|
|
1.1 ! root 1: /* ! 2: * libc/stdio/sprintf.c ! 3: * ANSI-compliant C standard i/o library. ! 4: * sprintf() ! 5: * ANSI 4.9.6.5. ! 6: * Formatted print into given string. ! 7: */ ! 8: ! 9: #include <stdio.h> ! 10: #include <stdarg.h> ! 11: ! 12: int ! 13: sprintf(s, format) char *s; const char *format; ! 14: { ! 15: va_list args; ! 16: register int count; ! 17: FILE file; ! 18: _FILE2 file2; ! 19: ! 20: file._f2p = &file2; ! 21: va_start(args, format); ! 22: _stropen(s, -1, &file); ! 23: count = vfprintf(&file, format, args); ! 24: putc('\0', &file); ! 25: return count; ! 26: } ! 27: ! 28: /* end of libc/stdio/sprintf.c */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.