Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!maverick.ksu.ksu.edu!news From: proot@ksuvax1.cis.ksu.edu (Paul T. Root) Newsgroups: comp.unix.aix Subject: getopt (3) problem? Message-ID: <1990Sep12.011152.26067@maverick.ksu.ksu.edu> Date: 12 Sep 90 01:11:52 GMT Sender: news@maverick.ksu.ksu.edu (The News Guru) Organization: Kansas State University, Dept. of Computing and Information Sciences Lines: 21 In compiling and running some things, I have found that getopt doesn't act right. When it runs out of parameters instead of returning an EOF it returns a -1. I have called my Rep and he said he'd pass it along. I've used getopt quite a bit on Suns, Vax, PS/2's, 370's, so I don't think its operator error. The work around I use is like this: while(( c = getopt( argc, argv, "d:m" )), c != EOF && c != -1 ) { switch( c ) { . . . } } Keeping the world informed... Paul.