Category : C Source Code
Archive   : CSRC2.ZIP
Filename : SSCANF.C

Output of file : SSCANF.C contained in archive : CSRC2.ZIP
* s s c a n . c
* Formatted numeric input



title sscanf Formatted Numeric Input
index Formatted input conversion

char *
sscanf(buffer, format, arg1, ...);
char *buffer;
char *format;

sscanf() parses the input string, in buf, according to the indicated
format descriptor, storing the results in the pointer arguments.
It returns the number of successfully assigned input items.

See the description of scanf() for further documentation.


Sscanf() returns -1 if the end of the input string was detected
and no data was stored. It returns -2 if a palpably
incorrect format, such as "%" is encountered.




sscanf(buffer, format, args)
char *buffer;
char *format;
* Formatted conversion
FILE dummyiov;
register FILE *fd;

fd = &dummyiov;
fd->_flag = _IOSTRG | _IOWRT;
fd->_base = buffer;
fd->_ptr = buffer;
fd->_cnt = strlen(buffer);
return(c_doscan(fd, format, &args));

  3 Responses to “Category : C Source Code
Archive   : CSRC2.ZIP
Filename : SSCANF.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: