Subversion Repositories Kolibri OS

Rev

Rev 8793 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8793 Rev 9529
Line 169... Line 169...
169
        if (ch == EOF) return EOF;
169
        if (ch == EOF) return EOF;
170
    };
170
    };
Line 171... Line 171...
171
 
171
 
172
    if (ch == '0')  // octal or hex, read next
172
    if (ch == '0')  // octal or hex, read next
173
    {
-
 
174
        base = 8;
173
    {
175
        ch = vgetc(save, src);
174
        ch = vgetc(save, src);
-
 
175
        if (ch == 'c' || ch == 'C')
-
 
176
            base = 8;
-
 
177
        else if (ch == 'x' || ch == 'X')
-
 
178
            base = 16;
176
        if (ch == EOF || isspace(ch))
179
        if (base == 10)
177
            have_digits++;
180
            have_digits++;
178
        else
-
 
179
        if (ch == 'x' || ch == 'X')
181
        else
-
 
182
        {
-
 
183
            char tch = vgetc(save, src);
-
 
184
            if ((base == 8 && isdigit(tch) && tch < '8') ||
180
        {
185
                (base == 16 && isxdigit(tch)))
-
 
186
                ch = tch;
-
 
187
            else
181
            base = 16;
188
            {
-
 
189
                have_digits++;
182
            ch = vgetc(save, src);
190
                //base = 10; // not required: zero is zero with any (base > 1)
-
 
191
                vungetc(save, tch, src);
183
            if (ch == EOF) return EOF;
192
            }
184
        }
193
        }
185
    }
194
    }
186
    *digit = 0;
195
    *digit = 0;
187
    for (;;)
196
    for (;;)