gengetopt (devel/gengetopt) Updated: 3 years, 7 months ago Add to my watchlist

Generates a C function that uses getopt_long function

This program generates a C function that uses getopt_long function to parse the command line options, to validate them and fills 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.

Version: 2.23 License: GPL-3+ GitHub
Displaying statistics for 1,128 users who made submissions during: until

Statistics for selected duration

2025-Sep-15 to 2025-Oct-15


Total Installations 10
Requested Installations 7


macOS Versions

Loading Chart

Port Versions

Loading Chart



Xcode Versions

Loading Chart

CLT Versions

Loading Chart



Variants table

Variants Count


Monthly Statistics

Can remain cached for up to 24 hours