Category : C Source Code
Archive   : SC88.ZIP
Filename : ITOO.C
** itoo -- converts nbr to octal string of length sz
** right adjusted and blank filled, returns str
**
** if sz > 0 terminate with null byte
** if sz = 0 find end of string
** if sz < 0 use last byte for data
*/
itoo(nbr, str, sz) int nbr; char str[]; int sz; {
int digit;
if(sz>0) str[--sz]=0;
else if(sz<0) sz = -sz;
else while(str[sz]!=0) ++sz;
while(sz) {
digit=nbr&7; nbr=(nbr>>3)&8191;
str[--sz]=digit+48;
if(nbr==0) break;
}
while(sz) str[--sz]=' ';
return str;
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/