BSD Ports

devel/gengetopt 2.23_1 DragonFly

Tool for generating a C function which parses command line arguments

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
GPLv3+
Categories
devel
Package size
230.1 KiB, 1087.2 KiB installed

Description

This program generate a C function that uses getopt_long function to parse the command line options, validate them and fill a struct.

Thus your program can now handle options such as:

myprog --input foo.c -o foo.o --no-tabs -i 100 \*.class

And both long options (those that start with --) and short options (start with - and consist of only one character) can be handled. For standards about short and long options you may want to take a look at the GNU Coding Standards.

In the other systems

SystemPortVersion
DragonFlydevel/gengetopt2.23_1
FreeBSDdevel/gengetopt2.23.1
OpenBSDdevel/gengetopt2.23.1
NetBSDdevel/gengetopt2.22.6
MidnightBSDdevel/gengetopt2.23_1
HardenedBSDdevel/gengetopt2.23.1
GhostBSDdevel/gengetopt2.23_1

Install

Binary package:

pkg install gengetopt

From DPorts:

cd /usr/dports/devel/gengetopt && make install clean

Dependencies

Run dependencies 1

No port depends on this one.