BSD Ports

devel/gengetopt 2.22.6 NetBSD

Command line parser generator

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
gnu-gpl-v3
Categories
devel
Package size
203.8 KiB, 1000.1 KiB installed

Description

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.

Gengetopt can also generate a function to save the command line options into a file, and a function to read the command line options from a file. Of course, these two kinds of files are compliant.

In the other systems

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

Install

Binary package:

pkgin install gengetopt

From pkgsrc:

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

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_642.22.6
NetBSD 10.1 aarch642.22.6
SmartOS / illumos x86_642.22.6
macOS 15 arm642.22.6

Dependencies

Required by 1