Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!zaphod.mps.ohio-state.edu!think.com!paperboy!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: Flags with more than one letter Message-ID: <15843@smoke.brl.mil> Date: 16 Apr 91 01:22:38 GMT References: <1991Apr10.132106.4122@fmrco> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 13 In article <1991Apr10.132106.4122@fmrco> harold@fmrco (Harold Naparst) writes: >How do you pass flags to main() with more than one letter? >I am using getopt, and it only allows flags with one letter. >Is there another option parsing program I should know >about ? There are three parts to the answer: (1) getopt() implements the official Command Syntax Standard, to which your applications should conform if at all feasible. (2) There have been more elaborate argument parsers posted to the net from time to time. (3) Any C program can examine its arguments directly; consult any decent C textbook for examples.