annotate src/libsys/sprintf/sprintf.c @ 188:049091077b51

doc/Compiling: update for gtm900mgc
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 15 Feb 2020 20:58:01 +0000
parents 425ab6d987f3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
86
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #include <stdarg.h>
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 int
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 sprintf(char *strdest, char *fmt, ...)
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 {
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 va_list ap;
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 int len;
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 va_start(ap, fmt);
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 len = vsprintf(strdest, fmt, ap);
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 va_end(ap);
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 return(len);
425ab6d987f3 src/libsys: pieced together from Citrine
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 }