11/*
2- ** $Id: liolib.c,v 2.125 2014/05/21 15:24:21 roberto Exp roberto $
2+ ** $Id: liolib.c,v 2.126 2014/06/02 03:00:51 roberto Exp roberto $
33** Standard I/O (and system) library
44** See Copyright Notice in lua.h
55*/
@@ -402,11 +402,11 @@ static int test2 (RN *rn, const char *set) {
402402
403403
404404/*
405- ** Read a sequence of (hexa )digits
405+ ** Read a sequence of (hex )digits
406406*/
407- static int readdigits (RN * rn , int hexa ) {
407+ static int readdigits (RN * rn , int hex ) {
408408 int count = 0 ;
409- while ((hexa ? isxdigit (rn -> c ) : isdigit (rn -> c )) && nextc (rn ))
409+ while ((hex ? isxdigit (rn -> c ) : isdigit (rn -> c )) && nextc (rn ))
410410 count ++ ;
411411 return count ;
412412}
@@ -426,21 +426,21 @@ static int readdigits (RN *rn, int hexa) {
426426static int read_number (lua_State * L , FILE * f ) {
427427 RN rn ;
428428 int count = 0 ;
429- int hexa = 0 ;
429+ int hex = 0 ;
430430 char decp [2 ] = "." ;
431431 rn .f = f ; rn .n = 0 ;
432432 decp [0 ] = getlocaledecpoint (); /* get decimal point from locale */
433433 l_lockfile (rn .f );
434434 do { rn .c = l_getc (rn .f ); } while (isspace (rn .c )); /* skip spaces */
435435 test2 (& rn , "-+" ); /* optional signal */
436436 if (test2 (& rn , "0" )) {
437- if (test2 (& rn , "xX" )) hexa = 1 ; /* numeral is hexadecimal */
437+ if (test2 (& rn , "xX" )) hex = 1 ; /* numeral is hexadecimal */
438438 else count = 1 ; /* count initial '0' as a valid digit */
439439 }
440- count += readdigits (& rn , hexa ); /* integral part */
440+ count += readdigits (& rn , hex ); /* integral part */
441441 if (test2 (& rn , decp )) /* decimal point? */
442- count += readdigits (& rn , hexa ); /* fractionary part */
443- if (count > 0 && test2 (& rn , (hexa ? "pP" : "eE" ))) { /* exponent mark? */
442+ count += readdigits (& rn , hex ); /* fractional part */
443+ if (count > 0 && test2 (& rn , (hex ? "pP" : "eE" ))) { /* exponent mark? */
444444 test2 (& rn , "-+" ); /* exponent signal */
445445 readdigits (& rn , 0 ); /* exponent digits */
446446 }
0 commit comments