annotate src/libsys/sprintf/sprintf.c @ 97:80e3a78126ac

gcc/ld-script.src: .bss_dar moved to the beginning of XRAM
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 21 Jul 2018 02:10:28 +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 }