1: /* Copyright (c) 1979 Regents of the University of California */
   2: 
   3: static char sccsid[] = "@(#)EXPO.c 1.2 3/7/81";
   4: 
   5: long
   6: EXPO(value)
   7: 
   8:     double  value;
   9: {
  10:     register int retval;
  11:     register char *cp;
  12:     char sign, buf[30];
  13:     extern char *index();
  14: 
  15:     if (value == 0.0)
  16:         return 0;
  17:     sprintf(buf, "%.1e", value);
  18:     cp = index(buf, 'e') + 1;
  19:     sign = *cp++;
  20:     retval = 0;
  21:     while (*cp)
  22:         retval = retval * 10 + *cp++ - '0';
  23:     return sign == '-' ? -retval : retval;
  24: }

Defined functions

EXPO defined in line 5; used 2 times

Defined variables

sccsid defined in line 3; never used
Last modified: 1983-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 876
Valid CSS Valid XHTML 1.0 Strict