mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-12-08 21:06:08 +00:00
more versatile
SCCS-file: scheck.c SCCS-SID: 7.6
This commit is contained in:
committed by
Paul Eggert
parent
cc39bbb7fb
commit
ef3e352a39
8
scheck.c
8
scheck.c
@ -29,6 +29,7 @@ char * format;
|
||||
register char * tp;
|
||||
register int c;
|
||||
register char * result;
|
||||
char dummy;
|
||||
|
||||
if (string == NULL || format == NULL)
|
||||
return "";
|
||||
@ -59,9 +60,14 @@ char * format;
|
||||
}
|
||||
if (c != '\0')
|
||||
result = "";
|
||||
else if (sscanf(string, fbuf) != EOF)
|
||||
else {
|
||||
*(tp - 1) = '%';
|
||||
*tp++ = 'c';
|
||||
*tp++ = '\0';
|
||||
if (sscanf(string, fbuf, &dummy) == 1)
|
||||
result = "";
|
||||
else result = format;
|
||||
}
|
||||
free(fbuf);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user