*(workptr = work+14) = '\0'; /* generate digits in reverse order */
do
*(--workptr) = '0'+ *(lmod(temp,absval,ten) + 3);
while
(lcomp(ldiv(absval,absval,ten),zero) > 0);
strcpy(rptr,workptr);
return(result);
}
/* lassign(ldest,lsource) assigns long lsource to ldest, returns
ptr to ldest */
char *lassign(ldest,lsource)
unsigned *ldest, *lsource;
{
*ldest++ = *lsource++; /* copy first two bytes */
*ldest = *lsource; /* then last two */
return(ldest);
}
/* ltou(l) converts long l to an unsigned (by truncating) */
utol(l,u)
char l[];
unsigned u;
{
itol(l, u & 0x7FFF); /* convert integer part */
if(u > 0x7FFF) l[2] += 0x80; /* take care of leftmost bit */
return(l);
}