On 11/12/18, Carl Eugen Hoyos <ceffm...@gmail.com> wrote:
> 2018-11-11 17:41 GMT+01:00, Paul B Mahol <one...@gmail.com>:
>
>> +static long long scanexp(FFFILE *f, int pok)
>> +{
>> +    int c;
>> +    int x;
>> +    long long y;
>> +    int neg = 0;
>> +
>> +    c = shgetc(f);
>> +    if (c=='+' || c=='-') {
>> +        neg = (c=='-');
>> +        c = shgetc(f);
>> +        if (c-'0'>=10U && pok) shunget(f);
>> +    }
>> +    if (c-'0'>=10U) {
>> +        shunget(f);
>> +        return LLONG_MIN;
>> +    }
>> +    for (x=0; c-'0'<10U && x<INT_MAX/10; c = shgetc(f))
>> +        x = 10*x + c-'0';
>> +    for (y=x; c-'0'<10U && y<LLONG_MAX/100; c = shgetc(f))
>> +        y = 10*y + c-'0';
>> +    for (; c-'0'<10U; c = shgetc(f));
>> +    shunget(f);
>> +    return neg ? -y : y;
>> +}
>
> Did you write this function?

No

> The style looks a little unusual for FFmpeg...

Yes
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to