2 * Convert a string to an integer.
14 long long atoi( char *str )
16 char *p = str, *pe = str + strlen( str );
27 val = val * 10 + (fc - '0');
31 ( '-'@see_neg | '+' )? ( digit @add_digit )+
34 # Initialize and execute.
42 if ( cs < atoi_first_final )
43 fprintf( stderr, "atoi: there was an error\n" );
54 while ( fgets( buf, sizeof(buf), stdin ) != 0 ) {
55 long long value = atoi( buf );
56 printf( "%lld\n", value );