Annotation of 42BSD/ingres/source/gutil/itoa.c, revision 1.1.1.1

1.1       root        1: # include      <sccs.h>
                      2: 
                      3: SCCSID(@(#)itoa.c      7.1     2/5/81)
                      4: 
                      5: /*
                      6: **  ITOA -- integer to ascii conversion
                      7: */
                      8: 
                      9: itoa(i, a)
                     10: register int   i;
                     11: register char  *a;
                     12: {
                     13:        register char   *j;
                     14:        char            b[6];
                     15: 
                     16:        if (i < 0)
                     17:        {
                     18:                *a++ = '-';
                     19:                i = -i;
                     20:        }
                     21:        j = &b[5];
                     22:        *j-- = 0;
                     23:        do
                     24:        {
                     25:                *j-- = i % 10 + '0';
                     26:                i /= 10;
                     27:        } while (i);
                     28:        do
                     29:        {
                     30:                *a++ = *++j;
                     31:        } while (*j);
                     32:        return (0);
                     33: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.