summaryrefslogtreecommitdiff
path: root/libc/src/xscanf.c
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-02-05 13:05:37 -0800
committerPixel <pixel@nobis-crew.org>2011-02-05 13:05:37 -0800
commit078b4ccf0b65d655d81e9f4fc6e1284773e1dda4 (patch)
treedadfbf7c2ae6d81d48bb402da57721592a3a7d45 /libc/src/xscanf.c
parentb6378c65dbad497cab13c3551e89b9bbbef2602b (diff)
Re-structured the *scanf and *printf functions.
Diffstat (limited to 'libc/src/xscanf.c')
-rwxr-xr-xlibc/src/xscanf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/xscanf.c b/libc/src/xscanf.c
index ad6f190..d121722 100755
--- a/libc/src/xscanf.c
+++ b/libc/src/xscanf.c
@@ -11,7 +11,7 @@
* VAL(a) leads to 1 if a is true and valid
*/
#define NEXT(c) ((c)=xgetc(opaque),size++,incount++)
-#define PREV(c) do{if((c)!=EOF)xungetc((c),opaque);size--;incount--;}while(0)
+#define PREV(c) do{if((c)!=EOF)xungetc(opaque,(c));size--;incount--;}while(0)
#define VAL(a) ((a)&&size<=width)
#ifdef NOFLOATINGPOINT
@@ -30,7 +30,7 @@ static const unsigned char undef[3][sizeof(double)]= /* Undefined numeric values
};
#endif
-int vxscanf(int (*xgetc)(void *),void (*xungetc)(int,void*),void *opaque,const char *format,va_list args)
+int vxscanf(int (*xgetc)(void *),void (*xungetc)(void*,int),void *opaque,const char *format,va_list args)
{
size_t blocks=0,incount=0;
int c=0;