l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2001 Dec 30 17:10

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] GPL license clarification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] GPL license clarification

On Wed, 12 Sep 2001, Micah Cowan wrote:

> What exactly was it that was inflexible about your curent getopt
> implementation?

The version that comes with DJGPP is the BSD version of getopt.  All
"-x [optarg]" arguments are required to come before the arguments that do
not have any "-x" in front.  For example, if I have:

   while(1) {
      int c = getopt(argc, argv, "-o:");
      if(c == EOF) break;

      switch(c) {
         case 'o':
            printf("Output filename should be \"%s\"\n", optarg);
         case 1:
            printf("Input filename should be \"%s\"\n", optarg);

And I type:

   % myprog -o outfile infile

I'll get the desired behavior in both BSD and GNU implementations.  
However, if I type:

   % myprog infile -o outfile

then I'll get the desired behavior only in the GNU implementation.

I think the BSD implementation is the POSIX-compliant behavior, but I
don't want to think about which options should come before what when I use
my program and I don't want the other users of my program to think about
such details either, you know?

For now, I'm using the GNU implementation and I think things are alright
as long as the program doesn't get distributed.  But if you *want* to
write your own version and release it with BSD license or public domain it
then I'll certainly appreciate it :)

Concerned for Peter and Rhonda,

Mark K. Kim
PGP key available upon request.

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!