# 2.11BSD#431 - /usr/ingres/source/gutil/oatoi.c

##### Functions

    oatoi             X

       1: /*
       2: **  OCTAL ASCII TO INTEGER CONVERSION
       3: **
       4: **	The ascii string 'a' which represents an octal number
       5: **	is converted to binary and returned.  Conversion stops at any
       6: **	non-octal digit.
       7: **
       8: **	Note that the number may not have a sign, and may not have
       9: **	leading blanks.
      10: **
      11: **	(Intended for converting the status codes in users(FILE))
      12: */
      13:
      14: oatoi(a)
      15: char    *a;
      16: {
      17:     register int    r;
      18:     register char   *p;
      19:     register char   c;
      20:
      21:     r = 0;
      22:     p = a;
      23:
      24:     while ((c = *p++) >= '0' && c <= '7')
      25:         r = (r << 3) | (c &= 7);
      26:
      27:     return (r);
      28: }

#### Defined functions

oatoi defined in line 14; used 4 times

- in /usr/ingres/source/dbu/create.c line 242
- in /usr/ingres/source/iutil/initucode.c line 461
- in /usr/ingres/source/support/creatdb.c line 1128
- in /usr/ingres/source/support/ingres.c line 748

Last modified: 1995-02-04 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 383 |