A package was submitted to savannah.nongnu.org
This mail was sent to [EMAIL PROTECTED], [EMAIL PROTECTED]


Damien CASSOU <[EMAIL PROTECTED]> described the package as follows:
License: gpl
Other License: 
Package: C library to parse command line args
System name: libargs
Type: non-GNU

Description:
I would like to create a librairie that will parse all the command line options of a 
programm. It will be useful to avoid construction like this :

if ( (strcmp(argv[i], \"-h\") == 0) || (strcmp(argv[i], \"--help\") == 0) )
  {
    ...
  }
  else if ( (strcmp(argv[i], \"-l\") == 0) || (strcmp(argv[i], --licence\") == 0) )
  {
    ...
  }
...

which is not very maintainable. It will be for C programs and will use the GNU 
standards for options (short and long type args). It might use getopt_long but will be 
easyer than it because everything will be implemented in the library.
There are no sources at all for now.

I want user to do :
larg_add_argument(\'v\',\"version\",\"Print the version of this software\",version);
larg_add_argument(\'h\',\"help\",\"Print a short help message\",help)
...
(where version and help are the functions to run when the argument is passed)

Prototype might be :
void larg_add_argument(char shortArg, char *longArg, char *desc, void (*func)());

Hoping that my project will be accepted


Other Software Required:
stdlib.h stdio.h string.h...
maybe : getopt.h unistd.h

Other Comments:




_______________________________________________
Savannah-hackers mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/savannah-hackers

Reply via email to