home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
SSCANF.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
548b
|
38 lines
#define __SRC__
#include <stdio.h>
#include "lib.h"
static int sgetc(s)
unsigned char **s;
{
register unsigned char c;
c = *(*s)++;
return((c == '\0') ? EOF : c);
}
static int sungetc(c, s)
int c;
unsigned char **s;
{
if(c == EOF)
c = '\0';
return(*--(*s) = c);
}
int
sscanf(buf, fmt, arg)
const char *buf, *fmt;
int arg;
{
return(_scanf(&buf, sgetc, sungetc, fmt, &arg));
}
int
vsscanf(buf, fmt, arg)
const char *buf, *fmt;
char *arg;
{
return(_scanf(&buf, sgetc, sungetc, fmt, arg));
}