----- Original Message ----- From: Craig McLean <[EMAIL PROTECTED]> Date: Sunday, January 4, 2004 9:02 pm Subject: [clug-talk] Some C programming Questions
> I've been doing some more C coding lately, and have some questions. > > First is there any standardized way of parsing command line inputs > to a C > program. I rummaged around the C standard looking for some magic > librarythat makes command line input parsing not suck, but there > isn't anything. > Is there some well used external library I can grab and use to ease > commandline input parsing in C programs? > Use "getopt". man 3 getopt > Second why is signal.h and signal handling in general part of the C > standard? C is a generic platform independent language. It is > surprisingto me that something as UNIX specific as signals is part > of ANSI C. Is the > notion of signals more widespread then I thought, or is this just a > historical artifact related to C's heritage as the UNIX systems > programminglanguage? > From: The Standard C Library, Prentice Hall, P. J. Plaugher "The C standard had to weaken the already weak semantics of UNIX signals to accomodate an assortment of operating systems: - A given signal may never occur unless you report it with raise. - A given signal will be ignored unless you call signal to turn it on." It goes on to say that the ansi standard reduces the number of types of signal from UNIX and that use of signal is inherently non-portable. _______________________________________________ clug-talk mailing list [EMAIL PROTECTED] http://clug.ca/mailman/listinfo/clug-talk_clug.ca

