#: 5762 S15/Hot Topics
01-Aug-90 17:48:04
Sb: #5755-OSK - passwords?
Fm: Scott t. Griepentrog 72427,335
To: Mark Griffith 76070,41
>no one but you have seen these
A large number of people (okay, about 5 or 6 I know of) have and are using the
libraries I wrote. I was planning on uploading the entire set anyways, I'll
just get to it a little faster now.
My replacement for printf is not something I revel in. That is an example of a
case where I have had to follow the "OS9" standard of using writeln/ readln
calls, but needed to adjust to zero terminated strings used in C. I have two
functions, rdln() and wrln(), which are exact replacements of the standard
readln() and writeln(), except that they take 0 termination. I use these
primarily, instead of printf, as a lot of stuff is line based and works a heck
of a lot faster without the extra overhead of printf and standard i/o. I have
duplicates to these routines which work the same in Unix and PC.
For conversion of numeric variables to their ascii expressions, I have the
routines char *dec(num,digits), and decl(), hex, hexl(). I tend to build
strings into a buffer with strcpy and then wrln() it. I suppose I could write
a routine to handle this a little easier, but it would seldom be useful as the
overhead would again be there. I will admit to using sprintf() on a few
occasions where space/speed is not a consideration.
As for input routines, I always write routines to do the specific function
required. That way I don't have to contend with scanf's oddities.
StG
|