Subversion Repositories Kolibri OS

Rev

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

Rev 1906 Rev 3065
Line 297... Line 297...
297
		if (!*s)
297
		if (!*s)
298
			goto ret;
298
			goto ret;
299
		}
299
		}
300
	s0 = s;
300
	s0 = s;
301
	y = z = 0;
301
	y = z = 0;
302
	for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
302
	for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) {
-
 
303
		if (nd < DBL_DIG + 1) {
303
			if (nd < 9)
304
			if (nd < 9)
304
				y = 10*y + c - '0';
305
				y = 10*y + c - '0';
305
		else if (nd < 16)
306
			else
306
				z = 10*z + c - '0';
307
				z = 10*z + c - '0';
-
 
308
		}
-
 
309
        }
307
	nd0 = nd;
310
	nd0 = nd;
308
	if (strncmp (s, _localeconv_r (ptr)->decimal_point,
311
	if (strncmp (s, _localeconv_r (ptr)->decimal_point,
309
		     strlen (_localeconv_r (ptr)->decimal_point)) == 0)
312
		     strlen (_localeconv_r (ptr)->decimal_point)) == 0) {
310
		{
-
 
311
		decpt = 1;
313
		decpt = 1;
312
		c = *(s += strlen (_localeconv_r (ptr)->decimal_point));
314
		c = *(s += strlen (_localeconv_r (ptr)->decimal_point));
313
		if (!nd) {
315
		if (!nd) {
314
			for(; c == '0'; c = *++s)
316
			for(; c == '0'; c = *++s)
315
				nz++;
317
				nz++;
Line 323... Line 325...
323
			}
325
			}
324
		for(; c >= '0' && c <= '9'; c = *++s) {
326
		for(; c >= '0' && c <= '9'; c = *++s) {
325
 have_dig:
327
 have_dig:
326
			nz++;
328
			nz++;
327
			if (c -= '0') {
329
			if (c -= '0') {
328
				nf += nz;
330
				for(i = 1; i < nz; i++) {
329
				for(i = 1; i < nz; i++)
331
					if (nd <= DBL_DIG + 1) {
330
					if (nd++ < 9)
332
						if (nd + i < 10)
331
							y *= 10;
333
							y *= 10;
332
					else if (nd <= DBL_DIG + 1)
334
						else
333
							z *= 10;
335
							z *= 10;
-
 
336
					}
-
 
337
				}
-
 
338
				if (nd <= DBL_DIG + 1) {
334
				if (nd++ < 9)
339
					if (nd + i < 10)
335
						y = 10*y + c;
340
						y = 10*y + c;
336
				else if (nd <= DBL_DIG + 1)
341
					else
337
						z = 10*z + c;
342
						z = 10*z + c;
-
 
343
				}
-
 
344
				if (nd <= DBL_DIG + 1) {
-
 
345
					nf += nz;
-
 
346
					nd += nz;
-
 
347
				}
338
				nz = 0;
348
				nz = 0;
339
				}
349
				}
340
			}
350
			}
341
		}
351
		}
342
 dig_done:
352
 dig_done: