1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-12-08 20:25:13 +00:00

more versatile

SCCS-file: scheck.c
SCCS-SID: 7.6
This commit is contained in:
Arthur David Olson
1986-01-21 09:00:18 -05:00
committed by Paul Eggert
parent cc39bbb7fb
commit ef3e352a39

View File

@ -29,6 +29,7 @@ char * format;
register char * tp; register char * tp;
register int c; register int c;
register char * result; register char * result;
char dummy;
if (string == NULL || format == NULL) if (string == NULL || format == NULL)
return ""; return "";
@ -59,9 +60,14 @@ char * format;
} }
if (c != '\0') if (c != '\0')
result = ""; result = "";
else if (sscanf(string, fbuf) != EOF) else {
result = ""; *(tp - 1) = '%';
else result = format; *tp++ = 'c';
*tp++ = '\0';
if (sscanf(string, fbuf, &dummy) == 1)
result = "";
else result = format;
}
free(fbuf); free(fbuf);
return result; return result;
} }