comparison th_string.c @ 298:86fe17a2ed81

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 22 Feb 2016 18:29:53 +0200
parents bd10af062702
children 0311f139fcf6
comparison
equal deleted inserted replaced
297:bd10af062702 298:86fe17a2ed81
280 280
281 // Get field width 281 // Get field width
282 while (th_isdigit(*fmt)) 282 while (th_isdigit(*fmt))
283 f_width = f_width * 10 + (*fmt++ - '0'); 283 f_width = f_width * 10 + (*fmt++ - '0');
284 284
285 // Check for precision 285 // Check for field precision
286 if (*fmt == '.') 286 if (*fmt == '.')
287 { 287 {
288 fmt++; 288 fmt++;
289 if (!th_isdigit(*fmt)) 289 if (!th_isdigit(*fmt))
290 return -103; 290 return -103;
291 291
292 // If no digit after '.', precision is to be 0
292 f_prec = 0; 293 f_prec = 0;
293 while (th_isdigit(*fmt)) 294 while (th_isdigit(*fmt))
294 f_prec = f_prec * 10 + (*fmt++ - '0'); 295 f_prec = f_prec * 10 + (*fmt++ - '0');
295 } 296 }
297
296 // Check for length modifiers (NOT SUPPORTED CURRENTLY) 298 // Check for length modifiers (NOT SUPPORTED CURRENTLY)
297 switch (*fmt) 299 switch (*fmt)
298 { 300 {
299 case 'l': 301 case 'l':
300 case 'L': 302 case 'L':