1: #
   2: # include   "../../ingres.h"
   3: # include   "../../symbol.h"
   4: # include   "../../pipes.h"
   5: # include   "IIglobals.h"
   6: 
   7: 
   8: /*
   9: **  INTEGER OUTPUT CONVERSION
  10: **
  11: **	The integer `i' is converted to ascii and put
  12: **	into the static buffer `buf'.  The address of `buf' is
  13: **	returned.
  14: */
  15: 
  16: char *IIitos(i1)
  17: int i1;
  18: {
  19:     register char   *a;
  20:     register int    i;
  21:     static char buf[7];
  22: 
  23:     i = i1;
  24:     if (i < 0)
  25:         i = -i;
  26: 
  27:     a = &buf[6];
  28:     *a-- = '\0';
  29:     do
  30:     {
  31:         *a-- = i % 10 + '0';
  32:         i /= 10;
  33:     } while (i);
  34:     if (i1 < 0)
  35:         *a-- = '-';
  36: 
  37:     a++;
  38:     return (a);
  39: }
Last modified: 1995-02-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1873
Valid CSS Valid XHTML 1.0 Strict