| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | [C] Fido Gateway |
From: "Kurt Kuzba"
From: Charles.Angelich!1.106.2000.0{at}filegate.net
> Now that Janis, Jon, and Bob have managed to make access
> available to the lowest on the food chain I am teaching my cat
> to use the function keys to post in the C_ECHO. She may as well
> have equal access along with the others, she isn't at the very
> _bottom_ of the food chain (think that's the amoeba?). Do we
> have a access point for the amoeba yet? If not Janis, Jon, and
> Bob can probably come up with something.
O mighty one! We, who are not worthy of your great presence in
our worthless and non-Fido email inbox, do not thumb our noses in
derision, but rather in awe and reverence of your superior wit
and intellect. We pass, not by reference, but by value, and offer
this bit of code gleaned from thy wisdom.
/*_|_| tstworth.c PUBLIC DOMAIN by Kurt Kuzba ( 11/10/2003 )
_|_|_| Simple example of testing input for validity in relation to _|_|_|
use of dynamically allocated string space. _|_|*/
#include
#include
#define INET NULL
#define DISDAIN 0;
char* MY_Input()
{
char* buf;
buf = malloc(64);
if(NULL != buf) fgets(buf, 64, stdin);
return buf;
}
int main(void)
{
char* testofworth = MY_Input();
int worthy_individual = (testofworth != INET);
printf("%s\n", (worthy_individual) ? testofworth : "Waste
Matter");
free(testofworth);
return DISDAIN;
}
/*_|_| end tstworth.c _|_|*/
I have never written better code. I hope Bob adopts it for
the Snippets collection. I am sure it is of infinite value for
people who need to manage system resources intelligently.
I learn so much here when worthy [_FIDO_] folk are contributing.
> kkuzba{at}centurytel.net http://home.centurytel.net/kkuzba
> and Pippin broke Rule 4 by putting most of the next day's
> allowance of wood on the fire.
--- BBBS/LiI v4.01 Flag-5
* Origin: Prism bbs (1:261/38)SEEN-BY: 633/267 270 @PATH: 261/38 123/500 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.