|
|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 362 (0x16a)
Types: TextFile
Notes: UNIX file
Names: »itoa.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
└─⟦2d53db1df⟧ UNIX Filesystem
└─⟦this⟧ »frankh/lib/itoa.c«
/*
* Convert interger to ascii string ( leading zeros )
* five places.
z */
#include <flib.h>
char *itoa(in, strng)
unsigned int in;
char *strng;
{
register int i;
unsigned int p;
p = 10000;
strng[0] = 32; /* lead off with a blank */
for(i = 1; i != 6; ++i) {
strng[i] = in / p + 0x30;
in = in - ( in / p ) * p;
p = p / 10;
}
return(strng);
}