diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:49:11 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:49:11 +0000 |
commit | a153e2624e9e3e7b06fad207e8855bea617ac088 (patch) | |
tree | 61b33bfceb94acec99084a416397d2838018b160 /xkbscan.c | |
parent | ae4c01f83c60e931983c74d6285c6a22e3c33034 (diff) |
merge latest (4.3.99.16) from XFree86 (vendor) branch
Diffstat (limited to 'xkbscan.c')
-rw-r--r-- | xkbscan.c | 33 |
1 files changed, 18 insertions, 15 deletions
@@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/xkbcomp/xkbscan.c,v 3.11 2002/06/05 00:00:38 dawes Exp $ */ +/* $XFree86: xc/programs/xkbcomp/xkbscan.c,v 3.12 2003/08/06 14:04:05 eich Exp $ */ #include <stdio.h> #include <ctype.h> @@ -173,34 +173,37 @@ int ch; int tmp,stop; ch = stop = 0; if (((tmp=getc(yyin))!=EOF) && (isdigit(tmp)) && - (tmp!='8') && (tmp!='9')) { + (tmp!='8') && (tmp!='9')) { ch= (ch*8)+(tmp-'0'); } else { stop= 1; ungetc(tmp,yyin); } - if ((!stop) && ((tmp=getc(yyin))!=EOF) && (isdigit(tmp)) && + if (!stop) { + if (((tmp=getc(yyin))!=EOF) && (isdigit(tmp)) && (tmp!='8') && (tmp!='9')) { - ch= (ch*8)+(tmp-'0'); - } - else { - stop= 1; - ungetc(tmp,yyin); + ch= (ch*8)+(tmp-'0'); + } + else { + stop= 1; + ungetc(tmp,yyin); + } } - if ((!stop) && ((tmp=getc(yyin))!=EOF) && (isdigit(tmp)) && + if (!stop) { + if (((tmp=getc(yyin))!=EOF) && (isdigit(tmp)) && (tmp!='8') && (tmp!='9')) { - ch= (ch*8)+(tmp-'0'); - } - else { - stop= 1; - ungetc(tmp,yyin); + ch= (ch*8)+(tmp-'0'); + } + else { + stop= 1; + ungetc(tmp,yyin); + } } } } else return ERROR_TOK; } - if ( nInBuf < BUFSIZE-1 ) buf[nInBuf++] = ch; } |