Rip out popt.

This commit is contained in:
Panu Matilainen 2007-07-05 16:59:34 +03:00
parent 769ad04453
commit 5275cce57b
71 changed files with 4 additions and 17966 deletions

View File

@ -102,7 +102,6 @@ splint:
-load lib/rpmlib.lcd \
-load rpmdb/rpmdb.lcd \
-load rpmio/rpmio.lcd \
-load popt/popt.lcd \
$(DEFS) $(INCLUDES) rpmqv.c $(rpmb_SOURCES)
.PHONY: lint
@ -113,8 +112,7 @@ lint:
`make -s sources -C rpmdb` \
`make -s sources -C rpmio` \
`make -s sources -C beecrypt` \
`make -s sources -C file/src` \
`make -s sources -C popt`
`make -s sources -C file/src`
CVSTAG = r$(subst .,-,$(VERSION))

View File

@ -38,28 +38,13 @@ fi
# XXX add missing config.rpath, kludgery around what's apparently
# gettext related stuff...
for d in . popt file; do
for d in . file; do
touch $d/config.rpath
done
if [ -d popt ]; then
(echo "--- popt"; cd popt; ./autogen.sh --noconfigure "$@")
fi
if [ -d zlib ]; then
(echo "--- zlib"; cd zlib; ./autogen.sh --noconfigure "$@")
fi
if [ -d beecrypt ]; then
(echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@")
fi
if [ -d elfutils ]; then
(echo "--- elfutils"; cd elfutils; ./autogen.sh --noconfigure "$@")
fi
if [ -d file ]; then
(echo "--- file"; cd file; ./autogen.sh --noconfigure "$@")
fi
if [ -d neon ]; then
(echo "--- neon"; cd neon; ./autogen.sh "$@")
fi
echo "--- rpm"
$libtoolize --copy --force

View File

@ -650,9 +650,6 @@ AC_CHECK_HEADERS(bzlib.h libio.h zlib.h)
AC_CHECK_HEADERS(err.h mcheck.h)
AC_CHECK_HEADERS(pthread.h)
dnl popt w float/double needs.
AC_CHECK_HEADERS(float.h)
AC_CHECK_HEADERS(glob.h)
dnl statfs portability fiddles.
@ -1294,11 +1291,7 @@ AC_SUBST(RPM)
AC_SUBST(OBJDUMP)
dnl XXX this causes popt to depend on zlib et al
dnl # XXX Propagate -lucb to popt ...
dnl export LIBS INCPATH CONFIG_SITE
AC_CONFIG_SUBDIRS(popt file db3)
AC_CONFIG_SUBDIRS(file db3)
AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt
rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
@ -1318,7 +1311,7 @@ AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt
python/rpm/Makefile
lua/Makefile
])
AC_CONFIG_COMMANDS([default],[[ echo timestamp > popt/stamp-h.in
AC_CONFIG_COMMANDS([default],[[
echo timestamp > stamp-h.in
]],[[]])

View File

@ -1,34 +0,0 @@
.deps
.depend
.libs
Doxyfile
Makefile
Makefile.in
aclocal.m4
autom4te*
config.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
doxygen
depcomp
install-sh
libtool
ltconfig
ltmain.sh
missing
stamp-h
stamp-h1
stamp-h.in
test1
test2
test3
*.la
*.lcd
*.lo
*.swp
popt-*.tar.gz

View File

@ -1,44 +0,0 @@
-I. -DHAVE_CONFIG_H -D_GNU_SOURCE
#+partial
+forcehints
-warnposix
+unixlib
-unrecogcomments # XXX ignore doxygen markings
+strict # lclint level
# --- in progress
+bounds
-bufferoverflowhigh
# --- +partial artifacts
# --- not-yet at strict level
-bitwisesigned # 75
-elseifcomplete # 18
-exportfcn # 25
-ifblock # 202
-namechecks # 206
-ptrarith # 43
-mustdefine # 10
-shiftimplementation # 120
-sys-dir-errors
-strictops # 16
-whileblock # 10
# --- not-yet at checks level
-mustfree # 52
-predboolptr # 62
-usedef # 1
# --- not-yet at standard level
-boolops # 112
-predboolint # 30
+charint # 3
+ignorequals # 13

View File

@ -1,324 +0,0 @@
Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project
is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do _not_
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
Quick configuration advice
==========================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias, message inheritance, automatic
charset conversion or plural form handling) as the implementation here.
It is also not possible to offer this additional functionality on top
of a `catgets' implementation. Future versions of GNU `gettext' will
very likely convey even more functionality. So it might be a good idea
to change to GNU `gettext' as soon as possible.
So you need _not_ provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
provides the GNU `gettext' functions. If not, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is _not_ required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --disable-nls
will respectively bypass any pre-existing `gettext' to use the
internationalizing routines provided within this package, or else,
_totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
The configuration process will not test for the `catgets' function
and therefore it will not be used. The reason is that even an
emulation of `gettext' on top of `catgets' could not provide all the
extensions of the GNU `gettext' library.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
and `CC' is an ISO 3166 two-letter country code. For example, let's
suppose that you speak German and live in Germany. At the shell
prompt, merely execute `setenv LANG de_DE' (in `csh'),
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
This can be done from your `.login' or `.profile' file, once and for
all.
You might think that the country code specification is redundant.
But in fact, some languages have dialects in different countries. For
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
country code serves to distinguish the dialects.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
understand other languages, you can set up a priority list of languages.
This is done through a different environment variable, called
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
for the purpose of message handling, but you still need to have `LANG'
set to the primary language; this is required by other parts of the
system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of
teams can be found at the Free Translation Project's homepage,
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
area.
If you'd like to volunteer to _work_ at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is _not_ the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
_actively_ in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of September
2001. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja
+----------------------------------------------------+
a2ps | [] [] [] |
bash | [] [] [] [] |
bfd | |
binutils | [] |
bison | [] [] [] [] [] |
clisp | [] [] [] [] |
cpio | [] [] [] [] [] |
diffutils | [] [] [] [] [] [] [] |
enscript | [] [] |
error | [] [] |
fetchmail | |
fileutils | [] [] [] [] [] [] [] [] |
findutils | [] [] [] [] [] [] [] [] |
flex | [] [] [] |
freetype | |
gas | |
gawk | [] [] |
gcal | |
gcc | |
gettext | [] [] [] [] [] [] [] [] [] [] |
gnupg | [] [] [] [] [] [] [] |
gprof | |
grep | [] [] [] [] [] [] [] [] |
hello | [] [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] |
indent | [] [] [] [] [] |
jpilot | [] |
kbd | |
ld | [] |
libc | [] [] [] [] [] [] [] [] |
lilypond | [] |
lynx | [] [] [] [] |
m4 | [] [] [] [] [] [] [] [] |
make | [] [] [] [] [] [] |
mysecretdiary | [] |
nano | [] [] [] |
opcodes | |
parted | [] [] [] |
ptx | [] [] [] [] [] [] [] |
python | |
recode | [] [] [] [] [] [] [] [] [] |
sed | [] [] [] [] [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] [] [] [] [] [] [] [] |
sharutils | [] [] [] [] [] [] [] [] |
sketch | |
soundtracker | [] [] [] |
sp | |
tar | [] [] [] [] [] [] [] [] |
texinfo | [] [] [] [] [] [] |
textutils | [] [] [] [] [] [] [] [] |
util-linux | [] [] |
wdiff | [] [] [] |
wget | [] [] [] [] [] [] [] [] [] [] |
+----------------------------------------------------+
bg cs da de el en eo es et fi fr gl he hr id it ja
0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18
ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
+----------------------------------------------------+
a2ps | [] [] [] | 6
bash | | 4
bfd | | 0
binutils | | 1
bison | [] | 6
clisp | [] | 5
cpio | [] [] [] [] [] | 10
diffutils | [] [] [] [] | 11
enscript | [] [] [] | 5
error | [] [] | 4
fetchmail | | 0
fileutils | [] [] [] [] [] [] [] [] [] | 17
findutils | [] [] [] [] [] [] [] [] | 16
flex | [] [] [] | 6
freetype | | 0
gas | | 0
gawk | [] | 3
gcal | | 0
gcc | | 0
gettext | [] [] [] [] [] [] [] [] | 18
gnupg | [] [] [] | 10
gprof | | 0
grep | [] [] [] [] | 12
hello | [] [] [] [] [] [] [] [] [] [] [] | 22
id-utils | [] [] [] | 6
indent | [] [] [] [] [] [] [] | 12
jpilot | | 1
kbd | [] | 1
ld | | 1
libc | [] [] [] [] [] [] [] [] | 16
lilypond | [] [] | 3
lynx | [] [] [] [] | 8
m4 | [] [] [] [] | 12
make | [] [] [] [] [] [] | 12
mysecretdiary | | 1
nano | [] | 4
opcodes | [] | 1
parted | [] [] | 5
ptx | [] [] [] [] [] [] [] [] | 15
python | | 0
recode | [] [] [] [] | 13
sed | [] [] [] [] [] [] [] | 19
sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21
sharutils | [] [] [] | 11
sketch | | 0
soundtracker | | 3
sp | | 0
tar | [] [] [] [] [] [] [] | 15
texinfo | [] | 7
textutils | [] [] [] [] [] [] [] [] | 16
util-linux | [] [] | 4
wdiff | [] [] [] [] | 7
wget | [] [] [] [] [] [] [] | 17
+----------------------------------------------------+
33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If September 2001 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites. The most
up-to-date matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
Using `gettext' in new packages
===============================
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
in particular that even non-free programs can use `libintl' as a shared
library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
Once the sources are changed appropriately and the setup can handle
to use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
`translation@iro.umontreal.ca' to make the `.pot' files available to
the translation teams.

View File

@ -1,46 +0,0 @@
1.5 -> 1.6
- add ability to perform callbacks for every, not just first, match.
1.3 -> 1.5
- heavy dose of const's
- poptParseArgvString() now NULL terminates the list
1.2.3 -> 1.3
- added support for single -
- misc bug fixes
- portability improvements
1.2.2 -> 1.2.3
- fixed memset() in help message generation (Dale Hawkins)
- added extern "C" stuff to popt.h for C++ compilers (Dale Hawkins)
- const'ified poptParseArgvString (Jeff Garzik)
1.2.1 -> 1.2.2
- fixed bug in chaind alias happens which seems to have only
affected --triggers in rpm
- added POPT_ARG_VAL
- popt.3 installed by default
1.2 -> 1.2.1
- added POPT_ARG_INTL_DOMAIN (Elliot Lee)
- updated Makefile's to be more GNUish (Elliot Lee)
1.1 -> 1.2
- added popt.3 man page (Robert Lynch)
- don't use mmap anymore (its lack of portability isn't worth the
trouble)
- added test script
- added support for exec
- removed support for *_POPT_ALIASES env variable -- it was a bad
idea
- reorganized into multiple source files
- added automatic help generation, POPT_AUTOHELP
- added table callbacks
- added table inclusion
- updated man page for new features
- added test scripts
1.0 -> 1.1
- moved to autoconf (Fred Fish)
- added STRERROR replacement (Norbert Warmuth)
- added const keywords (Bruce Perens)

View File

@ -1,22 +0,0 @@
Copyright (c) 1998 Red Hat Software
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.

View File

@ -1,475 +0,0 @@
# Doxyfile 1.0.0
# This file describes the settings to be used by doxygen for a project
#
# All text after a hash (#) is considered a comment and will be ignored
# The format is:
# TAG = value [value, ...]
# Values that contain spaces should be placed between quotes (" ")
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
# The PROJECT_NAME tag is a single word (or a sequence of word surrounded
# by quotes) that should identify the project.
PROJECT_NAME = @PACKAGE@
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = @VERSION@
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = doxygen
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# The default language is English, other supported languages are:
# Dutch, French, Italian, Czech, Swedish, German and Japanese
OUTPUT_LANGUAGE = English
# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
QUIET = NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated by doxygen. Possible values are YES and NO. If left blank
# NO is used.
WARNINGS = YES
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
DISABLE_INDEX = NO
# If the EXTRACT_ALL tag is set to YES all classes and functions will be
# included in the documentation, even if no documentation was available.
EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation.
EXTRACT_PRIVATE = NO
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members inside documented classes or files.
HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all
# undocumented classes.
HIDE_UNDOC_CLASSES = NO
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
# include brief member descriptions after the members that are listed in
# the file and class documentation (similar to JavaDoc).
# Set to NO to disable this.
BRIEF_MEMBER_DESC = YES
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
# the brief description of a member or function before the detailed description.
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
REPEAT_BRIEF = YES
# If the ALWAYS_DETAILS_SEC and REPEAT_BRIEF tags are both set to YES then
# Doxygen will generate a detailed section even if there is only a brief
# description.
ALWAYS_DETAILED_SEC = NO
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
# path before files name in the file list and in the header files. If set
# to NO the shortest path that makes the file name unique will be used.
FULL_PATH_NAMES = YES
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
# can be used to strip a user defined part of the path. Stripping is
# only done if one of the specified strings matches the left-hand part of
# the path.
STRIP_FROM_PATH = @POPT_SOURCE_PATH@/
# The INTERNAL_DOCS tag determines if documentation
# that is typed after a \internal command is included. If the tag is set
# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
INTERNAL_DOCS = NO
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
# generate a class diagram (in Html and LaTeX) for classes with base or
# super classes. Setting the tag to NO turns the diagrams off.
CLASS_DIAGRAMS = YES
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
# be generated. Documented entities will be cross-referenced with these sources.
SOURCE_BROWSER = YES
# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.
INLINE_SOURCES = NO
# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen
# will only generate file names in lower case letters. If set to
# YES upper case letters are also allowed. This is useful if you have
# classes or files whose names only differ in case and if your file system
# supports case sensitive file names.
CASE_SENSE_NAMES = NO
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
# will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES
# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen
# will interpret the first line (until the first dot) of a JavaDoc-style
# comment as the brief description. If set to NO, the Javadoc-style will
# behave just like the Qt-style comments.
JAVADOC_AUTOBRIEF = YES
# if the INHERIT_DOCS tag is set to YES (the default) then an undocumented
# member inherits the documentation from any documented member that it
# reimplements.
INHERIT_DOCS = YES
# if the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
INLINE_INFO = YES
# the TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
TAB_SIZE = 8
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = \
./findme.c \
./findme.h \
./popt.c \
./popt.h \
./poptconfig.c \
./popthelp.c \
./poptint.h \
./poptparse.c \
./system.h
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
FILE_PATTERNS = *.c *.h
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
RECURSIVE = NO
# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE =
# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories.
EXCLUDE_PATTERNS =
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).
EXAMPLE_PATH =
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
EXAMPLE_PATTERNS =
# The IMAGE_PATH tag can be used to specify one or more files or
# directories that contain image that are included in the documentation (see
# the \image command).
IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
# by executing (via popen()) the command <filter> <input-file>, where <filter>
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
# input file. Doxygen will then use the output that the filter program writes
# to standard output.
INPUT_FILTER =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# generate HTML output
GENERATE_HTML = YES
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
HTML_OUTPUT =
# The HTML_HEADER tag can be used to specify a personal HTML header for
# each generated HTML page. If it is left blank doxygen will generate a
# standard header.
HTML_HEADER =
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
# each generated HTML page. If it is left blank doxygen will generate a
# standard footer.
HTML_FOOTER =
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
# style sheet that is used by each HTML page. It can be used to
# fine-tune the look of the HTML output. If the tag is left blank doxygen
# will generate a default style sheet
HTML_STYLESHEET =
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
HTML_ALIGN_MEMBERS = YES
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
# of the generated HTML documentation.
GENERATE_HTMLHELP = NO
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
# of all compounds will be generated. Enable this if the project
# contains a lot of classes, structs, unions or interfaces.
ALPHABETICAL_INDEX = NO
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])
COLS_IN_ALPHA_INDEX = 5
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
GENERATE_LATEX = NO
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `latex' will be used as the default path.
LATEX_OUTPUT =
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
# LaTeX documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_LATEX = NO
# The PAPER_TYPE tag can be used to set the paper type that is used
# by the printer. Possible values are: a4, a4wide, letter, legal and
# executive. If left blank a4wide will be used.
PAPER_TYPE = a4wide
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output.
EXTRA_PACKAGES =
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
# the generated latex document. The header should contain everything until
# the first chapter. If it is left blank doxygen will generate a
# standard header. Notice: only use this tag if you know what you are doing!
LATEX_HEADER =
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
PDF_HYPERLINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
GENERATE_MAN = YES
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `man' will be used as the default path.
MAN_OUTPUT =
# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
MAN_EXTENSION = .3
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
# evaluate all C-preprocessor directives found in the sources and include
# files.
ENABLE_PREPROCESSING = YES
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
# names in the source code. If set to NO (the default) only conditional
# compilation will be performed.
MACRO_EXPANSION = YES
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
SEARCH_INCLUDES = YES
# The INCLUDE_PATH tag can be used to specify one or more directories that
# contain include files that are not input files but should be processed by
# the preprocessor.
INCLUDE_PATH =
# The PREDEFINED tag can be used to specify one or more macro names that
# are defined before the preprocessor is started (similar to the -D option of
# gcc). The argument of the tag is a list of macros of the form: name
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
PREDEFINED =
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the
# PREDEFINED tag.
EXPAND_ONLY_PREDEF = NO
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
# The TAGFILES tag can be used to specify one or more tagfiles.
TAGFILES =
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.
GENERATE_TAGFILE =
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
# in the class index. If set to NO only the inherited external classes
# will be listed.
ALLEXTERNALS = NO
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the search engine
#---------------------------------------------------------------------------
# The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
SEARCHENGINE = NO
# The CGI_NAME tag should be the name of the CGI script that
# starts the search engine (doxysearch) with the correct parameters.
# A script with this name will be generated by doxygen.
CGI_NAME = search.cgi
# The CGI_URL tag should be the absolute URL to the directory where the
# cgi binaries are located. See the documentation of your http daemon for
# details.
CGI_URL =
# The DOC_URL tag should be the absolute URL to the directory where the
# documentation is located. If left blank the absolute path to the
# documentation, with file:// prepended to it, will be used.
DOC_URL =
# The DOC_ABSPATH tag should be the absolute path to the directory where the
# documentation is located. If left blank the directory on the local machine
# will be used.
DOC_ABSPATH =
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
# is installed.
BIN_ABSPATH = /usr/local/bin/
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
# documentation generated for other projects. This allows doxysearch to search
# the documentation for these projects as well.
EXT_DOC_PATHS =

View File

@ -1,64 +0,0 @@
# Makefile for popt library.
AUTOMAKE_OPTIONS = 1.4 foreign
LINT = splint
EXTRA_DIST = autogen.sh CHANGES $(man_MANS) \
testit.sh test-poptrc test3-data \
popt.ps
SUBDIRS = po
INCLUDES = -I. -I$(top_srcdir)
noinst_HEADERS = findme.h poptint.h system.h
noinst_PROGRAMS = test1 test2 test3
test1_SOURCES = test1.c
test1_LDFLAGS =
test1_LDADD = $(usrlib_LTLIBRARIES)
test2_SOURCES = test2.c
test2_LDFLAGS =
test2_LDADD = $(usrlib_LTLIBRARIES)
test3_SOURCES = test3.c
test3_LDFLAGS =
test3_LDADD = $(usrlib_LTLIBRARIES)
noinst_SCRIPTS = testit.sh
TESTS_ENVIRONMENT = \
test1="./test1"
TESTS = testit.sh
include_HEADERS = popt.h
usrlibdir = $(libdir)@MARK64@
usrlib_LTLIBRARIES = libpopt.la
libpopt_la_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c
libpopt_la_LDFLAGS = @INTLLIBS@
man_MANS = popt.3
#BUILT_SOURCES = popt.lcd
popt.lcd: Makefile.am ${libpopt_la_SOURCES} ${include_HEADERS} ${noinst_HEADERS}
lclint -dump $@ ${libpopt_la_SOURCES}
.PHONY: sources
sources:
@echo $(libpopt_la_SOURCES:%=popt/%)
.PHONY: lint
lint:
$(LINT) ${DEFS} ${INCLUDES} test1.c ${libpopt_la_SOURCES}
CVSTAG = $(PACKAGE)-$(subst .,_,$(VERSION))
.PHONY: doxygen
doxygen: Doxyfile
rm -rf doxygen
mkdir -p doxygen
doxygen

View File

@ -1,18 +0,0 @@
This is the popt command line option parsing library. While it is similiar
to getopt(3), it contains a number of enhancements, including:
1) popt is fully reentrant
2) popt can parse arbitrary argv[] style arrays while
getopt(2) makes this quite difficult
3) popt allows users to alias command line arguments
4) popt provides convience functions for parsing strings
into argv[] style arrays
popt is used by rpm, the Red Hat install program, and many other Red Hat
utilities, all of which provide excellent examples of how to use popt.
Complete documentation on popt is available in popt.ps (included in this
tarball), which is excerpted with permission from the book "Linux
Application Development" by Michael K. Johnson and Erik Troan (availble
from Addison Wesley in May, 1998).
Comments on popt should be addressed to ewt@redhat.com.

View File

@ -1,35 +0,0 @@
#!/bin/sh
srcdir="`dirname $0`"
test -z "$srcdir" && srcdir=.
THEDIR="`pwd`"
libtoolize=`which glibtoolize 2>/dev/null`
case $libtoolize in
/*) ;;
*) libtoolize=`which libtoolize 2>/dev/null`
case $libtoolize in
/*) ;;
*) libtoolize=libtoolize
esac
esac
cd "$srcdir"
$libtoolize --copy --force
aclocal
autoheader
automake -a -c
autoconf
if [ "$1" = "--noconfigure" ]; then
exit 0;
fi
cd "$THEDIR"
if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then
$srcdir/configure --prefix=/usr "$@"
else
$srcdir/configure "$@"
fi

View File

@ -1,97 +0,0 @@
AC_INIT(popt.h)
AC_CANONICAL_SYSTEM
AC_PREREQ(2.12)
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE(popt, 1.10.2.1)
ALL_LINGUAS="cs da de es eu_ES fi fr gl hu id is it ja ko no pl pt pt_BR ro ru sk sl sr sv tr uk wa zh zh_CN zh_TW"
AC_ISC_POSIX
AC_PROG_CC
AC_GCC_TRADITIONAL
AM_C_PROTOTYPES
AC_SYS_LARGEFILE
dnl AM_DISABLE_SHARED
AM_PROG_LIBTOOL
AC_PROG_INSTALL
if test "X$CC" = Xgcc; then
CFLAGS="-Wall $CFLAGS"
fi
dnl XXX lose rpm libs
LIBS=
addlib() {
l=$1
shift
case "$target" in
*-*-solaris*) LIBS="$LIBS -L$l -R $l $*";;
*) LIBS="$LIBS -L$l $*";;
esac
}
dnl
dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
dnl requires gcc). If it's not, don't rebuild dependencies -- use what was
dnl shipped with RPM.
dnl
if test X"$GCC" = "Xyes" ; then
TARGET="depend allprogs"
else
TARGET="everything"
#
# let the Makefile know that we're done with `depend', since we don't
# have gcc we're not going to rebuild our dependencies at all.
#
echo > .depend-done
fi
AC_SUBST(TARGET)
dnl XXX Choose /usr/lib or /usr/lib64 for library installs.
MARK64=
case "${target_cpu}" in
x86_64*|powerpc64*|ppc64*|sparc64*|s390x*) MARK64=64 ;;
esac
AC_SUBST(MARK64)
AC_CHECK_HEADERS(alloca.h float.h libintl.h mcheck.h unistd.h)
AC_MSG_CHECKING(for /usr/ucblib in LIBS)
if test -d /usr/ucblib ; then
if test "$build" = "mips-sni-sysv4" ; then
addlib /usr/ccs/lib -lc
fi
addlib /usr/ucblib
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if test ! -f ../rpm.c
then
AC_MSG_CHECKING(for GNU xgettext)
xgettext --version 2>&1 | grep 'GNU gettext' >/dev/null 2>&1 || AC_MSG_ERROR([
*** GNU gettext is required. The latest version
*** is always available from ftp://ftp.gnu.org/gnu/gettext/.])
AC_MSG_RESULT(yes)
fi
AC_CHECK_FUNC(setreuid, [], [
AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
])
AC_CHECK_FUNCS(getuid geteuid mtrace __secure_getenv setregid strerror)
AM_GNU_GETTEXT_VERSION([0.11.2])
AM_GNU_GETTEXT([external])
POPT_SOURCE_PATH="`pwd`"
AC_DEFINE_UNQUOTED(POPT_SOURCE_PATH, "$POPT_SOURCE_PATH",
[Full path to popt top_srcdir.])
AC_SUBST(POPT_SOURCE_PATH)
AC_OUTPUT([Doxyfile Makefile po/Makefile.in])

View File

@ -1,51 +0,0 @@
/** \ingroup popt
* \file popt/findme.c
*/
/* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING
file accompanying popt source distributions, available from
ftp://ftp.rpm.org/pub/rpm/dist. */
#include "system.h"
#include "findme.h"
const char * findProgramPath(const char * argv0)
{
char * path = getenv("PATH");
char * pathbuf;
char * start, * chptr;
char * buf;
if (argv0 == NULL) return NULL; /* XXX can't happen */
/* If there is a / in the argv[0], it has to be an absolute path */
if (strchr(argv0, '/'))
return xstrdup(argv0);
if (path == NULL) return NULL;
start = pathbuf = alloca(strlen(path) + 1);
buf = malloc(strlen(path) + strlen(argv0) + sizeof("/"));
if (buf == NULL) return NULL; /* XXX can't happen */
strcpy(pathbuf, path);
chptr = NULL;
/*@-branchstate@*/
do {
if ((chptr = strchr(start, ':')))
*chptr = '\0';
sprintf(buf, "%s/%s", start, argv0);
if (!access(buf, X_OK))
return buf;
if (chptr)
start = chptr + 1;
else
start = NULL;
} while (start && *start);
/*@=branchstate@*/
free(buf);
return NULL;
}

View File

@ -1,20 +0,0 @@
/** \ingroup popt
* \file popt/findme.h
*/
/* (C) 1998-2000 Red Hat, Inc. -- Licensing details are in the COPYING
file accompanying popt source distributions, available from
ftp://ftp.rpm.org/pub/rpm/dist. */
#ifndef H_FINDME
#define H_FINDME
/**
* Return absolute path to executable by searching PATH.
* @param argv0 name of executable
* @return (malloc'd) absolute path to executable (or NULL)
*/
/*@null@*/ const char * findProgramPath(/*@null@*/ const char * argv0)
/*@*/;
#endif

View File

@ -1,40 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.2 2002/02/10 21:14:38 jbj Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here

View File

@ -1,7 +0,0 @@
Makefile
Makefile.in
POTFILES
stamp-cat-id
cat-id-tbl.c
*.mo
*.gmo

View File

@ -1,6 +0,0 @@
2002-02-10 gettextize <bug-gnu-utils@gnu.org>
* Makefile.in.in: Upgrade to gettext-0.10.40.
* cat-id-tbl.c: Remove file.
* stamp-cat-id: Remove file.

View File

@ -1,196 +0,0 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datarootdir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CC = @CC@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
$(POFILES) $(GMOFILES)
POTFILES = \
CATALOGS = @CATALOGS@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo
.c.o:
$(COMPILE) $<
.po.pox:
$(MAKE) $(PACKAGE).pot
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ --keyword=POPT_ \
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(PACKAGE).po \
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext"; then \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $(srcdir)/$$cat as" \
"$(DESTDIR)$$dir/$(PACKAGE).mo"; \
fi; \
done
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
done
if test "$(PACKAGE)" = "gettext"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
check: all
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.new.po
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
cp -p $$dir/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(PACKAGE).pot
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
cd $(srcdir); \
catalogs='$(GMOFILES)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
mv -f $$lang.new.po $$lang.po; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$lang.new.po; \
fi; \
done
$(MAKE) update-gmo
update-gmo: Makefile $(GMOFILES)
@:
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,10 +0,0 @@
# List of files which contain translatable strings.
# Package source files
findme.c
popt.c
poptconfig.c
popthelp.c
poptparse.c
test1.c

View File

@ -1,112 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2001-07-24 00:03+0100\n"
"Last-Translator: Milan Kerslager <kerslage@linux.cz>\n"
"Language-Team: Czech <cs@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "neznámé èíslo chyby"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "volba (%d) není v popt implementována\n"
#: popt.c:1184
msgid "missing argument"
msgstr "chybí argument"
#: popt.c:1186
msgid "unknown option"
msgstr "neznámá volba"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "po¾adovány vzájemnì výluèné logické operace"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg nesmí být NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "aliasy vnoøené pøíli¹ hluboko"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "chyba v quotování parametrù"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "chybná numerická hodnota"
#: popt.c:1198
msgid "number too large or too small"
msgstr "èíslo je pøíli¹ velké nebo pøíli¹ malé"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "selhala alokace pamìti"
#: popt.c:1204
msgid "unknown error"
msgstr "neznámá chyba"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Vypí¹e tuto nápovìdu"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Vypí¹e krátký návod k pou¾ití"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "Zobrazit implicitní volby ve zprávì"
#: popthelp.c:124
msgid "NONE"
msgstr "NONE"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Pou¾ití:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[VOLBY...]"

View File

@ -1,114 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: Sun Jan 21 2001 04:30:32+0200\n"
"Last-Translator: Martin Hansen <mah@k64.dk>\n"
"Language-Team: Dansk <dansk@klid.dk>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
"X-Generator: KTranslator v 0.6.0\n"
#: popt.c:35
msgid "unknown errno"
msgstr "ukendt fejlnr."
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "tilvalgstype (%d) er ikke implementeret i popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "mangler argument"
#: popt.c:1186
msgid "unknown option"
msgstr "ukendt tilvalg"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "de ønskede handlinger udelukker hinanden"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "aliaser er for dybt indlejret"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "fejl i parameter citering"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "ugyldig numerisk værdi"
#: popt.c:1198
msgid "number too large or too small"
msgstr "nummer for stort, eller for lille"
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr "ukendt fejl"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Vis denne hjælpemeddelelse"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Vis kortfattet brugsanvisning"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Vis kortfattet brugsanvisning"
#: popthelp.c:124
msgid "NONE"
msgstr "INGEN"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Brug:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[TILVALG...]"

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,118 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Leandro Lucarella <luca@linuxmendoza.org.ar>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr "errno desconocido"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "tipo de opcin (%d) no implementada en popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "falta argumento"
#: popt.c:1186
msgid "unknown option"
msgstr "opcin desconocida"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "requerida operacin lgica mutuamente exclusiva"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "alias anidados muy profundamente"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "error en cita de parmetros"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "valor numrico invlido"
#: popt.c:1198
msgid "number too large or too small"
msgstr "nmero muy largo o muy pequeo"
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr "error desconocido"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Muestra este mensaje de ayuda"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Indica el modo de uso resumido"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Indica el modo de uso resumido"
#: popthelp.c:124
msgid "NONE"
msgstr "NONE"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Modo de Uso:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[OPCIN...]"

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,122 +0,0 @@
# A French translation for rpm messages
# Copyright (C) 2003 Free Software Foundation, Inc.
# This file is distributed under the same license as the RPM package.
# RPM French Translation <rpm-fr@livna.org>, 2003.
# JBJ : THANX A LOT !!!
#
# N'hésitez pas à m'envoyez un courriel si vous avez des
# suggestions/corrections.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.8.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2003-06-22 23:43+0200\n"
"Last-Translator: RPM French Translation <rpm-fr@livna.org>\n"
"Language-Team: RPM French Translation <rpm-fr@livna.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "errno inconnu"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "type(%d) d'option non implémenté dans popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "argument manquant"
#: popt.c:1186
msgid "unknown option"
msgstr "option iconnue"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "opérations logiques mutuellement exclusives requises"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg ne devrait pas être NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "les alias sont trop entremellés"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "erreur en citant les paramètres"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "valeur numérique invalide"
#: popt.c:1198
msgid "number too large or too small"
msgstr "nombre trop grand ou trop petit"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "échec de l'allocation de mémoire"
#: popt.c:1204
msgid "unknown error"
msgstr "erreur inconnue"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Montre ce message d'aide"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Affiche un bref descriptif de l'utilisation"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "Afficher les valeurs par défaut des options dans le message"
#: popthelp.c:124
msgid "NONE"
msgstr "RIEN"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "ENTIER"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "CHAINE"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOTTANT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Utilisation:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[OPTION...]"

View File

@ -1,113 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2001-01-17 01:01+0100\n"
"Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n"
"Language-Team: Galician <trasno@ceu.fi.udc.es>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "errno descoñecido"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "tipo de opción (%d) non implementada en popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "falta un argumento"
#: popt.c:1186
msgid "unknown option"
msgstr "opción descoñecida"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "solicitáronse operacións lóxicas mutuamente excluíntes"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "aliases aniñados a un nivel demasiado profundo"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "erro nas comiñas do parámetro"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "valor numérico non válido"
#: popt.c:1198
msgid "number too large or too small"
msgstr "número demasiado grande ou pequeno"
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr "erro descoñecido"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Amosar esta mensaxe de axuda"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Amosar brevemente o xeito de utilización"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Amosar brevemente o xeito de utilización"
#: popthelp.c:124
msgid "NONE"
msgstr "NADA"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "CADEA"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Uso:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[OPCIÓN...]"

View File

@ -1,113 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2000-08-03 23:26+0200\n"
"Last-Translator: László Németh <nemeth@qwertynet.hu>\n"
"Language-Team: Hungarian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-2\n"
"Content-Transfer-Encoding: 8-bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "E súgó megjelenítése"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Rövid használati utasítás megjelenítése"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Rövid használati utasítás megjelenítése"
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,112 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2001-06-08 01:35+0000\n"
"Last-Translator: Richard Allen <ra@hp.is>\n"
"Language-Team: is <kde-isl@mmedia.is>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "óþekkt villunúmer"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "rofagerðin (%d) er ekki studd í popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "vantar viðfang"
#: popt.c:1186
msgid "unknown option"
msgstr "óþekktur rofi"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "beðið um rofa sem slökkva hvor á öðrum"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg ætti ekki að vera NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "alíasar of flóknir"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "villa í viðföngum (gæsalappir og svo frv.)"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "ógilt tölulegt gildi"
#: popt.c:1198
msgid "number too large or too small"
msgstr "talan of stór eða smá"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "ekki tókst að taka frá minni"
#: popt.c:1204
msgid "unknown error"
msgstr "óþekkt villa"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Sýna þessa hjálp"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Sýna stuttar notkunarleiðbeiningar"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "Sýna sjálfgefin gildi rofa í skilaboðum"
#: popthelp.c:124
msgid "NONE"
msgstr "ENGIN"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Notkun:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[ROFI...]"

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,112 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2001-09-06 20:06+0900\n"
"Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n"
"Language-Team: GNU Translation project <ko@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=EUC-KR\n"
"Content-Transfer-Encoding: 8-bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "알 수 없는 오류코드(errno) 입니다"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "옵션 유형 (%d)은 popt에서 사용할 수 없습니다\n"
#: popt.c:1184
msgid "missing argument"
msgstr "인수가 지정되지 않았습니다"
#: popt.c:1186
msgid "unknown option"
msgstr "알 수 없는 옵션입니다"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "양쪽에 배타적 논리 연산이 지정되었습니다"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "옵션->인수가 NULL이 되어서는 안됩니다"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "별칭(alias)이 복잡하게 설정되었습니다"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "매개변수에 오류가 있습니다"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "잘못된 수치 값입니다"
#: popt.c:1198
msgid "number too large or too small"
msgstr "숫자가 너무 크거나 너무 적습니다"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "메모리 할당에 실패했습니다"
#: popt.c:1204
msgid "unknown error"
msgstr "알 수 없는 오류입니다"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "이 도움말을 보여줍니다"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "간단한 사용법을 보여줍니다"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "기본적인 옵션을 보여줍니다"
#: popthelp.c:124
msgid "NONE"
msgstr "없음(NONE)"
#: popthelp.c:126
msgid "VAL"
msgstr "값(VAL)"
#: popthelp.c:130
msgid "INT"
msgstr "정수(INT)"
#: popthelp.c:131
msgid "LONG"
msgstr "정수(LONG)"
#: popthelp.c:132
msgid "STRING"
msgstr "문자열(STRING)"
#: popthelp.c:133
msgid "FLOAT"
msgstr "소수(FLOAT)"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "소수(DOUBLE)"
#: popthelp.c:135
msgid "ARG"
msgstr "인수(ARG)"
#: popthelp.c:548
msgid "Usage:"
msgstr "사용법:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[옵션...]"

View File

@ -1,112 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2001-06-27 11:05+0200\n"
"Last-Translator: Kjartan Maraas <kmaraas@online.no>\n"
"Language-Team: Norwegian <no@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "ukjent errno"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "flaggtype (%d) ikke implementert i popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "manglende argument"
#: popt.c:1186
msgid "unknown option"
msgstr "ukjent flagg"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "gjensidig eksluderende logiske operasjoner forespurt"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg må ikke være NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "aliaser med for dype løkker"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "feil i parametersitering"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "ugyldig numerisk verdi"
#: popt.c:1198
msgid "number too large or too small"
msgstr "tallet er for stort eller lite"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "minneallokering feilet"
#: popt.c:1204
msgid "unknown error"
msgstr "ukjent feil"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Vis denne hjelpmeldingen"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Vis kort bruksmelding"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "Vis forvalgte flagg i melding"
#: popthelp.c:124
msgid "NONE"
msgstr "INGEN"
#: popthelp.c:126
msgid "VAL"
msgstr "VERDI"
#: popthelp.c:130
msgid "INT"
msgstr "HELTALL"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRENG"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLYTTALL"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Bruk:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[FLAGG...]"

View File

@ -1,116 +0,0 @@
# translation of pl.po to Polish
# Jakub Bogusz <qboosh@pld.org.pl>, 2002.
# Piotr Drąg <raven@pmail.pl>, 2007.
#
msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2007-06-12 00:18+0200\n"
"Last-Translator: Piotr Drąg <raven@pmail.pl>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "nieznane errno"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "typ opcji (%d) nie jest zaimplementowany w popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "brak argumentu"
#: popt.c:1186
msgid "unknown option"
msgstr "nieznana opcja"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "zażądano wykluczające się operacje logiczne"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg nie może być NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "za duże osadzenie aliasów"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "błąd w cytowaniu parametru"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "nieprawidłowa wartość liczbowa"
#: popt.c:1198
msgid "number too large or too small"
msgstr "liczba jest za duża lub za mała"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "przydzielenie pamięci nie powiodło się"
#: popt.c:1204
msgid "unknown error"
msgstr "nieznany błąd"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Wyświetla ten komunikat pomocy"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Wyświetla skrócony sposób użycia"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "Wyświetla domyślne opcje"
#: popthelp.c:124
msgid "NONE"
msgstr "BRAK"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Użycie:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[OPCJA...]"

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,112 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2002-02-13 18:32+0000\n"
"Last-Translator: Pedro Morais <morais@kde.org>\n"
"Language-Team: pt <morais@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "errno desconhecido"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "tipo de opção (%d) não implementado no popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "falta um argumento"
#: popt.c:1186
msgid "unknown option"
msgstr "opção desconhecida"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "foram pedidas operações lógicas mutuamente exclusivas"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg não deve ser NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "'aliases' demasiado aninhados"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "erros no 'quoting' de parâmetros"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "valor númerico inválido"
#: popt.c:1198
msgid "number too large or too small"
msgstr "número demasiado grando ou pequeno"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "alocação de memória falhou"
#: popt.c:1204
msgid "unknown error"
msgstr "erro desconhecido"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Mostrar esta mensagem de ajuda"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Mostrar uma mensagem de utilização sucinta"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "Mostrar valor por omissão das opções na mensagem"
#: popthelp.c:124
msgid "NONE"
msgstr "NONE"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Utilização:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[OPÇÃO...]"

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,114 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2000-06-14 23:23+EST\n"
"Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
"Language-Team: Romanian <ro@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "eroare necunoscuta"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "optiunea de tipul (%d) nu este implementata in popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "argument lipsa"
#: popt.c:1186
msgid "unknown option"
msgstr "optiune necunoscuta"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "recursivitate infinita la optiunile sinonime"
#: popt.c:1194
#, fuzzy
msgid "error in parameter quoting"
msgstr "eroare la insertie parametru"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "valoare numarica invalida"
#: popt.c:1198
msgid "number too large or too small"
msgstr "numar prea mare sau prea mic"
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr "eroare necuinoscuta"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Afisare mesaj de help"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Afisare mesaj sintaxa sumar"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Afisare mesaj sintaxa sumar"
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr "Sintaxa:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[OPTIUNE...]"

View File

@ -1,112 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2001-07-05 21:00-0500\n"
"Last-Translator: Eugene Kanter <eugene@blackcatlinux.com>\n"
"Language-Team: Black Cat Linux Team <blackcat-support@blackcatlinux.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÎÏÍÅÒ ÏÛÉÂËÉ"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "ÏÂÒÁÂÏÔËÁ ÐÁÒÁÍÅÔÒÁ (%d) × popt ÎÅ ÐÒÅÄÕÓÍÏÔÒÅÎÁ\n"
#: popt.c:1184
msgid "missing argument"
msgstr "ÐÒÏÐÕÝÅÎ ÁÒÇÕÍÅÎÔ"
#: popt.c:1186
msgid "unknown option"
msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÐÁÒÁÍÅÔÒ"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "ÚÁÐÒÏÛÅÎÙ ×ÚÁÉÍÎÏ ÉÓËÌÀÞÁÀÝÉÅ ÌÏÇÉÞÅÓËÉÅ ÏÐÅÒÁÃÉÉ"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg ÎÅ ÍÏÖÅÔ ÂÙÔØ NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "ÐÒÅ×ÙÛÅÎ ÕÒÏ×ÅÎØ ÄÏÐÕÓÔÉÍÏÊ ÒÅËÕÒÓÉÉ ÐÏÄÓÔÁÎÏ×ÏË"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "ÏÛÉÂËa ÐÏÍÅÝÅÎÉÑ ÐÁÒÁÍÅÔÒÏ× × ËÁ×ÙÞËÉ"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "ÎÅÐÒÁ×ÉÌØÎÏÅ ÞÉÓÌÏ×ÏÅ ÚÎÁÞÅÎÉÅ"
#: popt.c:1198
msgid "number too large or too small"
msgstr "ÞÉÓÌÏ×ÏÅ ÚÎÁÞÅÎÉÅ ÚÁ ÐÒÅÄÅÌÁÍÉ ÐÒÅÄÕÓÍÏÔÒÅÎÎÏÇÏ"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "ÏÛÉÂËÁ ×ÙÄÅÌÅÎÉÑ ÐÁÍÑÔÉ"
#: popt.c:1204
msgid "unknown error"
msgstr "ÎÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "ðÏËÁÚÁÔØ ÜÔÏ ÓÏÏÂÝÅÎÉÅ"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "ðÏËÁÚÁÔØ ËÒÁÔËÕÀ ÉÎÓÔÒÕËÃÉÀ ÐÏ ÉÓÐÏÌØÚÏ×ÁÎÉÀ"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "ðÏËÁÚÁÔØ ÐÁÒÁÍÅÔÒÙ ÐÏ ÕÍÏÌÞÁÎÉÀ"
#: popthelp.c:124
msgid "NONE"
msgstr "NONE"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[ðáòáíåôò...]"

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 1999-08-04 21:40+0200\n"
"Last-Translator: Stanislav Meduna <stano@eunet.sk>\n"
"Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Vypísa» túto správu"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Zobrazi» struèný návod na pou¾itie"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Zobrazi» struèný návod na pou¾itie"
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,113 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2000-09-05 12:30+0200\n"
"Last-Translator: Roman Maurer <roman.maurer@hermes.si>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Prika¾i to sporoèilo s pomoèjo"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Prika¾i kratko sporoèilo o uporabi"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Prika¾i kratko sporoèilo o uporabi"
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,112 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2001-07-12 22:26+0100\n"
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "okänt felnummer"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "flaggtypen (%d) är inte implementerad i popt\n"
#: popt.c:1184
msgid "missing argument"
msgstr "argument saknas"
#: popt.c:1186
msgid "unknown option"
msgstr "okänd flagga"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "ömsesidigt uteslutande logiska operationer begärdes"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg får inte vara NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "alias är nästlade för djupt"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "fel i parametercitering"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "ogiltigt numeriskt värde"
#: popt.c:1198
msgid "number too large or too small"
msgstr "talet för stort eller för litet"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "minnesallokering misslyckades"
#: popt.c:1204
msgid "unknown error"
msgstr "okänt fel"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Visa denna hjälptext"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Visa en kortfattad användningstext"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "Visa standardalternativ för flaggor i meddelande"
#: popthelp.c:124
msgid "NONE"
msgstr "INGET"
#: popthelp.c:126
msgid "VAL"
msgstr "VÄRDE"
#: popthelp.c:130
msgid "INT"
msgstr "HELTAL"
#: popthelp.c:131
msgid "LONG"
msgstr "LÅNG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRÄNG"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLYTTAL"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DUBBEL"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Användning:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[FLAGGA...]"

View File

@ -1,113 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2000-02-11 13:01+0200\n"
"Last-Translator: Nilgun Belma Buguner <nilgun@technologist.com>\n"
"Language-Team: Turkish <tr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso8859-9\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "bilinmeyen hata no"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "seçenek türü (%d) popt için geçersiz\n"
#: popt.c:1184
msgid "missing argument"
msgstr "argüman eksik"
#: popt.c:1186
msgid "unknown option"
msgstr "bilinmeyen seçenek"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "birbirini dýþlayan mantýksal iþlemler istendi"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "adlarda çok fazla içiçelikler"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "parametrelerde týrnak iþaretleme hatalý "
#: popt.c:1196
msgid "invalid numeric value"
msgstr "sayýsal deðer geçersiz"
#: popt.c:1198
msgid "number too large or too small"
msgstr "sayý ya çok büyük ya da çok küçük"
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr "bilinmeyen hata"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Bu yardým iletisini gösterir"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Kýsa bir kullaným iletisi göster"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Kýsa bir kullaným iletisi göster"
#: popthelp.c:124
msgid "NONE"
msgstr "YOK"
#: popthelp.c:126
msgid "VAL"
msgstr "DEÐ"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "Kullanýmý:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[SEÇENEK...]"

View File

@ -1,117 +0,0 @@
# Translation into the ukrainian language.
# Copyright (C) 1999 Free Software Foundation, Inc.
# Yuri Syrota <rasta@renome.rovno.ua>, 1999.
#
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 1999-09-30 16:54+0200\n"
"Last-Translator: Yuri Syrota <rasta@renome.rovno.ua>\n"
"Language-Team: Ukrainian <uk@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=koi8-u\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "ðÏËÁÚÁÔÉ ÃÀ ÄÏצÄËÕ"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "ðÏËÁÚÁÔÉ ËÏÒÏÔËÕ ÄÏצÄËÕ ÐÒÏ ×ÉËÏÒÉÓÔÁÎÎÑ"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "ðÏËÁÚÁÔÉ ËÏÒÏÔËÕ ÄÏצÄËÕ ÐÒÏ ×ÉËÏÒÉÓÔÁÎÎÑ"
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,121 +0,0 @@
# Translation into the walloon language.
#
# Si vos voloz donner on côp di spale pol ratoûrnaedje di Gnome (ou des
# ôtes libes programes) sicrijhoz-mu a l' adresse emile
# <linux-wa@chanae.alphanet.ch>; nos avons co bråmint di l' ovraedje a fé.
#
# Copyright (C) 1999 Free Software Foundation, Inc.
#
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 1999-03-18 23:11+0100\n"
"Last-Translator: Nobody yet\n"
"Language-Team: walon <linux-wa@chanae.alphanet.ch>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "Mostrer ci messaedje d' aide chal"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "Mostre on court messaedje so kmint vos è siervi"
#: popthelp.c:79
#, fuzzy
msgid "Display option defaults in message"
msgstr "Mostre on court messaedje so kmint vos è siervi"
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,117 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: ENCODING\n"
#: popt.c:35
msgid "unknown errno"
msgstr ""
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
#: popt.c:1184
msgid "missing argument"
msgstr ""
#: popt.c:1186
msgid "unknown option"
msgstr ""
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr ""
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr ""
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr ""
#: popt.c:1194
msgid "error in parameter quoting"
msgstr ""
#: popt.c:1196
msgid "invalid numeric value"
msgstr ""
#: popt.c:1198
msgid "number too large or too small"
msgstr ""
#: popt.c:1200
msgid "memory allocation failed"
msgstr ""
#: popt.c:1204
msgid "unknown error"
msgstr ""
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr ""
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr ""
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr ""
#: popthelp.c:124
msgid "NONE"
msgstr ""
#: popthelp.c:126
msgid "VAL"
msgstr ""
#: popthelp.c:130
msgid "INT"
msgstr ""
#: popthelp.c:131
msgid "LONG"
msgstr ""
#: popthelp.c:132
msgid "STRING"
msgstr ""
#: popthelp.c:133
msgid "FLOAT"
msgstr ""
#: popthelp.c:134
msgid "DOUBLE"
msgstr ""
#: popthelp.c:135
msgid "ARG"
msgstr ""
#: popthelp.c:548
msgid "Usage:"
msgstr ""
#: popthelp.c:572
msgid "[OPTION...]"
msgstr ""

View File

@ -1,118 +0,0 @@
# translation of translation.po to
# Traditional Chinese Messages for popt
# Copyright (C) 2005 Free Software Foundation, Inc.
# Wei-Lun Chao <chaoweilun@pcmail.com.tw>, 2005.
#
msgid ""
msgstr ""
"Project-Id-Version: translation\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2005-05-20 15:53+1000\n"
"Last-Translator: \n"
"Language-Team: <zh@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.9.1\n"
#: popt.c:35
msgid "unknown errno"
msgstr "未知的错误"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "选项类别 (%d) 沒有在 popt 中实现\n"
#: popt.c:1184
msgid "missing argument"
msgstr "缺少参数"
#: popt.c:1186
msgid "unknown option"
msgstr "未知的选项"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "需要 XOR 逻辑运算"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg 不应该为 NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "别名嵌套太深"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "参数引号错误"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "无效的数值"
#: popt.c:1198
msgid "number too large or too small"
msgstr "数值太大或太小"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "内存分配错误"
#: popt.c:1204
msgid "unknown error"
msgstr "未知的错误"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "显示这个帮助信息"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "显示简短的使用说明"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "在信息中显示默认的选项"
#: popthelp.c:124
msgid "NONE"
msgstr "NONE"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "用法:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[选项...]"

View File

@ -1,116 +0,0 @@
# Traditional Chinese Messages for popt
# Copyright (C) 2005 Free Software Foundation, Inc.
# Wei-Lun Chao <chaoweilun@pcmail.com.tw>, 2005
#
msgid ""
msgstr ""
"Project-Id-Version: popt 1.10.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-02-29 07:48-0500\n"
"PO-Revision-Date: 2005-04-08 17:52+0800\n"
"Last-Translator: Wei-Lun Chao <chaoweilun@pcmail.com.tw>\n"
"Language-Team: zh_TW <zh-l10n@linux.org.tw>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: popt.c:35
msgid "unknown errno"
msgstr "未知的錯誤"
#: popt.c:964
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr "選項類型 (%d) 沒有在 popt 中實作\n"
#: popt.c:1184
msgid "missing argument"
msgstr "缺少引數"
#: popt.c:1186
msgid "unknown option"
msgstr "未知的選項"
#: popt.c:1188
msgid "mutually exclusive logical operations requested"
msgstr "需要相互獨立的邏輯運算"
#: popt.c:1190
msgid "opt->arg should not be NULL"
msgstr "opt->arg 不應為 NULL"
#: popt.c:1192
msgid "aliases nested too deeply"
msgstr "巢狀別名太深"
#: popt.c:1194
msgid "error in parameter quoting"
msgstr "參數引號錯誤"
#: popt.c:1196
msgid "invalid numeric value"
msgstr "不正確的數值"
#: popt.c:1198
msgid "number too large or too small"
msgstr "數字太大或太小"
#: popt.c:1200
msgid "memory allocation failed"
msgstr "記憶體配置錯誤"
#: popt.c:1204
msgid "unknown error"
msgstr "未知的錯誤"
#: popthelp.c:64 popthelp.c:75
msgid "Show this help message"
msgstr "顯示本說明訊息"
#: popthelp.c:65 popthelp.c:76
msgid "Display brief usage message"
msgstr "顯示簡短的使用說明"
#: popthelp.c:79
msgid "Display option defaults in message"
msgstr "在訊息中顯示預設選項"
#: popthelp.c:124
msgid "NONE"
msgstr "NONE"
#: popthelp.c:126
msgid "VAL"
msgstr "VAL"
#: popthelp.c:130
msgid "INT"
msgstr "INT"
#: popthelp.c:131
msgid "LONG"
msgstr "LONG"
#: popthelp.c:132
msgid "STRING"
msgstr "STRING"
#: popthelp.c:133
msgid "FLOAT"
msgstr "FLOAT"
#: popthelp.c:134
msgid "DOUBLE"
msgstr "DOUBLE"
#: popthelp.c:135
msgid "ARG"
msgstr "ARG"
#: popthelp.c:548
msgid "Usage:"
msgstr "用法:"
#: popthelp.c:572
msgid "[OPTION...]"
msgstr "[選項...]"

View File

@ -1,765 +0,0 @@
.TH POPT 3 "June 30, 1998" "" "Linux Programmer's Manual"
.SH NAME
popt \- Parse command line options
.SH SYNOPSIS
.nf
.B #include <popt.h>
.sp
.BI "poptContext poptGetContext(const char * " name ", int " argc ,
.BI " const char ** "argv ,
.BI " const struct poptOption * " options ,
.BI " int " flags );
.sp
.BI "void poptFreeContext(poptContext " con );
.sp
.BI "void poptResetContext(poptContext " con );
.sp
.BI "int poptGetNextOpt(poptContext " con );
.sp
.BI "const char * poptGetOptArg(poptContext " con );
.sp
.BI "const char * poptGetArg(poptContext " con );
.sp
.BI "const char * poptPeekArg(poptContext " con );
.sp
.BI "const char ** poptGetArgs(poptContext " con );
.sp
.BI "const char *const poptStrerror(const int " error );
.sp
.BI "const char * poptBadOption(poptContext " con ", int " flags );
.sp
.BI "int poptReadDefaultConfig(poptContext " con ", int " flags );
.sp
.BI "int poptReadConfigFile(poptContext " con ", char * " fn );
.sp
.BI "int poptAddAlias(poptContext " con ", struct poptAlias " alias ,
.BI " int " flags );
.sp
.BI "int poptParseArgvString(char * " s ", int * " argcPtr ,
.BI " const char *** " argvPtr );
.sp
.BI "int poptDupArgv(int " argc ", const char ** " argv ", int * " argcPtr ",
.BI " const char *** " argvPtr ");"
.sp
.BI "int poptStuffArgs(poptContext " con ", const char ** " argv );
.sp
.fi
.SH DESCRIPTION
The popt library exists essentially for parsing command-line
options. It is found superior in many ways when compared to
parsing the argv array by hand or using the getopt functions
.B getopt()
and
.B getopt_long()
[see
.BR getopt "(3)]."
Some specific advantages of popt are: it does not utilize global
.RI "variables, thus enabling multiple passes in parsing " argv
.RI "; it can parse an arbitrary array of " argv "-style elements, "
allowing parsing of command-line-strings from any source;
it provides a standard method of option aliasing (to be
discussed at length below.); it can exec external option filters; and,
finally, it can automatically generate help and usage messages for
the application.
.sp
Like
.BR getopt_long() ,
the popt library supports short and long style options. Recall
that a
.B short option
consists of a - character followed by a single alphanumeric character.
A
.BR "long option" ,
common in GNU utilities, consists of two - characters followed by a
string made up of letters, numbers and hyphens. Long options are
optionally allowed to begin with a single -, primarily to allow command-line
compatibility between popt applications and X toolkit applications.
Either type of option may be followed by an argument. A space separates a
short option from its arguments; either a space or an = separates a long
option from an argument.
.sp
The popt library is highly portable and should work on any POSIX
platform. The latest version is distributed with rpm and is always available
from: ftp://ftp.rpm.org/pub/rpm/dist.
.sp
It may be redistributed under the X consortium license, see the file COPYING
in the popt source distribution for details.
.SH "BASIC POPT USAGE"
.SS "1. THE OPTION TABLE"
Applications provide popt with information on their command-line
options by means of an "option table," i.e., an array of
.B struct poptOption
structures:
.sp
#include <popt.h>
.sp
.nf
struct poptOption {
const char * longName; /* may be NULL */
char shortName; /* may be '\\0' */
int argInfo;
void * arg; /* depends on argInfo */
int val; /* 0 means don't return, just update flag */
char * descrip; /* description for autohelp -- may be NULL */
char * argDescrip; /* argument description for autohelp */
};
.fi
.sp
Each member of the table defines a single option that may be
passed to the program. Long and short options are considered
a single option that may occur in two different forms. The
first two members,
.IR longName " and " shortName ", define the names of the option;"
the first is a long name, while the latter is a single character.
.sp
The
.IR argInfo " member tells popt what type of argument is expected"
after the argument. If no option is expected,
.B POPT_ARG_NONE
should be used.
The rest of the valid values are shown in the following table:
.sp
.TS
lfB lfB lfB
lfB lfR lfR.
Value Description arg Type
POPT_ARG_NONE No argument expected int
POPT_ARG_STRING No type checking to be performed char *
POPT_ARG_INT An integer argument is expected int
POPT_ARG_LONG A long integer is expected long
POPT_ARG_VAL Integer value taken from \f(CWval\fR int
POPT_ARG_FLOAT An float argument is expected float
POPT_ARG_DOUBLE A double argument is expected double
.TE
.sp
For numeric values, if the \fIargInfo\fR value is bitwise or'd with one of
\fBPOPT_ARGFLAG_OR\fR, \fBPOPT_ARGFLAG_AND\fR, or \fBPOPT_ARGFLAG_XOR\fR,
the value is saved by performing an OR, AND, or XOR.
If the \fIargInfo\fR value is bitwise or'd with \fBPOPT_ARGFLAG_NOT\fR,
the value will be negated before saving. For the common operations of
setting and/or clearing bits, \fBPOPT_BIT_SET\fR and \fBPOPT_BIT_CLR\fR
have the appropriate flags set to perform bit operations.
.sp
If the \fIargInfo\fR value is bitwise or'd with \fBPOPT_ARGFLAG_ONEDASH\fR,
the long argument may be given with a single - instead of two. For example,
if \fB--longopt\fR is an option with \fBPOPT_ARGFLAG_ONEDASH\fR, is
specified, \fB-longopt\fR is accepted as well.
.sp
.RI "The next element, " arg ", allows popt to automatically update "
.RI "program variables when the option is used. If " arg " is "
.BR NULL ", it is ignored and popt takes no special action. "
Otherwise it should point to a variable of the type indicated in the
right-most column of the table above.
.sp
.RI "If the option takes no argument (" argInfo " is "
.BR POPT_ARG_NONE "), the variable pointed to by "
.IR arg " is set to 1 when the option is used. (Incidentally, it "
will perhaps not escape the attention of hunt-and-peck typists that
.RB "the value of " POPT_ARG_NONE " is 0.) If the option does take "
an argument, the variable that
.IR arg " points to is updated to reflect the value of the argument."
.RB "Any string is acceptable for " POPT_ARG_STRING " arguments, but "
.BR POPT_ARG_INT ", " POPT_ARG_LONG ", " POPT_ARG_FLOAT ", and "
.BR POPT_ARG_DOUBLE " are converted to the appropriate type, and an "
error returned if the conversion fails.
.sp
\fBPOPT_ARG_VAL\fR causes \fIarg\fP to be set to the (integer) value of
\fIval\fP when the argument is found. This is most often useful for
mutually-exclusive arguments in cases where it is not an error for
multiple arguments to occur and where you want the last argument
specified to win; for example, "rm -i -f". \fBPOPT_ARG_VAL\fP causes
the parsing function not to return a value, since the value of \fIval\fP
has already been used.
.sp
If the \fIargInfo\fR value is bitwise or'd with \fBPOPT_ARGFLAG_OPTIONAL\fR,
the argument to the long option may be omitted. If the long option
is used without an argument, a default value of zero or NULL will be saved
(if the arg pointer is present), otherwise behavior will be identical to
a long option with argument.
.sp
.RI "The next option, " val ", is the value popt's parsing function
should return when the option is encountered. If it is 0, the parsing
function does not return a value, instead parsing the next
command-line argument.
.sp
.RI "The last two options, " descrip " and " argDescrip " are only required
if automatic help messages are desired (automatic usage messages can
.RI "be generated without them). " descrip " is a text description of the
.RI "argument and " argdescrip " is a short summary of the type of arguments
.RI "the option expects, or NULL if the option doesn't require any
arguments.
.sp
.RB "If popt should automatically provide " --usage " and " --help " (" -? ")
.RB "options, one line in the table should be the macro " POPT_AUTOHELP ".
.RB "This macro includes another option table (via " POPT_ARG_INCLUDE_TABLE;
see below) in the main one which provides the table entries for these
.RB "arguments. When " --usage " or " --help " are passed to programs which
use popt's automatical help, popt displays the appropriate message on
stderr as soon as it finds the option, and exits the program with a
return code of 0. If you want to use popt's automatic help generation in
a different way, you need to explicitly add the option entries to your programs
.RB "option table instead of using " POPT_AUTOHELP ".
.sp
If the \fIargInfo\fR value is bitwise or'd with \fBPOPT_ARGFLAG_DOC_HIDDEN\fR,
the argument will not be shown in help output.
.sp
If the \fIargInfo\fR value is bitwise or'd with \fBPOPT_ARGFLAG_SHOW_DEFAULT\fR,
the inital value of the arg will be shown in help output.
.sp
The final structure in the table should have all the pointer values set
.RB "to " NULL " and all the arithmetic values set to 0, marking the "
.RB "end of the table. The macro " POPT_TABLEEND " is provided to do that.
.sp
There are two types of option table entries which do not specify command
line options. When either of these types of entries are used, the
\fIlongName\fR element must be \fBNULL\fR and the \fBshortName\fR element
must be \fB'\\0'\fR.
.sp
The first of these special entry types allows the application to nest
another option table in the current one; such nesting may extend quite
deeply (the actual depth is limited by the program's stack). Including
other option tables allows a library to provide a standard set of
command-line options to every program which uses it (this is often done
in graphical programming toolkits, for example). To do this, set
the \fIargInfo\fR field to \fBPOPT_ARG_INCLUDE_TABLE\fR and the
\fRarg\fR field to point to the table which is being included. If
automatic help generation is being used, the \fIdescrip\fR field should
contain a overall description of the option table being included.
.sp
The other special option table entry type tells popt to call a function (a
callback) when any option in that table is found. This is especially usefull
when included option tables are being used, as the program which provides
the top-level option table doesn't need to be aware of the other options
which are provided by the included table. When a callback is set for
a table, the parsing function never returns information on an option in
the table. Instead, options information must be retained via the callback
or by having popt set a variable through the option's \fIarg\fR field.
Option callbacks should match the following prototype:
.sp
.nf
.BI "void poptCallbackType(poptContext con,
.BI " const struct poptOption * opt,
.BI " const char * arg, void * data);
.fi
.sp
The first parameter is the context which is being parsed (see the next
section for information on contexts), \fIopt\fR points to the option
which triggered this callback, and \fIarg\fR is the option's argument.
If the option does not take an argument, \fIarg\fR is \fBNULL\fR. The
final parameter, \fIdata\fR is taken from the \fIdescrip\fR field
of the option table entry which defined the callback. As \fIdescrip\fR
is a pointer, this allows callback functions to be passed an arbitrary
set of data (though a typecast will have to be used).
.sp
The option table entry which defines a callback has an \fIargInfo\fR of
\fBPOPT_ARG_CALLBACK\fR, an \fIarg\fR which points to the callback
function, and a \fIdescrip\fR field which specifies an arbitrary pointer
to be passed to the callback.
.SS "2. CREATING A CONTEXT"
popt can interleave the parsing of multiple command-line sets. It allows
this by keeping all the state information for a particular set of
command-line arguments in a
.BR poptContext " data structure, an opaque type that should not be "
modified outside the popt library.
.sp
.RB "New popt contexts are created by " poptGetContext() ":"
.sp
.nf
.BI "poptContext poptGetContext(const char * " name ", int "argc ",
.BI " const char ** "argv ",
.BI " const struct poptOption * "options ",
.BI " int "flags ");"
.fi
.sp
The first parameter,
.IR name ", is used only for alias handling (discussed later). It "
should be the name of the application whose options are being parsed,
.RB "or should be " NULL " if no option aliasing is desired. The next "
two arguments specify the command-line arguments to parse. These are
.RB "generally passed to " poptGetContext() " exactly as they were "
.RB "passed to the program's " main() " function. The "
.IR options " parameter points to the table of command-line options, "
which was described in the previous section. The final parameter,
.IR flags ,
can take one of three values:
.br
.TS
lfB lfB
lfB lfR.
Value Description
POPT_CONTEXT_NO_EXEC Ignore exec expansions
POPT_CONTEXT_KEEP_FIRST Do not ignore argv[0]
POPT_CONTEXT_POSIXMEHARDER Options cannot follow arguments
.TE
.sp
.RB "A " poptContext " keeps track of which options have already been "
parsed and which remain, among other things. If a program wishes to
restart option processing of a set of arguments, it can reset the
.BR poptContext " by passing the context as the sole argument to "
.BR poptResetContext() .
.sp
When argument processing is complete, the process should free the
.BR poptContext " as it contains dynamically allocated components. The "
.BR poptFreeContext() " function takes a "
.BR poptContext " as its sole argument and frees the resources the "
context is using.
.sp
.RB "Here are the prototypes of both " poptResetContext() " and "
.BR poptFreeContext() :
.sp
.nf
.B #include <popt.h>
.BI "void poptFreeContext(poptContext " con ");"
.BI "void poptResetContext(poptContext " con ");"
.fi
.sp
.SS "3. PARSING THE COMMAND LINE"
.RB "After an application has created a " poptContext ", it may begin "
.RB "parsing arguments. " poptGetNextOpt() " performs the actual "
argument parsing.
.sp
.nf
.B #include <popt.h>
.BI "int poptGetNextOpt(poptContext " con ");"
.fi
.sp
Taking the context as its sole argument, this function parses the next
command-line argument found. After finding the next argument in the
option table, the function fills in the object pointed to by the option
.RI "table entry's " arg
.RB "pointer if it is not " NULL ". If the val entry for the option is "
non-0, the function then returns that value. Otherwise,
.BR poptGetNextOpt() " continues on to the next argument."
.sp
.BR poptGetNextOpt() " returns -1 when the final argument has been "
parsed, and other negative values when errors occur. This makes it a
good idea to
.RI "keep the " val " elements in the options table greater than 0."
.sp
.RI "If all of the command-line options are handled through " arg
pointers, command-line parsing is reduced to the following line of code:
.sp
.nf
rc = poptGetNextOpt(poptcon);
.fi
.sp
Many applications require more complex command-line parsing than this,
however, and use the following structure:
.sp
.nf
while ((rc = poptGetNextOpt(poptcon)) > 0) {
switch (rc) {
/* specific arguments are handled here */
}
}
.fi
.sp
When returned options are handled, the application needs to know the
value of any arguments that were specified after the option. There are two
ways to discover them. One is to ask popt to fill in a variable with the
.RI "value of the option through the option table's " arg " elements. The "
.RB "other is to use " poptGetOptArg() ":"
.sp
.nf
.B #include <popt.h>
.BI "const char * poptGetOptArg(poptContext " con ");"
.fi
.sp
This function returns the argument given for the final option returned by
.BR poptGetNextOpt() ", or it returns " NULL " if no argument was specified."
.sp
.SS "4. LEFTOVER ARGUMENTS"
Many applications take an arbitrary number of command-line arguments,
such as a list of file names. When popt encounters an argument that does
not begin with a -, it assumes it is such an argument and adds it to a list
of leftover arguments. Three functions allow applications to access such
arguments:
.nf
.HP
.BI "const char * poptGetArg(poptContext " con ");"
.fi
This function returns the next leftover argument and marks it as
processed.
.PP
.nf
.HP
.BI "const char * poptPeekArg(poptContext " con ");"
.fi
The next leftover argument is returned but not marked as processed.
This allows an application to look ahead into the argument list,
without modifying the list.
.PP
.nf
.HP
.BI "const char ** poptGetArgs(poptContext " con ");"
.fi
All the leftover arguments are returned in a manner identical to
.IR argv ". The final element in the returned array points to "
.BR NULL ", indicating the end of the arguments.
.sp
.SS "5. AUTOMATIC HELP MESSAGES"
The \fBpopt\fR library can automatically generate help messages which
describe the options a program accepts. There are two types of help
messages which can be generated. Usage messages are a short messages
which lists valid options, but does not describe them. Help messages
describe each option on one (or more) lines, resulting in a longer, but
more useful, message. Whenever automatic help messages are used, the
\fBdescrip\fR and \fBargDescrip\fR fields \fBstruct poptOption\fR members
should be filled in for each option.
.sp
The \fBPOPT_AUTOHELP\fR macro makes it easy to add \fB--usage\fR and
\fB--help\fR messages to your program, and is described in part 1
of this man page. If more control is needed over your help messages,
the following two functions are available:
.sp
.nf
.B #include <popt.h>
.BI "void poptPrintHelp(poptContext " con ", FILE * " f ", int " flags ");
.BI "void poptPrintUsage(poptContext " con ", FILE * " f ", int " flags ");
.fi
.sp
\fBpoptPrintHelp()\fR displays the standard help message to the stdio file
descriptor f, while \fBpoptPrintUsage()\fR displays the shorter usage
message. Both functions currently ignore the \fBflags\fR argument; it is
there to allow future changes.
.sp
.SH "ERROR HANDLING"
All of the popt functions that can return errors return integers.
When an error occurs, a negative error code is returned. The
following table summarizes the error codes that occur:
.sp
.nf
.B " Error Description"
.BR "POPT_ERROR_NOARG " "Argument missing for an option."
.BR "POPT_ERROR_BADOPT " "Option's argument couldn't be parsed."
.BR "POPT_ERROR_OPTSTOODEEP " "Option aliasing nested too deeply."
.BR "POPT_ERROR_BADQUOTE " "Quotations do not match."
.BR "POPT_ERROR_BADNUMBER " "Option couldn't be converted to number."
.BR "POPT_ERROR_OVERFLOW " "A given number was too big or small."
.fi
.sp
Here is a more detailed discussion of each error:
.sp
.TP
.B POPT_ERROR_NOARG
An option that requires an argument was specified on the command
line, but no argument was given. This can be returned only by
.BR poptGetNextOpt() .
.sp
.TP
.B POPT_ERROR_BADOPT
.RI "An option was specified in " argv " but is not in the option
.RB "table. This error can be returned only from " poptGetNextOpt() .
.sp
.TP
.B POPT_ERROR_OPTSTOODEEP
A set of option aliases is nested too deeply. Currently, popt
follows options only 10 levels to prevent infinite recursion. Only
.BR poptGetNextOpt() " can return this error."
.sp
.TP
.B POPT_ERROR_BADQUOTE
A parsed string has a quotation mismatch (such as a single quotation
.RB "mark). " poptParseArgvString() ", " poptReadConfigFile() ", or "
.BR poptReadDefaultConfig() " can return this error."
.sp
.TP
.B POPT_ERROR_BADNUMBER
A conversion from a string to a number (int or long) failed due
to the string containing nonnumeric characters. This occurs when
.BR poptGetNextOpt() " is processing an argument of type "
.BR POPT_ARG_INT ", " POPT_ARG_LONG ", "
.RB POPT_ARG_FLOAT ", or " POPT_ARG_DOUBLE "."
.sp
.TP
.B POPT_ERROR_OVERFLOW
A string-to-number conversion failed because the number was too
.RB "large or too small. Like " POPT_ERROR_BADNUMBER ", this error
.RB "can occur only when " poptGetNextOpt() " is processing an "
.RB "argument of type " POPT_ARG_INT ", " POPT_ARG_LONG ", "
.RB POPT_ARG_FLOAT ", or " POPT_ARG_DOUBLE "."
.sp
.TP
.B POPT_ERROR_ERRNO
.RI "A system call returned with an error, and " errno " still
contains the error from the system call. Both
.BR poptReadConfigFile() " and " poptReadDefaultConfig() " can "
return this error.
.sp
.PP
Two functions are available to make it easy for applications to provide
good error messages.
.HP
.nf
.BI "const char *const poptStrerror(const int " error ");"
.fi
This function takes a popt error code and returns a string describing
.RB "the error, just as with the standard " strerror() " function."
.PP
.HP
.nf
.BI "const char * poptBadOption(poptContext " con ", int " flags ");"
.fi
.RB "If an error occurred during " poptGetNextOpt() ", this function "
.RI "returns the option that caused the error. If the " flags " argument"
.RB "is set to " POPT_BADOPTION_NOALIAS ", the outermost option is "
.RI "returned. Otherwise, " flags " should be 0, and the option that is "
returned may have been specified through an alias.
.PP
These two functions make popt error handling trivial for most
applications. When an error is detected from most of the functions,
an error message is printed along with the error string from
.BR poptStrerror() ". When an error occurs during argument parsing, "
code similiar to the following displays a useful error message:
.sp
.nf
fprintf(stderr, "%s: %s\\n",
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
poptStrerror(rc));
.fi
.sp
.SH "OPTION ALIASING"
.RB "One of the primary benefits of using popt over " getopt() " is the "
ability to use option aliasing. This lets the user specify options that
popt expands into other options when they are specified. If the standard
.RB "grep program made use of popt, users could add a " --text " option "
.RB "that expanded to " "-i -n -E -2" " to let them more easily find "
information in text files.
.sp
.SS "1. SPECIFYING ALIASES"
.RI "Aliases are normally specified in two places: " /etc/popt
.RB "and the " .popt " file in the user's home directory (found through "
.RB "the " HOME " environment variable). Both files have the same format, "
an arbitrary number of lines formatted like this:
.sp
.IB appname " alias " newoption "" " expansion"
.sp
.RI "The " appname " is the name of the application, which must be the "
.RI "same as the " name " parameter passed to "
.BR poptGetContext() ". This allows each file to specify aliases for "
.RB "multiple programs. The " alias " keyword specifies that an alias is "
being defined; currently popt configuration files support only aliases, but
other abilities may be added in the future. The next option is the option
that should be aliased, and it may be either a short or a long option. The
rest of the line specifies the expansion for the alias. It is parsed
similarly to a shell command, which allows \\, ", and ' to be used for
quoting. If a backslash is the final character on a line, the next line
in the file is assumed to be a logical continuation of the line containing
the backslash, just as in shell.
.sp
.RB "The following entry would add a " --text " option to the grep command, "
as suggested at the beginning of this section.
.sp
.B "grep alias --text -i -n -E -2"
.SS "2. ENABLING ALIASES"
.RB "An application must enable alias expansion for a " poptContext
.RB "before calling " poptGetNextArg() " for the first time. There are "
three functions that define aliases for a context:
.HP
.nf
.BI "int poptReadDefaultConfig(poptContext " con ", int " flags ");"
.fi
.RI "This function reads aliases from " /etc/popt " and the "
.BR .popt " file in the user's home directory. Currently, "
.IR flags " should be "
.BR NULL ", as it is provided only for future expansion."
.PP
.HP
.nf
.BI "int poptReadConfigFile(poptContext " con ", char * " fn ");"
.fi
.RI "The file specified by " fn " is opened and parsed as a popt "
configuration file. This allows programs to use program-specific
configuration files.
.PP
.HP
.nf
.BI "int poptAddAlias(poptContext " con ", struct poptAlias " alias ",
.BI " int " flags ");"
.fi
Occasionally, processes want to specify aliases without having to
read them from a configuration file. This function adds a new alias
.RI "to a context. The " flags " argument should be 0, as it is "
currently reserved for future expansion. The new alias is specified
.RB "as a " "struct poptAlias" ", which is defined as:"
.sp
.nf
struct poptAlias {
const char * longName; /* may be NULL */
char shortName; /* may be '\\0' */
int argc;
const char ** argv; /* must be free()able */
};
.fi
.sp
.RI "The first two elements, " longName " and " shortName ", specify "
.RI "the option that is aliased. The final two, " argc " and " argv ","
define the expansion to use when the aliases option is encountered.
.PP
.SH "PARSING ARGUMENT STRINGS"
Although popt is usually used for parsing arguments already divided into
.RI "an " argv "-style array, some programs need to parse strings that "
are formatted identically to command lines. To facilitate this, popt
provides a function that parses a string into an array of strings,
using rules similiar to normal shell parsing.
.sp
.nf
.B "#include <popt.h>"
.BI "int poptParseArgvString(char * " s ", int * " argcPtr ",
.BI " char *** " argvPtr ");"
.BI "int poptDupArgv(int " argc ", const char ** " argv ", int * " argcPtr ",
.BI " const char *** " argvPtr ");"
.fi
.sp
.RI "The string s is parsed into an " argv "-style array. The integer "
.RI "pointed to by the " argcPtr " parameter contains the number of elements "
.RI "parsed, and the final " argvPtr " parameter contains the address of the"
newly created array.
.RB "The routine " poptDupArgv() " can be used to make a copy of an existing "
argument array.
.sp
.RI "The " argvPtr
.RB "created by " poptParseArgvString() " or " poptDupArgv() " is suitable to pass directly "
.RB "to " poptGetContext() .
Both routines return a single dynamically allocated contiguous
.RB "block of storage and should be " free() "ed when the application is"
finished with the storage.
.SH "HANDLING EXTRA ARGUMENTS"
Some applications implement the equivalent of option aliasing but need
.RB "to do so through special logic. The " poptStuffArgs() " function "
allows an application to insert new arguments into the current
.BR poptContext .
.sp
.nf
.B "#include <popt.h>"
.BI "int poptStuffArgs(poptContext "con ", const char ** " argv ");"
.fi
.sp
.RI "The passed " argv
.RB "must have a " NULL " pointer as its final element. When "
.BR poptGetNextOpt() " is next called, the "
"stuffed" arguments are the first to be parsed. popt returns to the
normal arguments once all the stuffed arguments have been exhausted.
.SH "EXAMPLE"
The following example is a simplified version of the program "robin"
which appears in Chapter 15 of the text cited below. Robin has
been stripped of everything but its argument-parsing logic, slightly
reworked, and renamed "parse." It may prove useful in illustrating
at least some of the features of the extremely rich popt library.
.sp
.nf
#include <popt.h>
#include <stdio.h>
void usage(poptContext optCon, int exitcode, char *error, char *addl) {
poptPrintUsage(optCon, stderr, 0);
if (error) fprintf(stderr, "%s: %s\n", error, addl);
exit(exitcode);
}
int main(int argc, char *argv[]) {
char c; /* used for argument parsing */
int i = 0; /* used for tracking options */
char *portname;
int speed = 0; /* used in argument parsing to set speed */
int raw = 0; /* raw mode? */
int j;
char buf[BUFSIZ+1];
poptContext optCon; /* context for parsing command-line options */
struct poptOption optionsTable[] = {
{ "bps", 'b', POPT_ARG_INT, &speed, 0,
"signaling rate in bits-per-second", "BPS" },
{ "crnl", 'c', 0, 0, 'c',
"expand cr characters to cr/lf sequences" },
{ "hwflow", 'h', 0, 0, 'h',
"use hardware (RTS/CTS) flow control" },
{ "noflow", 'n', 0, 0, 'n',
"use no flow control" },
{ "raw", 'r', 0, &raw, 0,
"don't perform any character conversions" },
{ "swflow", 's', 0, 0, 's',
"use software (XON/XOF) flow control" } ,
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 }
};
optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
poptSetOtherOptionHelp(optCon, "[OPTIONS]* <port>");
if (argc < 2) {
poptPrintUsage(optCon, stderr, 0);
exit(1);
}
/* Now do options processing, get portname */
while ((c = poptGetNextOpt(optCon)) >= 0) {
switch (c) {
case 'c':
buf[i++] = 'c';
break;
case 'h':
buf[i++] = 'h';
break;
case 's':
buf[i++] = 's';
break;
case 'n':
buf[i++] = 'n';
break;
}
}
portname = poptGetArg(optCon);
if((portname == NULL) || !(poptPeekArg(optCon) == NULL))
usage(optCon, 1, "Specify a single port", ".e.g., /dev/cua0");
if (c < -1) {
/* an error occurred during option processing */
fprintf(stderr, "%s: %s\\n",
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
poptStrerror(c));
return 1;
}
/* Print out options, portname chosen */
printf("Options chosen: ");
for(j = 0; j < i ; j++)
printf("-%c ", buf[j]);
if(raw) printf("-r ");
if(speed) printf("-b %d ", speed);
printf("\\nPortname chosen: %s\\n", portname);
poptFreeContext(optCon);
exit(0);
}
.fi
.sp
RPM, a popular Linux package management program, makes heavy use
of popt's features. Many of its command-line arguments are implemented
through popt aliases, which makes RPM an excellent example of how to
take advantage of the popt library. For more information on RPM, see
http://www.rpm.org. The popt source code distribution includes test
program(s) which use all of the features of the popt libraries in
various ways. If a feature isn't working for you, the popt test code
is the first place to look.
.SH BUGS
None presently known.
.SH AUTHOR
Erik W. Troan <ewt@redhat.com>
.PP
This man page is derived in part from
.IR "Linux Application Development"
by Michael K. Johnson and Erik W. Troan, Copyright (c) 1998 by Addison
Wesley Longman, Inc., and included in the popt documentation with the
permission of the Publisher and the appreciation of the Authors.
.PP
Thanks to Robert Lynch for his extensive work on this man page.
.SH "SEE ALSO"
.BR getopt (3)
.sp
.IR "Linux Application Development" ", by Michael K. Johnson and "
Erik W. Troan (Addison-Wesley, 1998; ISBN 0-201-30821-5), Chapter 24.
.sp
.BR popt.ps " is a Postscript version of the above cited book "
chapter. It can be found in the source archive for popt available at:
ftp://ftp.rpm.org/pub/rpm.

File diff suppressed because it is too large Load Diff

View File

@ -1,564 +0,0 @@
/** \file popt/popt.h
* \ingroup popt
*/
/* (C) 1998-2000 Red Hat, Inc. -- Licensing details are in the COPYING
file accompanying popt source distributions, available from
ftp://ftp.rpm.org/pub/rpm/dist. */
#ifndef H_POPT
#define H_POPT
#include <stdio.h> /* for FILE * */
#define POPT_OPTION_DEPTH 10
/** \ingroup popt
* \name Arg type identifiers
*/
/*@{*/
#define POPT_ARG_NONE 0 /*!< no arg */
#define POPT_ARG_STRING 1 /*!< arg will be saved as string */
#define POPT_ARG_INT 2 /*!< arg will be converted to int */
#define POPT_ARG_LONG 3 /*!< arg will be converted to long */
#define POPT_ARG_INCLUDE_TABLE 4 /*!< arg points to table */
#define POPT_ARG_CALLBACK 5 /*!< table-wide callback... must be
set first in table; arg points
to callback, descrip points to
callback data to pass */
#define POPT_ARG_INTL_DOMAIN 6 /*!< set the translation domain
for this table and any
included tables; arg points
to the domain string */
#define POPT_ARG_VAL 7 /*!< arg should take value val */
#define POPT_ARG_FLOAT 8 /*!< arg will be converted to float */
#define POPT_ARG_DOUBLE 9 /*!< arg will be converted to double */
#define POPT_ARG_MASK 0x0000FFFF
/*@}*/
/** \ingroup popt
* \name Arg modifiers
*/
/*@{*/
#define POPT_ARGFLAG_ONEDASH 0x80000000 /*!< allow -longoption */
#define POPT_ARGFLAG_DOC_HIDDEN 0x40000000 /*!< don't show in help/usage */
#define POPT_ARGFLAG_STRIP 0x20000000 /*!< strip this arg from argv(only applies to long args) */
#define POPT_ARGFLAG_OPTIONAL 0x10000000 /*!< arg may be missing */
#define POPT_ARGFLAG_OR 0x08000000 /*!< arg will be or'ed */
#define POPT_ARGFLAG_NOR 0x09000000 /*!< arg will be nor'ed */
#define POPT_ARGFLAG_AND 0x04000000 /*!< arg will be and'ed */
#define POPT_ARGFLAG_NAND 0x05000000 /*!< arg will be nand'ed */
#define POPT_ARGFLAG_XOR 0x02000000 /*!< arg will be xor'ed */
#define POPT_ARGFLAG_NOT 0x01000000 /*!< arg will be negated */
#define POPT_ARGFLAG_LOGICALOPS \
(POPT_ARGFLAG_OR|POPT_ARGFLAG_AND|POPT_ARGFLAG_XOR)
#define POPT_BIT_SET (POPT_ARG_VAL|POPT_ARGFLAG_OR)
/*!< set arg bit(s) */
#define POPT_BIT_CLR (POPT_ARG_VAL|POPT_ARGFLAG_NAND)
/*!< clear arg bit(s) */
#define POPT_ARGFLAG_SHOW_DEFAULT 0x00800000 /*!< show default value in --help */
/*@}*/
/** \ingroup popt
* \name Callback modifiers
*/
/*@{*/
#define POPT_CBFLAG_PRE 0x80000000 /*!< call the callback before parse */
#define POPT_CBFLAG_POST 0x40000000 /*!< call the callback after parse */
#define POPT_CBFLAG_INC_DATA 0x20000000 /*!< use data from the include line,
not the subtable */
#define POPT_CBFLAG_SKIPOPTION 0x10000000 /*!< don't callback with option */
#define POPT_CBFLAG_CONTINUE 0x08000000 /*!< continue callbacks with option */
/*@}*/
/** \ingroup popt
* \name Error return values
*/
/*@{*/
#define POPT_ERROR_NOARG -10 /*!< missing argument */
#define POPT_ERROR_BADOPT -11 /*!< unknown option */
#define POPT_ERROR_OPTSTOODEEP -13 /*!< aliases nested too deeply */
#define POPT_ERROR_BADQUOTE -15 /*!< error in paramter quoting */
#define POPT_ERROR_ERRNO -16 /*!< errno set, use strerror(errno) */
#define POPT_ERROR_BADNUMBER -17 /*!< invalid numeric value */
#define POPT_ERROR_OVERFLOW -18 /*!< number too large or too small */
#define POPT_ERROR_BADOPERATION -19 /*!< mutually exclusive logical operations requested */
#define POPT_ERROR_NULLARG -20 /*!< opt->arg should not be NULL */
#define POPT_ERROR_MALLOC -21 /*!< memory allocation failed */
/*@}*/
/** \ingroup popt
* \name poptBadOption() flags
*/
/*@{*/
#define POPT_BADOPTION_NOALIAS (1 << 0) /*!< don't go into an alias */
/*@}*/
/** \ingroup popt
* \name poptGetContext() flags
*/
/*@{*/
#define POPT_CONTEXT_NO_EXEC (1 << 0) /*!< ignore exec expansions */
#define POPT_CONTEXT_KEEP_FIRST (1 << 1) /*!< pay attention to argv[0] */
#define POPT_CONTEXT_POSIXMEHARDER (1 << 2) /*!< options can't follow args */
#define POPT_CONTEXT_ARG_OPTS (1 << 4) /*!< return args as options with value 0 */
/*@}*/
/** \ingroup popt
*/
struct poptOption {
/*@observer@*/ /*@null@*/
const char * longName; /*!< may be NULL */
char shortName; /*!< may be NUL */
int argInfo;
/*@shared@*/ /*@null@*/
void * arg; /*!< depends on argInfo */
int val; /*!< 0 means don't return, just update flag */
/*@observer@*/ /*@null@*/
const char * descrip; /*!< description for autohelp -- may be NULL */
/*@observer@*/ /*@null@*/
const char * argDescrip; /*!< argument description for autohelp */
};
/** \ingroup popt
* A popt alias argument for poptAddAlias().
*/
struct poptAlias {
/*@owned@*/ /*@null@*/
const char * longName; /*!< may be NULL */
char shortName; /*!< may be NUL */
int argc;
/*@owned@*/
const char ** argv; /*!< must be free()able */
};
/** \ingroup popt
* A popt alias or exec argument for poptAddItem().
*/
/*@-exporttype@*/
typedef struct poptItem_s {
struct poptOption option; /*!< alias/exec name(s) and description. */
int argc; /*!< (alias) no. of args. */
/*@owned@*/
const char ** argv; /*!< (alias) args, must be free()able. */
} * poptItem;
/*@=exporttype@*/
/** \ingroup popt
* \name Auto-generated help/usage
*/
/*@{*/
/**
* Empty table marker to enable displaying popt alias/exec options.
*/
/*@-exportvar@*/
/*@unchecked@*/ /*@observer@*/
extern struct poptOption poptAliasOptions[];
/*@=exportvar@*/
#define POPT_AUTOALIAS { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptAliasOptions, \
0, "Options implemented via popt alias/exec:", NULL },
/**
* Auto help table options.
*/
/*@-exportvar@*/
/*@unchecked@*/ /*@observer@*/
extern struct poptOption poptHelpOptions[];
/*@=exportvar@*/
/*@-exportvar@*/
/*@unchecked@*/ /*@observer@*/
extern struct poptOption * poptHelpOptionsI18N;
/*@=exportvar@*/
#define POPT_AUTOHELP { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptHelpOptions, \
0, "Help options:", NULL },
#define POPT_TABLEEND { NULL, '\0', 0, NULL, 0, NULL, NULL }
/*@}*/
/** \ingroup popt
*/
/*@-exporttype@*/
typedef /*@abstract@*/ struct poptContext_s * poptContext;
/*@=exporttype@*/
/** \ingroup popt
*/
#ifndef __cplusplus
/*@-exporttype -typeuse@*/
typedef struct poptOption * poptOption;
/*@=exporttype =typeuse@*/
#endif
/*@-exportconst@*/
enum poptCallbackReason {
POPT_CALLBACK_REASON_PRE = 0,
POPT_CALLBACK_REASON_POST = 1,
POPT_CALLBACK_REASON_OPTION = 2
};
/*@=exportconst@*/
#ifdef __cplusplus
extern "C" {
#endif
/*@-type@*/
/** \ingroup popt
* Table callback prototype.
* @param con context
* @param reason reason for callback
* @param opt option that triggered callback
* @param arg @todo Document.
* @param data @todo Document.
*/
typedef void (*poptCallbackType) (poptContext con,
enum poptCallbackReason reason,
/*@null@*/ const struct poptOption * opt,
/*@null@*/ const char * arg,
/*@null@*/ const void * data)
/*@globals internalState @*/
/*@modifies internalState @*/;
/** \ingroup popt
* Initialize popt context.
* @param name context name (usually argv[0] program name)
* @param argc no. of arguments
* @param argv argument array
* @param options address of popt option table
* @param flags or'd POPT_CONTEXT_* bits
* @return initialized popt context
*/
/*@only@*/ /*@null@*/
poptContext poptGetContext(
/*@dependent@*/ /*@keep@*/ const char * name,
int argc, /*@dependent@*/ /*@keep@*/ const char ** argv,
/*@dependent@*/ /*@keep@*/ const struct poptOption * options,
int flags)
/*@*/;
/** \ingroup popt
* Reinitialize popt context.
* @param con context
*/
/*@unused@*/
void poptResetContext(/*@null@*/poptContext con)
/*@modifies con @*/;
/** \ingroup popt
* Return value of next option found.
* @param con context
* @return next option val, -1 on last item, POPT_ERROR_* on error
*/
int poptGetNextOpt(/*@null@*/poptContext con)
/*@globals fileSystem, internalState @*/
/*@modifies con, fileSystem, internalState @*/;
/** \ingroup popt
* Return next option argument (if any).
* @param con context
* @return option argument, NULL if no argument is available
*/
/*@observer@*/ /*@null@*/ /*@unused@*/
const char * poptGetOptArg(/*@null@*/poptContext con)
/*@modifies con @*/;
/** \ingroup popt
* Return next argument.
* @param con context
* @return next argument, NULL if no argument is available
*/
/*@observer@*/ /*@null@*/ /*@unused@*/
const char * poptGetArg(/*@null@*/poptContext con)
/*@modifies con @*/;
/** \ingroup popt
* Peek at current argument.
* @param con context
* @return current argument, NULL if no argument is available
*/
/*@observer@*/ /*@null@*/ /*@unused@*/
const char * poptPeekArg(/*@null@*/poptContext con)
/*@*/;
/** \ingroup popt
* Return remaining arguments.
* @param con context
* @return argument array, NULL terminated
*/
/*@observer@*/ /*@null@*/
const char ** poptGetArgs(/*@null@*/poptContext con)
/*@modifies con @*/;
/** \ingroup popt
* Return the option which caused the most recent error.
* @param con context
* @param flags
* @return offending option
*/
/*@observer@*/
const char * poptBadOption(/*@null@*/poptContext con, int flags)
/*@*/;
/** \ingroup popt
* Destroy context.
* @param con context
* @return NULL always
*/
/*@null@*/
poptContext poptFreeContext( /*@only@*/ /*@null@*/ poptContext con)
/*@modifies con @*/;
/** \ingroup popt
* Add arguments to context.
* @param con context
* @param argv argument array, NULL terminated
* @return 0 on success, POPT_ERROR_OPTSTOODEEP on failure
*/
/*@unused@*/
int poptStuffArgs(poptContext con, /*@keep@*/ const char ** argv)
/*@modifies con @*/;
/** \ingroup popt
* Add alias to context.
* @todo Pass alias by reference, not value.
* @deprecated Use poptAddItem instead.
* @param con context
* @param alias alias to add
* @param flags (unused)
* @return 0 on success
*/
/*@unused@*/
int poptAddAlias(poptContext con, struct poptAlias alias, int flags)
/*@modifies con @*/;
/** \ingroup popt
* Add alias/exec item to context.
* @param con context
* @param newItem alias/exec item to add
* @param flags 0 for alias, 1 for exec
* @return 0 on success
*/
int poptAddItem(poptContext con, poptItem newItem, int flags)
/*@modifies con @*/;
/** \ingroup popt
* Read configuration file.
* @param con context
* @param fn file name to read
* @return 0 on success, POPT_ERROR_ERRNO on failure
*/
int poptReadConfigFile(poptContext con, const char * fn)
/*@globals errno, fileSystem, internalState @*/
/*@modifies con->execs, con->numExecs,
errno, fileSystem, internalState @*/;
/** \ingroup popt
* Read default configuration from /etc/popt and $HOME/.popt.
* @param con context
* @param useEnv (unused)
* @return 0 on success, POPT_ERROR_ERRNO on failure
*/
/*@unused@*/
int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv)
/*@globals fileSystem, internalState @*/
/*@modifies con->execs, con->numExecs,
fileSystem, internalState @*/;
/** \ingroup popt
* Duplicate an argument array.
* @note: The argument array is malloc'd as a single area, so only argv must
* be free'd.
*
* @param argc no. of arguments
* @param argv argument array
* @retval argcPtr address of returned no. of arguments
* @retval argvPtr address of returned argument array
* @return 0 on success, POPT_ERROR_NOARG on failure
*/
int poptDupArgv(int argc, /*@null@*/ const char **argv,
/*@null@*/ /*@out@*/ int * argcPtr,
/*@null@*/ /*@out@*/ const char *** argvPtr)
/*@modifies *argcPtr, *argvPtr @*/;
/** \ingroup popt
* Parse a string into an argument array.
* The parse allows ', ", and \ quoting, but ' is treated the same as " and
* both may include \ quotes.
* @note: The argument array is malloc'd as a single area, so only argv must
* be free'd.
*
* @param s string to parse
* @retval argcPtr address of returned no. of arguments
* @retval argvPtr address of returned argument array
*/
int poptParseArgvString(const char * s,
/*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr)
/*@modifies *argcPtr, *argvPtr @*/;
/** \ingroup popt
* Parses an input configuration file and returns an string that is a
* command line. For use with popt. You must free the return value when done.
*
* Given the file:
\verbatim
# this line is ignored
# this one too
aaa
bbb
ccc
bla=bla
this_is = fdsafdas
bad_line=
reall bad line
reall bad line = again
5555= 55555
test = with lots of spaces
\endverbatim
*
* The result is:
\verbatim
--aaa --bbb --ccc --bla="bla" --this_is="fdsafdas" --5555="55555" --test="with lots of spaces"
\endverbatim
*
* Passing this to poptParseArgvString() yields an argv of:
\verbatim
'--aaa'
'--bbb'
'--ccc'
'--bla=bla'
'--this_is=fdsafdas'
'--5555=55555'
'--test=with lots of spaces'
\endverbatim
*
* @bug NULL is returned if file line is too long.
* @bug Silently ignores invalid lines.
*
* @param fp file handle to read
* @param *argstrp return string of options (malloc'd)
* @param flags unused
* @return 0 on success
* @see poptParseArgvString
*/
/*@-fcnuse@*/
int poptConfigFileToString(FILE *fp, /*@out@*/ char ** argstrp, int flags)
/*@globals fileSystem @*/
/*@modifies *fp, *argstrp, fileSystem @*/;
/*@=fcnuse@*/
/** \ingroup popt
* Return formatted error string for popt failure.
* @param error popt error
* @return error string
*/
/*@observer@*/
const char *const poptStrerror(const int error)
/*@*/;
/** \ingroup popt
* Limit search for executables.
* @param con context
* @param path single path to search for executables
* @param allowAbsolute absolute paths only?
*/
/*@unused@*/
void poptSetExecPath(poptContext con, const char * path, int allowAbsolute)
/*@modifies con @*/;
/** \ingroup popt
* Print detailed description of options.
* @param con context
* @param fp ouput file handle
* @param flags (unused)
*/
void poptPrintHelp(poptContext con, FILE * fp, /*@unused@*/ int flags)
/*@globals fileSystem @*/
/*@modifies *fp, fileSystem @*/;
/** \ingroup popt
* Print terse description of options.
* @param con context
* @param fp ouput file handle
* @param flags (unused)
*/
void poptPrintUsage(poptContext con, FILE * fp, /*@unused@*/ int flags)
/*@globals fileSystem @*/
/*@modifies *fp, fileSystem @*/;
/** \ingroup popt
* Provide text to replace default "[OPTION...]" in help/usage output.
* @param con context
* @param text replacement text
*/
/*@-fcnuse@*/
void poptSetOtherOptionHelp(poptContext con, const char * text)
/*@modifies con @*/;
/*@=fcnuse@*/
/** \ingroup popt
* Return argv[0] from context.
* @param con context
* @return argv[0]
*/
/*@-fcnuse@*/
/*@observer@*/
const char * poptGetInvocationName(poptContext con)
/*@*/;
/*@=fcnuse@*/
/** \ingroup popt
* Shuffle argv pointers to remove stripped args, returns new argc.
* @param con context
* @param argc no. of args
* @param argv arg vector
* @return new argc
*/
/*@-fcnuse@*/
int poptStrippedArgv(poptContext con, int argc, char ** argv)
/*@modifies *argv @*/;
/*@=fcnuse@*/
/**
* Save a long, performing logical operation with value.
* @warning Alignment check may be too strict on certain platorms.
* @param arg integer pointer, aligned on int boundary.
* @param argInfo logical operation (see POPT_ARGFLAG_*)
* @param aLong value to use
* @return 0 on success, POPT_ERROR_NULLARG/POPT_ERROR_BADOPERATION
*/
/*@-incondefs@*/
/*@unused@*/
int poptSaveLong(/*@null@*/ long * arg, int argInfo, long aLong)
/*@modifies *arg @*/
/*@requires maxSet(arg) >= 0 /\ maxRead(arg) == 0 @*/;
/*@=incondefs@*/
/**
* Save an integer, performing logical operation with value.
* @warning Alignment check may be too strict on certain platorms.
* @param arg integer pointer, aligned on int boundary.
* @param argInfo logical operation (see POPT_ARGFLAG_*)
* @param aLong value to use
* @return 0 on success, POPT_ERROR_NULLARG/POPT_ERROR_BADOPERATION
*/
/*@-incondefs@*/
/*@unused@*/
int poptSaveInt(/*@null@*/ int * arg, int argInfo, long aLong)
/*@modifies *arg @*/
/*@requires maxSet(arg) >= 0 /\ maxRead(arg) == 0 @*/;
/*@=incondefs@*/
/*@=type@*/
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,182 +0,0 @@
/** \ingroup popt
* \file popt/poptconfig.c
*/
/* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING
file accompanying popt source distributions, available from
ftp://ftp.rpm.org/pub/rpm/dist. */
#include "system.h"
#include "poptint.h"
/*@access poptContext @*/
/*@-compmempass@*/ /* FIX: item->option.longName kept, not dependent. */
static void configLine(poptContext con, char * line)
/*@modifies con @*/
{
size_t nameLength;
const char * entryType;
const char * opt;
poptItem item = alloca(sizeof(*item));
int i, j;
if (con->appName == NULL)
return;
nameLength = strlen(con->appName);
/*@-boundswrite@*/
memset(item, 0, sizeof(*item));
if (strncmp(line, con->appName, nameLength)) return;
line += nameLength;
if (*line == '\0' || !isspace(*line)) return;
while (*line != '\0' && isspace(*line)) line++;
entryType = line;
while (*line == '\0' || !isspace(*line)) line++;
*line++ = '\0';
while (*line != '\0' && isspace(*line)) line++;
if (*line == '\0') return;
opt = line;
while (*line == '\0' || !isspace(*line)) line++;
*line++ = '\0';
while (*line != '\0' && isspace(*line)) line++;
if (*line == '\0') return;
/*@-temptrans@*/ /* FIX: line alias is saved */
if (opt[0] == '-' && opt[1] == '-')
item->option.longName = opt + 2;
else if (opt[0] == '-' && opt[2] == '\0')
item->option.shortName = opt[1];
/*@=temptrans@*/
if (poptParseArgvString(line, &item->argc, &item->argv)) return;
/*@-modobserver@*/
item->option.argInfo = POPT_ARGFLAG_DOC_HIDDEN;
for (i = 0, j = 0; i < item->argc; i++, j++) {
const char * f;
if (!strncmp(item->argv[i], "--POPTdesc=", sizeof("--POPTdesc=")-1)) {
f = item->argv[i] + sizeof("--POPTdesc=");
if (f[0] == '$' && f[1] == '"') f++;
item->option.descrip = f;
item->option.argInfo &= ~POPT_ARGFLAG_DOC_HIDDEN;
j--;
} else
if (!strncmp(item->argv[i], "--POPTargs=", sizeof("--POPTargs=")-1)) {
f = item->argv[i] + sizeof("--POPTargs=");
if (f[0] == '$' && f[1] == '"') f++;
item->option.argDescrip = f;
item->option.argInfo &= ~POPT_ARGFLAG_DOC_HIDDEN;
item->option.argInfo |= POPT_ARG_STRING;
j--;
} else
if (j != i)
item->argv[j] = item->argv[i];
}
if (j != i) {
item->argv[j] = NULL;
item->argc = j;
}
/*@=modobserver@*/
/*@=boundswrite@*/
/*@-nullstate@*/ /* FIX: item->argv[] may be NULL */
if (!strcmp(entryType, "alias"))
(void) poptAddItem(con, item, 0);
else if (!strcmp(entryType, "exec"))
(void) poptAddItem(con, item, 1);
/*@=nullstate@*/
}
/*@=compmempass@*/
int poptReadConfigFile(poptContext con, const char * fn)
{
const char * file, * chptr, * end;
char * buf;
/*@dependent@*/ char * dst;
int fd, rc;
off_t fileLength;
fd = open(fn, O_RDONLY);
if (fd < 0)
return (errno == ENOENT ? 0 : POPT_ERROR_ERRNO);
fileLength = lseek(fd, 0, SEEK_END);
if (fileLength == -1 || lseek(fd, 0, 0) == -1) {
rc = errno;
(void) close(fd);
errno = rc;
return POPT_ERROR_ERRNO;
}
file = alloca(fileLength + 1);
if (read(fd, (char *)file, fileLength) != fileLength) {
rc = errno;
(void) close(fd);
errno = rc;
return POPT_ERROR_ERRNO;
}
if (close(fd) == -1)
return POPT_ERROR_ERRNO;
/*@-boundswrite@*/
dst = buf = alloca(fileLength + 1);
chptr = file;
end = (file + fileLength);
/*@-infloops@*/ /* LCL: can't detect chptr++ */
while (chptr < end) {
switch (*chptr) {
case '\n':
*dst = '\0';
dst = buf;
while (*dst && isspace(*dst)) dst++;
if (*dst && *dst != '#')
configLine(con, dst);
chptr++;
/*@switchbreak@*/ break;
case '\\':
*dst++ = *chptr++;
if (chptr < end) {
if (*chptr == '\n')
dst--, chptr++;
/* \ at the end of a line does not insert a \n */
else
*dst++ = *chptr++;
}
/*@switchbreak@*/ break;
default:
*dst++ = *chptr++;
/*@switchbreak@*/ break;
}
}
/*@=infloops@*/
/*@=boundswrite@*/
return 0;
}
int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv)
{
char * fn, * home;
int rc;
if (con->appName == NULL) return 0;
rc = poptReadConfigFile(con, "/etc/popt");
if (rc) return rc;
if ((home = getenv("HOME"))) {
fn = alloca(strlen(home) + 20);
strcpy(fn, home);
strcat(fn, "/.popt");
rc = poptReadConfigFile(con, fn);
if (rc) return rc;
}
return 0;
}

View File

@ -1,819 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/** \ingroup popt
* \file popt/popthelp.c
*/
/* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING
file accompanying popt source distributions, available from
ftp://ftp.rpm.org/pub/rpm/dist. */
#include "system.h"
#define POPT_WCHAR_HACK
#ifdef POPT_WCHAR_HACK
#include <wchar.h> /* for mbsrtowcs */
/*@access mbstate_t @*/
#endif
#include "poptint.h"
/*@access poptContext@*/
/**
* Display arguments.
* @param con context
* @param foo (unused)
* @param key option(s)
* @param arg (unused)
* @param data (unused)
*/
static void displayArgs(poptContext con,
/*@unused@*/ enum poptCallbackReason foo,
struct poptOption * key,
/*@unused@*/ const char * arg, /*@unused@*/ void * data)
/*@globals fileSystem@*/
/*@modifies fileSystem@*/
{
if (key->shortName == '?')
poptPrintHelp(con, stdout, 0);
else
poptPrintUsage(con, stdout, 0);
exit(0);
}
#ifdef NOTYET
/*@unchecked@*/
static int show_option_defaults = 0;
#endif
/**
* Empty table marker to enable displaying popt alias/exec options.
*/
/*@observer@*/ /*@unchecked@*/
struct poptOption poptAliasOptions[] = {
POPT_TABLEEND
};
/**
* Auto help table options.
*/
/*@-castfcnptr@*/
/*@observer@*/ /*@unchecked@*/
struct poptOption poptHelpOptions[] = {
{ NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL },
{ "help", '?', 0, NULL, '?', N_("Show this help message"), NULL },
{ "usage", '\0', 0, NULL, 'u', N_("Display brief usage message"), NULL },
POPT_TABLEEND
} ;
/*@observer@*/ /*@unchecked@*/
static struct poptOption poptHelpOptions2[] = {
/*@-readonlytrans@*/
{ NULL, '\0', POPT_ARG_INTL_DOMAIN, PACKAGE, 0, NULL, NULL},
/*@=readonlytrans@*/
{ NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL },
{ "help", '?', 0, NULL, '?', N_("Show this help message"), NULL },
{ "usage", '\0', 0, NULL, 'u', N_("Display brief usage message"), NULL },
#ifdef NOTYET
{ "defaults", '\0', POPT_ARG_NONE, &show_option_defaults, 0,
N_("Display option defaults in message"), NULL },
#endif
POPT_TABLEEND
} ;
/*@observer@*/ /*@unchecked@*/
struct poptOption * poptHelpOptionsI18N = poptHelpOptions2;
/*@=castfcnptr@*/
/**
* @param table option(s)
*/
/*@observer@*/ /*@null@*/ static const char *const
getTableTranslationDomain(/*@null@*/ const struct poptOption *table)
/*@*/
{
const struct poptOption *opt;
if (table != NULL)
for (opt = table; opt->longName || opt->shortName || opt->arg; opt++) {
if (opt->argInfo == POPT_ARG_INTL_DOMAIN)
return opt->arg;
}
return NULL;
}
/**
* @param opt option(s)
* @param translation_domain translation domain
*/
/*@observer@*/ /*@null@*/ static const char *const
getArgDescrip(const struct poptOption * opt,
/*@-paramuse@*/ /* FIX: i18n macros disabled with lclint */
/*@null@*/ const char * translation_domain)
/*@=paramuse@*/
/*@*/
{
if (!(opt->argInfo & POPT_ARG_MASK)) return NULL;
if (opt == (poptHelpOptions + 1) || opt == (poptHelpOptions + 2))
if (opt->argDescrip) return POPT_(opt->argDescrip);
if (opt->argDescrip) return D_(translation_domain, opt->argDescrip);
switch (opt->argInfo & POPT_ARG_MASK) {
case POPT_ARG_NONE: return POPT_("NONE");
#ifdef DYING
case POPT_ARG_VAL: return POPT_("VAL");
#else
case POPT_ARG_VAL: return NULL;
#endif
case POPT_ARG_INT: return POPT_("INT");
case POPT_ARG_LONG: return POPT_("LONG");
case POPT_ARG_STRING: return POPT_("STRING");
case POPT_ARG_FLOAT: return POPT_("FLOAT");
case POPT_ARG_DOUBLE: return POPT_("DOUBLE");
default: return POPT_("ARG");
}
}
/**
* Display default value for an option.
* @param lineLength display positions remaining
* @param opt option(s)
* @param translation_domain translation domain
* @return
*/
static /*@only@*/ /*@null@*/ char *
singleOptionDefaultValue(size_t lineLength,
const struct poptOption * opt,
/*@-paramuse@*/ /* FIX: i18n macros disabled with lclint */
/*@null@*/ const char * translation_domain)
/*@=paramuse@*/
/*@*/
{
const char * defstr = D_(translation_domain, "default");
char * le = malloc(4*lineLength + 1);
char * l = le;
if (le == NULL) return NULL; /* XXX can't happen */
/*@-boundswrite@*/
*le = '\0';
*le++ = '(';
strcpy(le, defstr); le += strlen(le);
*le++ = ':';
*le++ = ' ';
if (opt->arg) /* XXX programmer error */
switch (opt->argInfo & POPT_ARG_MASK) {
case POPT_ARG_VAL:
case POPT_ARG_INT:
{ long aLong = *((int *)opt->arg);
le += sprintf(le, "%ld", aLong);
} break;
case POPT_ARG_LONG:
{ long aLong = *((long *)opt->arg);
le += sprintf(le, "%ld", aLong);
} break;
case POPT_ARG_FLOAT:
{ double aDouble = *((float *)opt->arg);
le += sprintf(le, "%g", aDouble);
} break;
case POPT_ARG_DOUBLE:
{ double aDouble = *((double *)opt->arg);
le += sprintf(le, "%g", aDouble);
} break;
case POPT_ARG_STRING:
{ const char * s = *(const char **)opt->arg;
if (s == NULL) {
strcpy(le, "null"); le += strlen(le);
} else {
size_t slen = 4*lineLength - (le - l) - sizeof("\"...\")");
*le++ = '"';
strncpy(le, s, slen); le[slen] = '\0'; le += strlen(le);
if (slen < strlen(s)) {
strcpy(le, "..."); le += strlen(le);
}
*le++ = '"';
}
} break;
case POPT_ARG_NONE:
default:
l = _free(l);
return NULL;
/*@notreached@*/ break;
}
*le++ = ')';
*le = '\0';
/*@=boundswrite@*/
return l;
}
/**
* Display help text for an option.
* @param fp output file handle
* @param maxLeftCol largest argument display width
* @param opt option(s)
* @param translation_domain translation domain
*/
static void singleOptionHelp(FILE * fp, size_t maxLeftCol,
const struct poptOption * opt,
/*@null@*/ const char * translation_domain)
/*@globals fileSystem @*/
/*@modifies *fp, fileSystem @*/
{
size_t indentLength = maxLeftCol + 5;
size_t lineLength = 79 - indentLength;
const char * help = D_(translation_domain, opt->descrip);
const char * argDescrip = getArgDescrip(opt, translation_domain);
size_t helpLength;
char * defs = NULL;
char * left;
size_t nb = maxLeftCol + 1;
int displaypad = 0;
/* Make sure there's more than enough room in target buffer. */
if (opt->longName) nb += strlen(opt->longName);
if (argDescrip) nb += strlen(argDescrip);
/*@-boundswrite@*/
left = malloc(nb);
if (left == NULL) return; /* XXX can't happen */
left[0] = '\0';
left[maxLeftCol] = '\0';
if (opt->longName && opt->shortName)
sprintf(left, "-%c, %s%s", opt->shortName,
((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "-" : "--"),
opt->longName);
else if (opt->shortName != '\0')
sprintf(left, "-%c", opt->shortName);
else if (opt->longName)
sprintf(left, "%s%s",
((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "-" : "--"),
opt->longName);
if (!*left) goto out;
if (argDescrip) {
char * le = left + strlen(left);
if (opt->argInfo & POPT_ARGFLAG_OPTIONAL)
*le++ = '[';
/* Choose type of output */
/*@-branchstate@*/
if (opt->argInfo & POPT_ARGFLAG_SHOW_DEFAULT) {
defs = singleOptionDefaultValue(lineLength, opt, translation_domain);
if (defs) {
char * t = malloc((help ? strlen(help) : 0) +
strlen(defs) + sizeof(" "));
if (t) {
char * te = t;
*te = '\0';
if (help) {
strcpy(te, help); te += strlen(te);
}
*te++ = ' ';
strcpy(te, defs);
defs = _free(defs);
}
defs = t;
}
}
/*@=branchstate@*/
if (opt->argDescrip == NULL) {
switch (opt->argInfo & POPT_ARG_MASK) {
case POPT_ARG_NONE:
break;
case POPT_ARG_VAL:
#ifdef NOTNOW /* XXX pug ugly nerdy output */
{ long aLong = opt->val;
int ops = (opt->argInfo & POPT_ARGFLAG_LOGICALOPS);
int negate = (opt->argInfo & POPT_ARGFLAG_NOT);
/* Don't bother displaying typical values */
if (!ops && (aLong == 0L || aLong == 1L || aLong == -1L))
break;
*le++ = '[';
switch (ops) {
case POPT_ARGFLAG_OR:
*le++ = '|';
/*@innerbreak@*/ break;
case POPT_ARGFLAG_AND:
*le++ = '&';
/*@innerbreak@*/ break;
case POPT_ARGFLAG_XOR:
*le++ = '^';
/*@innerbreak@*/ break;
default:
/*@innerbreak@*/ break;
}
*le++ = (opt->longName != NULL ? '=' : ' ');
if (negate) *le++ = '~';
/*@-formatconst@*/
le += sprintf(le, (ops ? "0x%lx" : "%ld"), aLong);
/*@=formatconst@*/
*le++ = ']';
}
#endif
break;
case POPT_ARG_INT:
case POPT_ARG_LONG:
case POPT_ARG_FLOAT:
case POPT_ARG_DOUBLE:
case POPT_ARG_STRING:
*le++ = (opt->longName != NULL ? '=' : ' ');
strcpy(le, argDescrip); le += strlen(le);
break;
default:
break;
}
} else {
size_t lelen;
*le++ = '=';
strcpy(le, argDescrip);
lelen = strlen(le);
le += lelen;
#ifdef POPT_WCHAR_HACK
{ const char * scopy = argDescrip;
mbstate_t t;
size_t n;
memset ((void *)&t, '\0', sizeof (t)); /* In initial state. */
/* Determine number of characters. */
n = mbsrtowcs (NULL, &scopy, strlen(scopy), &t);
displaypad = (int) (lelen-n);
}
#endif
}
if (opt->argInfo & POPT_ARGFLAG_OPTIONAL)
*le++ = ']';
*le = '\0';
}
/*@=boundswrite@*/
if (help)
fprintf(fp," %-*s ", maxLeftCol+displaypad, left);
else {
fprintf(fp," %s\n", left);
goto out;
}
left = _free(left);
/*@-branchstate@*/
if (defs) {
help = defs;
defs = NULL;
}
/*@=branchstate@*/
helpLength = strlen(help);
/*@-boundsread@*/
while (helpLength > lineLength) {
const char * ch;
char format[16];
ch = help + lineLength - 1;
while (ch > help && !isspace(*ch)) ch--;
if (ch == help) break; /* give up */
while (ch > (help + 1) && isspace(*ch)) ch--;
ch++;
sprintf(format, "%%.%ds\n%%%ds", (int) (ch - help), (int) indentLength);
/*@-formatconst@*/
fprintf(fp, format, help, " ");
/*@=formatconst@*/
help = ch;
while (isspace(*help) && *help) help++;
helpLength = strlen(help);
}
/*@=boundsread@*/
if (helpLength) fprintf(fp, "%s\n", help);
out:
/*@-dependenttrans@*/
defs = _free(defs);
/*@=dependenttrans@*/
left = _free(left);
}
/**
* Find display width for longest argument string.
* @param opt option(s)
* @param translation_domain translation domain
* @return display width
*/
static size_t maxArgWidth(const struct poptOption * opt,
/*@null@*/ const char * translation_domain)
/*@*/
{
size_t max = 0;
size_t len = 0;
const char * s;
if (opt != NULL)
while (opt->longName || opt->shortName || opt->arg) {
if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
if (opt->arg) /* XXX program error */
len = maxArgWidth(opt->arg, translation_domain);
if (len > max) max = len;
} else if (!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
len = sizeof(" ")-1;
if (opt->shortName != '\0') len += sizeof("-X")-1;
if (opt->shortName != '\0' && opt->longName) len += sizeof(", ")-1;
if (opt->longName) {
len += ((opt->argInfo & POPT_ARGFLAG_ONEDASH)
? sizeof("-")-1 : sizeof("--")-1);
len += strlen(opt->longName);
}
s = getArgDescrip(opt, translation_domain);
#ifdef POPT_WCHAR_HACK
/* XXX Calculate no. of display characters. */
if (s) {
const char * scopy = s;
mbstate_t t;
size_t n;
/*@-boundswrite@*/
memset ((void *)&t, '\0', sizeof (t)); /* In initial state. */
/*@=boundswrite@*/
/* Determine number of characters. */
n = mbsrtowcs (NULL, &scopy, strlen(scopy), &t);
len += sizeof("=")-1 + n;
}
#else
if (s)
len += sizeof("=")-1 + strlen(s);
#endif
if (opt->argInfo & POPT_ARGFLAG_OPTIONAL) len += sizeof("[]")-1;
if (len > max) max = len;
}
opt++;
}
return max;
}
/**
* Display popt alias and exec help.
* @param fp output file handle
* @param items alias/exec array
* @param nitems no. of alias/exec entries
* @param left largest argument display width
* @param translation_domain translation domain
*/
static void itemHelp(FILE * fp,
/*@null@*/ poptItem items, int nitems, size_t left,
/*@null@*/ const char * translation_domain)
/*@globals fileSystem @*/
/*@modifies *fp, fileSystem @*/
{
poptItem item;
int i;
if (items != NULL)
for (i = 0, item = items; i < nitems; i++, item++) {
const struct poptOption * opt;
opt = &item->option;
if ((opt->longName || opt->shortName) &&
!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
singleOptionHelp(fp, left, opt, translation_domain);
}
}
/**
* Display help text for a table of options.
* @param con context
* @param fp output file handle
* @param table option(s)
* @param left largest argument display width
* @param translation_domain translation domain
*/
static void singleTableHelp(poptContext con, FILE * fp,
/*@null@*/ const struct poptOption * table, size_t left,
/*@null@*/ const char * translation_domain)
/*@globals fileSystem @*/
/*@modifies *fp, fileSystem @*/
{
const struct poptOption * opt;
const char *sub_transdom;
if (table == poptAliasOptions) {
itemHelp(fp, con->aliases, con->numAliases, left, NULL);
itemHelp(fp, con->execs, con->numExecs, left, NULL);
return;
}
if (table != NULL)
for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) {
if ((opt->longName || opt->shortName) &&
!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
singleOptionHelp(fp, left, opt, translation_domain);
}
if (table != NULL)
for (opt = table; (opt->longName || opt->shortName || opt->arg); opt++) {
if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_INCLUDE_TABLE)
continue;
sub_transdom = getTableTranslationDomain(opt->arg);
if (sub_transdom == NULL)
sub_transdom = translation_domain;
if (opt->descrip)
fprintf(fp, "\n%s\n", D_(sub_transdom, opt->descrip));
singleTableHelp(con, fp, opt->arg, left, sub_transdom);
}
}
/**
* @param con context
* @param fp output file handle
*/
static int showHelpIntro(poptContext con, FILE * fp)
/*@globals fileSystem @*/
/*@modifies *fp, fileSystem @*/
{
int len = 6;
const char * fn;
fprintf(fp, POPT_("Usage:"));
if (!(con->flags & POPT_CONTEXT_KEEP_FIRST)) {
/*@-boundsread@*/
/*@-nullderef -type@*/ /* LCL: wazzup? */
fn = con->optionStack->argv[0];
/*@=nullderef =type@*/
/*@=boundsread@*/
if (fn == NULL) return len;
if (strchr(fn, '/')) fn = strrchr(fn, '/') + 1;
fprintf(fp, " %s", fn);
len += strlen(fn) + 1;
}
return len;
}
void poptPrintHelp(poptContext con, FILE * fp, /*@unused@*/ int flags)
{
size_t leftColWidth;
(void) showHelpIntro(con, fp);
if (con->otherHelp)
fprintf(fp, " %s\n", con->otherHelp);
else
fprintf(fp, " %s\n", POPT_("[OPTION...]"));
leftColWidth = maxArgWidth(con->options, NULL);
singleTableHelp(con, fp, con->options, leftColWidth, NULL);
}
/**
* Display usage text for an option.
* @param fp output file handle
* @param cursor current display position
* @param opt option(s)
* @param translation_domain translation domain
*/
static size_t singleOptionUsage(FILE * fp, size_t cursor,
const struct poptOption * opt,
/*@null@*/ const char *translation_domain)
/*@globals fileSystem @*/
/*@modifies *fp, fileSystem @*/
{
size_t len = 4;
char shortStr[2] = { '\0', '\0' };
const char * item = shortStr;
const char * argDescrip = getArgDescrip(opt, translation_domain);
if (opt->shortName != '\0' && opt->longName != NULL) {
len += 2;
if (!(opt->argInfo & POPT_ARGFLAG_ONEDASH)) len++;
len += strlen(opt->longName);
} else if (opt->shortName != '\0') {
len++;
shortStr[0] = opt->shortName;
shortStr[1] = '\0';
} else if (opt->longName) {
len += strlen(opt->longName);
if (!(opt->argInfo & POPT_ARGFLAG_ONEDASH)) len++;
item = opt->longName;
}
if (len == 4) return cursor;
#ifdef POPT_WCHAR_HACK
/* XXX Calculate no. of display characters. */
if (argDescrip) {
const char * scopy = argDescrip;
mbstate_t t;
size_t n;
/*@-boundswrite@*/
memset ((void *)&t, '\0', sizeof (t)); /* In initial state. */
/*@=boundswrite@*/
/* Determine number of characters. */
n = mbsrtowcs (NULL, &scopy, strlen(scopy), &t);
len += sizeof("=")-1 + n;
}
#else
if (argDescrip)
len += sizeof("=")-1 + strlen(argDescrip);
#endif
if ((cursor + len) > 79) {
fprintf(fp, "\n ");
cursor = 7;
}
if (opt->longName && opt->shortName) {
fprintf(fp, " [-%c|-%s%s%s%s]",
opt->shortName, ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "" : "-"),
opt->longName,
(argDescrip ? " " : ""),
(argDescrip ? argDescrip : ""));
} else {
fprintf(fp, " [-%s%s%s%s]",
((opt->shortName || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) ? "" : "-"),
item,
(argDescrip ? (opt->shortName != '\0' ? " " : "=") : ""),
(argDescrip ? argDescrip : ""));
}
return cursor + len + 1;
}
/**
* Display popt alias and exec usage.
* @param fp output file handle
* @param cursor current display position
* @param item alias/exec array
* @param nitems no. of ara/exec entries
* @param translation_domain translation domain
*/
static size_t itemUsage(FILE * fp, size_t cursor,
/*@null@*/ poptItem item, int nitems,
/*@null@*/ const char * translation_domain)
/*@globals fileSystem @*/
/*@modifies *fp, fileSystem @*/
{
int i;
/*@-branchstate@*/ /* FIX: W2DO? */
if (item != NULL)
for (i = 0; i < nitems; i++, item++) {
const struct poptOption * opt;
opt = &item->option;
if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) {
translation_domain = (const char *)opt->arg;
} else if ((opt->longName || opt->shortName) &&
!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
cursor = singleOptionUsage(fp, cursor, opt, translation_domain);
}
}
/*@=branchstate@*/
return cursor;
}
/**
* Keep track of option tables already processed.
*/
typedef struct poptDone_s {
int nopts;
int maxopts;
const void ** opts;
} * poptDone;
/**
* Display usage text for a table of options.
* @param con context
* @param fp output file handle
* @param cursor current display position
* @param opt option(s)
* @param translation_domain translation domain
* @param done tables already processed
* @return
*/
static size_t singleTableUsage(poptContext con, FILE * fp, size_t cursor,
/*@null@*/ const struct poptOption * opt,
/*@null@*/ const char * translation_domain,
/*@null@*/ poptDone done)
/*@globals fileSystem @*/
/*@modifies *fp, done, fileSystem @*/
{
/*@-branchstate@*/ /* FIX: W2DO? */
if (opt != NULL)
for (; (opt->longName || opt->shortName || opt->arg) ; opt++) {
if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) {
translation_domain = (const char *)opt->arg;
} else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
if (done) {
int i = 0;
for (i = 0; i < done->nopts; i++) {
/*@-boundsread@*/
const void * that = done->opts[i];
/*@=boundsread@*/
if (that == NULL || that != opt->arg)
/*@innercontinue@*/ continue;
/*@innerbreak@*/ break;
}
/* Skip if this table has already been processed. */
if (opt->arg == NULL || i < done->nopts)
continue;
/*@-boundswrite@*/
if (done->nopts < done->maxopts)
done->opts[done->nopts++] = (const void *) opt->arg;
/*@=boundswrite@*/
}
cursor = singleTableUsage(con, fp, cursor, opt->arg,
translation_domain, done);
} else if ((opt->longName || opt->shortName) &&
!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
cursor = singleOptionUsage(fp, cursor, opt, translation_domain);
}
}
/*@=branchstate@*/
return cursor;
}
/**
* Return concatenated short options for display.
* @todo Sub-tables should be recursed.
* @param opt option(s)
* @param fp output file handle
* @retval str concatenation of short options
* @return length of display string
*/
static int showShortOptions(const struct poptOption * opt, FILE * fp,
/*@null@*/ char * str)
/*@globals fileSystem @*/
/*@modifies *str, *fp, fileSystem @*/
/*@requires maxRead(str) >= 0 @*/
{
/* bufsize larger then the ascii set, lazy alloca on top level call. */
char * s = (str != NULL ? str : memset(alloca(300), 0, 300));
int len = 0;
/*@-boundswrite@*/
if (opt != NULL)
for (; (opt->longName || opt->shortName || opt->arg); opt++) {
if (opt->shortName && !(opt->argInfo & POPT_ARG_MASK))
s[strlen(s)] = opt->shortName;
else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE)
if (opt->arg) /* XXX program error */
len = showShortOptions(opt->arg, fp, s);
}
/*@=boundswrite@*/
/* On return to top level, print the short options, return print length. */
if (s == str && *s != '\0') {
fprintf(fp, " [-%s]", s);
len = strlen(s) + sizeof(" [-]")-1;
}
return len;
}
void poptPrintUsage(poptContext con, FILE * fp, /*@unused@*/ int flags)
{
poptDone done = memset(alloca(sizeof(*done)), 0, sizeof(*done));
size_t cursor;
done->nopts = 0;
done->maxopts = 64;
cursor = done->maxopts * sizeof(*done->opts);
/*@-boundswrite@*/
done->opts = memset(alloca(cursor), 0, cursor);
/*@-keeptrans@*/
done->opts[done->nopts++] = (const void *) con->options;
/*@=keeptrans@*/
/*@=boundswrite@*/
cursor = showHelpIntro(con, fp);
cursor += showShortOptions(con->options, fp, NULL);
cursor = singleTableUsage(con, fp, cursor, con->options, NULL, done);
cursor = itemUsage(fp, cursor, con->aliases, con->numAliases, NULL);
cursor = itemUsage(fp, cursor, con->execs, con->numExecs, NULL);
if (con->otherHelp) {
cursor += strlen(con->otherHelp) + 1;
if (cursor > 79) fprintf(fp, "\n ");
fprintf(fp, " %s", con->otherHelp);
}
fprintf(fp, "\n");
}
void poptSetOtherOptionHelp(poptContext con, const char * text)
{
con->otherHelp = _free(con->otherHelp);
con->otherHelp = xstrdup(text);
}

View File

@ -1,116 +0,0 @@
/** \ingroup popt
* \file popt/poptint.h
*/
/* (C) 1998-2000 Red Hat, Inc. -- Licensing details are in the COPYING
file accompanying popt source distributions, available from
ftp://ftp.rpm.org/pub/rpm/dist. */
#ifndef H_POPTINT
#define H_POPTINT
/**
* Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
* @param p memory to free
* @retval NULL always
*/
/*@unused@*/ static inline /*@null@*/ void *
_free(/*@only@*/ /*@null@*/ const void * p)
/*@modifies p @*/
{
if (p != NULL) free((void *)p);
return NULL;
}
/* Bit mask macros. */
/*@-exporttype -redef @*/
typedef unsigned int __pbm_bits;
/*@=exporttype =redef @*/
#define __PBM_NBITS (8 * sizeof (__pbm_bits))
#define __PBM_IX(d) ((d) / __PBM_NBITS)
#define __PBM_MASK(d) ((__pbm_bits) 1 << (((unsigned)(d)) % __PBM_NBITS))
/*@-exporttype -redef @*/
typedef struct {
__pbm_bits bits[1];
} pbm_set;
/*@=exporttype =redef @*/
#define __PBM_BITS(set) ((set)->bits)
#define PBM_ALLOC(d) calloc(__PBM_IX (d) + 1, sizeof(__pbm_bits))
#define PBM_FREE(s) _free(s);
#define PBM_SET(d, s) (__PBM_BITS (s)[__PBM_IX (d)] |= __PBM_MASK (d))
#define PBM_CLR(d, s) (__PBM_BITS (s)[__PBM_IX (d)] &= ~__PBM_MASK (d))
#define PBM_ISSET(d, s) ((__PBM_BITS (s)[__PBM_IX (d)] & __PBM_MASK (d)) != 0)
struct optionStackEntry {
int argc;
/*@only@*/ /*@null@*/
const char ** argv;
/*@only@*/ /*@null@*/
pbm_set * argb;
int next;
/*@only@*/ /*@null@*/
const char * nextArg;
/*@observer@*/ /*@null@*/
const char * nextCharArg;
/*@dependent@*/ /*@null@*/
poptItem currAlias;
int stuffed;
};
struct poptContext_s {
struct optionStackEntry optionStack[POPT_OPTION_DEPTH];
/*@dependent@*/
struct optionStackEntry * os;
/*@owned@*/ /*@null@*/
const char ** leftovers;
int numLeftovers;
int nextLeftover;
/*@keep@*/
const struct poptOption * options;
int restLeftover;
/*@only@*/ /*@null@*/
const char * appName;
/*@only@*/ /*@null@*/
poptItem aliases;
int numAliases;
int flags;
/*@owned@*/ /*@null@*/
poptItem execs;
int numExecs;
/*@only@*/ /*@null@*/
const char ** finalArgv;
int finalArgvCount;
int finalArgvAlloced;
/*@dependent@*/ /*@null@*/
poptItem doExec;
/*@only@*/
const char * execPath;
int execAbsolute;
/*@only@*/ /*@relnull@*/
const char * otherHelp;
/*@null@*/
pbm_set * arg_strip;
};
#ifdef HAVE_LIBINTL_H
#include <libintl.h>
#endif
#if defined(HAVE_GETTEXT) && !defined(__LCLINT__)
#define _(foo) gettext(foo)
#else
#define _(foo) foo
#endif
#if defined(HAVE_DCGETTEXT) && !defined(__LCLINT__)
#define D_(dom, str) dgettext(dom, str)
#define POPT_(foo) D_("popt", foo)
#else
#define D_(dom, str) str
#define POPT_(foo) foo
#endif
#define N_(foo) foo
#endif

View File

@ -1,227 +0,0 @@
/** \ingroup popt
* \file popt/poptparse.c
*/
/* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING
file accompanying popt source distributions, available from
ftp://ftp.rpm.org/pub/rpm/dist. */
#include "system.h"
#define POPT_ARGV_ARRAY_GROW_DELTA 5
/*@-boundswrite@*/
int poptDupArgv(int argc, const char **argv,
int * argcPtr, const char *** argvPtr)
{
size_t nb = (argc + 1) * sizeof(*argv);
const char ** argv2;
char * dst;
int i;
if (argc <= 0 || argv == NULL) /* XXX can't happen */
return POPT_ERROR_NOARG;
for (i = 0; i < argc; i++) {
if (argv[i] == NULL)
return POPT_ERROR_NOARG;
nb += strlen(argv[i]) + 1;
}
dst = malloc(nb);
if (dst == NULL) /* XXX can't happen */
return POPT_ERROR_MALLOC;
argv2 = (void *) dst;
dst += (argc + 1) * sizeof(*argv);
/*@-branchstate@*/
for (i = 0; i < argc; i++) {
argv2[i] = dst;
dst += strlen(strcpy(dst, argv[i])) + 1;
}
/*@=branchstate@*/
argv2[argc] = NULL;
if (argvPtr) {
*argvPtr = argv2;
} else {
free(argv2);
argv2 = NULL;
}
if (argcPtr)
*argcPtr = argc;
return 0;
}
/*@=boundswrite@*/
/*@-bounds@*/
int poptParseArgvString(const char * s, int * argcPtr, const char *** argvPtr)
{
const char * src;
char quote = '\0';
int argvAlloced = POPT_ARGV_ARRAY_GROW_DELTA;
const char ** argv = malloc(sizeof(*argv) * argvAlloced);
int argc = 0;
int buflen = strlen(s) + 1;
char * buf = memset(alloca(buflen), 0, buflen);
int rc = POPT_ERROR_MALLOC;
if (argv == NULL) return rc;
argv[argc] = buf;
for (src = s; *src != '\0'; src++) {
if (quote == *src) {
quote = '\0';
} else if (quote != '\0') {
if (*src == '\\') {
src++;
if (!*src) {
rc = POPT_ERROR_BADQUOTE;
goto exit;
}
if (*src != quote) *buf++ = '\\';
}
*buf++ = *src;
} else if (isspace(*src)) {
if (*argv[argc] != '\0') {
buf++, argc++;
if (argc == argvAlloced) {
argvAlloced += POPT_ARGV_ARRAY_GROW_DELTA;
argv = realloc(argv, sizeof(*argv) * argvAlloced);
if (argv == NULL) goto exit;
}
argv[argc] = buf;
}
} else switch (*src) {
case '"':
case '\'':
quote = *src;
/*@switchbreak@*/ break;
case '\\':
src++;
if (!*src) {
rc = POPT_ERROR_BADQUOTE;
goto exit;
}
/*@fallthrough@*/
default:
*buf++ = *src;
/*@switchbreak@*/ break;
}
}
if (strlen(argv[argc])) {
argc++, buf++;
}
rc = poptDupArgv(argc, argv, argcPtr, argvPtr);
exit:
if (argv) free(argv);
return rc;
}
/*@=bounds@*/
/* still in the dev stage.
* return values, perhaps 1== file erro
* 2== line to long
* 3== umm.... more?
*/
int poptConfigFileToString(FILE *fp, char ** argstrp, /*@unused@*/ int flags)
{
char line[999];
char * argstr;
char * p;
char * q;
char * x;
int t;
int argvlen = 0;
size_t maxlinelen = sizeof(line);
size_t linelen;
int maxargvlen = 480;
int linenum = 0;
*argstrp = NULL;
/* | this_is = our_line
* p q x
*/
if (fp == NULL)
return POPT_ERROR_NULLARG;
argstr = calloc(maxargvlen, sizeof(*argstr));
if (argstr == NULL) return POPT_ERROR_MALLOC;
while (fgets(line, (int)maxlinelen, fp) != NULL) {
linenum++;
p = line;
/* loop until first non-space char or EOL */
while( *p != '\0' && isspace(*p) )
p++;
linelen = strlen(p);
if (linelen >= maxlinelen-1)
return POPT_ERROR_OVERFLOW; /* XXX line too long */
if (*p == '\0' || *p == '\n') continue; /* line is empty */
if (*p == '#') continue; /* comment line */
q = p;
while (*q != '\0' && (!isspace(*q)) && *q != '=')
q++;
if (isspace(*q)) {
/* a space after the name, find next non space */
*q++='\0';
while( *q != '\0' && isspace((int)*q) ) q++;
}
if (*q == '\0') {
/* single command line option (ie, no name=val, just name) */
q[-1] = '\0'; /* kill off newline from fgets() call */
argvlen += (t = q - p) + (sizeof(" --")-1);
if (argvlen >= maxargvlen) {
maxargvlen = (t > maxargvlen) ? t*2 : maxargvlen*2;
argstr = realloc(argstr, maxargvlen);
if (argstr == NULL) return POPT_ERROR_MALLOC;
}
strcat(argstr, " --");
strcat(argstr, p);
continue;
}
if (*q != '=')
continue; /* XXX for now, silently ignore bogus line */
/* *q is an equal sign. */
*q++ = '\0';
/* find next non-space letter of value */
while (*q != '\0' && isspace(*q))
q++;
if (*q == '\0')
continue; /* XXX silently ignore missing value */
/* now, loop and strip all ending whitespace */
x = p + linelen;
while (isspace(*--x))
*x = 0; /* null out last char if space (including fgets() NL) */
/* rest of line accept */
t = x - p;
argvlen += t + (sizeof("' --='")-1);
if (argvlen >= maxargvlen) {
maxargvlen = (t > maxargvlen) ? t*2 : maxargvlen*2;
argstr = realloc(argstr, maxargvlen);
if (argstr == NULL) return POPT_ERROR_MALLOC;
}
strcat(argstr, " --");
strcat(argstr, p);
strcat(argstr, "=\"");
strcat(argstr, q);
strcat(argstr, "\"");
}
*argstrp = argstr;
return 0;
}

View File

@ -1,81 +0,0 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#if defined (__GLIBC__) && defined(__LCLINT__)
/*@-declundef@*/
/*@unchecked@*/
extern __const __int32_t *__ctype_tolower;
/*@unchecked@*/
extern __const __int32_t *__ctype_toupper;
/*@=declundef@*/
#endif
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#if HAVE_MCHECK_H
#include <mcheck.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef __NeXT
/* access macros are not declared in non posix mode in unistd.h -
don't try to use posix on NeXTstep 3.3 ! */
#include <libc.h>
#endif
#if defined(__LCLINT__)
/*@-declundef -incondefs @*/ /* LCL: missing annotation */
/*@only@*/ /*@out@*/
void * alloca (size_t __size)
/*@ensures MaxSet(result) == (__size - 1) @*/
/*@*/;
/*@=declundef =incondefs @*/
#endif
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#elif defined(__GNUC__) && defined(__STRICT_ANSI__)
#define alloca __builtin_alloca
#endif
/*@-redecl -redef@*/
/*@mayexit@*/ /*@only@*/ /*@unused@*/
char * xstrdup (const char *str)
/*@*/;
/*@=redecl =redef@*/
#if HAVE_MCHECK_H && defined(__GNUC__)
#define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL)
#define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
#else
#define xstrdup(_str) strdup(_str)
#endif /* HAVE_MCHECK_H && defined(__GNUC__) */
#if HAVE___SECURE_GETENV && !defined(__LCLINT__)
#define getenv(_s) __secure_getenv(_s)
#endif
#include "popt.h"

View File

@ -1,12 +0,0 @@
test1 alias --simple --arg2
test1 alias --two --arg1 --arg2 alias
test1 alias --takerest --
test1 alias -T --arg2
test1 alias -O --arg1
test1 alias --grab --arg2 "'foo !#:+'"
test1 alias --grabbar --grab bar
test1 exec --echo-args echo
test1 alias -e --echo-args
test1 exec -a /bin/echo

View File

@ -1,278 +0,0 @@
/* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING
file accompanying popt source distributions, available from
ftp://ftp.rpm.org/pub/rpm/dist. */
#include "system.h"
/*@unchecked@*/
static int pass2 = 0;
static void option_callback(/*@unused@*/ poptContext con,
/*@unused@*/ enum poptCallbackReason reason,
const struct poptOption * opt,
char * arg, void * data)
/*@globals fileSystem @*/
/*@modifies fileSystem @*/
{
if (pass2)
fprintf(stdout, "callback: %c %s %s ", opt->val, (char *) data, arg);
}
/*@unchecked@*/
static int arg1 = 0;
/*@unchecked@*/ /*@observer@*/
static char * arg2 = "(none)";
/*@unchecked@*/
static int arg3 = 0;
/*@unchecked@*/
static int inc = 0;
/*@unchecked@*/
static int shortopt = 0;
/*@unchecked@*/
static int aVal = 141421;
/*@unchecked@*/
static int bVal = 141421;
/*@unchecked@*/
static int aFlag = 0;
/*@unchecked@*/
static int bFlag = 0;
/*@unchecked@*/
static int aInt = 271828;
/*@unchecked@*/
static int bInt = 271828;
/*@unchecked@*/
static long aLong = 738905609L;
/*@unchecked@*/
static long bLong = 738905609L;
/*@unchecked@*/
static float aFloat = 3.1415926535;
/*@unchecked@*/
static float bFloat = 3.1415926535;
/*@unchecked@*/
static double aDouble = 9.86960440108935861883;
/*@unchecked@*/
static double bDouble = 9.86960440108935861883;
/*@unchecked@*/ /*@null@*/
static char * oStr = (char *) -1;
/*@unchecked@*/
static int singleDash = 0;
/*@unchecked@*/ /*@observer@*/
static char * lStr =
"This tests default strings and exceeds the ... limit. "
"123456789+123456789+123456789+123456789+123456789+ "
"123456789+123456789+123456789+123456789+123456789+ "
"123456789+123456789+123456789+123456789+123456789+ "
"123456789+123456789+123456789+123456789+123456789+ ";
/*@unchecked@*/ /*@null@*/
static char * nStr = NULL;
/*@unchecked@*/
static struct poptOption moreCallbackArgs[] = {
{ NULL, '\0', POPT_ARG_CALLBACK|POPT_CBFLAG_INC_DATA,
(void *)option_callback, 0,
NULL, NULL },
{ "cb2", 'c', POPT_ARG_STRING, NULL, 'c',
"Test argument callbacks", NULL },
POPT_TABLEEND
};
/*@unchecked@*/
static struct poptOption callbackArgs[] = {
{ NULL, '\0', POPT_ARG_CALLBACK, (void *)option_callback, 0,
"sampledata", NULL },
{ "cb", 'c', POPT_ARG_STRING, NULL, 'c',
"Test argument callbacks", NULL },
{ "longopt", '\0', 0, NULL, 'l',
"Unused option for help testing", NULL },
POPT_TABLEEND
};
/*@unchecked@*/
static struct poptOption moreArgs[] = {
{ "inc", 'I', 0, &inc, 0, "An included argument", NULL },
POPT_TABLEEND
};
/*@unchecked@*/
static struct poptOption options[] = {
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, &moreCallbackArgs, 0,
"arg for cb2", NULL },
{ "arg1", '\0', 0, &arg1, 0, "First argument with a really long"
" description. After all, we have to test argument help"
" wrapping somehow, right?", NULL },
{ "arg2", '2', POPT_ARG_STRING | POPT_ARGFLAG_SHOW_DEFAULT, &arg2, 0,
"Another argument", "ARG" },
{ "arg3", '3', POPT_ARG_INT, &arg3, 0,
"A third argument", "ANARG" },
{ "onedash", '\0', POPT_ARGFLAG_ONEDASH, &shortopt, 0,
"POPT_ARGFLAG_ONEDASH: Option takes a single -", NULL },
{ "hidden", '\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, NULL, 0,
"POPT_ARGFLAG_HIDDEN: A hidden option (--help shouldn't display)",
NULL },
{ "optional", '\0', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, &oStr, 0,
"POPT_ARGFLAG_OPTIONAL: Takes an optional string argument", NULL },
{ "val", '\0', POPT_ARG_VAL | POPT_ARGFLAG_SHOW_DEFAULT, &aVal, 125992,
"POPT_ARG_VAL: 125992 141421", 0},
{ "int", 'i', POPT_ARG_INT | POPT_ARGFLAG_SHOW_DEFAULT, &aInt, 0,
"POPT_ARG_INT: 271828", NULL },
{ "long", 'l', POPT_ARG_LONG | POPT_ARGFLAG_SHOW_DEFAULT, &aLong, 0,
"POPT_ARG_LONG: 738905609", NULL },
{ "float", 'f', POPT_ARG_FLOAT | POPT_ARGFLAG_SHOW_DEFAULT, &aFloat, 0,
"POPT_ARG_FLOAT: 3.14159", NULL },
{ "double", 'd', POPT_ARG_DOUBLE | POPT_ARGFLAG_SHOW_DEFAULT, &aDouble, 0,
"POPT_ARG_DOUBLE: 9.8696", NULL },
{ "bitset", '\0', POPT_BIT_SET | POPT_ARGFLAG_SHOW_DEFAULT, &aFlag, 0x4321,
"POPT_BIT_SET: |= 0x4321", 0},
{ "bitclr", '\0', POPT_BIT_CLR | POPT_ARGFLAG_SHOW_DEFAULT, &aFlag, 0x1234,
"POPT_BIT_CLR: &= ~0x1234", 0},
{ "nstr", '\0', POPT_ARG_STRING | POPT_ARGFLAG_SHOW_DEFAULT, &nStr, 0,
"POPT_ARG_STRING: (null)", NULL},
{ "lstr", '\0', POPT_ARG_STRING | POPT_ARGFLAG_SHOW_DEFAULT, &lStr, 0,
"POPT_ARG_STRING: \"123456789...\"", NULL},
{ NULL, '-', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, &singleDash, 0,
NULL, NULL },
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, &moreArgs, 0,
NULL, NULL },
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, &callbackArgs, 0,
"Callback arguments", NULL },
POPT_AUTOHELP
POPT_TABLEEND
};
static void resetVars(void)
/*@globals arg1, arg2, arg3, inc, shortopt,
aVal, aFlag, aInt, aLong, aFloat, aDouble,
oStr, singleDash, pass2 @*/
/*@modifies arg1, arg2, arg3, inc, shortopt,
aVal, aFlag, aInt, aLong, aFloat, aDouble,
oStr, singleDash, pass2 @*/
{
arg1 = 0;
arg2 = "(none)";
arg3 = 0;
inc = 0;
shortopt = 0;
aVal = bVal;
aFlag = bFlag;
aInt = bInt;
aLong = bLong;
aFloat = bFloat;
aDouble = bDouble;
oStr = (char *) -1;
singleDash = 0;
pass2 = 0;
}
int main(int argc, const char ** argv)
/*@globals pass2, fileSystem, internalState @*/
/*@modifies pass2, fileSystem, internalState @*/
{
int rc;
int ec = 0;
poptContext optCon;
const char ** rest;
int help = 0;
int usage = 0;
#if HAVE_MCHECK_H && HAVE_MTRACE
/*@-moduncon -noeffectuncon@*/
mtrace(); /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */
/*@=moduncon =noeffectuncon@*/
#endif
/*@-modobserver@*/
resetVars();
/*@=modobserver@*/
/*@-temptrans@*/
optCon = poptGetContext("test1", argc, argv, options, 0);
/*@=temptrans@*/
(void) poptReadConfigFile(optCon, "./test-poptrc");
#if 1
while ((rc = poptGetNextOpt(optCon)) > 0) /* Read all the options ... */
{};
poptResetContext(optCon); /* ... and then start over. */
/*@-modobserver@*/
resetVars();
/*@=modobserver@*/
#endif
pass2 = 1;
if ((rc = poptGetNextOpt(optCon)) < -1) {
fprintf(stderr, "test1: bad argument %s: %s\n",
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
poptStrerror(rc));
ec = 2;
goto exit;
}
if (help) {
poptPrintHelp(optCon, stdout, 0);
goto exit;
}
if (usage) {
poptPrintUsage(optCon, stdout, 0);
goto exit;
}
fprintf(stdout, "arg1: %d arg2: %s", arg1, arg2);
if (arg3)
fprintf(stdout, " arg3: %d", arg3);
if (inc)
fprintf(stdout, " inc: %d", inc);
if (shortopt)
fprintf(stdout, " short: %d", shortopt);
if (aVal != bVal)
fprintf(stdout, " aVal: %d", aVal);
if (aFlag != bFlag)
fprintf(stdout, " aFlag: %d", aFlag);
if (aInt != bInt)
fprintf(stdout, " aInt: %d", aInt);
if (aLong != bLong)
fprintf(stdout, " aLong: %ld", aLong);
/*@-realcompare@*/
if (aFloat != bFloat)
fprintf(stdout, " aFloat: %g", aFloat);
if (aDouble != bDouble)
fprintf(stdout, " aDouble: %g", aDouble);
/*@=realcompare@*/
if (oStr != (char *)-1)
fprintf(stdout, " oStr: %s", (oStr ? oStr : "(none)"));
if (singleDash)
fprintf(stdout, " -");
/*@-boundsread@*/
rest = poptGetArgs(optCon);
if (rest) {
fprintf(stdout, " rest:");
while (*rest) {
fprintf(stdout, " %s", *rest);
rest++;
}
}
/*@=boundsread@*/
fprintf(stdout, "\n");
exit:
optCon = poptFreeContext(optCon);
#if HAVE_MCHECK_H && HAVE_MTRACE
/*@-moduncon -noeffectuncon@*/
muntrace(); /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */
/*@=moduncon =noeffectuncon@*/
#endif
return ec;
}

View File

@ -1,149 +0,0 @@
/*
Popt Library Test Program Number Too
--> "a real world test of popt bugs" <--
Copyright (C) 1999 US Interactive, Inc.
This program can be used under the GPL or LGPL at your
whim as long as this Copyright remains attached.
*/
#include "system.h"
char *PathnameOfKeyFile = NULL;
char *PathnameOfOfferFile = NULL;
char *txHost = NULL;
int txSslPort = 443;
int txStoreId = 0;
char *contentProtocol = NULL;
char *contentHost = NULL;
int contentPort = 80;
char *contentPath = NULL;
char *dbPassword = NULL;
char *dbUserName = NULL;
char *rcfile = "createuser-defaults";
char *username=NULL;
char *password = NULL;
char *firstname = NULL;
char *lastname = NULL;
char *addr1 = NULL;
char *addr2 = NULL;
char *city = NULL;
char *state = NULL;
char *postal = NULL;
char *country = NULL;
char *email = NULL;
char *dayphone = NULL;
char *fax = NULL;
int
main(int argc, const char ** argv) {
poptContext optCon; /* context for parsing command-line options */
struct poptOption userOptionsTable[] = {
{ "first", 'f', POPT_ARG_STRING, &firstname, 0,
"user's first name", "first" },
{ "last", 'l', POPT_ARG_STRING, &lastname, 0,
"user's last name", "last" },
{ "username", 'u', POPT_ARG_STRING, &username, 0,
"system user name", "user" },
{ "password", 'p', POPT_ARG_STRING, &password, 0,
"system password name", "password" },
{ "addr1", '1', POPT_ARG_STRING, &addr1, 0,
"line 1 of address", "addr1" },
{ "addr2", '2', POPT_ARG_STRING, &addr2, 0,
"line 2 of address", "addr2" },
{ "city", 'c', POPT_ARG_STRING, &city, 0,
"city", "city" },
{ "state", 's', POPT_ARG_STRING, &state, 0,
"state or province", "state" },
{ "postal", 'P', POPT_ARG_STRING, &postal, 0,
"postal or zip code", "postal" },
{ "zip", 'z', POPT_ARG_STRING, &postal, 0,
"postal or zip code", "postal" },
{ "country", 'C', POPT_ARG_STRING, &country, 0,
"two letter ISO country code", "country" },
{ "email", 'e', POPT_ARG_STRING, &email, 0,
"user's email address", "email" },
{ "dayphone", 'd', POPT_ARG_STRING, &dayphone, 0,
"day time phone number", "dayphone" },
{ "fax", 'F', POPT_ARG_STRING, &fax, 0,
"fax number", "fax" },
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
struct poptOption transactOptionsTable[] = {
{ "keyfile", '\0', POPT_ARG_STRING, &PathnameOfKeyFile, 0,
"transact offer key file (flat_O.kf)", "key-file" },
{ "offerfile", '\0', POPT_ARG_STRING, &PathnameOfOfferFile, 0,
"offer template file (osl.ofr)", "offer-file" },
{ "storeid", '\0', POPT_ARG_INT, &txStoreId, 0,
"store id", "store-id" },
{ "rcfile", '\0', POPT_ARG_STRING, &rcfile, 0,
"default command line options (in popt format)", "rcfile" },
{ "txhost", '\0', POPT_ARG_STRING, &txHost, 0,
"transact host", "transact-host" },
{ "txsslport", '\0', POPT_ARG_INT, &txSslPort, 0,
"transact server ssl port ", "transact ssl port" },
{ "cnhost", '\0', POPT_ARG_STRING, &contentHost, 0,
"content host", "content-host" },
{ "cnpath", '\0', POPT_ARG_STRING, &contentPath, 0,
"content url path", "content-path" },
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
struct poptOption databaseOptionsTable[] = {
{ "dbpassword", '\0', POPT_ARG_STRING, &dbPassword, 0,
"Database password", "DB password" },
{ "dbusername", '\0', POPT_ARG_STRING, &dbUserName, 0,
"Database user name", "DB UserName" },
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
struct poptOption optionsTable[] = {
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, NULL, 0,
"Transact Options (not all will apply)", NULL },
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, NULL, 0,
"Transact Database Names", NULL },
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, NULL, 0,
"User Fields", NULL },
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
optionsTable[0].arg = transactOptionsTable;
optionsTable[1].arg = databaseOptionsTable;
optionsTable[2].arg = userOptionsTable;
#if HAVE_MCHECK_H && HAVE_MTRACE
mtrace(); /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */
#endif
optCon = poptGetContext("createuser", argc, argv, optionsTable, 0);
poptReadConfigFile(optCon, rcfile );
/* although there are no options to be parsed, check for --help */
poptGetNextOpt(optCon);
optCon = poptFreeContext(optCon);
printf( "dbusername %s\tdbpassword %s\n"
"txhost %s\ttxsslport %d\ttxstoreid %d\tpathofkeyfile %s\n"
"username %s\tpassword %s\tfirstname %s\tlastname %s\n"
"addr1 %s\taddr2 %s\tcity %s\tstate %s\tpostal %s\n"
"country %s\temail %s\tdayphone %s\tfax %s\n",
dbUserName, dbPassword,
txHost, txSslPort, txStoreId, PathnameOfKeyFile,
username, password, firstname, lastname,
addr1,addr2, city, state, postal,
country, email, dayphone, fax);
return 0;
}

View File

@ -1,10 +0,0 @@
single string: ' --aaa --bbb --ccc --bla="bla" --this_is="fdsafdas" --5555="55555" --test="with lots of spaces"'
popt array: size=7
'--aaa'
'--bbb'
'--ccc'
'--bla=bla'
'--this_is=fdsafdas'
'--5555=55555'
'--test=with lots of spaces'

View File

@ -1,13 +0,0 @@
# this line is ignored
# this one too
aaa
bbb
ccc
bla=bla
this_is = fdsafdas
bad_line=
reall bad line
reall bad line = again
5555= 55555
test = with lots of spaces

View File

@ -1 +0,0 @@
cannot parse test3-data/02.input. ret=-18

View File

@ -1,2 +0,0 @@
# this next line has 999 letters. this should cause an abort.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

View File

@ -1,70 +0,0 @@
single string: ' --confversion="1.0.0.0" --expires="19:57:56 03/16/01" --sessions="-1" --hostid="72738c36" --hostid="80b0cafb" --hostid="80c104e4" --hostid="80cf520f" --hostid="809fc805" --port="6666" --realservername="goya:554" --realserverip="127.0.0.1:554" --sdmux="0" --runtimeconf="1" --soc="1" --socaddr="127.0.0.1" --socconntimeout="3" --socqport="4110" --socuport="4111" --loadtest="0" --tunnelssmport="5541" --allowtcptransport="0" --realrevpkts="0" --asmrules="4;" --maxasmtime="10" --asmwaittime="4" --asmcalctime="4" --maxletswitchtime="20" --setbw="6;" --setbwblocktime="15" --asmsetbwtime="3" --setbwwaittime="1" --inputmaxsetbw="100" --encratemaxsetbw="100" --livesetbwdelta="2" --encrate="34000" --maxoutproberate="85" --maxoutencrate="140" --minoutencrate="108" --erprgamma="70" --utp="15" --nbalpha="77" --bbalpha="83" --tsfrequency="10" --recoveryrate="140" --maxbuffer="2000" --csmbuffer="12000" --probedelta="120" --numprobes="4" --probebuffpkts="5" --probeinterval="600000" --clientlog="2" --loglevel="2" --monitor="0" --testmode="0" --emulator="0" --emuaddr="127.0.0.1" --emuport="4200" --auxsvr="0" --mngsvrip="127.0.0.1" --mngsvrport="15550" --ssmip="127.0.0.1" --auxsvrport="14445" --auxsvrchkfreq="2" --auxsvrchkperiod="60;" --simulation="0" --netbuffer="5" --siminterval="3"'
popt array: size=67
'--confversion=1.0.0.0'
'--expires=19:57:56 03/16/01'
'--sessions=-1'
'--hostid=72738c36'
'--hostid=80b0cafb'
'--hostid=80c104e4'
'--hostid=80cf520f'
'--hostid=809fc805'
'--port=6666'
'--realservername=goya:554'
'--realserverip=127.0.0.1:554'
'--sdmux=0'
'--runtimeconf=1'
'--soc=1'
'--socaddr=127.0.0.1'
'--socconntimeout=3'
'--socqport=4110'
'--socuport=4111'
'--loadtest=0'
'--tunnelssmport=5541'
'--allowtcptransport=0'
'--realrevpkts=0'
'--asmrules=4;'
'--maxasmtime=10'
'--asmwaittime=4'
'--asmcalctime=4'
'--maxletswitchtime=20'
'--setbw=6;'
'--setbwblocktime=15'
'--asmsetbwtime=3'
'--setbwwaittime=1'
'--inputmaxsetbw=100'
'--encratemaxsetbw=100'
'--livesetbwdelta=2'
'--encrate=34000'
'--maxoutproberate=85'
'--maxoutencrate=140'
'--minoutencrate=108'
'--erprgamma=70'
'--utp=15'
'--nbalpha=77'
'--bbalpha=83'
'--tsfrequency=10'
'--recoveryrate=140'
'--maxbuffer=2000'
'--csmbuffer=12000'
'--probedelta=120'
'--numprobes=4'
'--probebuffpkts=5'
'--probeinterval=600000'
'--clientlog=2'
'--loglevel=2'
'--monitor=0'
'--testmode=0'
'--emulator=0'
'--emuaddr=127.0.0.1'
'--emuport=4200'
'--auxsvr=0'
'--mngsvrip=127.0.0.1'
'--mngsvrport=15550'
'--ssmip=127.0.0.1'
'--auxsvrport=14445'
'--auxsvrchkfreq=2'
'--auxsvrchkperiod=60;'
'--simulation=0'
'--netbuffer=5'
'--siminterval=3'

View File

@ -1,210 +0,0 @@
#
# WARNING: NO LINE IN THIS FILE SHOULD BE LONGER THAN 999 characters!
#
# a vague real world example
#
# the vers no of this file. useful for debug
confversion=1.0.0.0
# date and time of expiry of this license
expires=19:57:56 03/16/01
# max no of simultaneous sessions
sessions=-1
# hostid(s) of licensed host(s): matisse
hostid=72738c36
# degas (exodus)
hostid=80b0cafb
# max
hostid=80c104e4
# breton
hostid=80cf520f
# vaneyck
hostid=809fc805
# port at which SSM should listen (unless -p)
port=6666
# the name of the realserver that we proxy for
realservername=goya:554
# the ip addr of real server we proxy fo
realserverip=127.0.0.1:554
# are we using an SDMUX to receive rev STP pkts?
sdmux=0
# allow run time config through TCP connection
runtimeconf=1
# should we connect to SOC for delivinit/update etc?
soc=1
# address of the SOC
socaddr=127.0.0.1
# no of secs before we timeout SOC connection
socconntimeout=3
# SOC port for sending delivinit query
socqport=4110
# SOC port for sending delivery update
socuport=4111
# run in load test mode? (ignore player disconnect)
loadtest=0
# port of SSM to redirect to on probe bw < desc bw
tunnelssmport=5541
# allow TCP (RTSP interleaved) streaming?
allowtcptransport=0
# enable RDT rev packets?
realrevpkts=0
# allow asm switches? 0=no,1=yes,2=all within maxasmtime,3=1 within maxasmtime
# 4=same as 2 but also whenever told by CSM after maxasmtime+tell CSM
asmrules=4;
# max time to which we will allow asm switches
maxasmtime=10
# time to wait after switch before starting below
asmwaittime=4
# time over which to calc post asm switch input rate
asmcalctime=4
# time after LETSWITCH within which to permit switch
maxletswitchtime=20
# change setbw? 0=no,1=block,2=sub w/1st,3=sub w/curr,4=tell CSM,5=allow w/asm
# 6=sub w/cur enc rate & tell CSM & generate setbw on switch
setbw=6;
# minimum time between setbw requests from player
setbwblocktime=15
# max time within which we allow post asm setbw
asmsetbwtime=3
# post switch wait time (secs) before we send setbw
setbwwaittime=1
# max setbw as % of [init/post switch] input rate
inputmaxsetbw=100
# max setbw as % of current encoding rate
encratemaxsetbw=100
# % increase in encratemaxsetbw for live streams
livesetbwdelta=2
# temporarily here. encoding rate bits/sec
encrate=34000
# max output rate = maxoutproberate % probe rate
maxoutproberate=85
# max output rate = maxoutencrate % curr enc rate
maxoutencrate=140
# worst case outrate. should be > encratemaxsetbw
minoutencrate=108
# max out rate = er+erprgamma%(maxoutpr%pr-er)
erprgamma=70
# the CSM UTP: % loss above which CSM will enter CC
utp=15
# CSM alpha for narrowband
nbalpha=77
# CSM alpha for broadband
bbalpha=83
# periodic sendTS? 0 = sendTS only at SR_COMPUTE
tsfrequency=10
# SReoc as a % of the encoding rate
recoveryrate=140
# maximum server side buffer (in packets)
maxbuffer=2000
# client side buffer (in milliseconds)
csmbuffer=12000
# probe bw > probedelta % describe bw for us to work
probedelta=120
# the number of probes to do at the beginning
numprobes=4
# number of packets to burst during each probe
probebuffpkts=5
# time (in microsecs) interval between probes
probeinterval=600000
# client logs to none(0),disk(1),soc(2),both(3)
clientlog=2
# 0=none,1=brief,2=detailed,3=extensive
loglevel=2
# connected to monitor?
monitor=0
# 0=none, 1=test
testmode=0
# are we using the emulator?
emulator=0
# emulator IP address
emuaddr=127.0.0.1
# emulator TCP control port to connect to
emuport=4200
#
# aux serv config
#
# start aux server? 0=no, 1=yes
auxsvr=0
# IP address of mgmt server
mngsvrip=127.0.0.1
# port where mgmt server listens
mngsvrport=15550
# IP address of SSM that we are monitoring
ssmip=127.0.0.1
# port where aux server should listen
auxsvrport=14445
# frequency of aux server checks
auxsvrchkfreq=2
auxsvrchkperiod=60;
#
# congestion simulation info
#
# congestion simulation?
simulation=0
# size of the network buffer
netbuffer=5
# time (in secs) between drop rate recalculation
siminterval=3

View File

@ -1,48 +0,0 @@
/* vim:ts=8:sts=4 */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <popt.h>
int main (int argc, char **argv) {
char *out;
int newargc, j, f, ret;
char **newargv;
FILE *fp;
if (argc == 1) {
printf ("usage: test-popt file_1 file_2 ...\n");
printf ("you may specify many files\n");
exit (1);
}
for (f = 1; f < argc; f++) {
fp = fopen (argv[f], "r");
if (fp == NULL) {
printf ("cannot read file %s. errno=%s\n", argv[f],
strerror(errno));
continue;
}
ret = poptConfigFileToString (fp, &out, 0);
if (ret != 0) {
printf ("cannot parse %s. ret=%d\n", argv[f], ret);
continue;
}
printf ("single string: '%s'\n", out);
poptParseArgvString (out, &newargc, &newargv);
printf ("popt array: size=%d\n", newargc);
for (j = 0; j < newargc; j++)
printf ("'%s'\n", newargv[j]);
printf ("\n");
free(out);
fclose (fp);
}
return 0;
}

View File

@ -1,100 +0,0 @@
#!/bin/sh
run() {
prog=$1; shift
name=$1; shift
answer=$1; shift
echo Running test $name.
result=`$builddir/$prog $*`
if [ "$answer" != "$result" ]; then
echo "Test \"$*\" failed with: \"$result\" != \"$answer\" "
exit 2
fi
}
run_diff() {
prog=$1; shift
name=$1; shift
in_file=$1; shift
answer_file=$1; shift
out=$builddir/tmp.out
diff_file=$builddir/tmp.diff
echo Running test $name.
$builddir/$prog $in_file > $out
ret=$?
diff $out $answer_file > $diff_file
diff_ret=$?
if [ "$diff_ret" != "0" ]; then
echo "Test \"$name\" failed output is in $out, diff is:"
cat $diff_file
exit 2
fi
rm $out $diff_file
}
builddir=`pwd`
[ -z "$srcdir" ] && srcdir=$builddir
cd ${srcdir}
test1=${builddir}/test1
echo "Running tests in `pwd`"
#make -q testcases
run test1 "test1 - 1" "arg1: 1 arg2: (none)" --arg1
run test1 "test1 - 2" "arg1: 0 arg2: foo" --arg2 foo
run test1 "test1 - 3" "arg1: 1 arg2: something" --arg1 --arg2 something
run test1 "test1 - 4" "arg1: 0 arg2: another" --simple another
run test1 "test1 - 5" "arg1: 1 arg2: alias" --two
run test1 "test1 - 6" "arg1: 1 arg2: (none) rest: --arg2" --arg1 -- --arg2
run test1 "test1 - 7" "arg1: 0 arg2: abcd rest: --arg1" --simple abcd -- --arg1
run test1 "test1 - 8" "arg1: 1 arg2: (none) rest: --arg2" --arg1 --takerest --arg2
run test1 "test1 - 9" "arg1: 0 arg2: foo" -2 foo
run test1 "test1 - 10" "arg1: 0 arg2: (none) arg3: 50" -3 50
run test1 "test1 - 11" "arg1: 0 arg2: bar" -T bar
run test1 "test1 - 12" "arg1: 1 arg2: (none)" -O
run test1 "test1 - 13" "arg1: 1 arg2: foo" -OT foo
run test1 "test1 - 14" "arg1: 0 arg2: (none) inc: 1" --inc
run test1 "test1 - 15" "arg1: 0 arg2: foo inc: 1" -I --arg2 foo
POSIX_ME_HARDER=1 ; export POSIX_ME_HARDER
run test1 "test1 - 16" "arg1: 1 arg2: (none) rest: foo --arg2 something" --arg1 foo --arg2 something
unset POSIX_ME_HARDER
POSIXLY_CORRECT=1 ; export POSIXLY_CORRECT
run test1 "test1 - 17" "arg1: 1 arg2: (none) rest: foo --arg2 something" --arg1 foo --arg2 something
unset POSIXLY_CORRECT
run test1 "test1 - 18" "callback: c sampledata bar arg1: 1 arg2: (none)" --arg1 --cb bar
run test1 "test1 - 19" "" --echo-args
run test1 "test1 - 20" "--arg1" --echo-args --arg1
run test1 "test1 - 21" "--arg2 something" -T something -e
run test1 "test1 - 22" "--arg2 something more args" -T something -a more args
run test1 "test1 - 23" "--echo-args -a" --echo-args -e -a
run test1 "test1 - 24" "arg1: 0 arg2: (none) short: 1" -onedash
run test1 "test1 - 25" "arg1: 0 arg2: (none) short: 1" --onedash
run test1 "test1 - 26" "callback: c arg for cb2 foo arg1: 0 arg2: (none)" --cb2 foo
run test1 "test1 - 27" "arg1: 0 arg2: (none) -" -
run test1 "test1 - 28" "arg1: 0 arg2: foo -" - -2 foo
run test1 "test1 - 29" "arg1: 0 arg2: bbbb" --arg2=aaaa -2 bbbb
run test1 "test1 - 30" "arg1: 0 arg2: 'foo bingo' rest: boggle" --grab bingo boggle
run test1 "test1 - 31" "arg1: 0 arg2: 'foo bar' rest: boggle" --grabbar boggle
run test1 "test1 - 32" "arg1: 0 arg2: (none) aFloat: 10.1" -f 10.1
run test1 "test1 - 33" "arg1: 0 arg2: (none) aFloat: 10.1" --float 10.1
run test1 "test1 - 34" "arg1: 0 arg2: (none) aDouble: 10.1" -d 10.1
run test1 "test1 - 35" "arg1: 0 arg2: (none) aDouble: 10.1" --double 10.1
run test1 "test1 - 36" "arg1: 0 arg2: (none) oStr: (none)" --optional
run test1 "test1 - 37" "arg1: 0 arg2: (none) oStr: yadda" --optional=yadda
run test1 "test1 - 38" "arg1: 0 arg2: (none) oStr: yadda" --optional yadda
run test1 "test1 - 39" "arg1: 0 arg2: (none) oStr: ping rest: pong" --optional=ping pong
run test1 "test1 - 40" "arg1: 0 arg2: (none) oStr: ping rest: pong" --optional ping pong
run_diff test3 "test3 - 41" test3-data/01.input test3-data/01.answer
run_diff test3 "test3 - 42" test3-data/02.input test3-data/02.answer
run_diff test3 "test3 - 43" test3-data/03.input test3-data/03.answer
echo ""
echo "Passed."