Logo Search packages:      
Sourcecode: vaiostat version File versions  Download package

int atoi ( char *  buff  ) 

convert string to integer

Parameters:
buff input buffer
Returns:
integer value

Definition at line 220 of file vaiostat.c.

Referenced by vaio_lcd_ctrl().

{
      int val = 0;
      int pos = 1;
      char *ptr = buff;

      while ( *ptr && (*ptr >= '0' && *ptr <= '9') ) ptr++;
      while ( ptr-- > buff ){
            val += (pos * (*ptr-'0'));
            pos *= 10;
      }
      return val;
}


Generated by  Doxygen 1.6.0   Back to index