017-atoi.c (413B)
1 /* atoi -> stdlib/atoi.c -> mes/abtol.c. Negative-sign and digit-loop 2 * paths in one fixture; printf is reused from 14-printf-mixed for the 3 * two %d round-trips, so a regression here that flips the sign bit 4 * surfaces immediately. */ 5 extern int atoi (char const *s); 6 extern int printf (char const *fmt, ...); 7 8 int 9 main (void) 10 { 11 printf ("%d\n", atoi ("123")); 12 printf ("%d\n", atoi ("-42")); 13 return 0; 14 }