/****** ChangeToString() Mark E. Schretlen 87-01-17 - converts a variable of type long to a string suitable for Amiga Text() subroutines for window output. *******/ #include #include char *ChangeToString(x) long x; { double fi; int dummy,sign; static char buffer[70] = "\0"; char *p; sign = dummy = 0; fi = (double)x; strcpy(buffer,""); p = &buffer[0]; /* Convert long to string with unix "fcvt" */ strins(p,fcvt(fi,0,&dummy,&sign)); if (sign) strins(p,"-"); /* insert neg. sign if necessary */ return(p); }