pax_global_header00006660000000000000000000000064134320705040014510gustar00rootroot0000000000000052 comment=0aeff7faf438ac910b032e2b19032e8ff9261862 pinfo-0.6.13/000077500000000000000000000000001343207050400127125ustar00rootroot00000000000000pinfo-0.6.13/.editorconfig000066400000000000000000000004321343207050400153660ustar00rootroot00000000000000root = true [*] end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true max_line_length = 120 [*.c *.h] indent_style = tab indent_size = 4 tab_width = 4 [*.{yml,yaml,yml.j2,yaml.j2}] max_line_length = 120 indent_style = space indent_size = 2 pinfo-0.6.13/.gitignore000066400000000000000000000021341343207050400147020ustar00rootroot00000000000000*~ *.o Makefile Makefile.in /aclocal.m4 /autom4te.cache /configure /config.h /config.h.in /config.log /config.status /libtool /pinfo.spec /stamp-h1 /Changelog /macros/codeset.m4 /macros/gettext.m4 /macros/glibc2.m4 /macros/glibc21.m4 /macros/iconv.m4 /macros/intdiv0.m4 /macros/intmax.m4 /macros/inttypes-pri.m4 /macros/inttypes.m4 /macros/inttypes_h.m4 /macros/isc-posix.m4 /macros/lcmessage.m4 /macros/lib-ld.m4 /macros/lib-link.m4 /macros/lib-prefix.m4 /macros/libtool.m4 /macros/longdouble.m4 /macros/longlong.m4 /macros/ltoptions.m4 /macros/ltsugar.m4 /macros/ltversion.m4 /macros/lt~obsolete.m4 /macros/nls.m4 /macros/po.m4 /macros/printf-posix.m4 /macros/progtest.m4 /macros/signed.m4 /macros/size_max.m4 /macros/stdint_h.m4 /macros/uintmax_t.m4 /macros/ulonglong.m4 /macros/wchar_t.m4 /macros/wint_t.m4 /macros/xsize.m4 /po/Makevars.template /po/Rules-quot /po/boldquot.sed /po/en@boldquot.header /po/en@quot.header /po/quot.sed /po/POTFILES /po/*.gmo /po/*.sed /po/stamp-po /tools/ /doc/pinfo.1 /doc/pinfo.info /doc/version.texi /doc/stamp-vti /macros/macros.dep /src/.deps/ /src/pinfo /src/pinforc pinfo-0.6.13/.travis.yml000066400000000000000000000141221343207050400150230ustar00rootroot00000000000000# yamllint disable rule:truthy --- language: c dist: xenial addons: apt: sources: &source_apt - ubuntu-toolchain-r-test packages: &pkg_apt - gettext - autopoint - libreadline-dev - libncursesw5-dev - texinfo - autotools-dev - autoconf-archive - curl homebrew: packages: &pkg_brew - autoconf - autoconf-archive - automake - readline - libtool - gettext - texinfo - curl jobs: include: - stage: "Compiler version/OS checks" name: "linux/gcc-5" os: linux compiler: "gcc-5" addons: apt: sources: - *source_apt packages: - *pkg_apt - "gcc-5" - stage: "Compiler version/OS checks" name: "linux/gcc-6" os: linux compiler: "gcc-6" addons: apt: sources: - *source_apt packages: - *pkg_apt - "gcc-6" - stage: "Compiler version/OS checks" name: "linux/gcc-7" os: linux compiler: "gcc-7" addons: apt: sources: - *source_apt packages: - *pkg_apt - "gcc-7" - stage: "Compiler version/OS checks" name: "linux/gcc-8" os: linux compiler: "gcc-8" addons: apt: sources: - *source_apt packages: - *pkg_apt - "gcc-8" - stage: "Compiler version/OS checks" name: "linux/gcc-9" os: linux compiler: "gcc-9" addons: apt: sources: - *source_apt packages: - *pkg_apt - "gcc-9" - stage: "Compiler version/OS checks" name: "linux/clang-5" os: linux compiler: "clang-5.0" addons: apt: sources: [ *source_apt ] packages: - *pkg_apt - "clang-5.0" - stage: "Compiler version/OS checks" name: "linux/clang-6" os: linux compiler: "clang-6.0" addons: apt: sources: - *source_apt - "llvm-toolchain-xenial-6.0" packages: - *pkg_apt - "clang-6.0" - stage: "Compiler version/OS checks" name: "linux/clang-7" os: linux compiler: "clang-7" addons: apt: sources: - *source_apt - "llvm-toolchain-xenial-7" packages: - *pkg_apt - "clang-7" - stage: "Compiler version/OS checks" name: "osx/xcode-9.4" os: osx osx_image: "xcode9.4" compiler: clang env: [ CONFIGOPTIONS="--with-readline=/usr/local/opt/readline/" ] addons: homebrew: packages: - *pkg_brew - stage: "Compiler version/OS checks" name: "osx/xcode-10.1" os: osx osx_image: "xcode10.1" compiler: clang env: [ CONFIGOPTIONS="--with-readline=/usr/local/opt/readline/" ] addons: homebrew: packages: - *gettext - stage: "Compiler version/OS checks" name: "osx/hb/gcc-5" os: osx compiler: "gcc-5" env: [ CONFIGOPTIONS="--with-readline=/usr/local/opt/readline/" ] addons: homebrew: packages: - *pkg_brew - "gcc@5" - stage: "Compiler version/OS checks" name: "osx/hb/gcc-8" os: osx compiler: "gcc-8" env: [ CONFIGOPTIONS="--with-readline=/usr/local/opt/readline/" ] addons: homebrew: packages: - *pkg_apt - "gcc@8" - stage: "Crosscompiler checks" name: "x86_32" os: linux compiler: "gcc-8" env: { CFLAGS: "-m32" } addons: apt: sources: - *source_apt packages: - *pkg_apt - "gcc-8" - "gcc-8-multilib" - "lib32gcc-8-dev" - "lib32ncurses5-dev" - "lib32readline-dev" - stage: "Optimization checks" name: "gcc-8 -Os" os: linux compiler: "gcc-8" env: { CFLAGS: "-Os" } addons: apt: sources: - *source_apt packages: - *pkg_apt - "gcc-8" - stage: "Optimization checks" name: "gcc-8 -O3" os: linux compiler: "gcc-8" env: { CFLAGS: "-O3" } addons: apt: sources: - *source_apt packages: - *pkg_apt - "gcc-8" - stage: "distcheck" addons: apt: sources: - *source_apt packages: - *pkg_apt - texlive script: - ./autogen.sh - ./configure - make distcheck before_deploy: - | export PINFO_VERSION=$(awk '/^#define +PACKAGE_VERSION/ { print $3 }' < config.h | tr -d '"'); if [ "$PINFO_VERSION" != "$TRAVIS_TAG" ]; then echo "tag '$TRAVIS_TAG' is not in sync with PACKAGE_VERSION '$PINFO_VERSION'"; echo "Aborting release"; false; fi - echo "Deploying pinfo version $PINFO_VERSION to Github Release" deploy: provider: releases api_key: "$GITHUB_TOKEN" file: "pinfo-${PINFO_VERSION}.tar.gz" skip_cleanup: true on: { tags: true } draft: true allow_failures: - os: linux compiler: gcc-9 - os: osx compiler: gcc-8 - os: linux compiler: "gcc-8" env: { CFLAGS: "-m32" } before_install: - "$CC --version" before_script: - export PATH="/usr/local/opt/gettext/bin:$PATH" script: - ./autogen.sh - "./configure $CONFIGOPTIONS" - make after_failure: - apt install curl - > test -e config.log && curl -s 'https://hastebin.com/documents' --data-binary @config.log | grep '"key"'|sed 's#^.*"key"\s*:\s*"\(.*\)".*$#https://hastebin.com/\1#' - > test -e aclocal.m4 && curl -s 'https://hastebin.com/documents' --data-binary @aclocal.m4 | grep '"key"'|sed 's#^.*"key"\s*:\s*"\(.*\)".*$#https://hastebin.com/\1#' pinfo-0.6.13/ABOUT-NLS000066400000000000000000002036201343207050400141440ustar00rootroot000000000000001 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 free software 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 on translations can 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. 1.1 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'. 1.2 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 included GNU `gettext' 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 not be 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 usually have 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. 1.3 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. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your country by running the command `locale -a | grep '^LL''. 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'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. 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. 1.4 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. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of April 2005. 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 af am ar az be bg bs ca cs cy da de el en en_GB +-------------------------------------------------+ GNUnet | | a2ps | [] [] [] [] [] | aegis | () | ant-phone | () | anubis | [] | ap-utils | | aspell | [] [] [] [] | bash | [] [] | batchelor | [] | bfd | | bibshelf | [] | binutils | [] | bison | [] [] | bluez-pin | [] [] [] [] | clisp | [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | | cpplib | [] [] [] | darkstat | [] () [] | dialog | [] [] [] [] [] [] | diffutils | [] [] [] [] [] | doodle | [] | e2fsprogs | [] [] | enscript | [] [] [] [] | error | [] [] [] [] | fetchmail | [] () [] [] [] | fileutils | [] [] | findutils | [] [] [] | flex | [] [] [] | fslint | [] | gas | | gawk | [] [] [] | gbiff | [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] | gimp-print | [] [] [] [] | gip | | gliv | [] | glunarclock | | gmult | [] [] | gnubiff | () | gnucash | [] () () [] | gnucash-glossary | [] () | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | [] [] | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | | gpe-edit | [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] | gpsdrive | () () | gramadoir | [] [] | grep | [] [] [] [] [] [] | gretl | | gsasl | [] | gss | | gst-plugins | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] () | gtkspell | [] [] [] | hello | [] [] [] [] | id-utils | [] [] | impost | | indent | [] [] | iso_3166 | | iso_3166_1 | [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | | iso_639 | | jpilot | [] | jtag | | jwhois | | kbd | [] [] [] [] | latrine | () | ld | [] | libc | [] [] [] [] [] | libextractor | | libgpewidget | [] [] [] | libgsasl | | libiconv | [] [] [] [] [] | libidn | | lifelines | [] () | lilypond | [] | lingoteach | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | [] | make | [] [] | man-db | [] () [] [] | minicom | [] [] | mysecretdiary | [] [] | nano | [] () [] | nano_1_0 | [] () [] [] | opcodes | [] | parted | [] [] [] [] | psmisc | | ptx | [] [] [] | pwdutils | | python | | radius | [] | recode | [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] | sh-utils | [] [] | shared-mime-info | [] [] | sharutils | [] [] [] [] [] | silky | | skencil | [] () | sketch | [] () | solfege | [] | soundtracker | [] [] | sp | [] | stardict | [] | tar | | texinfo | [] [] | textutils | [] [] [] | tin | () () | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | vorbis-tools | [] [] [] [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] [] [] [] | xchat | [] [] [] [] | xkeyboard-config | | xpad | | +-------------------------------------------------+ af am ar az be bg bs ca cs cy da de el en en_GB 10 0 0 2 7 4 0 41 43 3 52 90 20 1 15 eo es et eu fa fi fr ga gl he hr hu id is it +-----------------------------------------------+ GNUnet | | a2ps | [] [] [] () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] | aspell | [] [] | bash | [] [] [] [] | batchelor | [] [] | bfd | [] | bibshelf | [] [] [] | binutils | [] [] | bison | [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] | clisp | [] [] | console-tools | | coreutils | [] [] [] [] [] | cpio | [] [] | cpplib | [] [] | darkstat | [] () [] [] [] | dialog | [] [] [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] [] | enscript | [] [] | error | [] [] [] [] [] | fetchmail | [] | fileutils | [] [] [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] | fslint | [] | gas | [] [] | gawk | [] [] [] [] | gbiff | [] | gcal | [] [] | gcc | [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] | gip | [] [] [] | gliv | () | glunarclock | [] [] [] | gmult | [] [] [] | gnubiff | () () | gnucash | [] () [] | gnucash-glossary | [] [] | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] | gpe-conf | [] | gpe-contacts | [] | gpe-edit | [] [] | gpe-go | [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] | gpe-taskmanager | [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] | gpsdrive | () () [] () | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] [] [] [] [] | gretl | [] [] [] | gsasl | [] [] [] | gss | [] | gst-plugins | [] [] [] | gstreamer | [] | gtick | [] [] [] [] [] | gtkspell | [] [] [] [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | impost | [] [] | indent | [] [] [] [] [] [] [] [] [] [] [] | iso_3166 | [] [] [] | iso_3166_1 | [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_3166_3 | [] | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | [] [] | jtag | [] | jwhois | [] [] [] [] [] | kbd | [] [] | latrine | [] [] [] | ld | [] [] | libc | [] [] [] [] [] | libextractor | | libgpewidget | [] [] [] [] [] | libgsasl | [] [] | libiconv | [] [] [] [] [] [] [] [] [] [] [] | libidn | [] [] | lifelines | () | lilypond | [] | lingoteach | [] [] [] | lynx | [] [] [] | m4 | [] [] [] [] | mailutils | [] [] | make | [] [] [] [] [] [] [] | man-db | () | minicom | [] [] [] [] | mysecretdiary | [] [] [] | nano | [] [] () [] [] | nano_1_0 | [] [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | psmisc | [] [] | ptx | [] [] [] [] [] [] [] [] [] | pwdutils | | python | | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rpm | [] | screem | | scrollkeeper | [] [] [] | sed | [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] | silky | [] | skencil | [] [] | sketch | [] [] | solfege | [] | soundtracker | [] [] [] | sp | [] | stardict | [] | tar | [] [] [] [] [] | texinfo | [] [] [] | textutils | [] [] [] [] [] | tin | [] () | tp-robot | [] [] | tuxpaint | [] [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] [] [] | vorbis-tools | [] [] | wastesedge | () | wdiff | [] [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] [] [] | xchat | [] [] [] [] [] | xkeyboard-config | | xpad | [] [] [] | +-----------------------------------------------+ eo es et eu fa fi fr ga gl he hr hu id is it 13 85 21 15 2 35 115 45 17 8 6 40 27 1 45 ja ko ku lg lt lv mk mn ms mt nb nl nn no nso +-----------------------------------------------+ GNUnet | | a2ps | () [] [] () | aegis | () | ant-phone | [] | anubis | [] [] [] | ap-utils | | aspell | [] [] | bash | [] | batchelor | [] | bfd | | bibshelf | | binutils | | bison | [] [] [] | bluez-pin | [] | clisp | [] | console-tools | | coreutils | [] [] | cpio | | cpplib | | darkstat | [] [] | dialog | [] | diffutils | [] [] [] | doodle | | e2fsprogs | | enscript | [] | error | [] | fetchmail | [] [] | fileutils | [] [] | findutils | [] | flex | [] [] | fslint | [] | gas | | gawk | [] [] | gbiff | [] | gcal | | gcc | | gettext-examples | [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gimp-print | [] [] | gip | [] | gliv | [] | glunarclock | [] [] | gmult | [] | gnubiff | | gnucash | () () [] | gnucash-glossary | [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] | gpe-clock | [] | gpe-conf | [] | gpe-contacts | | gpe-edit | [] | gpe-go | [] | gpe-login | [] | gpe-ownerinfo | [] | gpe-sketchbook | [] | gpe-su | [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | [] | gphoto2 | [] [] | gprof | | gpsdrive | () () () | gramadoir | () | grep | [] [] [] | gretl | | gsasl | [] | gss | | gst-plugins | [] | gstreamer | [] | gtick | [] | gtkspell | [] [] | hello | [] [] [] [] [] [] [] [] | id-utils | [] | impost | | indent | [] [] | iso_3166 | [] | iso_3166_1 | [] [] | iso_3166_2 | [] | iso_3166_3 | [] | iso_4217 | [] [] [] | iso_639 | [] [] [] | jpilot | () () () | jtag | | jwhois | [] | kbd | [] | latrine | [] | ld | | libc | [] [] [] [] [] | libextractor | | libgpewidget | [] | libgsasl | [] | libiconv | [] | libidn | | lifelines | [] | lilypond | [] | lingoteach | [] | lynx | [] [] | m4 | [] [] | mailutils | | make | [] [] [] | man-db | () | minicom | [] | mysecretdiary | [] | nano | [] [] | nano_1_0 | [] [] [] | opcodes | [] | parted | [] [] | psmisc | [] [] | ptx | [] [] [] | pwdutils | | python | | radius | | recode | [] | rpm | [] [] | screem | [] | scrollkeeper | [] [] [] | sed | [] [] | sh-utils | [] [] | shared-mime-info | [] [] [] [] | sharutils | [] [] | silky | [] | skencil | | sketch | | solfege | [] [] | soundtracker | | sp | () | stardict | [] [] | tar | [] [] | texinfo | [] [] [] | textutils | [] [] [] | tin | | tp-robot | [] | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] | vorbis-tools | [] | wastesedge | [] | wdiff | [] [] | wget | [] [] | xchat | [] [] [] [] | xkeyboard-config | [] | xpad | [] | +-----------------------------------------------+ ja ko ku lg lt lv mk mn ms mt nb nl nn no nso 33 11 1 1 1 2 2 3 11 0 15 96 7 5 0 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta +-------------------------------------------------+ GNUnet | | a2ps | () [] [] [] [] [] [] | aegis | () () | ant-phone | [] | anubis | [] [] [] | ap-utils | () | aspell | [] [] | bash | [] [] [] | batchelor | [] | bfd | | bibshelf | | binutils | [] [] | bison | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | clisp | [] | console-tools | [] | coreutils | [] [] [] [] | cpio | [] [] | cpplib | | darkstat | [] [] [] [] [] [] | dialog | [] [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] | doodle | [] | e2fsprogs | [] [] | enscript | [] [] [] [] | error | [] [] [] | fetchmail | [] () [] [] [] | fileutils | [] [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] [] [] | fslint | [] [] [] | gas | | gawk | [] [] [] [] | gbiff | [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gimp-print | [] [] | gip | [] [] [] | gliv | [] [] [] | glunarclock | [] [] [] [] [] [] | gmult | [] [] [] [] | gnubiff | () [] | gnucash | () [] [] [] [] | gnucash-glossary | [] [] [] | gpe-aerial | [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] | gpe-calendar | [] [] [] [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] | gpe-contacts | [] [] [] | gpe-edit | [] [] [] [] [] [] [] | gpe-go | [] [] [] [] [] | gpe-login | [] [] [] [] [] [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] | gpe-sketchbook | [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] [] [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] | gpsdrive | [] | gramadoir | [] | grep | [] [] [] [] [] [] [] | gretl | [] | gsasl | [] [] [] [] [] | gss | [] [] [] | gst-plugins | [] [] [] [] | gstreamer | [] [] [] [] | gtick | [] [] [] | gtkspell | [] [] [] [] [] [] | hello | [] [] [] [] [] [] [] | id-utils | [] [] [] [] | impost | | indent | [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] | iso_3166_1 | [] [] [] [] | iso_3166_2 | | iso_3166_3 | [] [] [] | iso_4217 | [] [] | iso_639 | [] [] [] | jpilot | | jtag | [] | jwhois | [] [] [] () () | kbd | [] [] [] | latrine | [] [] | ld | [] | libc | [] [] [] [] [] | libextractor | [] | libgpewidget | [] [] [] [] [] [] | libgsasl | [] [] [] | libiconv | [] [] [] [] [] [] [] [] [] [] | libidn | [] () | lifelines | [] [] | lilypond | [] | lingoteach | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] [] | minicom | [] [] [] [] | mysecretdiary | [] [] [] [] | nano | [] [] [] | nano_1_0 | [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | psmisc | [] [] | ptx | [] [] [] [] [] [] | pwdutils | [] | python | | radius | [] [] | recode | [] [] [] [] [] [] | rpm | [] [] [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] | sh-utils | [] [] [] | shared-mime-info | [] [] [] [] [] | sharutils | [] [] [] | silky | [] | skencil | [] [] [] | sketch | [] [] [] | solfege | | soundtracker | [] [] | sp | | stardict | [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] | tin | | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] | vorbis-tools | [] [] | wastesedge | | wdiff | [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] [] | xchat | [] [] [] [] [] [] | xkeyboard-config | | xpad | | +-------------------------------------------------+ or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta 1 0 48 30 58 6 79 71 5 45 13 12 50 86 0 tg th tk tr uk ven vi wa xh zh_CN zh_TW zu +--------------------------------------------+ GNUnet | | 0 a2ps | [] [] [] | 19 aegis | | 0 ant-phone | [] | 4 anubis | [] | 9 ap-utils | () | 1 aspell | [] [] [] | 13 bash | | 10 batchelor | [] [] | 7 bfd | | 1 bibshelf | [] | 5 binutils | [] | 6 bison | [] | 17 bluez-pin | [] [] [] [] [] | 24 clisp | | 7 console-tools | [] | 4 coreutils | [] | 16 cpio | [] [] | 6 cpplib | [] [] | 7 darkstat | [] () () | 15 dialog | [] [] [] | 25 diffutils | [] [] [] [] | 28 doodle | [] | 5 e2fsprogs | [] | 8 enscript | [] | 12 error | [] [] [] | 16 fetchmail | [] | 12 fileutils | [] [] [] | 18 findutils | [] [] | 17 flex | [] [] | 15 fslint | [] | 7 gas | [] | 3 gawk | [] | 14 gbiff | | 4 gcal | [] | 5 gcc | [] | 3 gettext-examples | [] [] [] [] | 20 gettext-runtime | [] [] [] [] [] | 25 gettext-tools | [] [] [] | 17 gimp-print | [] | 11 gip | [] | 8 gliv | [] | 6 glunarclock | [] [] | 13 gmult | [] [] [] | 13 gnubiff | [] | 3 gnucash | () [] | 10 gnucash-glossary | [] | 8 gpe-aerial | [] [] | 13 gpe-beam | [] [] | 13 gpe-calendar | [] [] [] [] | 18 gpe-clock | [] [] [] [] | 17 gpe-conf | [] [] | 12 gpe-contacts | [] [] | 6 gpe-edit | [] [] [] [] | 15 gpe-go | [] [] | 11 gpe-login | [] [] [] [] [] | 18 gpe-ownerinfo | [] [] [] [] | 19 gpe-sketchbook | [] [] | 14 gpe-su | [] [] [] | 16 gpe-taskmanager | [] [] [] | 17 gpe-timesheet | [] [] [] [] | 17 gpe-today | [] [] [] [] [] | 19 gpe-todo | [] [] [] | 16 gphoto2 | [] [] | 17 gprof | [] [] | 10 gpsdrive | | 2 gramadoir | [] | 6 grep | [] [] [] [] | 32 gretl | | 4 gsasl | [] [] | 12 gss | [] | 5 gst-plugins | [] [] | 16 gstreamer | [] [] [] | 14 gtick | [] | 11 gtkspell | [] [] [] | 20 hello | [] [] [] [] | 37 id-utils | [] [] | 13 impost | [] | 3 indent | [] [] [] | 24 iso_3166 | [] [] [] | 12 iso_3166_1 | [] [] | 20 iso_3166_2 | | 2 iso_3166_3 | [] [] | 8 iso_4217 | [] [] | 10 iso_639 | [] [] | 12 jpilot | [] [] [] | 6 jtag | | 2 jwhois | [] [] [] | 12 kbd | [] [] | 12 latrine | [] [] | 8 ld | [] | 5 libc | [] [] | 22 libextractor | | 1 libgpewidget | [] [] | 17 libgsasl | [] | 7 libiconv | [] [] [] [] [] | 32 libidn | [] [] | 5 lifelines | | 4 lilypond | [] | 5 lingoteach | | 5 lynx | [] [] | 14 m4 | [] [] | 17 mailutils | [] | 7 make | [] [] | 18 man-db | | 5 minicom | | 11 mysecretdiary | [] [] | 12 nano | | 11 nano_1_0 | [] [] | 17 opcodes | [] | 7 parted | [] [] [] | 17 psmisc | [] | 7 ptx | [] [] | 23 pwdutils | | 1 python | | 0 radius | [] | 6 recode | [] [] | 22 rpm | [] [] | 11 screem | | 1 scrollkeeper | [] [] | 23 sed | [] [] | 19 sh-utils | [] | 15 shared-mime-info | [] [] | 19 sharutils | [] [] [] | 20 silky | | 3 skencil | | 6 sketch | | 6 solfege | | 4 soundtracker | [] | 8 sp | [] | 3 stardict | [] [] [] [] | 10 tar | [] [] | 13 texinfo | [] [] | 14 textutils | [] [] [] | 17 tin | | 1 tp-robot | [] [] | 7 tuxpaint | [] [] [] [] | 34 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] | 17 vorbis-tools | [] | 10 wastesedge | | 1 wdiff | [] [] | 22 wget | [] [] [] [] | 31 xchat | [] [] [] | 22 xkeyboard-config | | 1 xpad | [] | 5 +--------------------------------------------+ 72 teams tg th tk tr uk ven vi wa xh zh_CN zh_TW zu 147 domains 0 0 1 78 29 0 71 16 0 41 20 0 1711 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 April 2005 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'. 1.6 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 the 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. pinfo-0.6.13/AUTHORS000066400000000000000000000026001343207050400137600ustar00rootroot00000000000000Pinfo is currently maintained by Bas Zoetekouw . Its original author is Przemek Borys . Please file any comments/questions/bug reports as an issue on Github: https://github.com/baszoetekouw/pinfo Below are the names of the people who helped by sending good ideas, bugs reports, or helped out in some other way: Adam Lazur Aleksey I Zavilohin Andrzej Solecki AndrĆ© Karwath Artur Frysiak Bas Zoetekouw Carlo Wood Christian Kurz Clytie Siddall Cort Daniel Bauke Daniel Nylander David M. Cooke Dmitry Volosenkov Dobrica Pavlinusic Eddy Petrişor Egil Kvaleberg Felipe Augusto van de Wiel Frederick W. Wheeler Hao Li Hector Rivas Gandara Ilya L Ovchinnikov Ingo Oeser Jakub Bogusz Jarkko O Mourujarvi Jerzy Klejnowski Jiri Pavlovsky KatarĆ­na MachĆ”lkovĆ” Kevin Kreamer Krzysztof Krzyzaniak Linus ƅkerlund Liviu Daia Maciej Nowicki Marcin Kadziolka Marcin Wojdyr Marius Gedminas Matthias Friedrich Michal Kuratczyk Michal Politowski Michał Stępień Moritz Moeller-Herrmann Nathanael Nerode Paul Boekholt Pawel Kolodziej Pawel Kot Pawel Wilk Piarres Beobide Przemek Borys Rene van Bevern Ryszard Kurek Simon Huggins Sotiris Vassilopoulos Stanislav Ievlev Stanislav Kuchar Tim Bell Tomasz Kloczko Witold Filipczyk Yuri Kozlov andrew deryabin (This list is possibly incomplete -- please remind me if you contributed in the past in some way, and are not credited here) pinfo-0.6.13/COPYING000066400000000000000000000354261343207050400137570ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS pinfo-0.6.13/Changelog.old000066400000000000000000001210441343207050400153030ustar00rootroot000000000000001999-11-02 Przemek Borys * AUTHORS, src/Makefile.am, src/manual.c: bugfix, and new makefile.am, which makes backup copies of old pinforc file 1999-10-31 Przemek Borys * src/parse_config.h, src/pinfo.c, src/pinforc.in, src/printinfo.c, src/regexp_search.c, src/regexp_search.h, src/utils.c, src/utils.h, src/video.c, configure.in, doc/pinfo.1.in, NEWS, src/filehandling_functions.c, src/mainfunction.c, src/mainfunction.h, src/manual.c, src/parse_config.c: opis w NEWS do 0.5.9 1999-10-10 Przemek Borys * src/mainfunction.c: fixed bug in totalsearch 1999-10-02 Przemek Borys * src/manual.c: patch for solaris (setenv->putenv) 1999-09-29 Przemek Borys * src/parse_config.c: tiny change 1999-09-25 Tomasz Kłoczko * pinfo.spec.in: - added ru translation from KSI-Linux spec file. 1999-09-19 Przemek Borys * configure.in, src/filehandling_functions.c, src/pinfo.c, src/utils.c: bugfixes, v0.5.8 1999-09-15 Tomasz Kłoczko * po/cs.po, po/de.po, po/pl.po, po/ru.po, po/sv.po: - updated. Przemek .. please before releasing each new version update .po files. 1999-09-15 Przemek Borys * po/de.po: german translation--update 1999-09-08 Artur Frysiak * pinfo.spec.in: - added ru locale * pinfo.spec.in: - now work on RedHat too (I hope) 1999-09-07 Przemek Borys * src/pinfo.c, src/utils.c, src/utils.h, configure.in, NEWS, src/filehandling_functions.c, src/filehandling_functions.h, src/Makefile.am, src/manual.c, src/parse_config.c: fixed --with-included-gettext (I hope) man pages can now have width different than 80 cols -r option works with compressed files NEW VERSION :) (what was the command, which I should pass to CVS now? ;) 1999-09-04 Artur Frysiak * pinfo.spec.in: - fix building on RH 6.0 1999-08-28 Przemek Borys * src/filehandling_functions.c, src/manual.c, NEWS: portability changes 1999-08-27 Jiri Pavlovsky * po/cs.po: *** empty log message *** 1999-08-22 Przemek Borys * README: *** empty log message *** 1999-08-18 Przemek Borys * src/manual.c, configure.in, NEWS: manual supports now key_goto (please update .po translations) 1999-08-16 Przemek Borys * src/video.c: fixed percent calculation 1999-08-15 Przemek Borys * AUTHORS, NEWS: . 1999-08-14 Przemek Borys * src/manual.c: correction to the split-link handler * doc/pinfo.1.in, src/pinforc.in, NEWS: Changes in docs. 1999-08-14 Jiri Pavlovsky * src/manual.c, src/video.c, po/cs.po: pinfo will no longer say, you are viewing >100% of a document :) updated cs.po 1999-08-13 Przemek Borys * src/colors.c, src/utils.c, src/utils.h, configure.in, doc/pinfo.1.in: little changes to make autoconf work how expected * src/manual.c, src/parse_config.c, src/pinforc.in, AUTHORS: modified pinforc.in to not add filters by default manual code now fully supports carried links. 1999-08-12 Przemek Borys * src/datatypes.c, src/filehandling_functions.c, src/mainfunction.c: modified default for ignoremacros (it can't be a constant) modified search routines for indirect entries modified routines for tag table creation * src/mainfunction.c, src/manual.c, NEWS: mainfunction -- updated searching routine to match new reality manual.c -- a code for following links splitted across lines, ie. send- mail.8 1999-08-10 Przemek Borys * src/manual.c: sigsegv fix 1999-08-03 Paweł Wilk * src/manual.c: fixed zipped files greeping/viewing 1999-07-30 Paweł Wilk * src/manual.c: little improvement when ignore notice is shown 1999-07-29 Artur Frysiak * pinfo.spec.in: - switch to rpm 3.0.x * configure.in: - check for more functions * ChangeLog: updated 1999-07-29 Paweł Wilk * src/manual.c: added configurable macro-remover * po/pl.po: added IGNORE translation * src/datatypes.c, src/datatypes.h: added macro-remover default variables * src/parse_config.c: customizations for macro-remover * src/pinforc.in: macro-remover default settings * po/de.po, po/sv.po, ChangeLog: niespodzianka 1999-07-24 Przemek Borys * src/pinfo.c: pinfo drops on floor root privileges 1999-07-24 Paweł Wilk * src/common_includes.h, src/pinfo.c: added checksu() func. used for leaving root privileges 1999-07-16 Przemek Borys * src/colors.c, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/initializelinks.c, src/mainfunction.c, src/pinfo.c, src/signal_handler.c, src/utils.c: the most time-consuming parts of pinfo should work faster. Could sb test it on some weak machine? ;) 1999-07-15 Przemek Borys * src/signal_handler.c: modified signal handler to produce better crash messages ;) * src/initializelinks.c: extracted the greatest time hog in initializelinks: exists_in_tag_table() I need now to make it faster--probably by sorting tag_table, and then using some more efficient algorithm. 1999-07-14 Artur Frysiak * ChangeLog: autoupdate 1999-07-13 Artur Frysiak * ChangeLog: autoupdate 1999-07-13 Przemek Borys * doc/pinfo.1.in: updated example cfg file in pinfo.1 * src/colors.c: accidentaly removed transparent support ;) * src/manual.h: added configurable macro-remover * src/manual.c, src/parse_config.c, src/pinfo.c, src/printinfo.c, src/utils.c, src/colors.c, src/filehandling_functions.c, src/initializelinks.c, src/mainfunction.c: removed Wall warnings 1999-07-10 Przemek Borys * src/colors.c: Let's start testing transparent COLOR_DEFAULT... 1999-07-09 Przemek Borys * src/parse_config.c, src/pinforc.in: vi-style secondary keybindings * src/manual.c, NEWS: fixed tiny bug in manual code 1999-07-08 Przemek Borys * src/filehandling_functions.c, src/utils.c: bugfixes 1999-07-07 Przemek Borys * src/filehandling_functions.c, src/pinfo.c: fixed bugs: pinfo with no filename argument, but with argc>1 runs dir page dir pages aren't concatenated if in $INFOPATH there is a entry, which corresponds to some default entry (to avoid duplicates) 1999-07-01 Przemek Borys * src/initializelinks.c, src/mainfunction.c, src/manual.c, src/signal_handler.c, src/utils.c, src/utils.h, TODO: bugfixes. added new facility to turn off the cursor * src/initializelinks.c, src/manual.c, src/printinfo.c, src/readlinewrapper.c, src/utils.c: memory allocation fixes 1999-06-29 Przemek Borys * po/pl.po, src/common_includes.h, src/datatypes.c, src/datatypes.h, src/initializelinks.c, src/mainfunction.c, src/Makefile.am, src/manual.c, src/menu_and_note_utils.c, src/parse_config.c, src/pinforc.in, src/printinfo.c, src/printinfo.h, src/video.c: added printing facility fixed indentation renamed .row members to .col :) (as it should be) * src/parse_config.h: customizations for macro-remover * doc/pinfo.1.in, NEWS: added printing facility fixed indentation renamed .row members to .col :) (as it should be) 1999-06-28 Przemek Borys * src/colors.h, src/datatypes.h, src/filehandling_functions.h, src/initializelinks.c, src/initializelinks.h, src/keyboard.h, src/mainfunction.h, src/manual.c, src/manual.h, src/menu_and_note_utils.c, src/parse_config.c, src/parse_config.h, src/pinfo.c, src/readlinewrapper.c, src/signal_handler.h, src/utils.c, src/utils.h, src/video.c, TECHSTUFF: Updated comments to the source... 1999-06-27 Przemek Borys * AUTHORS, configure.in, po/pl.po, src/initializelinks.c: even even faster compare_tag_table_string() ;)) * src/initializelinks.c: even faster compare_tag_table_string() 1999-06-25 Przemek Borys * src/filehandling_functions.c, src/filehandling_functions.h, src/mainfunction.c, src/manual.c, src/menu_and_note_utils.c, src/parse_config.c, src/parse_config.h, src/pinfo.c, src/pinforc.in, doc/pinfo.1, NEWS, TODO: support for dir lookups (i.e. when there is a dir entry, which has the same name with the command-line specified name, then that entry will be used -- example `pinfo cat'). * doc/pinfo.1.in, src/mainfunction.c, src/manual.c, src/pinforc.in, TODO: Added key_goline (like ^KL in joe) 1999-06-22 Przemek Borys * AUTHORS, NEWS, src/filehandling_functions.c, src/initializelinks.c, src/manual.c, src/parse_config.c, src/readlinewrapper.c: fixed some memory leaks added speed improvements 1999-06-20 Przemek Borys * TODO: added todo 1999-06-17 Przemek Borys * src/manual.c, NEWS, TODO: Fixed the sigsegv (underrun) bug in manual code. Pity that 0.5.4 is already released :-/ 1999-06-16 Artur Frysiak * ChangeLog: - updated 1999-06-16 Jiri Pavlovsky * src/initializelinks.c: fixed a tiny bug in multiline '*note' display 1999-06-14 Jiri Pavlovsky * po/cs.po: cs.po update 1999-06-13 Przemek Borys * src/mainfunction.c, src/manual.c, src/pinforc.in, src/video.c, AUTHORS, configure.in: Fixed bug with highlighting Fixed buf with not showing the last line of info pages. Prepared for 0.5.4 release. 1999-06-12 Przemek Borys * TODO: noted a bug to fix... * TODO: added a forgotten todo 1999-06-11 Przemek Borys * src/colors.c, src/colors.h, src/initializelinks.h, src/mainfunction.c, src/manual.c, src/parse_config.c, src/parse_config.h, src/utils.c, src/utils.h, NEWS: simple search highlighting (finally ;) Well... we're ready for the new release now ;) 1999-06-10 Przemek Borys * po/ru.po: po dlia russkowo jazyka :) 1999-06-08 Jiri Pavlovsky * po/cs.po, src/pinfo.c: correction to my previous correction in help message :) * src/pinfo.c, po/cs.po: Continuing my mission to deliver the most up-to-date and accurate pinfo help message :) updated cs.po 1999-06-08 Przemek Borys * src/manual.c, src/pinfo.c, AUTHORS, po/pl.po: updated polish po renamed -empty-lines to -squeeze-lines (like in less/cat) 1999-06-07 Jiri Pavlovsky * src/datatypes.c, src/pinfo.c, po/cs.po: Fixed typo in datatypes.c. Updated argument parsing code and help message to reflect new options. cs.po updated 1999-06-05 Linus ƅkerlund * po/sv.po, src/parse_config.c: parse_config.c: added check for NULL pointer to skip_whitespace(), and checks for the return value of skip_whitespace(), to get better error reporting. sv.po: updated. 1999-06-04 Przemek Borys * doc/pinfo.1.in, src/colors.c, src/common_includes.h, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/mainfunction.c, src/parse_config.c, src/parse_config.h, src/pinfo.c, src/pinforc.in, src/utils.c, src/utils.h, src/video.c, NEWS: added concatenation of all available dir pages into one added clear-screen at exit added lightbackground fixed displaying of text lines with different backgrounds (now the bakgorund reaches till the end of screen, not till the end of line). * src/initializelinks.c: Updated splitted into several lines note handler. 1999-05-31 Przemek Borys * src/initializelinks.h, src/utils.c, doc/pinfo.1.in: whitespaced notes should work now :) Updated man page. 1999-05-30 Przemek Borys * po/pl.po, AUTHORS: polish support for yes/no 1999-05-26 Jiri Pavlovsky * src/pinforc.in, po/cs.po: Put the 'QUIT-CONFIRM-DEFAULT' option to the pinforc. cs.po updated 1999-05-26 Przemek Borys * src/utils.h, src/datatypes.h, src/initializelinks.c, src/utils.c: comments/cleanups/etc. 1999-05-26 Artur Frysiak * ChangeLog: updated 1999-05-26 Jiri Pavlovsky * src/datatypes.h, src/keyboard.h, src/mainfunction.c, src/manual.c, src/parse_config.c, src/utils.c, src/utils.h, src/datatypes.c: 1999-05-26 Jiri Pavlovsky * src/datatypes.c src/datatypes.h src/keyboard.h src/mainfunction.c src/manual.c src/parse_config.c src/pinforc.in src/utils.c src/utils.h: Internationalize answer to the 'confirm-quit' dialog (and possibly any future yes/no dialog:). New config option 'QUIT-CONFIRM-DEFAULT' - determines default answer to the 'confirm-quit' dialog. 1999-05-20 Przemek Borys * doc/pinfo.1.in, src/datatypes.c, src/datatypes.h, src/initializelinks.c, src/mainfunction.c, src/manual.c, src/parse_config.c, src/pinforc.in, NEWS: Fixed bug in *note:' detection. Added option for enabling quit confirmation at exit (as in lynx). 1999-05-18 Artur Frysiak * ChangeLog: - updated 1999-05-18 Przemek Borys * NEWS: This time I'll update news file from the begining of new version work ;) 1999-05-17 Przemek Borys * doc/pinfo.1.in, src/datatypes.c, src/datatypes.h, src/filehandling_functions.h, src/initializelinks.c, src/initializelinks.h, src/keyboard.h, src/mainfunction.c, src/manual.c, src/parse_config.c, src/pinfo.c, src/pinforc.in, src/regexp_search.c, src/utils.c, src/utils.h: Added Filter-0xb7 option Corrected pgdn/end scrolling (at end they move to the last visible link) Corrected tab handling in highlights. 1999-05-16 Przemek Borys * po/cs.po, AUTHORS, NEWS: updated cs.po 1999-05-15 Przemek Borys * doc/pinfo.1.in, NEWS, src/mainfunction.c, src/manual.c, src/pinfo.c, src/pinforc.in, src/regexp_search.c, src/utils.c, src/utils.h: Added a wrapper for regexp search functions (a nonregexp wrapper). Modified pinfo.c to conform gnu standards. Modified pinforc.in to demonstrate the use of CTRL_KEY * doc/pinfo.1, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/manual.c, src/parse_config.c, src/pinfo.c, src/pinforc.in, AUTHORS, configure.in, NEWS: Added STDERR-REDIRECTION, MAN-OPTIONS, LONG-MANUAL-LINKS, and fixed bug in building of suffixed filename for .bz2, and .Z KEY_ALT, and KEY_CTRL work now fine. Added notes to pinfo.1, added changes to pinforc.in. 1999-05-15 Artur Frysiak * doc/pinfo.1.in: - man page templete * configure.in, doc/.cvsignore, doc/Makefile.am, doc/pinfo.1, Makefile.am, pinfo.spec.in, po/cs.po, po/de.po, po/pl.po, po/sv.po: - generate automagicali pinfo.1 1999-05-15 Przemek Borys * src/keyboard.h, src/mainfunction.c, src/manual.c, src/parse_config.c, src/utils.c, src/utils.h: config file parser now accepts KEY_CTRL('x') and KEY_ALT('x') (done by Linus) Besides, I've fixed alt key handler -- it now works fine... at least at linux console ;) 1999-05-14 Przemek Borys * TODO: removed old todo ;) 1999-05-13 Artur Frysiak * ChangeLog: - updated * src/Makefile.am: - CURSES_LIBS now in LIBS - CURSES_INCLUDES now in CPPFLAGS * src/parse_config.c: - used HAVE_KEY_END instead USE_NCURSES * src/.cvsignore, src/pinforc, src/pinforc.in: - autogenerate pinforc (now only KEY_END_1 ) * acconfig.h, configure.in: - added test have KEY_END in curses (if yes then define HAVE_KEY_END) 1999-05-13 Przemek Borys * src/manual.c, src/regexp_search.c: Added 2> redirection EVERYWHERE in manual.c (I hope ;) modified global regexp search to not find regexps longer than two lines (they are quite unusable for the reader, and shouldn't appear) * doc/pinfo.1, po/pl.po, src/pinfo.c, AUTHORS: Added --node command line option. Modified `AUtHORS' structure 1999-05-12 Przemek Borys * src/keyboard.h: support for KEY_CTRL, KEY_ADD -- adapted from midnight commander's source 1999-05-11 Przemek Borys * src/datatypes.c, src/datatypes.h, src/mainfunction.c, src/manual.c, src/parse_config.c, src/parse_config.h, src/pinfo.c, src/pinforc, doc/pinfo.1: Added searchagain key Noted, that KEY_END is probably available only in ncurses (since it was used in sample config file, and I received a bug report about it, when compiled on solaris) 1999-05-09 Przemek Borys * src/manual.c, src/pinfo.c: Added one _("blah") to pinfo.c Updated mailto-link recognization in manual.c 1999-05-06 Tomasz Kłoczko * pinfo.spec.in: - added %{_target} macro to ./configure parameters. 1999-05-06 Przemek Borys * po/de.po: updated german translation. 1999-05-03 Artur Frysiak * ChangeLog: updated * pinfo.spec.in: - added sv and de locale 1999-05-03 Przemek Borys * src/filehandling_functions.c, src/pinfo.c: added indentation :) * src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/filehandling_functions.h, src/pinfo.c, configure.in, doc/pinfo.1, NEWS, po/de.po: moved to version 0.5.2 (since the 0.5.1 contained serious bug) added -t option for viewing corrupted info files. added german translation 1999-05-02 Przemek Borys * po/sv.po, configure.in, NEWS: Added Swedish language module. Moved version number to 0.5.1. 1999-05-01 Przemek Borys * src/pinforc, src/readlinewrapper.c: renamed mutt to pine in pinforc reformatted readlinewrapper.c 1999-04-30 Przemek Borys * src/colors.c, src/colors.h, src/common_includes.h, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/filehandling_functions.h, src/initializelinks.c, src/initializelinks.h, src/localestuff.h, src/mainfunction.c, src/mainfunction.h, src/manual.c, src/manual.h, src/menu_and_note_utils.c, src/menu_and_note_utils.h, src/parse_config.c, src/parse_config.h, src/pinfo.c, src/readlinewrapper.c, src/readlinewrapper.h, src/regexp_search.c, src/regexp_search.h, src/sigblock.c, src/sigblock.h, src/signal_handler.c, src/signal_handler.h, src/snprintf.c, src/test.c, src/utils.c, src/utils.h, src/video.c, src/video.h: Reindented sources to gnu style rules. Added more comments to source files. Huh. I'm tired :) * doc/pinfo.1, NEWS: pinfo1 -- noted support for international info pages. NEWS -- preparing for 0.5.1 release 1999-04-29 Przemek Borys * doc/pinfo.1, src/datatypes.c, src/filehandling_functions.c, src/mainfunction.c, src/manual.c, src/parse_config.c, src/parse_config.h, src/pinforc: Added pgdn(up)_auto, fixed allocation bug in infopath handler. Added support for turning off a key binding (0 value). 1999-04-27 Przemek Borys * po/cs.po, src/datatypes.c, src/datatypes.h, src/manual.c, src/parse_config.c, src/pinforc, doc/pinfo.1: added support for manlinks, and empty-man-lines config-options my home cvs repository is down, I'M MAD :(( But I hope I've uploaded everything, what's necessary. 1999-04-27 Artur Frysiak * pinfo.spec.in: - added cs locale 1999-04-27 Przemek Borys * po/cs.po, configure.in: Added czech language support (Jiri Pavlovsky) 1999-04-26 Artur Frysiak * ChangeLog: - updated 1999-04-24 Przemek Borys * src/initializelinks.c: modified recognization of e-mail addresses (now there is required an username before '@'). 1999-04-23 Przemek Borys * src/initializelinks.c: Added support for splitted into two lines `highlights'. 1999-04-23 Linus ƅkerlund * src/parse_config.c, doc/pinfo.1: parse_config.c: Fixed blank lines in config file. pinfo.1: Added some more explanation about config file. 1999-04-23 Przemek Borys * doc/pinfo.1: Mentioned the last changes in man page :) * src/pinfo.c, src/mainfunction.c: Modified key_goto behaviour. Now it can either follow the `file.info' syntax, or the `info-standard' syntax -- `(file) node'. 1999-04-22 Przemek Borys * src/parse_config.h, src/menu_and_note_utils.c, src/menu_and_note_utils.h, src/parse_config.c, src/mainfunction.c, po/pl.po, AUTHORS: Internationalized config file parser error message. Added support for key_upnode (Marius Gedminas) Modified handling of blank lines in config file. 1999-04-21 Linus ƅkerlund * src/parse_config.c: Fixed the bug/feature that gave you a parse error for empty lines in the config file. 1999-04-21 Przemek Borys * src/initializelinks.c, src/pinforc, src/readrc.c, src/readrc.h, src/video.c, po/pl.po: minor change to initializelinks -- it now ignores apostrophes in words ending with n't (like wouldn't, haven't,...) removed old files. 1999-04-21 Artur Frysiak * ChangeLog: updated 1999-04-21 Przemek Borys * doc/pinfo.1: Stilistical changes to pinfo.1 1999-04-21 Linus ƅkerlund * src/pinforc, src/parse_config.c: Added user visible error messages like "parse error on line XX". Added MAILEDITOR option. 1999-04-20 Przemek Borys * src/initializelinks.c: updated little bug, which was caused by not counting tabs as 8 chars, but as 1. 1999-04-20 Linus ƅkerlund * doc/pinfo.1: Fixed some formulations and spelling errors. * src/parse_config.c, src/parse_config.h: Modified Files: pinfo/src/parse_config.c pinfo/src/parse_config.h 1999-04-19 Przemek Borys * src/datatypes.c, src/datatypes.h, src/initializelinks.c, src/initializelinks.h, src/mainfunction.c, src/manual.c, src/parse_config.c, doc/pinfo.1: Added support for mail@addresses.embedded in the viewed documents. Now you can send mail to such an addres by just pressing key_followlink on it. 1999-04-18 Przemek Borys * AUTHORS, configure.in, INSTALL.in, NEWS, TODO: Some modifications before next release. We move to 0.5.0 now, and I put this release on the web. * src/Makefile.am: A little modification in src/makefile.am semantic. Now it generates useful makefile.in's on my machine. (feel free to correct it if it's wrong, but I think it's OK ;) * src/pinforc, src/utils.c, src/video.c, src/colors.c, src/colors.h, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/initializelinks.c, src/mainfunction.c, src/manual.c, src/parse_config.c, src/parse_config.h: Secured tmp files. Now I use tempnam() to get a tmp name. It seems to work ;) Besides, I've added support for highlighting `quoted' text in info files. 1999-04-17 Przemek Borys * src/manual.c, src/parse_config.c, src/parse_config.h, src/video.c, src/colors.c, src/colors.h, src/datatypes.c, src/datatypes.h, src/initializelinks.c, src/initializelinks.h, src/mainfunction.c: Added experimental support for URL's embedded int info pages or man pages. Pinfo will now call lynx, when you press key_followlink on a detected url. (in future the www browser will be configurable ;) * src/manual.c, src/initializelinks.c: manual.c -- added back the stderr redirections by system() initializelinks.c -- added support for menus and notes, ending either by comma, period, tab, or newline. (as stated in info page for texinfo) 1999-04-16 Przemek Borys * src/initializelinks.c: added support for multiple note references in a single info line to the file initializelinks.c 1999-04-16 Artur Frysiak * macros/Makefile.am: - added missing readline.m4 macro * po/pl.po, src/Makefile.am, src/utils.c, acconfig.h, configure.in, pinfo.spec.in: - added --with-localedir=dir configure option - removed --with-readline from spec - pl.po updated with msgmerge - using PACKAGE and LOCALEDIR macros in bindtextdomain and textdomain 1999-04-16 Przemek Borys * src/parse_config.c, src/parse_config.h, src/pinforc, src/mainfunction.c: added key_dirpage do info module. You can now move to `dir' page by pressing 'd' (or whatever you define) * po/pl.po: Original (full) polish language module, which in some way missed the cvs repository. * doc/pinfo.1: updated manual page -- noted support for whitespaces between config file entries. * src/mainfunction.c, src/manual.c: mainfunction.c, manual.c - removed a bug, which caused sigsegv when nothing was given to regexp search. manual.c - removed bash stderr redirection. (this program is about to run not only under different shells, but also under different operating systems! :) 1999-04-16 Artur Frysiak * src/manual.c: - redirect man and appropos 2>/dev/null 1999-04-15 Artur Frysiak * src/localestuff.h, pinfo.spec.in: - added --without-included-gettext to ./configure in spec - included config.h in localestuff.h (to correct determine locale support) * po/pl.po, src/Makefile.am, configure.in, Makefile.am, pinfo.spec.in: - make rpm depends additional to pinfo.spec - correct some typos in configure.in - added pinforc and polish locale to %files in spec - added extra sources to EXTAR_DIST to include in dist tarball * pinfo.spec.in: - changed configure option to --with-readline * macros/autogen.sh, macros/readline.m4, src/common_includes.h, src/Makefile.am, src/readlinewrapper.c, src/readlinewrapper.h, src/utils.c, configure.in, INSTALL.in, pinfo.spec.in: - in INSTALL.in: change rpm -bb to make rpm - if ./configure not found curses exit with error message - added AM_CONDITIONAL to HAVE_SNPRINTF and HAVE_SIGBLOCK (if conditional is true not include extra source) - in src/autogen.sh: s/Gnome/pinfo/ - in macros/readline.m4: not use GNU readline at default - in src/Makefile.am: split pinfo_SOURCE to pinfo_COMMON_SRC, pinfo_SNPRINTF_SRC, pinfo_READLINE_SRC and pinfo_SIGBLOCK_SRC. This allow compile only needed sources - in src/common_includes.h: include some headers files if need - in src/readlinewrapper.[ch]: remove commented #ifndef (for cleanup) - in src/utils.c: resurect GNU readline support 1999-04-15 Przemek Borys * src/datatypes.c, src/filehandling_functions.c, src/mainfunction.c, src/parse_config.c, src/pinforc, doc/pinfo.1: added new features to config file added a possibility to move across different info documents with key_goto added support for infopages not ending with '.info' 1999-04-15 Artur Frysiak * po/pl.po: One typo 1999-04-14 Tomasz Kłoczko * ChangeLog: - updated ChangeLog. * po/pl.po: - starting translation, - added proper header. * po/pl.po, configure.in: - starting pl translation. 1999-04-14 Przemek Borys * src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/manual.c, src/pinfo.c, src/readlinewrapper.c, src/readlinewrapper.h, src/utils.c: some updates. i.e. new command line option 1999-04-14 Artur Frysiak * acconfig.h, configure.in: - Last (I hope) fix for check sigblock 1999-04-13 Artur Frysiak * configure.in: version up to 0.4.9 * src/filehandling_functions.c, src/filehandling_functions.h, src/initializelinks.c, src/mainfunction.c, src/manual.c, src/regexp_search.c, src/utils.c, NEWS: - Changes from 0.4.9 (Przemek still ignore ours work) * src/sigblock.c, src/common_includes.h: - include sigblock.h in sigblock.c 1999-04-13 Dobrica Pavlinusic * src/sigblock.h: changed back that #ifdef at begining. It created a lot of "allready defined" warnings on systems which actually have it. It work like this also... * src/sigblock.h: fixed one wrong #ifdef (first one) and one semicolumn (;) at sigblock proto. Now compiles on Solaris. But, it doesn't link yet. 1999-04-13 Artur Frysiak * macros/readline.m4, src/mainfunction.c, src/Makefile.am, src/manual.c, src/signal_handler.c, configure.in, macros/curses.m4, Makefile.am: - make rpm depends to Makefile (build new tarball if Makefile changed) - changed schemat of searching sigblock - some cleanup in configure.in - s/INCLUDEDIR/INCLUDES/ - in macros/curses.m4: changed CFLAGS to CPPFLAGS (-D is preprocessor flag) - use #ifdef getmaxyx instead #ifdef USE_NCURSES (in some places) * src/parse_config.c, src/parse_config.h: - Added missing typedef - changes for correct determine curses version (stil unfinished) 1999-04-13 Dobrica Pavlinusic * configure.in: * configure.in: - check for sigblock in libbsd 1999-04-13 Artur Frysiak * Makefile.am: hook for make rpms 1999-04-12 Artur Frysiak * ChangeLog: - updated (with correct names and emails) * po/POTFILES.in, src/colors.c: - removed readrc.c from POTFILES - s/#ifdef USE_NCURSES/#ifndef NO_COLOR_CURSES/ in colors.c * ChangeLog: updated * src/readlinewrapper.h: - use HAS_READLINE (from readline.m4) instead HAVE_LIBREADLINE * macros/readline.m4, src/Makefile.am, src/readlinewrapper.c, src/readlinewrapper.h, src/utils.c, acconfig.h, configure.in: - added readline.m4 macro to search for GNU readline library * po/.cvsignore: ignore more autogenerated files * po/POTFILES.in: - my stupid bug (spaces on end of lines) * src/sigblock.h: - added commented macro sigsegmask from glibc Dobrica, please test both. * src/common_includes.h, src/Makefile.am, src/sigblock.c, src/sigblock.h, configure.in: - added check for sigblock to configure.in - added snprintf.c, sigblock.[ch] to pinfo_SOURCES - include sigblock.h in common_includes.h - added replecament of sigblock (from glibc 2.1) and sigmask macro (from bash) * src/utils.c: in +164 changed #ifdef to #ifndef (sugested by Dobrica Pavlinusic ) * src/snprintf.c: - include config.h if defined HAVE_CONFIG_H 1999-04-10 Artur Frysiak * src/Makefile.am: - remove readrc.[ch] from pinfo_SOURCES (this files not in pinfo 0.4.8 tarball) * pinfo.spec.in: - updated %changelog * po/Makefile.in.in: no more autogenerated files * INSTALL.in: - changed install rpm from -i to -U (save time to ansver question: " I can't install pinfo. Rpm fail with messages: pinfo conflicts with pinfo-OLDVERSION. Whats wrong? " ) * INSTALL.in: fix typos * Makefile.am: added INSTALL to EXTRA_DIST * src/pinfo.c, acconfig.h, configure.in, .cvsignore, INSTALL, INSTALL.in: - now VERSION is defined _only_ in configure.in - update INSTALL INSTALL now is autogenerated from INSTALL.in. Change INSTALL.in insted INSTALL. * configure.in: - changed version to 0.4.8 * ChangeLog: updated * doc/pinfo.1, src/datatypes.c, src/filehandling_functions.c, src/initializelinks.c, src/localestuff.h, src/mainfunction.c, src/manual.c, src/menu_and_note_utils.c, src/parse_config.c, src/pinfo.c, src/pinforc, src/readlinewrapper.c, src/test.c, src/utils.c, src/utils.h, src/video.c, NEWS: - sync with 0.4.8 Przemek please use cvs ;-) * mainfunction.h: this file is in src dir * po/.cvsignore: more autogenerated files * .cvsignore: ignore more autogenerated files * mkinstalldirs, missing: removed autogenerated file * po/.cvsignore: next autogenerated files * po/POTFILES.in: remove all source files; please fix me * po/ChangeLog: epmty but needed file * configure.in: another try to i18n * acconfig.h, configure.in, Makefile.am: next try to i18n * .cvsignore: next autogenerated files * po/.cvsignore: ignore autogenerated files * po/POTFILES.in: list of file with localized messages * configure.in: firts part cleanup * po/Makefile.in.in: stuf for i18n * configure.in, src/pinfo.c: - removed --with-getopt options from ./configure check for getopt_long solved problem with getopt 1999-04-09 Artur Frysiak * pinfo.spec.in: - correct one typo * macros/curses.m4: - added $CURSES_INCLUDEDIR to eval version of ncurses * acconfig.h, configure.in, Makefile.am, pinfo.spec.in: - fix parsing CONFIGDIR (now CONFIGDIR is $sysconfdir/pinforc) * src/utils.c, configure.in: - next try to fix --with-readline now path to libreadline.so maybe given ( --with-readline=/path/to/lib ) and path to readline.h maybe given ( --with-readline-inc=/path/to/include ) * src/utils.c, acconfig.h, configure.in: - fix for --with-readline * src/colors.c, src/mainfunction.c, src/Makefile.am, src/manual.c, src/parse_config.c, src/signal_handler.c, configure.in: - changed all #ifndef ___OLD_CURSES___ to #ifdef USE_NCURSES * src/snprintf.c: Original from Patrick Powell. Hacked from mutt by Dobrica Pavlinusic * configure.in, src/Makefile.am: - changes by Dobrica Pavlinusic "- added automatic check for getopt_long (no need to use options to configure) - added automatic check for GNU readline (if not found it defines appropriate symbol and continues -- before it just aborted) - added sprintf replacement Known problems: - GNU readline lib isn't found on Digital UNIX (it's installed!) -- I will have a look at that after this weekend" * src/Makefile.am: added pinforc (install in , default /etc) 1999-04-07 Artur Frysiak * configure.in: - disable --with-old-curses and fixed one typo * configure.in: version up to 0.4.6 * NEWS, doc/pinfo.1, INSTALL, README, TODO, AUTHORS: sync with 0.4.6 * src/common_includes.h, src/.cvsignore, src/Makefile.am: - using HAVE_CONFIG_H and USE_NCURSES common_includes.h * src/initializelinks.c, src/initializelinks.h, src/localestuff.h, src/readlinewrapper.c, src/readlinewrapper.h: new from pinfo 0.4.6 * src/colors.c, src/common_includes.h, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/filehandling_functions.h, src/mainfunction.c, src/mainfunction.h, src/Makefile.am, src/manual.c, src/menu_and_note_utils.c, src/menu_and_note_utils.h, src/parse_config.c, src/parse_config.h, src/pinfo.c, src/signal_handler.c, src/utils.c, src/utils.h, src/video.c, src/video.h: sync with pinfo 0.4.6 * src/pinforc: initial version from pinfo 0.4.6 1999-04-01 Tomasz Kłoczko * configure.in: - removed AM_PROG_LIBTOOL. 1999-03-31 Tomasz Kłoczko * ChangeLog: - updated. * pinfo.spec.in: - one cleanup and fix in %doc. Now pinfo is realy ready and can be quickly maked by: $ cvs -d :pserver:anonymous@cvs.pld.org.pl:/cvsroot login (Logging in to anonymous@cvs.pld.org.pl) CVS password: $ cvs -d :pserver:anonymous@cvs.pld.org.pl:/cvsroot co pinfo $ cd pinfo $ ./autogen.sh ;make dist ; rpm -ta -v pinfo-*.tar.gz 1999-03-31 Artur Frysiak * TODO: - info about /home/users/wiget/tmp 1999-03-31 Tomasz Kłoczko * NEWS: - moved from CHANGELOG. * CHANGELOG: - CHANGELOG moved to NEWS. 1999-03-31 Artur Frysiak * Makefile.am: - real using EXTRA_DIST 1999-03-31 Tomasz Kłoczko * doc/Makefile.am: - added proper macros for man pages. 1999-03-31 Artur Frysiak * TODO: TODO file * AUTHORS: changes from orginal tarball * ChangeLog: entry from 0.4.0 * ChangeLog: - moved CHANGELOG to ChangeLog 1999-03-31 Tomasz Kłoczko * configure.in: Added AM_MAINTAINER_MODE (without this macros/macros.dep is not generated). 1999-03-31 Artur Frysiak * configure.in: - correct display ./configure --help * configure.in: - one typo * acconfig.h, configure.in, pinfo.spec.in, src/common_includes.h, src/Makefile.am: - added (hacked from orginal Makefile) ./configure options: --enable-cursor [default=no ] --enable-static [default=yes] --with-old-curses [default=no ] --with-regexp-search [default=yes] --with-getopt [default=yes] --with-readline [default=yes] - changed spec file to use ./configure and make install (not tested yet) - added new source files to src/Makefile.am - moved *.h to pinfo_SOURCES - include config.h if need - version changed to 0.4.0 (like orginal tar.gz) Now pinfo succesfull compile :-) * .cvsignore: - added more autogenerated files * aclocal.m4, ltconfig, pinfo.spec: - autogenerated files * .cvsignore: - ignore more autogenerated files * src/readrc.c: - correct order of functions and some typos * src/.cvsignore: added some file: pinfo executable and .deps catalog * src/pinfo.c, src/utils.c, src/video.c, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/filehandling_functions.h, src/mainfunction.c, src/manual.c, src/parse_config.c, src/parse_config.h: -integrated changes from 0.4.0 * .cvsignore: - ignore backup and autogenerated files * configure.in, Makefile.am, pinfo.spec.in: - spec is now autogenerated 1999-03-29 Tomasz Kłoczko * src/Makefile.am: * all header files moved to EXTRA_DIST, * s/pinfo_SOURCE/pinfo_SOURCES/. * doc/Makefile: - removed. This file is generated. * acconfig.h: - autoheader template. * configure.in: - VERSION to 0.3.9, - added ncurses detecting macros, - added AM_CONFIG_HEADER for autoheader. * autogen.sh: - proper version this file with checking scr and doc subdirectories before generating all neccesary files. * doc/.cvsignore, macros/.cvsignore, src/.cvsignore: - add Makefile to ignore list. * macros/aclocal-include.m4, macros/compiler-flags.m4: - autoconf macros: * aclocal-include.m4: template with including aclocal macros, * compiler-flags.m4: setting up compiler flags. * macros/Makefile.am: - added compiler-flags.m4 and aclocal-include.m4 to MACROS. * macros/macros.dep: - romeved. This file is generated. * macros/autogen.sh: - previouse verion based on GNOME template. Current is witout GNOME additions * macros/.cvsignore: - added to ignore list macros.dep. 1999-03-28 Tomasz Kłoczko * autogen.sh: - fixed message. * macros/.cvsignore, macros/Makefile.in, src/.cvsignore, src/Makefile.in, doc/.cvsignore, doc/Makefile.in: - added proper .cvsignore in subdirectories, - removed */Makefile.in files. * CHANGELOG, doc/pinfo.1, README, src/colors.c, src/colors.h, src/common_includes.h, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/filehandling_functions.h, src/keyboard.c, src/keyboard.h, src/mainfunction.c, src/manual.c, src/manual.h, src/menu_and_note_utils.c, src/pinfo.c, src/signal_handler.c, src/utils.c, src/utils.h: - integrated latest changes from 0.3.9 version. 1999-03-27 Tomasz Kłoczko * Makefile: - removed. * src/menu_and_note_utils.h, src/pinfo.c, src/readrc.c, src/readrc.h, src/regexp_search.c, src/regexp_search.h, src/signal_handler.c, src/signal_handler.h, src/utils.c, src/utils.h, src/video.c, src/video.h, doc/Makefile, doc/Makefile.am, doc/Makefile.in, doc/pinfo.1, macros/autogen.sh, macros/curses.m4, macros/macros.dep, macros/Makefile.am, macros/Makefile.in, src/colors.c, src/colors.h, src/common_includes.h, src/datatypes.c, src/datatypes.h, src/filehandling_functions.c, src/filehandling_functions.h, src/keyboard.c, src/keyboard.h, src/mainfunction.c, src/mainfunction.h, src/Makefile.am, src/Makefile.in, src/manual.c, src/manual.h, src/menu_and_note_utils.c, ACKNOWLEDGEMENTS, aclocal.m4, AUTHORS, autogen.sh, ChangeLog, colors.c, colors.h, common_includes.h, configure.in, COPYING, datatypes.c, datatypes.h, filehandling_functions.c, filehandling_functions.h, GPL, keyboard.c, keyboard.h, ltconfig, mainfunction.c, Makefile.am, manual.c, manual.h, menu_and_note_utils.c, menu_and_note_utils.h, missing, mkinstalldirs, NEWS, pinfo.1, pinfo.c, pinfo.spec, readrc.c, readrc.h, regexp_search.c, regexp_search.h, signal_handler.c, signal_handler.h, utils.c, utils.h, video.c, video.h: - added autoconf/automake scheme, - some files moved to doc and src subdirestories - added macros subdirectory with autoconf macroc TODO: - add to configure.in detecting [n]curses using macros/curses/m4 macros. * utils.h, video.c, video.h, ACKNOWLEDGEMENTS, CHANGELOG, colors.c, colors.h, common_includes.h, datatypes.c, datatypes.h, filehandling_functions.c, filehandling_functions.h, GPL, INSTALL, keyboard.c, keyboard.h, mainfunction.c, mainfunction.h, Makefile, manual.c, manual.h, menu_and_note_utils.c, menu_and_note_utils.h, pinfo.1, pinfo.c, README, readrc.c, readrc.h, regexp_search.c, regexp_search.h, signal_handler.c, signal_handler.h, TECHSTUFF, utils.c: pinfo: curses based info browser - initial version 0.3.5. pinfo-0.6.13/Makefile.am000066400000000000000000000005101343207050400147420ustar00rootroot00000000000000# no FSF/GNU fascism AUTOMAKE_OPTIONS=foreign always_built_SUBDIRS = src sometimes_built_SUBDIRS = SUBDIRS = doc macros po $(always_built_SUBDIRS) EXTRA_DIST = TECHSTUFF pinfo.spec Changelog.old Changelog ## make rpms rpm: Makefile $(MAKE) dist rpm -ta --clean $(PACKAGE)-$(VERSION).tar.gz ACLOCAL_AMFLAGS = -I macros pinfo-0.6.13/NEWS000066400000000000000000000373451343207050400134250ustar00rootroot000000000000000.6.13: (2019-02-16) - Fix crash on 32-bit architectures 0.6.12: (2019-02-11) - minor release to fix the use of defualt colors (COLOR_DEFAULT) on ncurses installs; COLOR_DEFAULT values in pinforc were silently ignored, causing pinfo to use black-on-balc or white-on-white text - remove AM_MAINTAINER_MODE from autoconf scripts to make sure all necessary files are always rebuilt on ./configure && make - fix possibel buffer overflow (and compiler error with gcc 8.2) 0.6.11: (2019-02-08) - Gracefully handle missing indirect info nodes (https://bugs.debian.org/298865) - Fix infinite loop when regexp-matching an empty string (https://bugs.debian.org/358389) - Fix loading of bare info pages (i.e., without .info extension) (http://bugs.debian.org/496840) - Properly load info pages whose name starts with "dir" (http://bugs.debian.org/496840) - Changes and tweaks to the auto* build tools - Get rid of inlined functions, which break building with gcc7 (https://bugs.debian.org/853613) - Fix segfautl when closing unopened file - Fix typos in docs - Fix compiler warnings - Fix a number of out-of-buffer write, buffer overflows, string truncations - Clean up documentation - Correctly handle redirected stdin and/or stdout (https://bugs.debian.org/671306) - Fix crash after failed global search - Make curses mouse behaviour configurable Note: this changes the default behaviour to not capture the mouse. To restore the old behaviour, set GRAB-MOUSE=true in pinforc. - Avoid an infinite loop for malformed info pages - Add readline tab completion for nodes (https://bugs.debian.org/431708) - Correct parse node links that span multiple (indented) lines. (https://github.com/baszoetekouw/pinfo/issues/6) - If a direct info page hit isn't found, try to look up a node in the dir (https://github.com/baszoetekouw/pinfo/issues/6) - Improve lookup of info pages (https://github.com/baszoetekouw/pinfo/issues/6) - Fix linking to man pages in a different section (https://github.com/baszoetekouw/pinfo/issues/6) - Fix the -n/--node command line option (https://bugs.launchpad.net/ubuntu/+source/pinfo/+bug/1599374) 0.6.10: - Fix issue with handling of suspend/resume and character input (thanks to Scott Mcdermott for the patch) - Move variable declarations to the start of a block, to accomodate non-gcc compilers. Thanks to Anonymous for the patches submitted to Alioth. 0.6.9 - New maintainer: Bas Zoetekouw - License is now GPL version 2 only - Updated German, Dutch, English, Polish, Russian, Czech translations and added Basque, Swedish, Viernamese and Brazilian translations. Thanks to Jens Seidel, Rene van Bevern, Piarres Beobide, Krzysztof Krzyzaniak, Yuri Kozlov, Eddy Petrişor, KatarĆ­na MachĆ”lkovĆ”, Clytie Siddall and Felipe Augusto van de Wiel. - Nodes containing a "." are now correctly found - Non-ASCII man pages are displayed correctly - Improved the history behavior of the search input line - Broken tag tables are now automatically fixed - Don't segfault when a broken regexp is entered - Fixed a number of segfaults caused by using uninitialized pointers and off-by-1 errors - Fixed heap corruption caused by non-ascii chars in info pages - Fixed a lot of patch searching issues - Fixed text display on narrow terminals - Fixed highlighting of searches - The default pinforc now uses the terminal's default foreground and background colors. Thanks to Rob Funk for a patch. - Use libreadline by default; readline version 4 is now required. - Better cooperation between ncurses and readline - Fixed some memory leaks - Got rid of tempnam() calls - Fixed -Wall and -Wshadow compiler warnings - Use utf8 in documentation files and fixed typoes 0.6.8 Patches from Witold Filipczyk for node detection algorithms in man and info. Added default item on search prompt. Bugfix in info link freeing procedure, which failed on exim pages. Bugfix for dir page lookup when several matches are found--there was a double close() problem. 0.6.7 Added scrolling in left/right direction (!!!new config file keys). Fixed handling of info entries like `emacs21/emacs'--modified function matchfile(). Added autmatical detection of rawfilename for filenames beginning with `../', `./', `/' in main(). Added support for '(gcc)Introduction' like specification of nodes. 0.6.6 bugfixes for userdefined rcfile and configuration inconsistences added sorting of matches for the info file to display 0.6.5 Fixed bug in sorting of tag table links (major effect to the engine) Changed the file search engine to scan the directory for a matching pattern (instead of trying various propositions). Fixed minor sigsegv bug in page loader (link initializer). !Added switching between sections in manualviewer mode Highlighting code does not highlight leading spaces in splitted notes anymore. Added information when the search is not successful Added support for command line selected rc files 0.6.4 New apropos handler. It works now interactively. New option -p here. Doesn't highlight anymore links to itself in man viewer. Fixed bug with link following. Fixed readline emulation: it now deletes old line content, and handles end key Fixed SIGWINCH handler/curses blocking getch emulation Fixed searchpath routines. First of all, there is introduced a 'context' for currently viewed file. Pinfo will search files for one set of infopages only in one directory--in the context directory. The context can be changed only when changing the set of infopages. 0.6.3 NLS and documentation bugfixes Small bugfix in keyhandler 0.6.2 Fixed bug with searchpath for raw filename specification (temporary hack). Fixed stupid bug with info parser, which didn't accept an `INFOTAG.+\n' separator for info nodes (eg. gnuplot's infopage). Fixd detection of first info page. Fixed buggy use of bkgdset() 0.6.1 Modified behaviour of auto-pgdn. It now expands the submenus, as in info. Fixed problem with pinforc installed to non-exsisting etc directory Fixed problem with black bar on first man page Fixed buggy whitespace-skip comparing procedure Manual code can now handle hyphenated url links (it's still not perfect with e-mail--it only works if the `@' is in the upper line) Fixed buf in indirect-file search engine (a misplaced if()) Added texinfo documentation. Manual code is now case insensitive as far as sections are considered 0.6.0 Replaced evil `myclrtoeol' with `bkgdset+clrtoeol' Fixed putenv handler Make install does not overwrite old pinforc anymore (this has it's bad side--you must deal alone with version incompatibilities) fixed sorting of dirpage matches fixed some small bugs 0.5.9 Setenv()->putenv() (so pinfo can now compile without problems at nonlinux unices) Added SAFE-GROUP, and SAFE-USER config file options for defining users, to which we want to drop root privileges when running pinfo Added HIGHLIGHTREGEXP option, to allow highlighting of user defined regexps when viewing manuals/infos Search highlighting works now "professionaly" (as in less) Fixed sigsegv bug in search engine. 0.5.8 Fixed some ugly bugs to prepare for world domination ;-> 0.5.7 Updated man page Fixed `splitted manlink' code Added key_goto to manual code Fixed minor bugs, and portability misadvantages Modified the default info search order (./ is the last dir) Manual code displays now manuals with optional width != than 80 chars. Fixed configure --with-included-gettext (hopefuly) -r works now with compressed files 0.5.6 Fixed memory bugs Fixed displaying of concatenated dir pages Speed up alghoritms Transparent colors Manual code can now handle hyperlinks splitted by `-' sign Security filter for dangerous man macros (experimental) 0.5.5 Fixed nasty sigsegv bug in manual code. Speed improvements to the code. Many memory bugs fixed in the whole code. Added key for going to specified line. Added dir page name lookups. Now you will be able f.i. to go to `textutils:cat' after typing `pinfo cat'. Added support for printing. (with highlights, as in groff -Tascii). 0.5.4 Fixed highlighting code (the handling of \t's). PgDn works now more `traditionaly' -- at end the last link is selected. Added FILTER-0xB7 config option. Fixed bug in `*note:' detection. Added option for enabling quit confirmation at exit (as in lynx). Added option for clearing screen at exit Added support for lightbackground Fixed nonblack background in displaying contents of text. Added support for multi-dired info dir entries. Finally done some simple search highlighting. 0.5.3 Fixed stderr redirections. Now you won't get garbage on screen when following manual links. Added MAN-OPTIONS config option, which allows you to pass options to te `man' program. Added KEY_CTRL and KEY_ALT macros, which enable you to use CTRL+x and ALT+x combinations. (the ALT+x is probably only usable on linux console, but who knows ;) Fixed global regexp search code. It now searches every two following lines, to avoid returning of expressions, which are several hounderts lines long ;) Added STDERR-REDIRECTION config file option, which allows you to specify how do you wish to redirect stderr from plug-ins. Added support for long section names in manual code. Now, if your system supports it, you can make use of section names like "3ncurses", and similar, without abbreviating them to just "3". (see LONG-MANUAL-LINKS config option). Added regexp search wrapper for systems which don't support it. 0.5.2 Fixed one very bad bug. That's the reason for fast new-version release. Added German language support. Added -t option, for viewing corrupted info files. 0.5.1 Added support for mailto urls Fixed highlighting routines for info pages, which ignored tabulation formatting. Added key_pgdn(up)_auto for automatic going to the next(previous) node at the bottom(top) of viewed node. Also added support for 0 key value. Fixed one bug in $INFOPATH handler. Added support for hypertextualization of weird man sections (i.e. 3X11, 3Xt, etc. -- it's configurable) Config file allows you now to specify your web browser, and maileditor. Added national language support for Swedish and Czech. 0.5.0 Added support for http:// and ftp:// URLs embedded into man pages/info pages. Secured the mechanism of tmp file creation Added optional highlight for `quoted' text in info files Moved to configure (autoconf, automake)! Fixed sigsegv by regexp searchs. Added support for infos not ending with `.info*' suffix Added new feature to key_goto -- now when you pass there a name, ending with `.info', then key_goto will move you not to specified node, but to specified info document. Locale support now is working (see at the example with polish translation). Added key_dir Fixed support for xterm mouse. 0.4.9 Corrected global search code for inirect info files (that is those, split up across several info files). It works fine now. 0.4.8 You can now browse man pages from different sections. 0.4.7 After a week of contignous fight I've... FIXED the nasty bug, which caused so many sigsegvs! I'm really happy :)) And what about you? ;) But locales at present send sigsegvs anyway ;) I also added a program `testkey' for making it possible to obtain keycode values for weird keys for config file. 0.4.6 Fixed many bugs connected with v0.4.5. Started working on locale stuff. But for now it only causes unexpected segmentation faults ;) 0.4.5 HUGE change. I reimplemented the info handling routines so, that there is now possible to use links across different info files. Thanks to this I could also implement a handler for 'dir' page. Huh... I can't belive it works ;) 0.4.4 Made a wrapper for readline function. I just can't implement readline handling properly under ncurses, so you'd rather use this wrapper. It's not to advanced yet, but implements primary things, thich readline deals with (history, and line editing). I'm working on tab completion. 0.4.3 Added support for infos without tag table. Modified man page. 0.4.2 Modified use of readline lib. It doesn't require to use ltermcap anymore, and does not need to close curses screen... This was quite difficult task ;) Added support for resizing screen 'on the fly' (i.e. in x window). Added support for ncurses mouse (which works in xterm). 0.4.1 Recreated mechanism of opening info file. Now it is possible to add new compression methods for info by just modyfing two variables on the top of filehandling_functions.c. Also I've added support for national info pages, which may be located in the directory $INFOPATH/$LANG. (ie. for polish info pages that could be /usr/info/pl_PL/infopage.info) Added support for cutting off manual headers (--cut-man-headers) Added some nodeposition informations in status bar. 0.4.0 Support for apropos. Searches finally work properly. 0.3.9 Gnu Readline support. Now you can browse history on regexp searchs ;). Added sigblock on sigpipe. Now you can safely open pipes to programs which don't exist. 0.3.8 Added configuration file support. Fixed one bug. Expanded manual page :) 0.3.7 Added option --manual, and --raw-filename. Added support for 8-bit characters (i.e. national characters for certain charsets). Modified regexp search on manuals. Bold/italic tokens are recognized now. 0.3.6 Added possibility to call shell commands from within pinfo. Modified a bit makefile. Source does not use the 'dangerous' ;) sprintf anymore. Fixed minor bugs. 0.3.5 Fixed some more sigsegv bugs. 0.3.4 Fixed some stupid bugs in manual code. Added new comments to source. (since I almost got lost myself ;) 0.3.3 Speedup modifications. I.e. window is not refreshed now when key buffer is not empty (to avoid scrolling, when the key is already depressed, and to make it work better on slow terminals). 0.3.2 Added support for the refresh (^L) key. 0.3.1 Added possibility to redefine keys (at compile-time). Modified man page hypertext recognization (now it recognizes everything of the form 'something (x) or something (xy)'. Removed bug with regex.h in manual.c. 0.3.0 Manuals can be read now as well as info files, when info cannot be found. Manuals can be browsed similar to infos; hyperlinks are the fields od form 'something (x)' (according to the common format at SEE ALSO section). Since the change is quite big, I've moved the version number to 0.3.0. 0.2.4 Added regexp searching -- '/' option and 's' option. 0.2.3 Tiny change -- added some checking for mvaddstr functions, so they don't drop core if there's no menu/note token. 0.2.2 Added support for old curses (macro definition ___OLD_CURSES___, enabled in Makefile. That was enough to compile this program under HP-UX :) 0.2.1 Added support for "index menus", and all other of the format "* blabla:[optional spaces]node.". Added cache for menu/note highlight positions. Also code is a bit modified; to be precise I started to clarify it a bit by adding macros, and other things, to get as close to short'n'clear procedures, as possible. 0.2.0 The engine for hypertext recognization is reimplemented. Support for notes and menus of format : node. is added. Also color support is added. Also added some cache for menuchecking and notechecking functs. 0.1.5 Fixed bug with not deleting files from /tmp; added $INFOPATH support 0.1.4 Added 'g' key 0.1.3 Added pgdn/pgup/home/end keys 0.1.2 Added support for notes of kind note:: 0.1.1 First working engine; menus of kind menu:: are supported [12.III.1999] 0.0.0 I'm angry, because the only docs considering my problem (gtk) are in info format, and I just can't work with standard info ;-) pinfo-0.6.13/README.md000066400000000000000000000026271343207050400142000ustar00rootroot00000000000000Pinfo is user-friendly, console-based viewer for Info documents. Hope you like it :) Until version 0.6.8, Pinfo was maintained by Przemek Borys. His old project page is still available at http://pinfo.sourceforge.net/. Unfortunately, Przemek is no longer active, and development was taken over by Bas Zoetekouw and moved to Alioth: https://alioth.debian.org/projects/pinfo/. Since 2014 (version 0.6.10), development has moved to Github: https://github.com/baszoetekouw/pinfo See man page (pinfo.1) for details. Copyright (C) 1999 Przemek Borys Copyright (C) 2005-2006 Bas Zoetekouw Nathanael Nerode Copyright (C) 2007-2016 Bas Zoetekouw This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA pinfo-0.6.13/TECHSTUFF000066400000000000000000000051121343207050400141670ustar00rootroot00000000000000How does this program work. (for hackers ;) 1. Info file format Info files always contain a tag_table, which contains offsets to all nodes. If the info is splitted up into several subinfo files, there is a indirect table, which indicates, which offsets are in which file. Every node starts from an INFO_TAG, and ends at the EOF, or at another INFO_TAG. Menus are recognized as lines of format *Tag Table Node Name::comment and also as * comment: [spaces] Tag Table Node Name. Notes are recognized as lines of format blabla*note Tag Table Node Name::blabla and also as blabla*note comment: [spaces] Tag Table Node Name. Notes may be split up across lines. The offsets in tag_table in an indirect split are counted as follows: tag_table_offset-indirect_offset+tag_table[1]_offset In nonindirect splits it's normal. 2. How are man pages handled? All of this is handled in manual.c. It is called man program there to produce output, which is then parsed by pinfo. 3. A scheme of working when viewing info a) opening file (pinfo.c, filehandling_functions.c) b) seeking to the indirect table, and reading it - important function here is read_item, which reads an info node; that is a block of text starting with INFOTAG, and ending with it, or with another INFOTAG c) doing the same for tag_table d) running 'work' function (mainfunction.c), which handles keyboard actions - when this function is called, before it gets to the main loop, it sets up some standard variables, like position in viewed node, position of selected line with node (it is line oriented selection here). * it handles also here situations like 'aftersearch', where the function recognizes, that it's called after a search across infofiles, and that it must set the position to a value determined by previous search * besides aftersearch it must also handle the history -backward move; it uses then the npos and ncursor vars. * it also initializes caches for isnote and ismenu functions which check if given line contains a menu or note. - after that there follows a normal loop with quite clear cases. e) from the 'work' function there is called a function showscreen, which paints the screen (in quite simple way). The scheme of work when viewing manual is quite similar. 4. Additional notes - the regexp search via all info files is probably one of the most complicated functions For regexp search I've adapted a procedure from midnight commander, and put it into the file regexp_search.c For list of global variables, see datatypes.h For list of global vars for the manual code, see manual.cpinfo-0.6.13/autogen.sh000077500000000000000000000010041343207050400147060ustar00rootroot00000000000000#!/bin/sh set -e # Refresh GNU autotools toolchain. echo Cleaning autotools files... for f in autom4te.cache configure \ Makefile.in src/Makefile.in po/Makefile.in doc/Makefile.in macros/Makefile.in \ tools/mkinstalldirs tools/ltmain.sh tools/missing tools/config.guess tools/depcomp \ tools/config.sub tools/install-sh do test -e "$f" && rm -rf "$f" || true done echo Running autoreconf... autoreconf --install --symlink --verbose if [ -d ".git" ] then git log > Changelog fi exit 0 pinfo-0.6.13/configure.ac000066400000000000000000000156441343207050400152120ustar00rootroot00000000000000#*************************************************************************** #* Pinfo is a ncurses based lynx style info documentation browser #* #* Copyright (C) 1999-2005 Przemek Borys #* Copyright (C) 2005,2006 Bas Zoetekouw #* #* This program is free software; you can redistribute it and/or modify #* it under the terms of version 2 of the GNU General Public License as #* published by the Free Software Foundation. #* #* This program is distributed in the hope that it will be useful, but #* WITHOUT ANY WARRANTY; without even the implied warranty of #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #* General Public License for more details. #* #* You should have received a copy of the GNU General Public License #* along with this program; if not, write to the Free Software #* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 #* USA #***************************************************************************/ # # # Process this file with autoconf to produce a configure script. # $Id$ # # init AC_INIT([pinfo],[0.6.13],[https://github.com/baszoetekouw/pinfo]) # require a recent autoconf AC_PREREQ([2.69]) # for identification of derived ./configure scripts AC_REVISION([$Revision$]) # put the config into config.h AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([macros]) # id main dir by src/pinfo.c file AC_CONFIG_SRCDIR([src/pinfo.c]) # helper scripts are in tools/ AC_CONFIG_AUX_DIR([tools]) # init automake AM_INIT_AUTOMAKE # include the m4 stuff in tools/macros AM_ACLOCAL_INCLUDE(macros) #################################################### ## compiler stuff #################################################### # find C compiler AC_PROG_CC AC_PROG_CC_C99 # set correct LIBS for (almost obsolete) INTERACTIVE UNIX AC_SEARCH_LIBS([strerror],[cposix]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST WFLAGS="-Wall -Wextra -Wshadow -Werror" AX_CHECK_COMPILE_FLAG($WFLAGS, [AC_SUBST(WFLAGS)], [AC_SUBST(WFLAGS,"")] ) # Checks for library functions. AC_CHECK_FUNCS(strdup strstr strsep) AC_CHECK_FUNCS(getopt_long snprintf) AM_CONDITIONAL(HAVE_SNPRINTF,test "x$ac_cv_func_snprintf" = "xyes") AC_CHECK_FUNC(sigblock,,AC_CHECK_LIB(bsd, sigblock)) if test "x$ac_cv_lib_bsd_sigblock" = "xyes" -o \ "x$ac_cv_func_sigblock" = "xyes" ; then AC_DEFINE(HAVE_SIGBLOCK,1,[Define if have sigblock function]) fi AM_CONDITIONAL(HAVE_SIGBLOCK,test "x$ac_cv_lib_bsd_sigblock" = "xyes" -o \ "x$ac_cv_func_sigblock" = "xyes" ) AM_PROG_CC_C_O #################################################### ## some additional utilities we need #################################################### # find install AC_PROG_INSTALL # find ln -s AC_PROG_LN_S # set the MAKE variable for make in subdirs AC_PROG_MAKE_SET # find libtool LT_INIT #################################################### ## readline and curses #################################################### # readline AC_CHECK_READLINE # if we have readline, it needs to be version 5 if test "x$has_readline" = "xtrue" then if test $readline_version -lt 4 then AC_MSG_WARN([Version 4 of readline is required to compile pinfo. Yours is only version $readline_version. Readline support will be disabled.]) has_readline=false fi fi AM_CONDITIONAL(HAS_READLINE, test "$has_readline" = true) # curses AX_WITH_CURSES if test "x$ax_cv_curses" != xyes; then AC_MSG_ERROR([requires a (n)curses library]) fi # check for some functions in curses AC_CHECK_DECLS([curs_set, bkgdset, use_default_colors], [], [], [ #if HAVE_NCURSESW_H /* if should be used */ # include #elif HAVE_NCURSESW_CURSES_H /* if should be used */ # include #elif HAVE_NCURSES_H /* if should be used */ # include #elif HAVE_NCURSES_CURSES_H /* if should be used */ # include #elif HAVE_CURSES_H /* if is present and should be used */ # include #else # error "No valid curses headers detected" #endif ]) #################################################### ## wchar stuff #################################################### AC_CHECK_WCHAR if test "x$USE_WCHAR" = "xtrue" then CFLAGS="$CFLAGS $WCHAR_FLAGS" fi #################################################### ## locales #################################################### # the languages for which we have .po files ALL_LINGUAS="cs de eu ja nl pl pt_BR ro ru sv vi" # Checks for all prerequisites of the intl subdirectory AM_INTL_SUBDIR # gettext AM_GNU_GETTEXT_VERSION([0.14.4]) AM_GNU_GETTEXT([external]) # Specify locale stuff destination AC_ARG_WITH(localedir, [ --with-localedir=PATH specify where the locale stuff should go ]) if test "x$LOCALEDIR" = "x"; then if test "x$with_localedir" != "x"; then LOCALEDIR=$with_localedir else LOCALEDIR='$(prefix)/share/locale' fi fi AC_SUBST(LOCALEDIR) #################################################### ## user arguments #################################################### # do you want to see cursor when working with pinfo? ## TODO: this should really be a command line/config file option AC_ARG_ENABLE(showcursor, [ --enable-cursor enable cursor when working with pinfo [default=no]], , ) if test "x$enable_showcursor" != "xyes" ; then AC_DEFINE(HIDECURSOR,FALSE,[don't show cursor]) #' else AC_DEFINE(HIDECURSOR,TRUE,[don't show cursor]) #' fi # If pinfo is too slow, the below definition will resign from dynamical # allocation in critical places, and replace it with static buffers which # should save few instructions to CPU ;) ## TODO: do we still need this with current computing powers? AC_ARG_ENABLE(use_static, [ --disable-static enable using static buffers ], , enable_use_static=yes) if test "x$enable_use_static" = "xyes" ; then AC_DEFINE(___USE_STATIC___, 1, [don't use dynamic buffer]) #' fi # do you want to use regexp searches? ## TODO: this should really be a command line/config file option AC_ARG_WITH(regexp_search, [ --with-regexp-search use regular expression search [default=yes]]) if test "x$with_regexp_search" = "xno"; then AC_DEFINE(___DONT_USE_REGEXP_SEARCH___,1, [Don't use regexp search engine]) #' fi #################################################### ## destination dirs #################################################### ##TODO: replace these by PACKAGE_VERSION and PACKAGE_NAME AC_DEFINE_UNQUOTED(VERSION,"$VERSION",[Package version]) AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE",[Package name]) # export variables AC_SUBST(KEY_END) AC_SUBST(MAN_KEY_END) AC_SUBST(EXTRA_SOURCES) AC_SUBST(MANDIR) # generate these files depending on the current configuration AC_CONFIG_FILES([ Makefile doc/Makefile macros/Makefile src/Makefile pinfo.spec po/Makefile.in src/pinforc doc/pinfo.1 ]) # the end. Output config.status and launch it. AC_OUTPUT # vim:ts=4 pinfo-0.6.13/doc/000077500000000000000000000000001343207050400134575ustar00rootroot00000000000000pinfo-0.6.13/doc/Makefile.am000066400000000000000000000003211343207050400155070ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in @SET_MAKE@ AUTOMAKE_OPTIONS = info-in-builddir man_MANS = pinfo.1 info_TEXINFOS = pinfo.texi CLEANFILES = stamp-vti pinfo.1 pinfo.info version.texi pinfo-0.6.13/doc/pinfo.1.in000066400000000000000000000417561343207050400152760ustar00rootroot00000000000000.TH PINFO 1 "01 Dec 2001" .SH NAME .B pinfo \- is user-friendly, console-based viewer for Info documents .SH SYNTAX .B pinfo [\fIoptions\fR] [\fBinfopage\fR] .SH DESCRIPTION This is a program for viewing info files. You specify which page you want to read by passing it an .I infopage argument. This argument contains the name of an info page (i.e. 'bash'). The program will then (by default) search for it in the current directory, .IR "/usr/share/info", .IR "/usr/info", .IR "/usr/local/share/info", .IR "/usr/local/info". and .IR "/opt/info". The search path can be adjusted by INFOPATH environment variable or in the configuration file. Pinfo will also automatically add the suffix '-info', '-info.Z', '-info.gz', or '-info.bz2'. .P When the search for info pages fails, man is called with the infopage argument, and its output is parsed by pinfo. This means that when you don't have the appropriate info page, but have a man page instead; the man page will be viewed. .P When no \fIinfopage\fR is specified, the default `dir' page is shown. .P Supported options are .P .BR "-h", .B --help \- print help information and exit. .P .BR "-v", .BR --version \- print version information and exit. .P .BR "-m", .BR --manual \- uses manual page instead of info by default. (pinfo -m could be used as a manual pager). \fBWarning\fR: Everything what follows this option is passed to the `\fIman\fR' program. Don't be confused if pinfo options, which followed `\fB-m\fR' don't work. When using this option, pinfo does not parse the info options as usual! It invokes the man part of program. .P You can also call the man function of pinfo in another way. When pinfo is called with an argv[0] (the program file name), which contains the word 'man' in its name, the man functions are enabled automatically. .P Previously there was a symlink to pinfo, called pman, but I had to remove it from the distribution, since its name was in conflict with some other utility. Anyway, you can feel free to create such a link if you wish. .P .BR "-r", .BR --raw-filename \- uses a raw filename first (i.e. the name which you specified as \fIinfopage\fR is considered to be a real file in the specified location). .P .BR "-f", .BR --file synonym for -r. .P .BR "-a", .BR --apropos \- if this is set, apropos is called when no man or info page could be found. .P .BR "-c", .BR --cut-man-headers \- if this is set, man parsing code will try to cut out the repeated man headers. Use with care. ;) .P .BR "-s", .BR "--squeeze-lines" \- cut empty lines from manual pages. This option enables auto cutting of every repeated newline in a manual page. .P .BR "-t", .BR "--force-manual-tag-table" \- forces manual detection of tag table. This allows you to view info pages, which may be corrupted. (as i.e. version of jed's pages, shipped with RH5.0). The tag table corruption usually appears in that the info links, which you follow, move you to quite unexpected nodes. .P .BR "--node=\fInodename\fB", .BR "--node \fInodename\fB" \- Go to the node `\fInodename\fR' of info file. Since 0.6.7 it is also possible to specify nodes as in standalone info via file names, like `(gcc)Introduction'. .P .BR "--rcfile=\fIfilename\fB", .BR "--rcfile \fIfilename\fB" \- Use alternate configuration file. .P .BR "--long-manual-links", .BR "-l" \- Use long link names in manuals. On some systems the manual hierarchy is divided into subsections like `3ncurses', etc, while on other systems all belongs to section `3'. If this option is what your system is like, feel free to use it. .P .BR "--clear-at-exit", .BR "-x" \- Clear screen at exit. .P The options are handled by GNU getopt, so you can here (as in other programs) abbreviate the option names to the minimal number of characters by which the options differ. .P Warning! If you do not have getopt, these options will not work! .P .SH DEFAULT KEYS WHEN BROWSING INFO FILE .P Just take a look at the example configuration file (below), and at the key descriptions. Keys available in manual viewer differ a bit from the keys available in info viewer. .P .SH ENVIRONMENT There is a variable $INFOPATH, which can specify the paths to be searched for info files. It's format is similar to that of the $PATH variable. An example setting could look like: .P .B /usr/info:/usr/somewhere/info:/not/even/in/usr/info .P etc. Directories are separated by colons. .SH COLOR AND KEY DEFINITIONS .P There are configuration files called ~/.pinforc and [prefix]/etc/pinforc, for local and global configuration (where prefix is the prefix of the directory, where pinfo is installed, i.e. /usr/local, or /). Here's an example of such a file; we'll discuss the contents below: .P .nf .sp # Here are some color setting. # Whitespace between the entries is optional. COL_NORMAL = COLOR_WHITE, COLOR_BLACK, NO_BOLD, NO_BLINK COL_MENUSELECTED = COLOR_RED, COLOR_BLACK, BOLD, NO_BLINK COL_MENU=COLOR_BLUE,COLOR_BLACK,BOLD, NO_BLINK COL_NOTESELECTED=COLOR_RED,COLOR_BLACK,BOLD, NO_BLINK COL_NOTE=COLOR_GREEN,COLOR_BLACK,BOLD, NO_BLINK COL_TOPLINE=COLOR_YELLOW,COLOR_BLUE,BOLD, NO_BLINK COL_BOTTOMLINE=COLOR_YELLOW,COLOR_BLUE,BOLD, NO_BLINK COL_MANUALBOLD=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK COL_MANUALITALIC=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK COL_URL=COLOR_MAGENTA,COLOR_BLACK,BOLD, NO_BLINK COL_URLSELECTED=COLOR_RED,COLOR_BLACK,NO_BOLD, NO_BLINK COL_INFOHIGHLIGHT=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK # # Here are some keybindings as well... # KEY_TOTALSEARCH_1 = 's' KEY_TOTALSEARCH_2 = 'S' KEY_SEARCH_1 = '/' KEY_SEARCH_2 = '.' KEY_GOTO_1='g' KEY_GOTO_2='m' KEY_HOME_1='h' KEY_HOME_2='H' KEY_PREVNODE_1='p' KEY_PREVNODE_2='P' KEY_NEXTNODE_1='n' KEY_NEXTNODE_2='N' KEY_UP_1=KEY_UP KEY_UP_2='u' KEY_END_1=@KEY_END@ KEY_END_2='e' KEY_PGDN_1=KEY_NPAGE KEY_PGDN_2=' ' KEY_PGDN_AUTO_1=0 KEY_PGDN_AUTO_2=' ' KEY_PGUP_1=KEY_PPAGE KEY_PGUP_2='b' KEY_PGUP_AUTO_1=0 KEY_PGUP_AUTO_2='b' KEY_DOWN_1=KEY_DOWN KEY_DOWN_2='d' KEY_TOP_1=KEY_HOME KEY_TOP_2='t' KEY_BACK_1=KEY_LEFT KEY_BACK_2='l' KEY_FOLLOWLINK_1=KEY_RIGHT KEY_FOLLOWLINK_2='\n' # 12 is a code for ctrl+l KEY_REFRESH_1=12 KEY_REFRESH_2='~' KEY_SHELLFEED_1='!' KEY_SHELLFEED_2='1' KEY_QUIT_1='q' KEY_QUIT_2='Q' KEY_DIRPAGE_1='d' KEY_DIRPAGE_2='D' KEY_GOLINE_1='l' KEY_GOLINE_2=0 KEY_PRINT_1=']' KEY_PRINT_2=0 # # Some options, explained in the man page # MANUAL=false CUT-MAN-HEADERS=true CUT-EMPTY-MAN-LINES=true RAW-FILENAME=false APROPOS=false DONT-HANDLE-WITHOUT-TAG-TABLE=false LONG-MANUAL-LINKS=false FILTER-0xB7=true QUIT-CONFIRMATION=false QUIT-CONFIRM-DEFAULT=no CLEAR-SCREEN-AT-EXIT=true STDERR-REDIRECTION="2> /dev/null" HTTPVIEWER=lynx FTPVIEWER=lynx MAILEDITOR=pine MANLINKS=1:8:2:3:4:5:6:7:9:n:p:o:3X11:3Xt INFOPATH=/usr/info:/usr/share/info:/usr/local/info HIGHLIGHTREGEXP=Bash.*has SAFE-USER=nobody SAFE-GROUP=nobody .fi .P As you can see, the format is simple. First I'll explain the color definitions. First you must enter a color name (all available color names are present in the example, and they're self explanatory, I think. There is also a special color COLOR_DEFAULT, which stands for transparency). Then you enter the foreground color, and the background color. The BOLD attribute means that we want the foreground color to be highlighted. (i.e. light blue, light green). BLINK attribute is the blinking attribute, or highlighted background in some other configurations. .P Now let's move to the key definitions. Here we first put a key name (again all keys are present in the example); then we enter its value -- either surrounded by apostrophes, or a keycode number (like in KEY_REFRESH_1), or its mnemonic code name if its a special key (like i.e. in KEY_FOLLOWLINK_1). .P If you wish to specify key by code value, use the supplied program 'testkey' to obtain the needed value. It mainly is a feature, when you want to add some CTRL+letter keybindings, and similar. .P For each function you can bind two keys, i.e. you could bind both Enter and Cursor Right to the FollowLink-function. As you can see in the example above, the two key names are KEY_FOLLOWLINK_1 and KEY_FOLLOWLINK_2. .P Here's an explanation of the key names: .RS .sp .TP 1.0i .B KEY_TOTALSEARCH_1 Key for searching through all nodes of info file. .TP .B KEY_TOTALSEARCH_2 Alternate key for searching through all nodes of info file. .TP .B KEY_SEARCH_1 Key for searching through current node (or manual). .TP .B KEY_SEARCH_2 Alternate key for searching through current node (or manual). .TP .B KEY_SEARCH_AGAIN_1 Key for repeating the last search. .TP .B KEY_SEARCH_AGAIN_2 Alternate key for repeating the last search. .TP .B KEY_GOTO_1 Key for explicitly going to a node (by specifying its name). .TP .B KEY_GOTO_2 Alternate key for explicitly going to a node (by specifying its name). .TP .B KEY_PREVNODE_1 Key for going to a node marked as 'Prev' in the header. In man page viewer this goes to the previous man section. .TP .B KEY_PREVNODE_2 Alternate key for going to a node marked as 'Prev' in the header. In man page viewer this goes to the previous man section. .TP .B KEY_NEXTNODE_1 Key for going to a node marked as 'Next' in the header. In man page viewer this goes to the next man section. .TP .B KEY_NEXTNODE_2 Alternate key for going to a node marked as 'Next' in the header. In man page viewer this goes to the next man section. .TP .B KEY_UP_1 Key for scrolling text one line up. .TP .B KEY_UP_2 Alternate key for scrolling text one line up. .TP .B KEY_END_1 Key for going to the end of the node. .TP .B KEY_END_2 Alternate key for going to the end of the node. .TP .B KEY_PGDN_1 Key for going one page down in the viewed node. .TP .B KEY_PGDN_2 Alternate key for going one page down in the viewed node. .TP .B KEY_PGDN_AUTO_1 Key for going to the next node when you're at the end of node (default is zero -- turned off). .TP .B KEY_PGDN_AUTO_2 Alternate key for going to the next node when you're at the end of node (default is space, as for pgdn_2). .TP .B KEY_HOME_1 Key for going to the beginning of the node. .TP .B KEY_HOME_2 Alternate key for going to the beginning of the node. .TP .B KEY_PGUP_1 Key for going one page up in the viewed node. .TP .B KEY_PGUP_2 Alternate key for going one page up in the viewed node. .TP .B KEY_PGUP_AUTO_1 Key for going to the `up' node, when being at the top of node. (Default value is zero -- turned off). .TP .B KEY_PGUP_AUTO_2 Alternate key for going to the `up' node, when being at the top of node. (Default value is `\-', as for pgup_2). .TP .B KEY_DOWN_1 Key for scrolling the text down one line. .TP .B KEY_DOWN_2 Alternate key for scrolling the text down one line. .TP .B KEY_TOP_1 Key for going to the top (first) node. .TP .B KEY_TOP_2 Alternate key for going to the top (first) node. .TP .B KEY_BACK_1 Key for going back (in the history of viewed nodes). .TP .B KEY_BACK_2 Alternate key for going back (in the history of viewed nodes). .TP .B KEY_FOLLOWLINK_1 Key for following a hypertext link. .TP .B KEY_FOLLOWLINK_2 Alternate key for following a hypertext link. .TP .B KEY_REFRESH_1 Key for refreshing the screen (hard coded is the ^L value). .TP .B KEY_REFRESH_2 Alternate key for refreshing the screen. .TP .B KEY_SHELLFEED_1 Key for calling a shell command, and passing the viewed node to the stdin of that command. .TP .B KEY_SHELLFEED_2 Alternate key for calling a shell command, and passing the viewed node to the stdin of that command. .TP .B KEY_QUIT_1 Key for exiting the program. .TP .B KEY_QUIT_2 Alternate key for exiting the program. .TP .B KEY_GOLINE_1 Key for going to a specified line in file. .TP .B KEY_GOLINE_2 Alternate key for going to a specified line in file. .TP .B KEY_PRINT_1 Key for printing viewed node or man page. .TP .B KEY_PRINT_2 Alternate key for printing viewed node or man page. .sp .RE .P The special mnemonics for keys (which are defined at present) are: .RS .sp .TP 1.0i .B KEY_BREAK .TP .B KEY_DOWN .TP .B KEY_UP .TP .B KEY_LEFT .TP .B KEY_RIGHT .TP .B KEY_DOWN .TP .B KEY_HOME .TP .B KEY_BACKSPACE .TP .B KEY_NPAGE .TP .B KEY_PPAGE .TP .BR KEY_END " [Note: this works probably \fBONLY\fR with Linux ncurses]" .TP .B KEY_F(x) .TP .B KEY_CTRL('c') \- this assigns the key value to a \fIctrl+c\fR combination. \fIc\fR may be any letter you wish. .TP .B KEY_ALT('c') \- this assigns the key value to a \fIalt+c\fR combination. \fIc\fR may be any letter you wish. If \fIalt\fR key won't work, you may use \fIESC+key\fR combination. .TP .B 'c' \- this means a printable character \fIc\fR. The syntax is just like in C/C++ ;). .TP .B [number] \- you can also specify key as its code number. It is useful e.g. when specifying control keys, and some nonstandard keys. A numerical value of zero turns given key binding off. .sp .RE See manual page for curs_getch (3x) for description of their meaning. .P Warning! Try not to create some serious key binding conflicts! .P The options in the last part of the example configuration file should be fairly self-explanatory. The variables that can be set to true or false do the same things as the command line arguments with the same names. .RS .sp .TP 1.0i .B MANUAL If this is set to .B true the default is to first check for a man page, instead of a texinfo file. .TP .B CUT-MAN-HEADERS If set to true, then pinfo tries to cut off the repeated headers throughout man pages. .TP .B CUT-EMPTY-MAN-LINES If set to true, then pinfo tries to cut off the repeated newlines (i.e. it will shorten each set of consecutive newlines to one newline). .TP .B RAW-FILENAME If set to true, the file argument is taken to be the name of a file in the current working directory, i.e. the directories in .B INFOPATH will only be searched if a file with this name is not in the working directory. .TP .B APROPOS If set to true, .B apropos is called if no info or man page is found. .TP .B DONT-HANDLE-WITHOUT-TAG-TABLE If set to .B true , pinfo will not attempt to display texinfo pages without tag tables. .TP .B HTTPVIEWER Set this to the program you want to use to follow http links in documents. .TP .B FTPVIEWER Set this to the program you want to use to follow ftp links in documents. .TP .B MAILEDITOR Set this to your favorite email program, and it will be started if you follow an email link in a document. .TP .B PRINTUTILITY Utility, which you use for printing. I.e. `lpr'. If you don't use any, you may also try something like `cat >/dev/lp1', or sth. ;) .TP .B MANLINKS This specifies the section names, which may be referenced in your man pages (i.e. Xtoolkit man pages match the section 3Xt (see for example XtVaCreateWidget) manpage), Xlib function pages match section 3X11, etc. Such extensions may not be recognized by default, so it is a good idea to add them). .TP .B INFOPATH This allows you to override the default search path for info pages. The paths should be separated by colons. .TP .B MAN-OPTIONS This specifies the options, which should be passed to the `man' program. (see man(1) for description of what they're like). .TP .B STDERR-REDIRECTION Pinfo allows you to redirect the stderr output of called programs. For example if you don't want to see man's error messages about manual page formatting, you can use \fISTDER-REDIRECTION="2> /dev/null". This is the default. .TP .B LONG-MANUAL-LINKS This is another true/false option, which decides whether your system supports long manual section names, or not. (i.e. "3ncurses" instead of "3"). .TP .B FILTER-0xB7 This decides, whether you want to convert 0xb7 chars to `o', or not. For example for iso-8859-2 fonts this makes man's list marks a bit nicer ;) (look for example at perl's man page, to see how those marks look like). .TP .B QUIT-CONFIRMATION This decides whether you want to use quit confirmation on exit, or not. .TP .B QUIT-CONFIRM-DEFAULT This yes/no option determines the default answer to the QUIT-CONFIRMATION dialog. (default answer is when you press a key, that does not match the asked question). .TP .B CLEAR-SCREEN-AT-EXIT This true/false option determines if you want to have your screen cleared at exit, or no. .TP .B CALL-READLINE-HISTORY This true/false option determines if you want to have a prompt of last history entry whenever calling readline wrapper, eg. in subsequent searches. .TP .B HIGHLIGHTREGEXP This is an option, through which you may pass to pinfo regexps, which should be highlighted when working with document. Warning! This may turn very slow if you use it without care! .TP .B SAFE-USER This option is used to pass the name of user, to which suid when pinfo is run with root privileges. .TP .B SAFE-GROUP This option is used to pass the name of group, to which suid when pinfo is run with root privileges. .sp .RE .SH INTERNATIONALIZATION SUPPORT Pinfo implements general features of gnu gettext library (the thing, which you need to see national messages ;). But it is not the end. Pinfo allows you to use national info pages! You only need to put them to your info directory, into a subdirectory, which is called `$LANG'. .SH LICENSE This program is distributed under the terms of GPL. .SH BUGS .P Please send bug reports to the author. .SH AUTHOR Przemek Borys <\fBpborys@dione.ids.pl\fR> Bas Zoetekouw <\fBbas@debian.org\fR> .P There was also a lot of other people, who contributed to this code. See the AUTHORS file. .SH COMMENTS The author would like to read some comments and suggestions from you, if any. pinfo-0.6.13/doc/pinfo.texi000066400000000000000000000535531343207050400155000ustar00rootroot00000000000000\input texinfo @c %**start of header @setfilename pinfo.info @settitle Pinfo @c %**end of header @include version.texi @set AUTHOR Przemek Borys, Bas Zoetekouw @set CONTACT @email{pborys@@dione.ids.pl}, @email{bas@@debian.org} @set AUTHORTEXI Stanislav Kuchar @set CONTACTTEXI @email{thorn@@slonik.sk}, @uref{http://slonik.sk/} @set PROGRAM @file{pinfo} @ifinfo This is documentation for @value{PROGRAM}, version @value{VERSION}. Edition @value{EDITION}, date @value{UPDATED}. @flushright Copyright 2000 @copyright{} @value{AUTHOR}@* @value{CONTACT} @end flushright @end ifinfo @titlepage @title Pinfo @subtitle Version of @value{PROGRAM} @value{VERSION} @subtitle Edition @value{EDITION} @subtitle @value{UPDATED-MONTH} @author @value{AUTHOR} @author @value{CONTACT} @page @vskip 0pt plus 1filll @flushright Copyright 2000 @copyright{} @value{AUTHOR}@* @value{CONTACT} @end flushright @end titlepage @dircategory Texinfo documentation system @direntry * Pinfo: (pinfo). curses based lynx-style info browser. @end direntry @node Top, Invoking, (dir), (dir) @cindex Date This documentation is for @value{PROGRAM}, version @value{VERSION}. @menu * Invoking:: Command line options. * Configuration:: Configurable behaviour of pinfo. * Internationalization Support:: Localization. * Author:: Who wrote pinfo. * Bugs:: Help debugging. * Copyright:: Copying. * Index:: Index. @detailmenu --- The Detailed Node Listing --- Configuration * Configuration file:: Save your preferences. * Environment:: Variables. Configuration file * Color:: Color settings. * Keys:: Bindable keyboard. * Options:: Configuration options. * Example config file:: Build in values. Keys * Keybindings:: What keys can be used. @end detailmenu @end menu @node Invoking, Configuration, Top, Top @chapter Invoking @cindex Description @cindex Command line @cindex Options @cindex info files @value{PROGRAM} [@var{options}] [@var{info_page}] @value{PROGRAM} is a program for viewing info files. You specify which page you want to read by passing it an @var{info_page} argument. This argument contains the name of an info page (i.e. @samp{bash}). The program will then (by default) search for it in the current directory, @file{/usr/share/info}, @file{/usr/info}, @file{/usr/local/share/info}, @file{/usr/local/info}, and @file{/opt/info}. Other searchpath may be specified in configfile or via INFOPATH environmental variable. Pinfo will also automatically add the suffix @samp{-info}, @samp{-info.Z}, @samp{-info.gz}, or @samp{-info.bz2}. At present other suffixes are not recognized, but you can easily add them to the function @code{openinfo()} in @file{filehandling_functions.c}. When the search for info pages fails, man is called with the @var{info_page} argument, and its output is parsed by @value{PROGRAM}. This means that when you don't have the appropriate info page, but have a man page instead; the man page will be viewed. When no @var{info_page} is specified, the default @samp{dir} page is shown. @noindent Supported @var{options} are @table @samp @item -h, --help print help information and exit @item -v, --version print version information and exit @item -m, --manual uses manual page instead of info by default. (@value{PROGRAM} @samp{-m} could be used as a manual pager). Warning: Everything what follows this option is passed to the @code{man} program. Don't be confused if @value{PROGRAM} options, which followed @samp{-m} don't work. When using this option, pinfo does not parse the info options as usual! It invokes the man part of program. You can also call the man function of @value{PROGRAM} in another way. When @value{PROGRAM} is called with an @code{argv[0]} (the program file name), which contains the word @code{man} in its name, the man functions are enabled automatically. Previously there was a symlink to @value{PROGRAM}, called @code{pman}, but I had to remove it from the distribution, since its name was in conflict with some other utility. Anyway, you can feel free to create such a link if you wish. @item -r, --raw-filename uses a raw filename first (i.e. the name which you specified as infopage is considered to be a real file in the specified location). @item -f, --file Same as '-r'. @item -a, --apropos if this is set, apropos is called when no man or info page could be found. @item -c, --cut-man-headers if this is set, man parsing code will try to cut out the repeated man headers. Use with care. ;) @item -s, --squeeze-lines cut empty lines from manual pages. This option enables autocutting of every repeated newline in a manual page. @item -t, --force-manual-tag-table forces manual detection of tag table. This allows you to view info pages, which may be corrupted. (as i.e. version of jed's pages, shipped with RH5.0). The tag table corruption usually appears in that the info links, which you follow, move you to quite unexpected nodes. @item --node=@var{nodename}, --node @var{nodename} Go to the node @var{nodename} of info file. Since 0.6.7 it is also possible to specify nodes as in standalone info via filenames, like `(gcc)Introduction'. @item --rcfile=@var{filename}, --node @var{filename} Use alternate rcfile. @item -l, --long-manual-links Use long link names in manuals. On some systems the manual hierarchy is divided into subsections like @samp{3ncurses}, etc, while on other systems all belongs to section @samp{3}. If this option is what your system is like, feel free to use it. @item -x, --clear-at-exit Clear screen at exit. @end table The options are handled by GNU getopt, so you can here as in other programs abbreviate the option names to the minimal number of characters by which the options differ. Warning! If you do not have getopt, these options will not work! @node Configuration, Internationalization Support, Invoking, Top @chapter Configuration @menu * Configuration file:: Save your preferences. * Environment:: Variables. @end menu @node Configuration file, Environment, Configuration, Configuration @section Configuration file @cindex Customization @cindex Configure Just take a look at the example config file, @xref{Example config file}, and at the key descriptions, @xref{Keys}. Keys available in manual viewer differ a bit from the keys available in info viewer. There are configuration files called @file{~/.pinforc} and @file{[prefix]/etc/pinforc}, for local and global configuration (where prefix is the prefix of the directory, where @value{PROGRAM} is installed, i.e. @file{/usr/local}, or @file{/usr}). @menu * Color:: Color settings. * Keys:: Bindable keyboard. * Options:: Configuration options. * Example config file:: Build in values. @end menu @node Color, Keys, Configuration file, Configuration file @subsection Color @cindex Color @cindex Look preferences First you must enter a color name (all available color names are present in the example, @xref{Example config file}, and they're self explanatory, I think. There is also a special color @var{COLOR_DEFAULT}, which stands for transparency). Then you enter the foreground color, and the background color. The @var{BOLD} attribute means that we want the foreground color to be highlighted. (i.e. lightblue, lightgreen). @var{BLINK} attribute is the blinking attribute, or highlighted background in some other configurations. @node Keys, Options, Color, Configuration file @subsection Keys @cindex Keyboard @cindex Configure keys @cindex How to use it Now let's move to the key definitions. Here we first put a key name (again all keys are present in the example); then we enter its value -- either surrounded by apostrophes, or a keycode number (like in @var{KEY_REFRESH_1}), or its mnemonic code name if its a special key (like i.e. in @var{KEY_FOLLOWLINK_1}). If you wish to specify key by code value, use the supplied program 'testkey' to obtain the needed value. It mainly is a feature, when you want to add some ctrl+letter keybindings, and similar. For each function you can bind two keys, i.e. you could bind both Enter and Cursor Right to the FollowLink-function. As you can see in the example above, the two key names are @var{KEY_FOLLOWLINK_1} and @var{KEY_FOLLOWLINK_2}. @menu * Keybindings:: What keys can be used. @end menu @node Keybindings, , Keys, Keys @subsubsection Keybindings @cindex Keybindings @cindex Configuration Keys Here's an explanation of the key names: @table @var @item KEY_TOTALSEARCH_1 Key for searching through all nodes of info file. @item KEY_TOTALSEARCH_2 Alternate key for searching through all nodes of info file. @item KEY_SEARCH_1 Key for searching through current node (or manual). @item KEY_SEARCH_2 Alternate key for searching through current node (or manual). @item KEY_SEARCH_AGAIN_1 Key for repeating the last search. @item KEY_SEARCH_AGAIN_2 Alternate key for repeating the last search. @item KEY_GOTO_1 Key for explicitly going to a node (by specifing its name). @item KEY_GOTO_2 Alternate key for explicitly going to a node (by specifing its name). @item KEY_PREVNODE_1 Key for going to a node marked as 'Prev' in the header. In manpage viewer this goes to the previous man section. @item KEY_PREVNODE_2 Alternate key for going to a node marked as 'Prev' in the header. In manpage viewer this goes to the previous man section. @item KEY_NEXTNODE_1 Key for going to a node marked as 'Next' in the header. In manpage viewer this goes to the next man section. @item KEY_NEXTNODE_2 Alternate key for going to a node marked as 'Next' in the header. In manpage viewer this goes to the next man section. @item KEY_UP_1 Key for scrolling text one line up. @item KEY_UP_2 Alternate key for scrolling text one line up. @item KEY_END_1 Key for going to the end of the node. @item KEY_END_2 Alternate key for going to the end of the node. @item KEY_PGDN_1 Key for going one page down in the viewed node. @item KEY_PGDN_2 Alternate key for going one page down in the viewed node. @item KEY_PGDN_AUTO_1 Key for going to the next node when you're at the end of node (default is zero -- turned off). @item KEY_PGDN_AUTO_2 Alternate key for going to the next node when you're at the end of node (default is space, as for pgdn_2). @item KEY_HOME_1 Key for going to the beginning of the node. @item KEY_HOME_2 Alternate key for going to the beginning of the node. @item KEY_PGUP_1 Key for going one page up in the viewed node. @item KEY_PGUP_2 Alternate key for going one page up in the viewed node. @item KEY_PGUP_AUTO_1 Key for going to the `up' node, when being at the top of node. (Default value is zero -- turned off). @item KEY_PGUP_AUTO_2 Alternate key for going to the `up' node, when being at the top of node. (Default value is `-', as for pgup_2). @item KEY_DOWN_1 Key for scrolling the text down one line. @item KEY_DOWN_2 Alternate key for scrolling the text down one line. @item KEY_TOP_1 Key for going to the top (first) node. @item KEY_TOP_2 Alternate key for going to the top (first) node. @item KEY_BACK_1 Key for going back (in the history of viewed nodes). @item KEY_BACK_2 Alternate key for going back (in the history of viewed nodes). @item KEY_FOLLOWLINK_1 Key for following a hypertext link. @item KEY_FOLLOWLINK_2 Alternate key for following a hypertext link. @item KEY_REFRESH_1 Key for refreshing the screen (hardcoded is the ^L value). @item KEY_REFRESH_2 Alternate key for refreshing the screen. @item KEY_SHELLFEED_1 Key for calling a shell command, and passing the viewed node to the stdin of that command. @item KEY_SHELLFEED_2 Alternate key for calling a shell command, and passing the viewed node to the stdin of that command. @item KEY_QUIT_1 Key for exiting the program. @item KEY_QUIT_2 Alternate key for exiting the program. @item KEY_GOLINE_1 Key for going to a specified line in file. @item KEY_GOLINE_2 Alternate key for going to a specified line in file. @item KEY_PRINT_1 Key for printing viewed node or man page. @item KEY_PRINT_2 Alternate key for printing viewed node or man page. @end table The special mnemonics for keys (which are defined at present) are: @table @var @item KEY_BREAK @item KEY_DOWN @item KEY_UP @item KEY_LEFT @item KEY_RIGHT @item KEY_DOWN @item KEY_HOME @item KEY_BACKSPACE @item KEY_NPAGE @item KEY_PPAGE @item KEY_END [Note: this works probably ONLY with linux ncurses] @item KEY_F(x) @item KEY_CTRL('c') this assigns the key value to a ctrl+c combination. c may be any letter you wish. @item KEY_ALT('c') this assigns the key value to a alt+c combination. c may be any letter you wish. If alt key won't work, you may use ESC+key combination. @item 'c' this means a printable character c. The syntax is just like in C/C++ ;). @item [number] you can also specify key as its code number. It is useful e.g. when specifying control keys, and some nonstandard keys. A numerical value of zero turns given keybinding off. @end table See manual page for curs_getch(3x) for description of their meaning. Warning! Try not to create some serious keybinding conflicts! @node Options, Example config file, Keys, Configuration file @subsection Options @cindex Configuration options @cindex Manual The options in the last part of the example configuration file should be fairly self-explanatory. The variables that can be set to true or false do the same things as the commandline arguments with the same names. @table @var @item MANUAL If this is set to true the default is to first check for a man page, instead of a texinfo file. @item CUT-MAN-HEADERS If set to true, then pinfo tries to cut off the repeated headers throughout man pages. @item CUT-EMPTY-MAN-LINES If set to true, then pinfo tries to cut off the repeated newlines (i.e. it will shorten each set of consecutive newlines to one newline). @item RAW-FILENAME If set to true, the file argument is taken to be the name of a file in the current working directory, i.e. the directories in @code{INFOPATH} will only be searched if a file with this name is not in the working directory. @item APROPOS If set to true, apropos is called if no info or man page is found. @item DONT-HANDLE-WITHOUT-TAG-TABLE If set to true, pinfo will not attempt to display texinfo pages without tag tables. @item HTTPVIEWER Set this to the program you want to use to follow http links in documents. @item FTPVIEWER Set this to the program you want to use to follow ftp links in documents. @item MAILEDITOR Set this to your favourite email program, and it will be started if you follow an email link in a document. @item PRINTUTILITY Utility, which you use for printing. I.e. @samp{lpr}. If you don't use any, you may also try something like @samp{cat >/dev/lp1}, or sth. ;) @item MANLINKS This specifies the section names, which may be referenced in your man pages (i.e. Xtoolkit man pages match the section 3Xt (see for example XtVaCreateWidget) manpage), Xlib function pages match section 3X11, etc. Such extensions may not be recognized by default, so it is a good idea to add them). @item INFOPATH This allows you to override the default search paths for info pages. Paths should be separated by colons. @item MAN-OPTIONS This specifies the options, which should be passed to the `man' program. (see man(1) for description of what they're like). @item STDERR-REDIRECTION Pinfo allows you to redirect the stderr output of called programs. For example if you don't want to see man's error messages about manual page formatting, you can use @samp{STDERR-REDIRECTION="2> /dev/null"}. This is the default. @item LONG-MANUAL-LINKS This is another true/false option, which decides whether your system supports long manual section names, or not. (i.e. "3ncurses" instead of "3"). @item FILTER-0xB7 This decides, whether you want to convert 0xb7 chars to @samp{o}, or not. For example for iso-8859-2 fonts this makes man's list marks a bit nicer ;) (look for example at perl's man page, to see how those marks look like). @item QUIT-CONFIRMATION This decides whether you want to use quit confirmation on exit, or not. @item QUIT-CONFIRM-DEFAULT This yes/no option determines the default answer to the @var{QUIT-CONFIRMATION} dialog. (default answer is when you press a key, that does not match the asked question). @item CLEAR-SCREEN-AT-EXIT This true/false option determines if you want to have your screen cleared at exit, or no. @item CALL-READLINE-HISTORY This true/false option determines if you want to have a prompt of last history entry whenever calling readline wrapper, eg. in subsequent searches. @item HIGHLIGHTREGEXP This is an option, through which you may pass to pinfo regexps, which should be highlighted when working with document. Warning! This may turn very slow if you use it without care! @item SAFE-USER This option is used to pass the name of user, to which suid when pinfo is run with root privileges. @item SAFE-GROUP This option is used to pass the name of group, to which suid when pinfo is run with root privileges. @end table @node Example config file, , Options, Configuration file @subsection Example config file @cindex Config file @example # # Here are some colour setting. # Whitespace between the entries is optional. # COL_NORMAL =COLOR_WHITE, COLOR_BLACK, NO_BOLD, NO_BLINK COL_MENUSELECTED =COLOR_RED, COLOR_BLACK, BOLD, NO_BLINK COL_MENU =COLOR_BLUE, COLOR_BLACK, BOLD, NO_BLINK COL_NOTESELECTED =COLOR_RED, COLOR_BLACK, BOLD, NO_BLINK COL_NOTE =COLOR_GREEN, COLOR_BLACK, BOLD, NO_BLINK COL_TOPLINE =COLOR_YELLOW, COLOR_BLUE, BOLD, NO_BLINK COL_BOTTOMLINE =COLOR_YELLOW, COLOR_BLUE, BOLD, NO_BLINK COL_MANUALBOLD =COLOR_WHITE, COLOR_BLACK, BOLD, NO_BLINK COL_MANUALITALIC =COLOR_WHITE, COLOR_BLACK, BOLD, NO_BLINK COL_URL =COLOR_MAGENTA, COLOR_BLACK, BOLD, NO_BLINK COL_URLSELECTED =COLOR_RED, COLOR_BLACK, NO_BOLD, NO_BLINK COL_INFOHIGHLIGHT =COLOR_WHITE, COLOR_BLACK, BOLD, NO_BLINK # # Here are some keybindings as well... # KEY_TOTALSEARCH_1 ='s' KEY_TOTALSEARCH_2 ='S' KEY_SEARCH_1 ='/' KEY_SEARCH_2 ='.' KEY_GOTO_1 ='g' KEY_GOTO_2 ='m' KEY_HOME_1 ='h' KEY_HOME_2 ='H' KEY_PREVNODE_1 ='p' KEY_PREVNODE_2 ='P' KEY_NEXTNODE_1 ='n' KEY_NEXTNODE_2 ='N' KEY_UP_1 =KEY_UP KEY_UP_2 ='u' KEY_END_1 =KEY_END KEY_END_2 ='e' KEY_PGDN_1 =KEY_NPAGE KEY_PGDN_2 =' ' KEY_PGDN_AUTO_1 =0 KEY_PGDN_AUTO_2 =' ' KEY_PGUP_1 =KEY_PPAGE KEY_PGUP_2 ='b' KEY_PGUP_AUTO_1 =0 KEY_PGUP_AUTO_2 ='b' KEY_DOWN_1 =KEY_DOWN KEY_DOWN_2 ='d' KEY_TOP_1 =KEY_HOME KEY_TOP_2 ='t' KEY_BACK_1 =KEY_LEFT KEY_BACK_2 ='l' KEY_FOLLOWLINK_1 =KEY_RIGHT KEY_FOLLOWLINK_2 ='\n' # 12 is a code for ctrl+l KEY_REFRESH_1 =KEY_CTRL('l') KEY_REFRESH_2 ='~' KEY_SHELLFEED_1 ='!' KEY_SHELLFEED_2 ='1' KEY_QUIT_1 ='q' KEY_QUIT_2 ='Q' KEY_DIRPAGE_1 ='d' KEY_DIRPAGE_2 ='D' KEY_GOLINE_1 ='l' KEY_GOLINE_2 =0 KEY_PRINT_1 =']' KEY_PRINT_2 =0 KEY_SEARCH_AGAIN_1 ='f' KEY_SEARCH_AGAIN_2 =0 # # Some options, explained in the man page # MANUAL=false CUT-MAN-HEADERS=true CUT-EMPTY-MAN-LINES=true RAW-FILENAME=false APROPOS=false DONT-HANDLE-WITHOUT-TAG-TABLE=false LONG-MANUAL-LINKS=false FILTER-0xB7=true QUIT-CONFIRMATION=false QUIT-CONFIRM-DEFAULT=no CLEAR-SCREEN-AT-EXIT=true STDERR-REDIRECTION="2> /dev/null" HTTPVIEWER=lynx FTPVIEWER=lynx MAILEDITOR=pine MANLINKS=1:8:2:3:4:5:6:7:9:n:p:o:3X11:3Xt INFOPATH=/usr/info:/usr/share/info:/usr/local/info HIGHLIGHTREGEXP=bash.*has SAFE-USER=nobody SAFE-GROUP=nobody @end example @node Environment, , Configuration file, Configuration @section Environment @cindex Environment configuration @cindex Search path There is a variable @code{$INFOPATH}, which can specify the paths to be searched for info files. It's format is similar to that of the @code{$PATH} variable. An example setting could look like: @samp{/usr/info:/usr/somewhere/info:/not/even/in/usr/info} etc. Directories are separated by colons. @node Internationalization Support, Author, Configuration, Top @chapter Internationalization Support @cindex Languages Pinfo implements general features of gnu gettext library (the thing, which you need to see national messages ;). But it is not the end. Pinfo allows you to use national info pages! You only need to put them to your info directory, into a subdirectory, which is called @code{$LANG}. @node Author, Bugs, Internationalization Support, Top @chapter Author @cindex Who did it @cindex Comments @value{AUTHOR} @value{CONTACT} A lot of other people also contributed to this code. See the @file{AUTHORS} file. Please file bug reports on Github: @uref{https://github.com/baszoetekouw/pinfo} @node Bugs, Copyright, Author, Top @chapter Bugs Please file bug reports on Github: @uref{https://github.com/baszoetekouw/pinfo} @node Copyright, Index, Bugs, Top @chapter Copyright @cindex Copyright This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of this License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021111, USA. @flushright Copyright 2000 @copyright{} @value{AUTHOR}@* @value{CONTACT} @end flushright @node Index, , Copyright, Top @unnumbered Index @printindex cp @contents @bye pinfo-0.6.13/macros/000077500000000000000000000000001343207050400141765ustar00rootroot00000000000000pinfo-0.6.13/macros/Makefile.am000066400000000000000000000003101343207050400162240ustar00rootroot00000000000000## Please update this variable if any new macros are created MACROS= \ aclocal-include.m4 \ readline.m4 \ wchar.m4 \ pkg.m4 \ ax_with_curses.m4 \ ax_check_compile_flag.m4 EXTRA_DIST=$(MACROS) pinfo-0.6.13/macros/aclocal-include.m4000066400000000000000000000005641343207050400174640ustar00rootroot00000000000000# aclocal-include.m4 # # This macro adds the name macrodir to the set of directories # that `aclocal' searches for macros. # serial 1 dnl AM_ACLOCAL_INCLUDE(macrodir) AC_DEFUN([AM_ACLOCAL_INCLUDE], [ AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y) test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done ]) pinfo-0.6.13/macros/ax_check_compile_flag.m4000066400000000000000000000064031343207050400207110ustar00rootroot00000000000000# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 5 AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) AS_VAR_IF(CACHEVAR,yes, [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ])dnl AX_CHECK_COMPILE_FLAGS pinfo-0.6.13/macros/ax_with_curses.m4000066400000000000000000000664101343207050400174760ustar00rootroot00000000000000# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_with_curses.html # =========================================================================== # # SYNOPSIS # # AX_WITH_CURSES # # DESCRIPTION # # This macro checks whether a SysV or X/Open-compatible Curses library is # present, along with the associated header file. The NcursesW # (wide-character) library is searched for first, followed by Ncurses, # then the system-default plain Curses. The first library found is the # one returned. Finding libraries will first be attempted by using # pkg-config, and should the pkg-config files not be available, will # fallback to combinations of known flags itself. # # The following options are understood: --with-ncursesw, --with-ncurses, # --without-ncursesw, --without-ncurses. The "--with" options force the # macro to use that particular library, terminating with an error if not # found. The "--without" options simply skip the check for that library. # The effect on the search pattern is: # # (no options) - NcursesW, Ncurses, Curses # --with-ncurses --with-ncursesw - NcursesW only [*] # --without-ncurses --with-ncursesw - NcursesW only [*] # --with-ncursesw - NcursesW only [*] # --with-ncurses --without-ncursesw - Ncurses only [*] # --with-ncurses - NcursesW, Ncurses [**] # --without-ncurses --without-ncursesw - Curses only # --without-ncursesw - Ncurses, Curses # --without-ncurses - NcursesW, Curses # # [*] If the library is not found, abort the configure script. # # [**] If the second library (Ncurses) is not found, abort configure. # # The following preprocessor symbols may be defined by this macro if the # appropriate conditions are met: # # HAVE_CURSES - if any SysV or X/Open Curses library found # HAVE_CURSES_ENHANCED - if library supports X/Open Enhanced functions # HAVE_CURSES_COLOR - if library supports color (enhanced functions) # HAVE_CURSES_OBSOLETE - if library supports certain obsolete features # HAVE_NCURSESW - if NcursesW (wide char) library is to be used # HAVE_NCURSES - if the Ncurses library is to be used # # HAVE_CURSES_H - if is present and should be used # HAVE_NCURSESW_H - if should be used # HAVE_NCURSES_H - if should be used # HAVE_NCURSESW_CURSES_H - if should be used # HAVE_NCURSES_CURSES_H - if should be used # # (These preprocessor symbols are discussed later in this document.) # # The following output variables are defined by this macro; they are # precious and may be overridden on the ./configure command line: # # CURSES_LIBS - library to add to xxx_LDADD # CURSES_CFLAGS - include paths to add to xxx_CPPFLAGS # # In previous versions of this macro, the flags CURSES_LIB and # CURSES_CPPFLAGS were defined. These have been renamed, in keeping with # AX_WITH_CURSES's close bigger brother, PKG_CHECK_MODULES, which should # eventually supersede the use of AX_WITH_CURSES. Neither the library # listed in CURSES_LIBS, nor the flags in CURSES_CFLAGS are added to LIBS, # respectively CPPFLAGS, by default. You need to add both to the # appropriate xxx_LDADD/xxx_CPPFLAGS line in your Makefile.am. For # example: # # prog_LDADD = @CURSES_LIBS@ # prog_CPPFLAGS = @CURSES_CFLAGS@ # # If CURSES_LIBS is set on the configure command line (such as by running # "./configure CURSES_LIBS=-lmycurses"), then the only header searched for # is . If the user needs to specify an alternative path for a # library (such as for a non-standard NcurseW), the user should use the # LDFLAGS variable. # # The following shell variables may be defined by this macro: # # ax_cv_curses - set to "yes" if any Curses library found # ax_cv_curses_enhanced - set to "yes" if Enhanced functions present # ax_cv_curses_color - set to "yes" if color functions present # ax_cv_curses_obsolete - set to "yes" if obsolete features present # # ax_cv_ncursesw - set to "yes" if NcursesW library found # ax_cv_ncurses - set to "yes" if Ncurses library found # ax_cv_plaincurses - set to "yes" if plain Curses library found # ax_cv_curses_which - set to "ncursesw", "ncurses", "plaincurses" or "no" # # These variables can be used in your configure.ac to determine the level # of support you need from the Curses library. For example, if you must # have either Ncurses or NcursesW, you could include: # # AX_WITH_CURSES # if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then # AC_MSG_ERROR([requires either NcursesW or Ncurses library]) # fi # # If any Curses library will do (but one must be present and must support # color), you could use: # # AX_WITH_CURSES # if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then # AC_MSG_ERROR([requires an X/Open-compatible Curses library with color]) # fi # # Certain preprocessor symbols and shell variables defined by this macro # can be used to determine various features of the Curses library. In # particular, HAVE_CURSES and ax_cv_curses are defined if the Curses # library found conforms to the traditional SysV and/or X/Open Base Curses # definition. Any working Curses library conforms to this level. # # HAVE_CURSES_ENHANCED and ax_cv_curses_enhanced are defined if the # library supports the X/Open Enhanced Curses definition. In particular, # the wide-character types attr_t, cchar_t and wint_t, the functions # wattr_set() and wget_wch() and the macros WA_NORMAL and _XOPEN_CURSES # are checked. The Ncurses library does NOT conform to this definition, # although NcursesW does. # # HAVE_CURSES_COLOR and ax_cv_curses_color are defined if the library # supports color functions and macros such as COLOR_PAIR, A_COLOR, # COLOR_WHITE, COLOR_RED and init_pair(). These are NOT part of the # X/Open Base Curses definition, but are part of the Enhanced set of # functions. The Ncurses library DOES support these functions, as does # NcursesW. # # HAVE_CURSES_OBSOLETE and ax_cv_curses_obsolete are defined if the # library supports certain features present in SysV and BSD Curses but not # defined in the X/Open definition. In particular, the functions # getattrs(), getcurx() and getmaxx() are checked. # # To use the HAVE_xxx_H preprocessor symbols, insert the following into # your system.h (or equivalent) header file: # # #if defined HAVE_NCURSESW_CURSES_H # # include # #elif defined HAVE_NCURSESW_H # # include # #elif defined HAVE_NCURSES_CURSES_H # # include # #elif defined HAVE_NCURSES_H # # include # #elif defined HAVE_CURSES_H # # include # #else # # error "SysV or X/Open-compatible Curses header file required" # #endif # # For previous users of this macro: you should not need to change anything # in your configure.ac or Makefile.am, as the previous (serial 10) # semantics are still valid. However, you should update your system.h (or # equivalent) header file to the fragment shown above. You are encouraged # also to make use of the extended functionality provided by this version # of AX_WITH_CURSES, as well as in the additional macros # AX_WITH_CURSES_PANEL, AX_WITH_CURSES_MENU and AX_WITH_CURSES_FORM. # # LICENSE # # Copyright (c) 2009 Mark Pulford # Copyright (c) 2009 Damian Pietras # Copyright (c) 2012 Reuben Thomas # Copyright (c) 2011 John Zaitseff # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 18 # internal function to factorize common code that is used by both ncurses # and ncursesw AC_DEFUN([_FIND_CURSES_FLAGS], [ AC_MSG_CHECKING([for $1 via pkg-config]) AC_REQUIRE([_PKG_CONFIG]) _PKG_CONFIG([_ax_cv_$1_libs], [libs], [$1]) _PKG_CONFIG([_ax_cv_$1_cppflags], [cflags], [$1]) AS_IF([test "x$pkg_failed" = "xyes" || test "x$pkg_failed" = "xuntried"],[ AC_MSG_RESULT([no]) # No suitable .pc file found, have to find flags via fallback AC_CACHE_CHECK([for $1 via fallback], [ax_cv_$1], [ AS_ECHO() pkg_cv__ax_cv_$1_libs="-l$1" pkg_cv__ax_cv_$1_cppflags="-D_GNU_SOURCE $CURSES_CFLAGS" LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs" CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_$1_cppflags" AC_MSG_CHECKING([for initscr() with $pkg_cv__ax_cv_$1_libs]) AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])], [ AC_MSG_RESULT([yes]) AC_MSG_CHECKING([for nodelay() with $pkg_cv__ax_cv_$1_libs]) AC_LINK_IFELSE([AC_LANG_CALL([], [nodelay])],[ ax_cv_$1=yes ],[ AC_MSG_RESULT([no]) m4_if( [$1],[ncursesw],[pkg_cv__ax_cv_$1_libs="$pkg_cv__ax_cv_$1_libs -ltinfow"], [$1],[ncurses],[pkg_cv__ax_cv_$1_libs="$pkg_cv__ax_cv_$1_libs -ltinfo"] ) LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs" AC_MSG_CHECKING([for nodelay() with $pkg_cv__ax_cv_$1_libs]) AC_LINK_IFELSE([AC_LANG_CALL([], [nodelay])],[ ax_cv_$1=yes ],[ ax_cv_$1=no ]) ]) ],[ ax_cv_$1=no ]) ]) ],[ AC_MSG_RESULT([yes]) # Found .pc file, using its information LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs" CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_$1_cppflags" ax_cv_$1=yes ]) ]) AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES]) AC_DEFUN([AX_WITH_CURSES], [ AC_ARG_VAR([CURSES_LIBS], [linker library for Curses, e.g. -lcurses]) AC_ARG_VAR([CURSES_CFLAGS], [preprocessor flags for Curses, e.g. -I/usr/include/ncursesw]) AC_ARG_WITH([ncurses], [AS_HELP_STRING([--with-ncurses], [force the use of Ncurses or NcursesW])], [], [with_ncurses=check]) AC_ARG_WITH([ncursesw], [AS_HELP_STRING([--without-ncursesw], [do not use NcursesW (wide character support)])], [], [with_ncursesw=check]) ax_saved_LIBS=$LIBS ax_saved_CPPFLAGS=$CPPFLAGS AS_IF([test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes], [ax_with_plaincurses=no], [ax_with_plaincurses=check]) ax_cv_curses_which=no # Test for NcursesW AS_IF([test "x$CURSES_LIBS" = x && test "x$with_ncursesw" != xno], [ _FIND_CURSES_FLAGS([ncursesw]) AS_IF([test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes], [ AC_MSG_ERROR([--with-ncursesw specified but could not find NcursesW library]) ]) AS_IF([test "x$ax_cv_ncursesw" = xyes], [ ax_cv_curses=yes ax_cv_curses_which=ncursesw CURSES_LIBS="$pkg_cv__ax_cv_ncursesw_libs" CURSES_CFLAGS="$pkg_cv__ax_cv_ncursesw_cppflags" AC_DEFINE([HAVE_NCURSESW], [1], [Define to 1 if the NcursesW library is present]) AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present]) AC_CACHE_CHECK([for working ncursesw/curses.h], [ax_cv_header_ncursesw_curses_h], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@define _XOPEN_SOURCE_EXTENDED 1 @%:@include ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; chtype c = COLOR_PAIR(1) & A_COLOR; attr_t d = WA_NORMAL; cchar_t e; wint_t f; int g = getattrs(stdscr); int h = getcurx(stdscr) + getmaxx(stdscr); initscr(); init_pair(1, COLOR_WHITE, COLOR_RED); wattr_set(stdscr, d, 0, NULL); wget_wch(stdscr, &f); ]])], [ax_cv_header_ncursesw_curses_h=yes], [ax_cv_header_ncursesw_curses_h=no]) ]) AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xyes], [ ax_cv_curses_enhanced=yes ax_cv_curses_color=yes ax_cv_curses_obsolete=yes AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions]) AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)]) AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features]) AC_DEFINE([HAVE_NCURSESW_CURSES_H], [1], [Define to 1 if is present]) ]) AC_CACHE_CHECK([for working ncursesw.h], [ax_cv_header_ncursesw_h], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@define _XOPEN_SOURCE_EXTENDED 1 @%:@include ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; chtype c = COLOR_PAIR(1) & A_COLOR; attr_t d = WA_NORMAL; cchar_t e; wint_t f; int g = getattrs(stdscr); int h = getcurx(stdscr) + getmaxx(stdscr); initscr(); init_pair(1, COLOR_WHITE, COLOR_RED); wattr_set(stdscr, d, 0, NULL); wget_wch(stdscr, &f); ]])], [ax_cv_header_ncursesw_h=yes], [ax_cv_header_ncursesw_h=no]) ]) AS_IF([test "x$ax_cv_header_ncursesw_h" = xyes], [ ax_cv_curses_enhanced=yes ax_cv_curses_color=yes ax_cv_curses_obsolete=yes AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions]) AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)]) AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features]) AC_DEFINE([HAVE_NCURSESW_H], [1], [Define to 1 if is present]) ]) AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h_with_ncursesw], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@define _XOPEN_SOURCE_EXTENDED 1 @%:@include ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; chtype c = COLOR_PAIR(1) & A_COLOR; attr_t d = WA_NORMAL; cchar_t e; wint_t f; int g = getattrs(stdscr); int h = getcurx(stdscr) + getmaxx(stdscr); initscr(); init_pair(1, COLOR_WHITE, COLOR_RED); wattr_set(stdscr, d, 0, NULL); wget_wch(stdscr, &f); ]])], [ax_cv_header_ncurses_h_with_ncursesw=yes], [ax_cv_header_ncurses_h_with_ncursesw=no]) ]) AS_IF([test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes], [ ax_cv_curses_enhanced=yes ax_cv_curses_color=yes ax_cv_curses_obsolete=yes AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions]) AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)]) AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features]) AC_DEFINE([HAVE_NCURSES_H], [1], [Define to 1 if is present]) ]) AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno], [ AC_MSG_WARN([could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h]) ]) ]) ]) unset pkg_cv__ax_cv_ncursesw_libs unset pkg_cv__ax_cv_ncursesw_cppflags # Test for Ncurses AS_IF([test "x$CURSES_LIBS" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [ _FIND_CURSES_FLAGS([ncurses]) AS_IF([test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes], [ AC_MSG_ERROR([--with-ncurses specified but could not find Ncurses library]) ]) AS_IF([test "x$ax_cv_ncurses" = xyes], [ ax_cv_curses=yes ax_cv_curses_which=ncurses CURSES_LIBS="$pkg_cv__ax_cv_ncurses_libs" CURSES_CFLAGS="$pkg_cv__ax_cv_ncurses_cppflags" AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if the Ncurses library is present]) AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present]) AC_CACHE_CHECK([for working ncurses/curses.h], [ax_cv_header_ncurses_curses_h], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; chtype c = COLOR_PAIR(1) & A_COLOR; int g = getattrs(stdscr); int h = getcurx(stdscr) + getmaxx(stdscr); initscr(); init_pair(1, COLOR_WHITE, COLOR_RED); ]])], [ax_cv_header_ncurses_curses_h=yes], [ax_cv_header_ncurses_curses_h=no]) ]) AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xyes], [ ax_cv_curses_color=yes ax_cv_curses_obsolete=yes AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)]) AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features]) AC_DEFINE([HAVE_NCURSES_CURSES_H], [1], [Define to 1 if is present]) ]) AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; chtype c = COLOR_PAIR(1) & A_COLOR; int g = getattrs(stdscr); int h = getcurx(stdscr) + getmaxx(stdscr); initscr(); init_pair(1, COLOR_WHITE, COLOR_RED); ]])], [ax_cv_header_ncurses_h=yes], [ax_cv_header_ncurses_h=no]) ]) AS_IF([test "x$ax_cv_header_ncurses_h" = xyes], [ ax_cv_curses_color=yes ax_cv_curses_obsolete=yes AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)]) AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features]) AC_DEFINE([HAVE_NCURSES_H], [1], [Define to 1 if is present]) ]) AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno], [ AC_MSG_WARN([could not find a working ncurses/curses.h or ncurses.h]) ]) ]) ]) unset pkg_cv__ax_cv_ncurses_libs unset pkg_cv__ax_cv_ncurses_cppflags # Test for plain Curses (or if CURSES_LIBS was set by user) AS_IF([test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno], [ AS_IF([test "x$CURSES_LIBS" != x], [ LIBS="$ax_saved_LIBS $CURSES_LIBS" ], [ LIBS="$ax_saved_LIBS -lcurses" ]) AC_CACHE_CHECK([for Curses library], [ax_cv_plaincurses], [ AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])], [ax_cv_plaincurses=yes], [ax_cv_plaincurses=no]) ]) AS_IF([test "x$ax_cv_plaincurses" = xyes], [ ax_cv_curses=yes ax_cv_curses_which=plaincurses AS_IF([test "x$CURSES_LIBS" = x], [ CURSES_LIBS="-lcurses" ]) AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present]) # Check for base conformance (and header file) AC_CACHE_CHECK([for working curses.h], [ax_cv_header_curses_h], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; initscr(); ]])], [ax_cv_header_curses_h=yes], [ax_cv_header_curses_h=no]) ]) AS_IF([test "x$ax_cv_header_curses_h" = xyes], [ AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if is present]) # Check for X/Open Enhanced conformance AC_CACHE_CHECK([for X/Open Enhanced Curses conformance], [ax_cv_plaincurses_enhanced], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@define _XOPEN_SOURCE_EXTENDED 1 @%:@include @%:@ifndef _XOPEN_CURSES @%:@error "this Curses library is not enhanced" "this Curses library is not enhanced" @%:@endif ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; chtype c = COLOR_PAIR(1) & A_COLOR; attr_t d = WA_NORMAL; cchar_t e; wint_t f; initscr(); init_pair(1, COLOR_WHITE, COLOR_RED); wattr_set(stdscr, d, 0, NULL); wget_wch(stdscr, &f); ]])], [ax_cv_plaincurses_enhanced=yes], [ax_cv_plaincurses_enhanced=no]) ]) AS_IF([test "x$ax_cv_plaincurses_enhanced" = xyes], [ ax_cv_curses_enhanced=yes ax_cv_curses_color=yes AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions]) AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)]) ]) # Check for color functions AC_CACHE_CHECK([for Curses color functions], [ax_cv_plaincurses_color], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@define _XOPEN_SOURCE_EXTENDED 1 @%:@include ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; chtype c = COLOR_PAIR(1) & A_COLOR; initscr(); init_pair(1, COLOR_WHITE, COLOR_RED); ]])], [ax_cv_plaincurses_color=yes], [ax_cv_plaincurses_color=no]) ]) AS_IF([test "x$ax_cv_plaincurses_color" = xyes], [ ax_cv_curses_color=yes AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)]) ]) # Check for obsolete functions AC_CACHE_CHECK([for obsolete Curses functions], [ax_cv_plaincurses_obsolete], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ chtype a = A_BOLD; int b = KEY_LEFT; int g = getattrs(stdscr); int h = getcurx(stdscr) + getmaxx(stdscr); initscr(); ]])], [ax_cv_plaincurses_obsolete=yes], [ax_cv_plaincurses_obsolete=no]) ]) AS_IF([test "x$ax_cv_plaincurses_obsolete" = xyes], [ ax_cv_curses_obsolete=yes AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features]) ]) ]) AS_IF([test "x$ax_cv_header_curses_h" = xno], [ AC_MSG_WARN([could not find a working curses.h]) ]) ]) ]) AS_IF([test "x$ax_cv_curses" != xyes], [ax_cv_curses=no]) AS_IF([test "x$ax_cv_curses_enhanced" != xyes], [ax_cv_curses_enhanced=no]) AS_IF([test "x$ax_cv_curses_color" != xyes], [ax_cv_curses_color=no]) AS_IF([test "x$ax_cv_curses_obsolete" != xyes], [ax_cv_curses_obsolete=no]) LIBS=$ax_saved_LIBS CPPFLAGS=$ax_saved_CPPFLAGS unset ax_saved_LIBS unset ax_saved_CPPFLAGS ])dnl pinfo-0.6.13/macros/pkg.m4000066400000000000000000000240511343207050400152230ustar00rootroot00000000000000dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29.1) dnl dnl Copyright Ā© 2004 Scott James Remnant . dnl Copyright Ā© 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) m4_pattern_allow([^_PKG_CONFIG$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. AC_DEFUN([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR pinfo-0.6.13/macros/readline.m4000066400000000000000000000075051343207050400162320ustar00rootroot00000000000000dnl readline detection dnl based on curses.m4 from gnome dnl dnl What it does: dnl ============= dnl dnl - Determine which version of readline is installed on your system dnl and set the -I/-L/-l compiler entries and add a few preprocessor dnl symbols dnl - Do an AC_SUBST on the READLINE_INCLUDES and READLINE_LIBS so that dnl @READLINE_INCLUDES@ and @READLINE_LIBS@ will be available in dnl Makefile.in's dnl - Modify the following configure variables (these are the only dnl readline.m4 variables you can access from within configure.in) dnl READLINE_INCLUDES - contains -I's dnl READLINE_LIBS - sets -L and -l's appropriately dnl has_readline - exports result of tests to rest of configure dnl dnl Usage: dnl ====== dnl 1) call AC_CHECK_READLINE after AC_PROG_CC in your configure.in dnl 2) Make sure to add @READLINE_INCLUDES@ to your preprocessor flags dnl 3) Make sure to add @READLINE_LIBS@ to your linker flags or LIBS dnl dnl Notes with automake: dnl - call AM_CONDITIONAL(HAS_READLINE, test "$has_readline" = true) from dnl configure.in dnl - your Makefile.am can look something like this dnl ----------------------------------------------- dnl INCLUDES= blah blah blah $(READLINE_INCLUDES) dnl if HAS_READLINE dnl READLINE_TARGETS=name_of_readline_prog dnl endif dnl bin_PROGRAMS = other_programs $(READLINE_TARGETS) dnl other_programs_SOURCES = blah blah blah dnl name_of_readline_prog_SOURCES = blah blah blah dnl other_programs_LDADD = blah dnl name_of_readline_prog_LDADD = blah $(READLINE_LIBS) dnl ----------------------------------------------- dnl dnl AH_TEMPLATE([HAS_READLINE], [ Defined if found readline ]) AC_DEFUN([AC_CHECK_READLINE],[ search_readline=true has_readline=false dnl CFLAGS=${CFLAGS--O} AC_SUBST(READLINE_LIBS) AC_SUBST(READLINE_INCLUDES) AC_ARG_WITH(readline, [ --with-readline[=dir] Compile with readline/locate base dir [no compile]], if test "x$withval" = "xno" ; then search_readline=false elif test "x$withval" != "xyes" ; then READLINE_LIBS="$LIBS -L$withval/lib -lreadline" READLINE_INCLUDES="-I$withval/include" search_readline=false AC_DEFINE(HAS_READLINE) has_readline=true else search_readline=true fi ) if $search_readline then AC_SEARCH_READLINE() fi if $has_readline then AC_DEFINE(HAS_READLINE) AC_READLINE_VERSION() fi ]) dnl dnl Parameters: directory filename cureses_LIBS curses_INCLUDES nicename dnl AC_DEFUN([AC_READLINE], [ if $search_readline then if test -f $1/$2 then AC_MSG_RESULT(Found readline on $1/$2) READLINE_LIBS="$3" READLINE_INCLUDES="$4" search_readline=false has_readline=true fi fi ]) AC_DEFUN([AC_SEARCH_READLINE], [ AC_CHECKING(location of readline.h file) AC_READLINE(/usr/include, readline.h, -lreadline,, "readline on /usr/include") AC_READLINE(/usr/include/readline, readline.h, -lreadline, -I/usr/include/readline, "readline on /usr/include/readline") AC_READLINE(/usr/local/include, readline.h, -L/usr/local/lib -lreadline, -I/usr/local/include, "readline on /usr/local") AC_READLINE(/usr/local/include/readline, readline.h, -L/usr/local/lib -L/usr/local/lib/readline -lreadline, -I/usr/local/include/readline, "readline on /usr/local/include/readline") ] ) AC_DEFUN([AC_READLINE_VERSION], [ AC_MSG_CHECKING(for readline version) readline_version=unknown cat > conftest.$ac_ext < #undef VERSION VERSION:RL_VERSION_MAJOR.RL_VERSION_MINOR EOF if (eval "$ac_cpp $READLINE_INCLUDES conftest.$ac_ext") 2>&AC_FD_CC | egrep "VERSION:" >conftest.out 2>&1; then changequote(,)dnl readline_version=`cat conftest.out|sed -e 's/ //g' -e 's/^VERSION://' -e 's/\..*$//'` changequote([,])dnl fi rm -rf conftest* AC_MSG_RESULT($readline_version) ] ) pinfo-0.6.13/macros/wchar.m4000066400000000000000000000057651343207050400155610ustar00rootroot00000000000000dnl Detection of wchar_t and friends dnl Copyright (c) 2005 by Bas Zoetekouw dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of version 2 of the GNU General Public License as dnl published by the Free Software Foundation. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 dnl USA dnl To use thisscript , put a call to AC_CHECK_WCHAR in your configure.ac dnl After the call, USE_WCHAR will be defined and $USE_WCHAR=true if dnl wide characters are supported. dnl Additional flags that are needed are defined in dnl $WCHAR_FLAGS and @WCHAR_FLAGS@ AH_TEMPLATE([USE_WCHAR], [Defined if support for wide chars is wanted and supported. wchar.h, wchar_t, mbstowcs(), and friends will be available.] ) AH_TEMPLATE([HAVE_WCSWIDTH], [Defined if wcswidth() is available in ] ) AC_DEFUN([AC_CHECK_WCHAR],[ wchar_flags= dnl first check for wchar_t AC_MSG_CHECKING([for wchar_t in wchar.h]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([ [ #include ], [ wchar_t foo = (wchar_t)'\0'; ] ])], [ AC_MSG_RESULT([yes]) wchar_usable=true ], [ AC_MSG_RESULT([no]) wchar_usable=false ] ) if test "x$wchar_usable" = "xtrue" then dnl then check for mbstowcs AC_CHECK_DECL([mbstowcs], [ have_mbstowcs=true ], [ have_mbstowcs=false ] ) dnl then check for wcwidth have_wcwidth=false AC_MSG_CHECKING([for wcwidth]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [ #include ], [ char *p = (char *) wcwidth; ] )], [ dnl if found, set variables and print result have_wcwidth=true AC_MSG_RESULT([yes]) ], [ ] ) if test "x$have_wcwidth" = "xfalse" then AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [[ #define _XOPEN_SOURCE 600 #include ]], [[ char *p = (char *) wcwidth; ]] )], [ dnl if found, set variables and print result have_wcwidth=true wchar_flags="$wchar_flags -D_XOPEN_SOURCE=600" AC_MSG_RESULT([with -D_XOPEN_SOURCE=600]) ], [ ] ) fi fi if test \( "x$wchar_usable" = "xtrue" \) \ -a \( "x$have_mbstowcs" = "xtrue" \) \ -a \( "x$have_wcwidth" = "xtrue" \) then USE_WCHAR=true AC_DEFINE(USE_WCHAR) WCHAR_FLAGS=$wchar_flags AC_SUBST(WCHAR_FLAGS) else USE_WCHAR=false fi if test "x$USE_WCHAR" = "xtrue" then dnl check for wcswidth CPPFLAGS_OLD=$CPPFLAGS CPPFLAGS="$CPPFLAGS $wchar_flags" AC_CHECK_DECL([wcswidth], [ AC_DEFINE(HAVE_WCSWIDTH) ], [ true ], [ #include ] ) CPPFLAGS=$CPPFLAGS_OLD fi ]) dnl vim:ts=4:sw=4 pinfo-0.6.13/pinfo.spec.in000066400000000000000000000041341343207050400153100ustar00rootroot00000000000000Summary: Lynx-style info browser Summary(pl): Przźgl±darka info w stylu lynksa Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ Release: 1 Group: Utilities/System Group(pl): Narzździa/System Copyright: GPL Vendor: Bas Zoetekouw Source: https://github.com/baszoetekouw/pinfo BuildRoot: /tmp/%{name}-%{version}-root %define _prefix /usr %define _sysconfdir /etc %define _datedir %{_prefix}/share %define _bindir %{_prefix}/bin %define _mandir %(if [ "%{_target_vendor}" == "pld" ]; then echo "%{_prefix}/share/man"; else echo "%{_prefix}/share/man"; fi) %description Pinfo is a curses based lynx-style info browser. %description -l pl Pinfo jest przegl±dark± dokumentów info podobn± do lynksa. %prep echo "%{_mandir}" %setup -q %build LDFLAGS="-s"; export LDFLAGS %configure \ --without-included-gettext make %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \ ChangeLog NEWS AUTHORS README %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc *.gz %attr(755,root,root) %{_bindir}/pinfo %config %verify(not md5 size mtime) %{_sysconfdir}/pinforc %lang(pl) %{_datadir}/locale/pl/LC_MESSAGES/* %lang(cs) %{_datadir}/locale/cs/LC_MESSAGES/* %lang(de) %{_datadir}/locale/de/LC_MESSAGES/* %lang(sv) %{_datadir}/locale/sv/LC_MESSAGES/* %lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/* %{_mandir}/man1/* %changelog * Mon May 3 1999 Artur Frysiak [0.5.2-1] - added de and sv locale * Fri Apr 16 1999 Artur Frysiak [0.4.9-1] - added --with-readline to ./configure - added pinforc and polish locale to %%files * Sat Apr 10 1999 Artur Frysiak [0.4.8-1] - added --sysconfdir=/etc to ./configure * Thu Mar 25 1999 Tomasz K³oczko [0.3.5-1] - fixed passing $RPM_OPT_FLAGS. * Mon Mar 23 1999 Micha³ Kuratczyk [0.3.1-1] - upgraded to 0.3.1 * Sun Mar 21 1999 Micha³ Kuratczyk [0.2.4-1] - upgraded to 0.2.4 * Fri Mar 19 1999 Micha³ Kuratczyk [0.2.3-1] - initial RPM release pinfo-0.6.13/po/000077500000000000000000000000001343207050400133305ustar00rootroot00000000000000pinfo-0.6.13/po/ChangeLog000066400000000000000000000031141343207050400151010ustar00rootroot000000000000002003-08-21 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2003-02-12 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2002-07-14 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2002-07-11 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2002-05-05 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2002-03-16 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2002-03-10 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2002-03-06 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2002-02-10 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2001-12-02 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2001-12-02 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2001-11-24 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2001-09-10 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2001-07-19 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2001-07-15 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2001-07-15 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. * cat-id-tbl.c: Remove file. * stamp-cat-id: Remove file. pinfo-0.6.13/po/Makefile.in.in000066400000000000000000000317071343207050400160120ustar00rootroot00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.14.4 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: stamp-po all-no: # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ 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 -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.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 stamp-po $(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: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status force: # 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: pinfo-0.6.13/po/Makevars000066400000000000000000000035771343207050400150400ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Przemek Borys , Bas Zoetekouw , Nathanael Nerode # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = pinfo-devel@lists.alioth.debian.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = pinfo-0.6.13/po/POTFILES.in000066400000000000000000000004361343207050400151100ustar00rootroot00000000000000src/colors.c src/datatypes.c src/filehandling_functions.c src/initializelinks.c src/mainfunction.c src/manual.c src/menu_and_note_utils.c src/parse_config.c src/readlinewrapper.c # src/readrc.c src/regexp_search.c src/signal_handler.c src/snprintf.c src/utils.c src/video.c src/pinfo.c pinfo-0.6.13/po/cs.po000066400000000000000000000237231343207050400143040ustar00rootroot00000000000000# Czech translation of pinfo # Jiří Pavlovský , 1999. # revised and updated by KatarĆ­na MachĆ”lkovĆ” , 2005 msgid "" msgstr "" "Project-Id-Version: pinfo-0.5.6\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2005-10-11 16:59+0200\n" "Last-Translator: Katarina Machalkova \n" "Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "HledĆ”nĆ­ nepřímĆ©ho odkazu dokončeno" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "VarovĆ”nĆ­: tabulku značek nelze nalĆ©zt" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "HledĆ”nĆ­ tabulky značek dokončeno\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "Nelze otevřít konfiguračnĆ­ soubor!\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "stiskněte libovolnou klĆ”vesu" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "Chyba: Info dokument nelze otevřít." #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "Opravdu chcete dokument vytisknout?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "Zadejte řÔdek: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "Zadejte příkaz: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Operace se nezdařila..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "Zadejte regulĆ”rnĆ­ výraz: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "Hledaný řetězec nebyl nalezen..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "Neplatný regulĆ”rnĆ­ výraz;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "Pro pokračovĆ”nĆ­ stiskněte libovolnou klĆ”vesu..." #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "Zadejte jmĆ©no uzlu: " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "Uzel %s nenalezen" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "Opravdu chcete ukončit program?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Chyba: program man nelze spustit.\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Chyba: Nebyla nalezena ani manuĆ”lovĆ” strĆ”nka.\n" #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "SouvisejĆ­cĆ­ strĆ”nky:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "VolĆ”m program gunzip pro" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "Program gunzip nelze spustit.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "IGNORUJI" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "Chyba: Nebyla nalezena manuĆ”lovĆ” strĆ”nka.\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "VolĆ”m program apropos \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "ŽÔdnĆ© souvisejĆ­cĆ­ strĆ”nky\n" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "Zadejte nĆ”zev manuĆ”lovĆ© strĆ”nky: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "Zobrazen řÔdek %d/%d, %d%%" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "Zobrazen řÔdek %d/%d, 100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "Nelze otevřít konfiguračnĆ­ soubor!\n" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "SyntaktickĆ” chyba na řÔdku %d konfiguračnĆ­ho souboru.\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Nedostatek virtuĆ”lnĆ­ paměti\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "NĆ”zev souboru obsahuje nepovolenĆ© znaky!\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "ano" #: src/utils.c:585 msgid "no" msgstr "ne" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "Nelze otevřít konfiguračnĆ­ soubor!\n" #: src/video.c:59 msgid "File:" msgstr "Soubor:" #: src/video.c:60 msgid "Node:" msgstr "Uzel:" #: src/video.c:61 msgid "Next:" msgstr "DalŔí:" #: src/video.c:62 msgid "Prev:" msgstr "PředchozĆ­:" #: src/video.c:63 msgid "Up:" msgstr "Nahoru:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "HledĆ”m manuĆ”lovou strĆ”nku...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "chybĆ­ argument pro přepĆ­nač --node\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "chybĆ­ argument pro přepĆ­nač --rcfile\n" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "PoužitĆ­:\n" "%s [přepĆ­nače] [info|manuĆ”l]\n" "PřepĆ­nače:\n" "-h, --help vypĆ­Å”e tuto nĆ”povědu\n" "-v, --version vypĆ­Å”e informace o verzi\n" "-m, --manual zobrazĆ­ manuĆ”lovou strĆ”nku\n" "-r, --raw-filename zobrazĆ­ soubor danĆ©ho jmĆ©na\n" "-f, --file synonymum pro -r\n" "-a, --apropos pokud nenalezne odpovĆ­dajĆ­cĆ­ " "dokument,\n" " použije apropos(1)\n" "-p, --plain-apropos použije pouze apropos(1)\n" "-c, --cut-man-headers vystřihne z manuĆ”lových strĆ”nek " "opakovanĆ©\n" " hlavičky\n" "-l, --long-manual-links použije dlouhĆ© nĆ”zvy odkazÅÆ v " "manuĆ”lových\n" " strĆ”nkĆ”ch\n" "-s, --squeeze-manlines prĆ”zdnĆ© řÔdky jdoucĆ­ po sobě redukuje " "na\n" " jediný\n" "-d, --don't-handle-without-tag-table nezobrazĆ­ texinfo strĆ”nky bez tabulky\n" " značek\n" "-t, --force-manual-tag-table vynutĆ­ detekci tabulky značek\n" "-x, --clear-at-exit při ukončenĆ­ programu smaže obrazovku\n" " --node=UZEL, --node UZEL přeskočƭ rovnou na UZEL\n" " --rcfile=soubor, --rcfile soubor použije alternativnĆ­ konfiguračnĆ­ " "soubor\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Chyba: Nelze najĆ­t info strĆ”nku, zkouŔím manuĆ”lovou strĆ”nku.\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "VarovĆ”nĆ­: tabulka značek nenalezena...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "VytvÔří se nĆ”hradnĆ­ tabulka značek...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Toto nevypadĆ” jako info dokument...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "Zadaný uzel neexistuje...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "Tabulka značek je poÅ”kozena, pokouŔím se ji opravit..." #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "Soubor nenalezen. Stiskněte libovolnou klĆ”vesu..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "NeočekĆ”vanĆ” chyba.\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "Tabulka značek nenalezena. VytvÔří se nĆ”hradnĆ­..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "BezpečnostnĆ­ varovĆ”nĆ­: GID skupiny %s nelze zjistit\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "BezpečnostnĆ­ varovĆ”nĆ­: UID uživatele %s nelze zjistit\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" #~ msgid "Are you sure to print?" #~ msgstr "Opravdu chcete dokument vytisknout?" #~ msgid "Warning: could not find tag table\n" #~ msgstr "VarovĆ”nĆ­: tabulku značek nelze nalĆ©zt\n" #~ msgid "Searching for indirect done\n" #~ msgstr "HledĆ”nĆ­ nepřímĆ©ho odkazu ukončeno\n" pinfo-0.6.13/po/de.po000066400000000000000000000233031343207050400142610ustar00rootroot00000000000000# German translation of pinfo # Christian Kurz , 1999. # with smaller changes from Matthias Friedrich # msgid "" msgstr "" "Project-Id-Version: pinfo-0.5.0\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 1999-04-21 01:50+0200\n" "Last-Translator: RenĆ© van Bevern \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "Suche nach Knotenverzeichnis abgeschlossen." #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "Warnung: Konnte die Tag-Tabelle nicht finden." #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "Suche nach der Tag-Tabelle abgeschlossen.\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "Kann Konfigurationsdatei nicht ƶffnen.\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "Beliebige Taste drücken, um fortzufahren" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "Fehler: Konnte die Info-Datei nicht ƶffnen." #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "Wollen Sie wirklich drucken?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "Bitte Zeilennummer eingeben: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "Bitte Befehl eingeben: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Funktion fehlgeschlagen..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "Bitte regulƤren Ausdruck eingeben: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 #, fuzzy msgid "Search string not found..." msgstr "Warnung: Konnte keine Tag-Tabelle finden...\n" #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "Ungültiger regulƤrer Ausdruck;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "Beliebige Taste drücken, um fortzufahren..." #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "Bitte Knotennamen eingeben: " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "Knoten %s wurde nicht gefunden." #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "Sind Sie sicher, dass Sie pinfo beenden wollen?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Fehler: Kann 'man' nicht ausführen.\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Fehler: Es wurde auch keine Manpage gefunden.\n" #: src/manual.c:354 #, fuzzy, c-format msgid "Apropos pages:\n" msgstr "Passende Seiten:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "Rufe gunzip auf für" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "Konnte gunzip nicht ausführen.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "IGNORIERE" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "Fehler: Es wurde keine Manpage gefunden.\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "Rufe apropos auf \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "Nichts entsprechendes gefunden.\n" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "Bitte Manpage-Namen eingeben: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "Zeile %d/%d, %d%%" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "Zeile %d/%d, 100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "Kann Konfigurationsdatei nicht ƶffnen.\n" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Die Konfigurationsdatei hat einen Fehler in Zeile %d\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Virtueller Speicher aufgebraucht.\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "Ungültiges Zeichen im Dateinamen.\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "ja" #: src/utils.c:585 msgid "no" msgstr "nein" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "Kann Konfigurationsdatei nicht ƶffnen.\n" #: src/video.c:59 msgid "File:" msgstr "Datei:" #: src/video.c:60 msgid "Node:" msgstr "Knoten:" #: src/video.c:61 msgid "Next:" msgstr "nƤchstes Thema:" #: src/video.c:62 msgid "Prev:" msgstr "vorheriges Thema:" #: src/video.c:63 msgid "Up:" msgstr "Übergeordnet:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "Suche nach einer Manpage...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "--node-Option ohne Argument benutzt\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "--rcfile-Option ohne Argument benutzt\n" #: src/pinfo.c:169 #, fuzzy, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "Verwendung:\n" "%s [optionen] [info|manual]\n" "Optionen:\n" "-h, --help Hilfe\n" "-v, --version Version\n" "-m, --manual Man-Page verwenden\n" "-r, --raw-filename rohen Dateinamen verwenden\n" "-f, --file synonym für -r\n" "-a, --apropos Apropos aufrufen, wenn nichts " "gefunden\n" "-p, --plain-apropos nur apropos aufrufen\n" "-c, --cut-man-headers wiederholte Man-Kopfzeilen entfernen\n" "-l, --long-manual-links lange Linknamen in Man-Pages benutzen\n" "-s, --squeeze-manlines leere Zeilen aus Man-Pages entfernen\n" "-d, --dont-handle-without-tag-table keine Texinfo-Seiten ohne Tagtabellen\n" " anzeigen\n" "-t, --force-manual-tag-table Manuelles Auffinden der Tagtabelle\n" " erzwingen\n" "-x, --clear-at-exit Schirm beim Verlassen lƶschen\n" " --node=knoten, --node knoten direkt zum Knoten 'knoten' springen\n" " --rcfile=datei, --rcfile datei alternative Konfigurationsdatei " "benutzen\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Fehler: Info-Datei nicht gefunden, suche nach einer Manpage... \n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "Warnung: Konnte keine Tag-Tabelle finden...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "Versuche eine alternative Tag-Tabelle zu erstellen...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Dies scheint keine Info-Datei zu sein...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "Angegebener Knoten existiert nicht...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "" #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "Datei wurde nicht gefunden. Bitte drücken Sie eine Taste..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "Unerwarteter Fehler.\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "Versuche eine alternative Tag-Tabelle zu erstellen..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "Sicherheitswarnung: Konnte GID der Gruppe %s nicht ermitteln.\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "Sicherheitswarnung: Konnte UID des Benutzers %s nicht ermitteln.\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" #~ msgid "Are you sure to print?" #~ msgstr "Wollen Sie wirklich drucken?" #~ msgid "Warning: could not find tag table\n" #~ msgstr "Warnung: Konnte die Tag-Tabelle nicht finden.\n" #~ msgid "Searching for indirect done\n" #~ msgstr "Suche nach Node-Verzeichnis...\n" pinfo-0.6.13/po/eu.po000066400000000000000000000226431343207050400143100ustar00rootroot00000000000000# translation of eu.po to librezale.org # translation of pinfo.po to librezale.org # This file is distributed under the same license as the PACKAGE package. # Copyright (C) YEAR Przemek Borys , Bas Zoetekouw , Nathanael Nerode . # Piarres Beobide , 2005. # msgid "" msgstr "" "Project-Id-Version: eu\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2005-09-28 23:14+0200\n" "Last-Translator: Piarres Beobide \n" "Language-Team: librezale.org \n" "Language: eu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.10.2\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, fuzzy, c-format msgid "Searching for indirect done" msgstr "Bilaketa eginda" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "Abisua: ezin da etiketa taula aurkitu" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "Etiketa taula bilaketa eginda\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "Ezin da konfigurazio fitxatgia ireki!\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "sakatu tekla bat jarraitzeko" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "Errorea: ezin da info fitxategia ireki" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "Inprimatu nahi duzula ziur al zaude?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "Lerroa sartu: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "Komandoa sartu: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Eragiketa huts egin du..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "Sar espresio erregularra: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "Bilaketa katea ez da aurkitu..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "Espresio erregula baliogabea;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "Zapaldu edozein tekla jarraitzeko..." #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "Sartu nodo izena: " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "%s nodoa ez da aurkitu" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "Itxi nahi duzula ziur al zaude?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Errorea: Ezin da man komandoa deitu.\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Errorea: Manual orria ere ezin da aurkitu.\n" #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "Apropos orriak:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "gunzip deitzen" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "Ezin da gunzip abiarazi.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "ALDA BATETARA UZTEN" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "Errorea: Ez da manual orria aurkitu\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "apropos abiarazten \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "Baliozko ezer ez\n" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "Sar manual izena: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "%d/%d, %d%% lerroa bistarazten" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "%d/%d, 100%% lerroa bistarazten" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "Ezin da konfigurazio fitxatgia ireki!\n" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Analisi errorea konfigruazio fotxategiko %d lerroan\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Memoria birtuala agorturik\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "karakterera baliogabeak Fitxategi-izenean!\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "bai" #: src/utils.c:585 msgid "no" msgstr "ez" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "Ezin da konfigurazio fitxatgia ireki!\n" #: src/video.c:59 msgid "File:" msgstr "Fitxategia:" #: src/video.c:60 msgid "Node:" msgstr "Nodoa:" #: src/video.c:61 msgid "Next:" msgstr "Hurrengoa:" #: src/video.c:62 msgid "Prev:" msgstr "Aurrekoa:" #: src/video.c:63 msgid "Up:" msgstr "Gora:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "Man orrialdea bilatzen...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "--node aukera argumenturik gabe erabilia\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "--rcfile aukera argumenturik gabe erabilia\n" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "Erabilera:\n" "%s [aukerak] [info|manual]\n" "Aukerak:\n" "-h, --help laguntza\n" "-v, --version bertsioa\n" "-m, --manual man orria erabili\n" "-r, --raw-filename fitxatgi gordina erabili\n" "-f, --file -r-ren sinonimoa\n" "-a, --apropos apropos abiarazi ezer aurkitu ezkero\n" "-p, --plain-apropos apropos abiarazi bakarrik\n" "-c, --cut-man-headers moztu errepikatutako manual buruak\n" "-l, --long-manual-links lotura izen luzeak erabili manualetan\n" "-s, --squeeze-manlines moztu lerro hutsak manual orrietatik\n" "-d, --dont-handle-without-tag-table ez bistarazi etiketa taula gabeko " "texinfo\n" " orriak\n" "-t, --force-manual-tag-table indartu eskuzko etiketa taula " "atzematea\n" "-x, --clear-at-exit ixterakoan pantaila garbitu\n" " --node=nodename, --node nodename zuzenean node nodo-izenera salto egin\n" " --rcfile=file, --rcfile file beste rcfile bat erabili\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Errorea: ezin da info fitxategia ireki, manualarekin saiatzen\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "Abisua: etiketa taula ez da aurkitu...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "Beste etiketa taula bat sortzen saiatzen...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Honek ez dirudi info fitxategi bat...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "Ezarritako nodoa ez dago...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "Etiketa taula hondaturik dago, konpontzen saiatzen..." #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "Fitxategia ez da aurkitu. Zapaldu edozein tekla..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "Errores esperogabea.\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "Etiketa taula ez da aurkitu. Beste bat sortzen saiatzen..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "Segurtasun abisua: Ezin da talde honen GID-a aurkitu: %s\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "Segurtasun abisua: Ezin da erabiltzaile honen UID-a aurkitu: %s\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" pinfo-0.6.13/po/insert-header.sin000066400000000000000000000012401343207050400165720ustar00rootroot00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } pinfo-0.6.13/po/ja.po000066400000000000000000000235201343207050400142640ustar00rootroot00000000000000# Japanese messages for pinfo. # Copyright (C) 2001 Free Software Foundation, Inc. # Masayuki Hatta , 2001. # msgid "" msgstr "" "Project-Id-Version: pinfo 0.6.3\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2001-11-21 17:42+0900\n" "Last-Translator: Masayuki Hatta \n" "Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "indirectć®ę¤œē“¢å®Œäŗ†" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "č­¦å‘Š: ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ćŒč¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć§ć—ćŸ" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ć®ę¤œē“¢å®Œäŗ†\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 msgid "Can't open file" msgstr "" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "ć‚Øćƒ©ćƒ¼: infoćƒ•ć‚”ć‚¤ćƒ«ćŒé–‹ć‘ć¾ć›ć‚“ć§ć—ćŸ" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "ęœ¬å½“ć«å°åˆ·ć—ć¦ć‚ˆć‚ć—ć„ć§ć™ć‹?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "č”Œć‚’å…„åŠ›: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "ć‚³ćƒžćƒ³ćƒ‰ć‚’å…„åŠ›: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "ę“ä½œć«å¤±ę•—ć—ć¾ć—ćŸ..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 #, fuzzy msgid "Enter regular expression: " msgstr "ę­£č¦č”Øē¾ć‚’å…„åŠ›: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 #, fuzzy msgid "Search string not found..." msgstr "č­¦å‘Š: ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ćŒč¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć§ć—ćŸ...\n" #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "" #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "ćƒŽćƒ¼ćƒ‰åć‚’å…„åŠ›: " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "ćƒŽćƒ¼ćƒ‰ %s ćÆč¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć§ć—ćŸ" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "ęœ¬å½“ć«ēµ‚äŗ†ć—ć¦ć‚ˆć‚ć—ć„ć§ć™ć‹?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "ć‚Øćƒ©ćƒ¼: manć‚³ćƒžćƒ³ćƒ‰ćŒå‘¼ć³å‡ŗć›ć¾ć›ć‚“ć€‚\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "ć‚Øćƒ©ćƒ¼: ć©ć®ćƒžćƒ‹ćƒ„ć‚¢ćƒ«ćƒšćƒ¼ć‚øć‚‚č¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć§ć—ćŸć€‚\n" #: src/manual.c:354 #, fuzzy, c-format msgid "Apropos pages:\n" msgstr "é©åˆ‡ćŖćƒšćƒ¼ć‚ø:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "gunzipを呼び出し中: " #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "gunzipć‚’å‘¼ć³å‡ŗć›ć¾ć›ć‚“ć§ć—ćŸć€‚\n" #: src/manual.c:440 msgid "IGNORING" msgstr "焔視" #: src/manual.c:486 #, fuzzy, c-format msgid "Error: No manual page found\n" msgstr "ć‚Øćƒ©ćƒ¼: ć©ć®ćƒžćƒ‹ćƒ„ć‚¢ćƒ«ćƒšćƒ¼ć‚øć‚‚č¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć§ć—ćŸć€‚\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "ćƒžćƒ‹ćƒ„ć‚¢ćƒ«åć‚’å…„åŠ›: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "ē¾åœØ %d/%d č”Œē›®ć€%d%%" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "ē¾åœØ %d/%d č”Œē›®ć€100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "čØ­å®šćƒ•ć‚”ć‚¤ćƒ«ć® %d č”Œē›®ć§č§£ęžć‚Øćƒ©ćƒ¼\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "ä»®ęƒ³ćƒ”ćƒ¢ćƒŖć‚’ä½æć„åˆ‡ć£ć¦ć—ć¾ć„ć¾ć—ćŸ\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "ćƒ•ć‚”ć‚¤ćƒ«åć«ä»„äø‹ć®äøę­£ćŖć‚­ćƒ£ćƒ©ć‚Æć‚æćŒå«ć¾ć‚Œć¦ć„ć¾ć™!\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "yes" #: src/utils.c:585 msgid "no" msgstr "no" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "ć‚Øćƒ©ćƒ¼: infoćƒ•ć‚”ć‚¤ćƒ«ćŒé–‹ć‘ć¾ć›ć‚“ć§ć—ćŸ" #: src/video.c:59 msgid "File:" msgstr "ćƒ•ć‚”ć‚¤ćƒ«: " #: src/video.c:60 msgid "Node:" msgstr "ćƒŽćƒ¼ćƒ‰: " #: src/video.c:61 msgid "Next:" msgstr "ꬔ: " #: src/video.c:62 msgid "Prev:" msgstr "前: " #: src/video.c:63 msgid "Up:" msgstr "上: " #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "manćƒšćƒ¼ć‚øć‚’ęŽ¢ć—ć¦ć„ć¾ć™...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "--nodeć‚Ŗćƒ—ć‚·ćƒ§ćƒ³ć«å¼•ę•°ćŒäøŽćˆć‚‰ć‚Œć¦ć„ć¾ć›ć‚“\n" #: src/pinfo.c:158 #, fuzzy, c-format msgid "--rcfile option used without argument\n" msgstr "--nodeć‚Ŗćƒ—ć‚·ćƒ§ćƒ³ć«å¼•ę•°ćŒäøŽćˆć‚‰ć‚Œć¦ć„ć¾ć›ć‚“\n" #: src/pinfo.c:169 #, fuzzy, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "使い方:\n" "%s [ć‚Ŗćƒ—ć‚·ćƒ§ćƒ³] [info|manual]\n" "ć‚Ŗćƒ—ć‚·ćƒ§ćƒ³:\n" "-h, --help ćƒ˜ćƒ«ćƒ—\n" "-v, --version ćƒćƒ¼ć‚øćƒ§ćƒ³\n" "-m, --manual manćƒšćƒ¼ć‚øć‚’ä½æē”Ø\n" "-r, --raw-filename ē”Ÿć®ćƒ•ć‚”ć‚¤ćƒ«åć‚’ä½æē”Ø\n" "-f, --file\t\t\t -rと同じ\n" "-a, --apropos ä½•ć‚‚č¦‹ć¤ć‹ć‚‰ćŖć‘ć‚Œć°aproposを呼ぶ\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers ē¹°ć‚Ščæ”ć•ć‚ŒćŸmanćƒ˜ćƒƒćƒ€ć‚’ć‚«ćƒƒćƒˆ\n" "-l, --long-manual-links ćƒžćƒ‹ćƒ„ć‚¢ćƒ«ć«é•·ć„ćƒŖćƒ³ć‚Æåć‚’ä½æć†\n" "-s, --squeeze-manlines ćƒžćƒ‹ćƒ„ć‚¢ćƒ«ćƒšćƒ¼ć‚øć‹ć‚‰ē©ŗč”Œć‚’å‰Šé™¤\n" "-d, --dont-handle-without-tag-table ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ć®ē„”ć„texinfoćƒšćƒ¼ć‚øć‚’\n" " 蔨示しない\n" "-t, --force-manual-tag-table ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ć®ćƒžćƒ‹ćƒ„ć‚¢ćƒ«čŖč­˜ć‚’å¼·åˆ¶\n" "-x, --clear-at-exit ēµ‚äŗ†ę™‚ć«ē”»é¢ć‚’ć‚ÆćƒŖć‚¢\n" " --node=nodename, --node nodename ćƒŽćƒ¼ćƒ‰nodenameć«ē›“ęŽ„ć‚øćƒ£ćƒ³ćƒ—\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "ć‚Øćƒ©ćƒ¼: infoćƒ•ć‚”ć‚¤ćƒ«ć‚’é–‹ć‘ć¾ć›ć‚“ć§ć—ćŸć€‚ćƒžćƒ‹ćƒ„ć‚¢ćƒ«ć§č©¦ć—ć¦ć„ć¾ć™\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "č­¦å‘Š: ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ćŒč¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć§ć—ćŸ...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "åˆ„ć®ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ć‚’ä½œęˆć—ć‚ˆć†ćØć—ć¦ć„ć¾ć™...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "ć“ć‚ŒćÆinfoćƒ•ć‚”ć‚¤ćƒ«ć§ćÆćŖć„ć‚ˆć†ć§ć™...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "ęŒ‡å®šć•ć‚ŒćŸćƒŽćƒ¼ćƒ‰ćÆå­˜åœØć—ć¾ć›ć‚“...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "" #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "ćƒ•ć‚”ć‚¤ćƒ«ćŒč¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć€‚ä½•ć‹ć‚­ćƒ¼ć‚’ęŠ¼ć—ć¦äø‹ć•ć„..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "äŗˆęœŸć›ć¬ć‚Øćƒ©ćƒ¼ć§ć™ć€‚\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ćŒč¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć€‚åˆ„ć®ć‚’ä½œęˆć—ć‚ˆć†ćØć—ć¦ć„ć¾ć™..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "ć‚»ć‚­ćƒ„ćƒŖćƒ†ć‚£č­¦å‘Š: ä»„äø‹ć®ć‚°ćƒ«ćƒ¼ćƒ—ć®GIDć‚’å¾—ć‚‹ć“ćØćŒć§ćć¾ć›ć‚“: %s\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "ć‚»ć‚­ćƒ„ćƒŖćƒ†ć‚£č­¦å‘Š: ä»„äø‹ć®ćƒ¦ćƒ¼ć‚¶ć®UIDć‚’å–å¾—ć™ć‚‹ć“ćØćŒć§ćć¾ć›ć‚“: %s\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" #~ msgid "Are you sure to print?" #~ msgstr "ęœ¬å½“ć«å°åˆ·ć—ć¦ć‚ˆć‚ć—ć„ć§ć™ć‹?" #~ msgid "Warning: could not find tag table\n" #~ msgstr "č­¦å‘Š: ć‚æć‚°ćƒ†ćƒ¼ćƒ–ćƒ«ćŒč¦‹ć¤ć‹ć‚Šć¾ć›ć‚“ć§ć—ćŸ\n" #~ msgid "Searching for indirect done\n" #~ msgstr "indirectć®ę¤œē“¢å®Œäŗ†\n" pinfo-0.6.13/po/nl.po000066400000000000000000000227321343207050400143070ustar00rootroot00000000000000# Dutch translation for pinfo # vim:fileencoding=iso8859-15 # Copyright (C) 2005 Bas Zoetekouw # This file is distributed under the same license as the pinfo package. # msgid "" msgstr "" "Project-Id-Version: pinfo 0.6.8-svn\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2019-02-09 13:00+0100\n" "Last-Translator: Bas Zoetekouw \n" "Language-Team: Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "Indirectie zoekopdracht afgerond" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "Opgelet: tag-tabel niet gevonden" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "Zoeken naar tag-tabel afgerond\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "Fout bij het lezen van bestand '%s'" #: src/filehandling_functions.c:1129 msgid "Can't open file" msgstr "Kan bestand niet openen" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "Druk op een toets om door te gaan" #: src/filehandling_functions.c:1248 #, c-format msgid "Error: could not open info file part" msgstr "Fout: kon een deel van het infobestand niet openen" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "Weet u zeker dat u wilt printen?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "Voer regel in: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "Voer commando in:" #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Opdracht mislukt..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "Voer reguliere expressie in: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "Zoekstring niet gevonden..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "Ongeldige reguliere expressie;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "Druk een toets om door te gaan..." #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "Voer node-naam in: " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "Node %s niet gevonden" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "Weet u zeker dat u het programma wilt verlaten?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Fout: kan het man commando niet aanroepen.\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Fout: ook geen manual pagina gevonden.\n" #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "Verwante pagina's:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "Aanroepen van gunzip voor" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "Kon gunzip niet aanroepen.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "WORDT GENEGEERD" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "Fout: geen manual pagina gevonden\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "Apropos wordt aangeroepen \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "Niets geschikts\n" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "Geef manual naam in: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "Regel %d/%d (%d%%) wordt bekeken" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "Regel %d/%d (100%%) wordt bekeken" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "Kan configuratiebestand niet openen!\n" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Ontledingsfout in het configuratiebestand op regel %d\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Virtuele geheugen is uitgeput\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "Uitvoering van commando '%s' is mislukt: %i" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "Illegale karakters in bestandnaam!\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "ja" #: src/utils.c:585 msgid "no" msgstr "nee" #: src/utils.c:861 #, c-format msgid "Couldn't open temporary file\n" msgstr "Kan tijdelijke bestand niet openen\n" #: src/video.c:59 msgid "File:" msgstr "Bestand:" #: src/video.c:60 msgid "Node:" msgstr "Node:" #: src/video.c:61 msgid "Next:" msgstr "Volgende:" #: src/video.c:62 msgid "Prev:" msgstr "Vorige:" #: src/video.c:63 msgid "Up:" msgstr "Omhoog:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "Opgelet: lege tekenreeks voldoet aan zoekterm" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "Manpagina wordt gezocht...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "--node-optie heeft een argument nodig\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "--rcfile-optie heeft een argument nodig\n" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "Gebruik:\n" "%s [opties] [info|manual]\n" "Opties:\n" "-h, --help help\n" "-v, --version versie\n" "-m, --manual gebruik man pagina\n" "-r, --raw-filename gebruik ruwe bestandnaam\n" "-f, --file synoniem voor -r\n" "-a, --apropos roep apropos aan als er geen " "resultaten zijn\n" "-p, --plain-apropos gebruik alleen apropos\n" "-c, --cut-man-headers verwijder herhaalde koppen in man-" "pagina's weg\n" "-l, --long-manual-links gebruik lange linknamen in man-" "pagina's\n" "-s, --squeeze-manlines knip lege regels uit man-pagina's\n" "-d, --dont-handle-without-tag-table gebruik geen texinfo pagina's die " "geen\n" " tag-tabel hebben\n" "-t, --force-manual-tag-table forceer handmatige detectie van de tag-" "tabel\n" "-x, --clear-at-exit maak het scherm leeg bij het " "afsluiten\n" " --node=nodename, --node nodename spring direct naar de node nodename\n" " --rcfile=file, --rcfile file gebruik een alternatief " "configuratiebestand\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Fout: kon info-bestand niet openen, man-pagina wordt nu gezocht\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "Opgelet: tag-tabel niet gevonden...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "Alternatieve tag-tabel wordt aangemaakt...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Dit ziet er niet uit als een info bestand...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "Aangegeven node bestaat niet...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "Tag-tabel is kapot, bezig met reparatie..." #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "Bestand niet gevonden. Druk op een toets..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "Onverwachte fout.\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "Tag-tabel niet gevonden. Een alternatieve tabel wordt gegenereerd..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "Beveiligingswaarschuwing: kan GID van de groep `%s' niet vinden\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "Beveiligingswaarschuwing: kan UID van de gebruiker `%s' niet vinden\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "Kan administratieve privileges niet afwerpen: %s" pinfo-0.6.13/po/pinfo.pot000066400000000000000000000150011343207050400151640ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Przemek Borys , Bas Zoetekouw , Nathanael Nerode # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 msgid "Can't open file" msgstr "" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "" #: src/filehandling_functions.c:1248 #, c-format msgid "Error: could not open info file part" msgstr "" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "" #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "" #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "" #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "" #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "" #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "" #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "" #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "" #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "" #: src/manual.c:440 msgid "IGNORING" msgstr "" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "" #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" #: src/utils.c:584 msgid "yes" msgstr "" #: src/utils.c:585 msgid "no" msgstr "" #: src/utils.c:861 #, c-format msgid "Couldn't open temporary file\n" msgstr "" #: src/video.c:59 msgid "File:" msgstr "" #: src/video.c:60 msgid "Node:" msgstr "" #: src/video.c:61 msgid "Next:" msgstr "" #: src/video.c:62 msgid "Prev:" msgstr "" #: src/video.c:63 msgid "Up:" msgstr "" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "" #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "" #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "" #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" pinfo-0.6.13/po/pl.po000066400000000000000000000241511343207050400143060ustar00rootroot00000000000000# pinfo polish language module # # strings for the header-filter of info messages # , fuzzy msgid "" msgstr "" "Project-Id-Version: pinfo-0.6.8\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2005-09-29 21:59+0200\n" "Last-Translator: Krzysztof Krzyżaniak (eloy) \n" "Language-Team:\n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "Zakończono poszukiwanie mapowań niebezpośrednich" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "Ostrzeżenie: nie można znaleźć tablicy tagów" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "Zakończono poszukiwanie tablicy tagów\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "Nie można otworzyć pliku konfiguracyjnego!\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "naciśnij dowolny klawisz" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "Bład: nie nie można otworzyć pliku info" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "Czy na pewno drukować?" # # Go line messages # #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "Podaj linię: " # # Shellfeed messages # #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "Podaj komendę: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Operacja się nie powiodła..." # # Regexp search messages # #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 #, fuzzy msgid "Enter regular expression: " msgstr "WprowadÅŗ wyrażenie regularne: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "Szukany łańcuch nie został znaleziony..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "Błędne wyrażenie regularne;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "Naciśnij dowolny klawisz..." # # Goto messages # #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "Podaj nazwę węzła: " # , c-format #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "Węzeł %s nie istnieje" # Dialogs #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "Czy na pewno chcesz zakończyć pracę?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Błąd: Nie można uruchomić polecenia man.\n" # # Manual messages # # loading: #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Bład: Nie ma również pasującej strony podręcznika man.\n" # apropos: #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "Podobne strony:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "Uruchamianie gunzip dla" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "Nie można uruchomić programu gunzip.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "IGNOROWANIE" # # Manual messages # # loading: #: src/manual.c:486 #, fuzzy, c-format msgid "Error: No manual page found\n" msgstr "Bład: Nie znaleziono strony podręcznika.\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "Uruchamianie polecenia apropos \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "Brak odpowiadających stron\n" # # Goto messages # #: src/manual.c:1019 msgid "Enter manual name: " msgstr "Podaj tytuł podręcznika: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "Przeglądanie linii %d/%d, %d%%" # # Viewer messages # #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "Przeglądanie linii %d/%d, 100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "Nie można otworzyć pliku konfiguracyjnego!\n" # # Messages from the config file parsing procedures: # #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Błąd składni w linii %d pliku konfiguracyjnego\n" # # Out of memory message # #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Brak pamięci\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" # # Message for procedure, which checks the command line filename # # , c-format #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "W nazwie pliku znajdują się niedozwolone znaki!\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "tak" #: src/utils.c:585 msgid "no" msgstr "nie" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "Nie można otworzyć pliku konfiguracyjnego!\n" #: src/video.c:59 msgid "File:" msgstr "Plik:" #: src/video.c:60 msgid "Node:" msgstr "Węzeł:" #: src/video.c:61 msgid "Next:" msgstr "Następny:" #: src/video.c:62 msgid "Prev:" msgstr "Poprzedni:" #: src/video.c:63 msgid "Up:" msgstr "Góra:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "Szukam strony podręcznika...\n" # # error messages when loading # #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "opcja --node użyta bez argumentu\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "opcja --rcfile użyta bez argumentu\n" # # help message # # , c-format #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "Użycie:\n" "%s [opcje] [info|manual]\n" "Opcje:\n" "-h, --help Wypisz pomoc\n" "-v, --version Wypisz numer wersji\n" "-m, --manual Użyj strony podręcznika man\n" "-r, --raw-filename Użyj czystej, podanej nazwy pliku\n" "-a, --apropos W wypadku nieznalezienia pasującego\n" " dokumentu, użyj apropos(1)\n" "-p, --plain-apropos Wywołaj apropos bez szukania\n" " pasujących stron man\n" "-c, --cut-man-headers Wycinaj ze stron podręcznika man\n" " powtarzajace się nagłówki\n" "-l, --long-manual-links Używaj długich nazw sekcji w stronach\n" " podręcznika man\n" "-s, --squeeze-manlines Wycinaj ze stron podręcznika man\n" " powtarzające się puste linie\n" "-d, --don't-handle-without-tag-table Odmów działania, gdy strona info\n" " nie ma wpisu tag table\n" "-t, --force-manual-tag-table Wymuś ręczną konstrukcję tag table\n" "-x, --clear-at-exit Wyczyść ekran po zakończeniu " "działania\n" " --node=Węzeł, --node Węzeł PrzejdÅŗ do węzła Węzeł strony info\n" " --rcfile=plik, --rcfile plik Użyj alternatywnego pliku rc\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Błąd: nie ma takiego pliku info, szukanie strony podręcznika\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "Ostrzeżenie: nie znalaziono tablicy tagów...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "Próba utworzenia alternatywnej tablicy tagów...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Nie jest plikiem typu info...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "Podany węzeł nie istnieje...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "Tablica tagów jest uszkodzona, próba naprawy..." #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "Nie znaleziono pliku. Naciśnij dowolny klawisz..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "Nieoczekiwany błąd.\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "" "Nie znaleziono tablicy tagów. Próba utworzenia alternatywnej tablicy..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "Niebezpieczeństwo: Nie można pobrać GID grupy: %s\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "Niebezpieczeństwo: Nie można pobrać UID użytkownika: %s\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" pinfo-0.6.13/po/pt_BR.po000066400000000000000000000234741343207050400147100ustar00rootroot00000000000000# translation of pinfo # Copyright (C) 2006 Przemek Borys , # Bas Zoetekouw , Nathanael Nerode # This file is distributed under the same license as the pinfo package. # Felipe Augusto van de Wiel (faw) , 2006. # msgid "" msgstr "" "Project-Id-Version: pinfo\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2006-01-06 02:05-0200\n" "Last-Translator: Felipe Augusto van de Wiel (faw) \n" "Language-Team: l10n portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "pt_BR utf-8\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "Procura por indireta concluĆ­da" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "Aviso: nĆ£o foi possĆ­vel encontrar a tabela de etiquetas" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "Procura pela tabela de etiquetas concluĆ­da\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "NĆ£o foi possĆ­vel abrir o arquivo de configuração!\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "pressione uma tecla para continuar" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "Erro: nĆ£o foi possĆ­vel abrir o arquivo info\n" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "VocĆŖ tem certeza que deseja imprimir?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "Informe linha: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "Informe comando: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Operação falhou..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "Informe expressĆ£o regular: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "Texto pesquisado nĆ£o encontrado..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "ExpressĆ£o regular invĆ”lida;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "Pressione qualquer tecla para continuar..." #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "Informe nome do nó (node): " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "Nó (node) %s nĆ£o encontrado" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "VocĆŖ tem certeza que deseja sair?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Erro: NĆ£o foi possĆ­vel chamar o comando man.\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Erro: Nenhuma pĆ”gina de manual foi encontrada.\n" #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "PĆ”ginas apropos:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "Chamando gunzip para" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "NĆ£o foi possĆ­vel chamar gunzip.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "IGNORANDO" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "Erro: Nenhuma pĆ”gina de manual encontrada\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "Chamando apropos \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "Nada apropriado\n" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "Informe nome do manual: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "Visualizando linha %d/%d, %d%%" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "Visualizando linha %d/%d, 100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "NĆ£o foi possĆ­vel abrir o arquivo de configuração!\n" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Erro de interpretação do arquivo de configuração na linha %d\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Memória virtual exaurida\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "Caracteres ilegais no nome do arquivo!\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "sim" #: src/utils.c:585 msgid "no" msgstr "nĆ£o" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "NĆ£o foi possĆ­vel abrir o arquivo de configuração!\n" #: src/video.c:59 msgid "File:" msgstr "Arquivo:" #: src/video.c:60 msgid "Node:" msgstr "Nó:" #: src/video.c:61 msgid "Next:" msgstr "Próximo:" #: src/video.c:62 msgid "Prev:" msgstr "Anterior:" #: src/video.c:63 msgid "Up:" msgstr "Acima:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "Procurando pela pĆ”gina de manual...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "opção --node usada sem argumento\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "opção --rcfile usada sem argumento\n" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "Uso:\n" "%s [opƧƵes] [info|manual]\n" "OpƧƵes:\n" "-h, --help ajuda\n" "-v, --version versĆ£o\n" "-m, --manual use pĆ”ginas de manual (man page)\n" "-r, --raw-filename use nomes de arquivos crus (raw)\n" "-f, --file sinĆ“nimo para -r\n" "-a, --apropos chama apropos se nada for " "encontrado\n" "-p, --plain-apropos chama apenas apropos\n" "-c, --cut-man-headers remove cabeƧalhos man repetidos\n" "-l, --long-manual-links use nomes de link longos nos " "manuais\n" "-s, --squeeze-manlines remove linhas vazias das pĆ”ginas de\n" " manual\n" "-d, --dont-handle-without-tag-table nĆ£o exibe pĆ”ginas texinfo sem as\n" " tabelas de etiquetas\n" "-t, --force-manual-tag-table forƧar a detecção manual da tabela\n" " de etiquetas\n" "-x, --clear-at-exit limpa a tela quando sair\n" " --node=nomedonó, --node nomedonó pula direto para o nó \"nomedonó\"\n" " --rcfile=arquivo, --rcfile arquivo usa um arquivo rcfile alternativo\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Erro: nĆ£o foi possĆ­vel abrir o arquivo info, tentando manual\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "Aviso: tabela etiquetas nĆ£o encontrada...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "Tentando criar tabela de etiquetas alternativa...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Isso nĆ£o parece ser um arquivo info...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "O nó especificado nĆ£o existe...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "Tabela de etiquetas estĆ” corrompida, tentando consertar..." #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "Arquivo nĆ£o encontrado. Pressione uma tecla..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "Erro inesperado.\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "" "Tabela de etiquetas nĆ£o encontrada. Tentando criar tabela alternativa..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "" "Aviso de seguranƧa: NĆ£o foi possĆ­vel obter o GID do grupo chamado: %s\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "" "Aviso de seguranƧa: NĆ£o foi possĆ­vel obter o UID do usuĆ”rio chamado: %s\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" pinfo-0.6.13/po/remove-potcdate.sin000066400000000000000000000006601343207050400171430ustar00rootroot00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } pinfo-0.6.13/po/ro.po000066400000000000000000000240101343207050400143050ustar00rootroot00000000000000# translation of ro.po to Romanian # This file is distributed under the same license as the pinfo package. # Copyright (C) YEAR Przemek Borys , Bas Zoetekouw , Nathanael Nerode . # Eddy Petrisor , 2005. # msgid "" msgstr "" "Project-Id-Version: ro\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2005-09-30 03:42+0300\n" "Last-Translator: Eddy Petrisor \n" "Language-Team: Romanian \n" "Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.10.2\n" "Plural-Forms: nplurals=3;plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" "2:1))\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "S-a terminat căutarea pentru indirectare" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "Avertisment: tabela de etichete nu a putut fi găsită" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "S-a finalizat căutarea tabelei de etichete\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "Nu se poate deschide fişierul de configurare!\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "apăsaÅ£i o tastă pentru a continua" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "Eroare: fişierul info nu a putut fi deschis" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "Sigur doriÅ£i să tipăriÅ£i?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "IntroduceÅ£i linia: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "IntroduceÅ£i comanda: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "OperaÅ£ia a eşuat..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "IntroduceÅ£i expresia regulată: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "Şirul căutat nu a fost găsit..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "Expresie regulată nevalidă;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "ApăsaÅ£i o tastă pentru a continua..." #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "IntroduceÅ£i numele nodului: " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "Nodul %s nu a fost găsit" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "Sigur doriÅ£i să ieşiÅ£i?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Eroare: Nu se poate apela comanda man.\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Eroare: Nu a fost găsită nici pagina de manual.\n" #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "Pagini apropos:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "Se apelează gunzip pentru" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "gunzip nu a putut fi apelat.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "SE IGNORĂ" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "Eroare: Nu a fost găsită nici o pagină de manual\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "Se apelează apropos \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "Nu se potriveşte nimic\n" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "IntroduceÅ£i numele manualului: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "Se vizualizează linia %d/%d, %d%%" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "Se vizualizează linia %d/%d, 100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "Nu se poate deschide fişierul de configurare!\n" # nu sunt sigur că parse se traduce cu ā€žparcurgereā€ #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Eroare la parcurgerea fişierului de configurare la linia %d\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "S-a consumat memoria virtuală\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "Caractere ilegale Ć®n numele de fişier!\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "da" #: src/utils.c:585 msgid "no" msgstr "nu" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "Nu se poate deschide fişierul de configurare!\n" #: src/video.c:59 msgid "File:" msgstr "Fişier:" #: src/video.c:60 msgid "Node:" msgstr "Nod:" #: src/video.c:61 msgid "Next:" msgstr "Următorul:" #: src/video.c:62 msgid "Prev:" msgstr "Precedentul:" #: src/video.c:63 msgid "Up:" msgstr "Sus:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "Se caută pagina de manual...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "opÅ£iunea --node folosită fără argument\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "opÅ£iunea --rcfile folosită fără argument\n" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "Utilizare:\n" "%s [opÅ£iuni] [info|manual]\n" "OpÅ£iuni:\n" "-h, --help ajutor\n" "-v, --version versiune\n" "-m, --manual foloseşte pagina man-r, --raw-" "filename foloseşte nume brut\n" "-f, --file sinonim cu -r\n" "-a, --apropos apelează apropos dacă\n" " nu se găseşte nimic\n" "-p, --plain-apropos apelează doar apropos\n" "-c, --cut-man-headers taie antetele man repetate\n" "-l, --long-manual-links foloseşte nume lungi de legături\n" " Ć®n manuale\n" "-s, --squeeze-manlines taie liniile goale din paginile\n" " de manual\n" "-d, --dont-handle-without-tag-table nu afişa paginile texinfo fără \n" " tabele de etichete\n" "-t, --force-manual-tag-table forÅ£ează detecÅ£ia manuală a tabelei\n" " de etichete\n" "-x, --clear-at-exit şterge ecranul la ieşire\n" " --node=nodnume, --node nodnume salt direct la nodul numenod\n" " --rcfile=fişier, --rcfile fişier foloseşte un fişier rcfile alternativ\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Eroare: fişierul info nu a putut fi deschis, Ć®ncercaÅ£i manualul\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "Avertisment: tabela de etichete nu a fost găsită...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "Se Ć®ncearcă crearea tabelei de etichete alternative...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Acesta nu pare a fi fişier info...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "Nodul specificat nu există...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "Tabela de etichete este coruptă, se Ć®ncearcă repararea..." #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "Fişier negăsit. ApăsaÅ£i o tastă..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "Eroare neaşteptată.\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "Tabelă de etichete negăsită. Se Ć®ncercă crearea uneia alternative..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "" "Avertisment de securitate: Nu s-a putut prelua identificatorul grupului " "numit: %s\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "" "Avertisment de securitate: Nu s-a putut prelua identificatorul " "utilizatorului numit: %s\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" pinfo-0.6.13/po/ru.po000066400000000000000000000262711343207050400143260ustar00rootroot00000000000000# translation of ru.po to Russian # Copyright (C) 2005 Free Software Foundation, Inc. # Volosenkov Dmitry <_bil_@mail.ru>, 2003. # Yuri Kozlov , 2005. # msgid "" msgstr "" "Project-Id-Version: ru\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2005-10-01 10:47+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\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" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "Поиск ссылки Š·Š°Š²ŠµŃ€ŃˆŃ‘н" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "ŠŸŃ€ŠµŠ“ŃƒŠæŃ€ŠµŠ¶Š“ŠµŠ½ŠøŠµ: не могу найти табличный тег" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "Поиск табличного тега Š·Š°Š²ŠµŃ€ŃˆŃ‘н\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "ŠŠµ уГалось Š¾Ń‚ŠŗŃ€Ń‹Ń‚ŃŒ файл ŠŗŠ¾Š½Ń„ŠøŠ³ŃƒŃ€Š°Ń†ŠøŠø!\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "нажмите Š»ŃŽŠ±ŃƒŃŽ клавишу" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "ŠžŃˆŠøŠ±ŠŗŠ°: не уГалось Š¾Ń‚ŠŗŃ€Ń‹Ń‚ŃŒ info файл" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "Š’Ń‹ Š“ŠµŠ¹ŃŃ‚Š²ŠøŃ‚ŠµŠ»ŃŒŠ½Š¾ желаете Š½Š°ŠæŠµŃ‡Š°Ń‚Š°Ń‚ŃŒ?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "ВвеГите ŃŃ‚Ń€Š¾ŠŗŃƒ: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "ВвеГите команГу: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Действие не уГалось..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "ВвеГите Ń€ŠµŠ³ŃƒŠ»ŃŃ€Š½Š¾Šµ выражение: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "Дтрока не найГена..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "ŠŠµŠ“Š¾ŠæŃƒŃŃ‚ŠøŠ¼Š¾Šµ Ń€ŠµŠ³ŃƒŠ»ŃŃ€Š½Š¾Šµ выражение;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "ŠŠ°Š¶Š¼ŠøŃ‚Šµ Š»ŃŽŠ±ŃƒŃŽ клавишу..." #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "ВвеГите ŠøŠ¼Ń узла: " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "Узел %s не найГен" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "Š—Š°Š²ŠµŃ€ŃˆŠøŃ‚ŃŒ Ń€Š°Š±Š¾Ń‚Ńƒ?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "ŠžŃˆŠøŠ±ŠŗŠ°: ŠŠµŠ²Š¾Š·Š¼Š¾Š¶Š½Š¾ Š·Š°ŠæŃƒŃŃ‚ŠøŃ‚ŃŒ команГу man.\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "ŠžŃˆŠøŠ±ŠŗŠ°: Дтраница Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š° тоже не найГена.\n" #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "ŠŸŠ¾Š“Ń…Š¾Š“ŃŃ‰ŠøŠµ страницы:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "Š—Š°ŠæŃƒŃŠŗ gunzip Š“Š»Ń" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "ŠŠµ уГалось Š·Š°ŠæŃƒŃŃ‚ŠøŃ‚ŃŒ gunzip.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "Š˜Š“ŠŠžŠ Š˜Š ŠžŠ’ŠŠŠ˜Š•" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "ŠžŃˆŠøŠ±ŠŗŠ°: страница Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š° не найГена\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "Š—Š°ŠæŃƒŃŠŗ команГы apropos \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "ŠŠøŃ‡ŠµŠ³Š¾ ŠæŠ¾Š“Ń…Š¾Š“ŃŃ‰ŠµŠ³Š¾\n" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "ВвеГите название Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š°: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "ŠŸŃ€Š¾ŃŠ¼Š¾Ń‚Ń€ строки %d/%d, %d%%" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "ŠŸŃ€Š¾ŃŠ¼Š¾Ń‚Ń€ строки %d/%d, 100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "ŠŠµ уГалось Š¾Ń‚ŠŗŃ€Ń‹Ń‚ŃŒ файл ŠŗŠ¾Š½Ń„ŠøŠ³ŃƒŃ€Š°Ń†ŠøŠø!\n" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Š”ŠøŠ½Ń‚Š°ŠŗŃŠøŃ‡ŠµŃŠŗŠ°Ń ошибка ŠŗŠ¾Š½Ń„ŠøŠ³ŃƒŃ€Š°Ń†ŠøŠ¾Š½Š½Š¾Š³Š¾ файла в строке %d\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Š—Š°ŠŗŠ¾Š½Ń‡ŠøŠ»Š°ŃŃŒ Š²ŠøŃ€Ń‚ŃƒŠ°Š»ŃŒŠ½Š°Ń ŠæŠ°Š¼ŃŃ‚ŃŒ\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "ŠŠµŠ“Š¾ŠæŃƒŃŃ‚ŠøŠ¼Ń‹Šµ символы в имени файла!\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "Га" #: src/utils.c:585 msgid "no" msgstr "нет" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "ŠŠµ уГалось Š¾Ń‚ŠŗŃ€Ń‹Ń‚ŃŒ файл ŠŗŠ¾Š½Ń„ŠøŠ³ŃƒŃ€Š°Ń†ŠøŠø!\n" #: src/video.c:59 msgid "File:" msgstr "Файл:" #: src/video.c:60 msgid "Node:" msgstr "Узел:" #: src/video.c:61 msgid "Next:" msgstr "ДлеГ.:" #: src/video.c:62 msgid "Prev:" msgstr "ŠŸŃ€ŠµŠ“.:" #: src/video.c:63 msgid "Up:" msgstr "Вверх:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "Поиск страницы Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š°...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "параметр --node указан без Š°Ń€Š³ŃƒŠ¼ŠµŠ½Ń‚а\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "параметр --rcfile указан без Š°Ń€Š³ŃƒŠ¼ŠµŠ½Ń‚а\n" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "Использование:\n" "%s [параметры] [файл info или страницы Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š°]\n" "ŠŸŠ°Ń€Š°Š¼ŠµŃ‚Ń€Ń‹:\n" "-h, --help ŠæŠ¾Š¼Š¾Ń‰ŃŒ\n" "-v, --version Š²ŠµŃ€ŃŠøŃ\n" "-m, --manual ŠæŠ¾ŠŗŠ°Š·Š°Ń‚ŃŒ ŃŃ‚Ń€Š°Š½ŠøŃ†Ńƒ Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š°\n" "-r, --raw-filename ŠøŃŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŃŒ сырой файл\n" "-f, --file тоже что Šø -r\n" "-a, --apropos Š·Š°ŠæŃƒŃŃ‚ŠøŃ‚ŃŒ apropos, если\n" " ничего не найГено\n" "-p, --plain-apropos Š·Š°ŠæŃƒŃŃ‚ŠøŃ‚ŃŒ Ń‚Š¾Š»ŃŒŠŗŠ¾ apropos\n" "-c, --cut-man-headers Š²Ń‹Ń€ŠµŠ·Š°Ń‚ŃŒ ŠæŠ¾Š²Ń‚Š¾Ń€ŃŃŽŃ‰ŠøŠµŃŃ заголовки " "страниц\n" " Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š°\n" "-l, --long-manual-links ŠøŃŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŃŒ Глинные ссылки\n" " в Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š°Ń…\n" "-s, --squeeze-manlines Š²Ń‹Ń€ŠµŠ·Š°Ń‚ŃŒ ŠæŃƒŃŃ‚Ń‹Šµ строки ŠøŠ· страниц\n" " Ń€ŃƒŠŗŠ¾Š²Š¾Š“ŃŃ‚Š²Š°\n" "-d, --dont-handle-without-tag-table не ŠæŠ¾ŠŗŠ°Š·Ń‹Š²Š°Ń‚ŃŒ texinfo страницы без " "тегов\n" " таблиц\n" "-t, --force-manual-tag-table ŠæŃ€ŠøŠ½ŃƒŠ“ŠøŃ‚ŠµŠ»ŃŒŠ½Š¾Šµ Ń€ŃƒŃ‡Š½Š¾Šµ опреГеление " "тегов\n" " таблицы\n" "-x, --clear-at-exit Š¾Ń‡ŠøŃ‰Š°Ń‚ŃŒ ŃŠŗŃ€Š°Š½ при выхоГе\n" " --node=узел, --node узел ŃŃ€Š°Š·Ńƒ перейти Šŗ указанному узлу\n" " --rcfile=файл, --rcfile файл ŠøŃŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŃŒ Š“Ń€ŃƒŠ³Š¾Š¹ rcfile\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "ŠžŃˆŠøŠ±ŠŗŠ°: не уГалось Š¾Ń‚ŠŗŃ€Ń‹Ń‚ŃŒ info файл, попытка Š¾Ń‚ŠŗŃ€Ń‹Ń‚ŃŒ man\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "ŠŸŃ€ŠµŠ“ŃƒŠæŃ€ŠµŠ¶Š“ŠµŠ½ŠøŠµ: табличный тег не найГен...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "ŠŸŠ¾ŠæŃ‹Ń‚ŠŗŠ° ŃŠ¾Š·Š“Š°Ń‚ŃŒ Š“Ń€ŃƒŠ³Š¾Š¹ табличный тег...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Š’ŠµŃ€Š¾ŃŃ‚Š½Š¾ ŃŃ‚Š¾ не info файл...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "Указанный узел не ŃŃƒŃ‰ŠµŃŃ‚Š²ŃƒŠµŃ‚...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "Табличный тег поврежГён, попытка Š²Š¾ŃŃŃ‚Š°Š½Š¾Š²Š»ŠµŠ½ŠøŃ..." #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "Файл не найГен. ŠŠ°Š¶Š¼ŠøŃ‚Šµ Š»ŃŽŠ±ŃƒŃŽ клавишу..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "ŠŠµŠ¾Š¶ŠøŠ“Š°Š½Š½Š°Ń ошибка.\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "Табличный тег не найГен. ŠŸŠ¾ŠæŃ‹Ń‚ŠŗŠ° ŃŠ¾Š·Š“Š°Ń‚ŃŒ Š“Ń€ŃƒŠ³Š¾Š¹..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "ŠŸŃ€ŠµŠ“ŃƒŠæŃ€ŠµŠ¶Š“ŠµŠ½ŠøŠµ безопасности: ŠŠµ уГалось ŠæŠ¾Š»ŃƒŃ‡ŠøŃ‚ŃŒ GID Š³Ń€ŃƒŠæŠæŃ‹ %s\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "ŠŸŃ€ŠµŠ“ŃƒŠæŃ€ŠµŠ¶Š“ŠµŠ½ŠøŠµ безопасности: ŠŠµ уГалось ŠæŠ¾Š»ŃƒŃ‡ŠøŃ‚ŃŒ UID ŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŠµŠ»Ń %s\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" pinfo-0.6.13/po/sv.po000066400000000000000000000177251343207050400143340ustar00rootroot00000000000000# Svenska translation of pinfo. # Copyright (C) 2005 Free Software Foundation, Inc. # Daniel Nylander , 2005. # # msgid "" msgstr "" "Project-Id-Version: pinfo 0.6.8-6\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2005-10-06 12:00+0200\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "Sƶkning efter indirekt klar" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "Varning: kunde inte finna tag table" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "Sƶkning efter tag table klar\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "Kunde inte ƶppna konfigurationsfilen!\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "Fel: kunde inte ƶppna info-fil" #: src/mainfunction.c:168 src/manual.c:1005 #, fuzzy msgid "Are you sure you want to print?" msgstr "Ƅr du sƤker att du vill skriva ut?" # # Regexp search messages # #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "Ange linje " # # Shellfeed messages # #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "Skriv kommando: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Operationen misslyckades..." # # Regexp search messages # #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 #, fuzzy msgid "Enter regular expression: " msgstr "Skriv regexp: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "SƶkstrƤng inte hittad..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "" # # Goto messages # #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "Skriv nod-namn: " # , c-format #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "Kunde inte hitta nod %s" #: src/mainfunction.c:1213 src/manual.c:1585 #, fuzzy msgid "Are you sure you want to quit?" msgstr "Ƅr du sƤker att du vill avsluta?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Fel: Kunde inte kalla upp kommandot 'man'.\n" # # Manual messages # # loading: #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Fel: Hittade ingen manual-sida heller.\n" # apropos: #: src/manual.c:354 #, fuzzy, c-format msgid "Apropos pages:\n" msgstr "LƤmpliga sidor:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "Kallar upp gunzip fƶr" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "Kunde inte kalla upp gunzip.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "IGNORERAR" # # Manual messages # # loading: #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "Fel: Ingen manualsida hittad.\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "Kallar upp apropos \n" #: src/manual.c:496 #, fuzzy, c-format msgid "Nothing appropriate\n" msgstr "Inget lƤmpligt\n" # # Goto messages # #: src/manual.c:1019 msgid "Enter manual name: " msgstr "Ange manualnamn:" #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "Aktuell rad %d/%d, %d%%" # # Viewer messages # #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "Aktuell rad %d/%d, 100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "Kunde inte ƶppna konfigurationsfilen!\n" # # Messages from the config file parsing procedures: # #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Syntax-fel i konfigureringsfil pĆ„ rad %d\n" # # Out of memory message # #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Slut pĆ„ virtuellt minne\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" #: src/utils.c:584 msgid "yes" msgstr "" #: src/utils.c:585 msgid "no" msgstr "" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "Kunde inte ƶppna konfigurationsfilen!\n" #: src/video.c:59 msgid "File:" msgstr "" #: src/video.c:60 msgid "Node:" msgstr "" #: src/video.c:61 msgid "Next:" msgstr "" #: src/video.c:62 msgid "Prev:" msgstr "" #: src/video.c:63 msgid "Up:" msgstr "" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" #: src/pinfo.c:311 #, fuzzy, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Fel: kunde inte ƶppna info-fil\n" #: src/pinfo.c:344 #, fuzzy, c-format msgid "Warning: tag table not found...\n" msgstr "Sƶkning efter tag table klar\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "" #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "" #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "" #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" # pinfo Swedish language module # # strings for the header-filter of info messages # , fuzzy # # Load messages for info pages (version for printf) # #~ msgid "Searching for indirect done\n" #~ msgstr "Sƶkning efter indirekt klar\n" #~ msgid "Warning: could not find tag table\n" #~ msgstr "Varning: kunde inte finna tag table\n" pinfo-0.6.13/po/vi.po000066400000000000000000000240061343207050400143100ustar00rootroot00000000000000# Vietnamese translation for PInfo. # Copyright Ā© 2005 Przemek Borys , Bas Zoetekouw , Nathanael Nerode # This file is distributed under the same license as the PInfo package. # Clytie Siddall , 2005. # msgid "" msgstr "" "Project-Id-Version: pinfo\n" "Report-Msgid-Bugs-To: pinfo-devel@lists.alioth.debian.org\n" "POT-Creation-Date: 2019-02-06 13:30+0100\n" "PO-Revision-Date: 2005-12-21 15:11+1030\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0\n" "X-Generator: LocFactoryEditor 1.5.1b\n" #: src/filehandling_functions.c:491 src/filehandling_functions.c:498 #, c-format msgid "Searching for indirect done" msgstr "Đang tƬm kiįŗæm xong giĆ”n tiįŗæp" #: src/filehandling_functions.c:530 src/filehandling_functions.c:537 #, c-format msgid "Warning: could not find tag table" msgstr "Cįŗ£nh bĆ”o: khĆ“ng tƬm thįŗ„y bįŗ£ng thįŗ»" #: src/filehandling_functions.c:569 #, c-format msgid "Searching for tag table done\n" msgstr "Đang tƬm kiįŗæm xong bįŗ£ng thįŗ»\n" #: src/filehandling_functions.c:708 #, c-format msgid "Error while reading file '%s'" msgstr "" #: src/filehandling_functions.c:1129 #, fuzzy msgid "Can't open file" msgstr "• KhĆ“ng thể mở tįŗ­p tin cįŗ„u hƬnh. •\n" #: src/filehandling_functions.c:1130 src/pinfo.c:426 msgid "press a key to continue" msgstr "bįŗ„m phĆ­m nĆ o Ä‘į»ƒ tiįŗæp tỄc" #: src/filehandling_functions.c:1248 #, fuzzy, c-format msgid "Error: could not open info file part" msgstr "Lį»—i: khĆ“ng thể mở tįŗ­p tin thĆ“ng tin\n" #: src/mainfunction.c:168 src/manual.c:1005 msgid "Are you sure you want to print?" msgstr "Bįŗ”n có chįŗÆc muốn in khĆ“ng?" #: src/mainfunction.c:220 src/manual.c:1050 msgid "Enter line: " msgstr "GƵ dòng: " #: src/mainfunction.c:261 src/manual.c:1097 msgid "Enter command: " msgstr "GƵ lệnh: " #: src/mainfunction.c:280 msgid "Operation failed..." msgstr "Thao tĆ”c thįŗ„t bįŗ”i..." #: src/mainfunction.c:316 src/mainfunction.c:575 src/manual.c:1150 msgid "Enter regular expression: " msgstr "GƵ biểu thức chĆ­nh quy: " #: src/mainfunction.c:546 src/mainfunction.c:643 src/manual.c:1228 msgid "Search string not found..." msgstr "KhĆ“ng tƬm thįŗ„y chuį»—i tƬm kiįŗæm..." #: src/mainfunction.c:602 src/manual.c:1185 msgid "Invalid regular expression;" msgstr "Biểu thức chĆ­nh quy khĆ“ng hợp lệ;" #: src/mainfunction.c:604 src/manual.c:1187 msgid "Press any key to continue..." msgstr "Bįŗ„m phĆ­m nĆ o Ä‘į»ƒ tiįŗæp tỄc..." #: src/mainfunction.c:674 msgid "Enter node name: " msgstr "GƵ tĆŖn nĆŗt: " #: src/mainfunction.c:753 #, c-format msgid "Node %s not found" msgstr "KhĆ“ng tƬm thįŗ„y nĆŗt %s" #: src/mainfunction.c:1213 src/manual.c:1585 msgid "Are you sure you want to quit?" msgstr "Bįŗ”n có chįŗÆc muốn thoĆ”t khĆ“ng?" #: src/manual.c:342 #, c-format msgid "Error: Cannot call man command.\n" msgstr "Lį»—i: khĆ“ng thể gį»i lệnh man (hướng dįŗ«n).\n" #: src/manual.c:351 #, c-format msgid "Error: No manual page found either.\n" msgstr "Lį»—i: cÅ©ng khĆ“ng tƬm thįŗ„y trang hướng dįŗ«n.\n" #: src/manual.c:354 #, c-format msgid "Apropos pages:\n" msgstr "Trang Apropos:\n" #: src/manual.c:397 msgid "Calling gunzip for" msgstr "Đang gį»i gunzip cho" #: src/manual.c:403 #, c-format msgid "Couldn't call gunzip.\n" msgstr "KhĆ“ng thể gį»i gunzip.\n" #: src/manual.c:440 msgid "IGNORING" msgstr "ĐANG Bį»Ž QUA" #: src/manual.c:486 #, c-format msgid "Error: No manual page found\n" msgstr "Lį»—i: khĆ“ng tƬm thįŗ„y trang hướng dįŗ«n\n" #: src/manual.c:491 #, c-format msgid "Calling apropos \n" msgstr "Đang gį»i apropos \n" #: src/manual.c:496 #, c-format msgid "Nothing appropriate\n" msgstr "KhĆ“ng có gƬ thĆ­ch hợp\n" #: src/manual.c:1019 msgid "Enter manual name: " msgstr "GƵ tĆŖn sổ hướng dįŗ«n: " #: src/manual.c:1666 src/video.c:113 #, c-format msgid "Viewing line %d/%d, %d%%" msgstr "Đang xem dòng %d/%d, %d%%" #: src/manual.c:1668 src/video.c:115 #, c-format msgid "Viewing line %d/%d, 100%%" msgstr "Đang xem dòng %d/%d, 100%%" #: src/parse_config.c:99 #, c-format msgid "Can't open config file!\n" msgstr "• KhĆ“ng thể mở tįŗ­p tin cįŗ„u hƬnh. •\n" #: src/parse_config.c:149 #, c-format msgid "Parse error in config file on line %d\n" msgstr "Gįŗ·p lį»—i phĆ¢n tĆ”ch trong tįŗ­p tin cįŗ„u hƬnh trĆŖn dòng %d\n" #: src/utils.c:119 src/utils.c:175 #, c-format msgid "Virtual memory exhausted\n" msgstr "Hįŗæt bį»™ nhį»› įŗ£o\n" #: src/utils.c:214 #, c-format msgid "Failed to execute command '%s': %i" msgstr "" #: src/utils.c:254 #, c-format msgid "" "Illegal characters in filename!\n" "*** %s\n" msgstr "" "• Gįŗ·p ký tį»± sai trong tĆŖn tįŗ­p tin. •\n" "*** %s\n" #: src/utils.c:584 msgid "yes" msgstr "có" #: src/utils.c:585 msgid "no" msgstr "khĆ“ng" #: src/utils.c:861 #, fuzzy, c-format msgid "Couldn't open temporary file\n" msgstr "• KhĆ“ng thể mở tįŗ­p tin cįŗ„u hƬnh. •\n" #: src/video.c:59 msgid "File:" msgstr "Tįŗ­p tin:" #: src/video.c:60 msgid "Node:" msgstr "NĆŗt:" #: src/video.c:61 msgid "Next:" msgstr "Kįŗæ:" #: src/video.c:62 msgid "Prev:" msgstr "Trước:" #: src/video.c:63 msgid "Up:" msgstr "LĆŖn:" #: src/video.c:297 msgid "Warning: matched empty string" msgstr "" #: src/pinfo.c:110 src/pinfo.c:195 #, c-format msgid "Looking for man page...\n" msgstr "Đang tƬm trang hướng dįŗ«n...\n" #: src/pinfo.c:148 #, c-format msgid "--node option used without argument\n" msgstr "Tùy chį»n Ā« --node Ā» (nĆŗt) được dùng khĆ“ng có đối số\n" #: src/pinfo.c:158 #, c-format msgid "--rcfile option used without argument\n" msgstr "Tùy chį»n Ā« --rcfile Ā» (tįŗ­p tin rc) được dùng khĆ“ng có đối số\n" #: src/pinfo.c:169 #, c-format msgid "" "Usage:\n" "%s [options] [info|manual]\n" "Options:\n" "-h, --help help\n" "-v, --version version\n" "-m, --manual use man page\n" "-r, --raw-filename use raw filename\n" "-f, --file synonym for -r\n" "-a, --apropos call apropos if nothing found\n" "-p, --plain-apropos call only apropos\n" "-c, --cut-man-headers cut out repeated man headers\n" "-l, --long-manual-links use long link names in manuals\n" "-s, --squeeze-manlines cut empty lines from manual pages\n" "-d, --dont-handle-without-tag-table don't display texinfo pages without " "tag\n" " tables\n" "-t, --force-manual-tag-table force manual detection of tag table\n" "-x, --clear-at-exit clear screen at exit\n" " --node=nodename, --node nodename jump directly to the node nodename\n" " --rcfile=file, --rcfile file use alternate rcfile\n" msgstr "" "CĆ”ch sį»­ dỄng:\n" "%s [tùy_chį»n ...] [thĆ“ng_tin|sổ_hướng_dįŗ«n]\n" "Options:\n" "-h, --help _trợ giĆŗp_\n" "-v, --version _phiĆŖn bįŗ£n_\n" "-m, --manual sį»­ dỄng _trang hướng dįŗ«n_\n" "-r, --raw-filename sį»­ dỄng _tĆŖn tįŗ­p tin thĆ“_\n" "-f, --file bįŗ±ng tùy chį»n Ā« -r Ā» (_tįŗ­p tin_)\n" "-a, --apropos gį»i apropos nįŗæu khĆ“ng tƬm gƬ\n" "-p, --plain-apropos gį»i chỉ apropos thĆ“i (_chuįŗ©n_)\n" "-c, --cut-man-headers _cįŗÆt ra cĆ”c dòng đầu hướng dįŗ«n_ trùng\n" "-l, --long-manual-links sį»­ dỄng tĆŖn _liĆŖn kįŗæt dĆ i_ trong _sổ " "hướng dįŗ«n_\n" "-s, --squeeze-manlines cįŗÆt cĆ”c _dòng_ trįŗÆng ra trang _hướng " "dįŗ«n_ (_vįŗÆt_)\n" "-d, --dont-handle-without-tag-table _đừng_ hiển thị trang kiểu texinfo\n" "\t\t\t\t\t\t\t\t_khĆ“ng có bįŗ£ng thįŗ»_ (_quįŗ£n " "lý_) -t, --force-manual-tag-" "table _buį»™c_ tį»± phĆ”t hiện _bįŗ£ng thįŗ»_\n" "-x, --clear-at-exit _xóa_ mĆ n hƬnh _khi thoĆ”t_\n" " --node=nodename, --node nodename nhįŗ£y thįŗ³ng đến _nĆŗt tĆŖn_ nĆ y\n" " --rcfile=tįŗ­p_tin, --rcfile tįŗ­p_tin sį»­ dỄng tįŗ­p tin rc thay thįŗæ\n" #: src/pinfo.c:311 #, c-format msgid "Error: could not open info file, trying manual\n" msgstr "Lį»—i: khĆ“ng thể mở tįŗ­p tin thĆ“ng tin nĆŖn thį»­ sổ hướng dįŗ«n\n" #: src/pinfo.c:344 #, c-format msgid "Warning: tag table not found...\n" msgstr "Cįŗ£nh bĆ”o: khĆ“ng tƬm thįŗ„y bįŗ£ng thįŗ»...\n" #: src/pinfo.c:348 #, c-format msgid "Trying to create alternate tag table...\n" msgstr "Đang cố tįŗ”o bįŗ£ng thįŗ» thay thįŗæ...\n" #: src/pinfo.c:353 src/pinfo.c:577 #, c-format msgid "This doesn't look like info file...\n" msgstr "Điều nĆ y khĆ“ng hƬnh nhʰ tįŗ­p tin thĆ“ng tin...\n" #: src/pinfo.c:366 #, c-format msgid "Specified node does not exist...\n" msgstr "KhĆ“ng có nĆŗt đã gƵ...\n" #: src/pinfo.c:425 msgid "Tag table is corrupt, trying to fix..." msgstr "Bįŗ£ng thįŗ» bị hį»ng nĆŖn cố sį»­a..." #: src/pinfo.c:499 msgid "File not found. Press any key..." msgstr "KhĆ“ng tƬm thįŗ„y tįŗ­p tin. Bįŗ„m phĆ­m nĆ o..." #: src/pinfo.c:519 #, c-format msgid "Unexpected error.\n" msgstr "Gįŗ·p lį»—i bįŗ„t ngį».\n" #: src/pinfo.c:572 msgid "Tag table not found. Trying to create alternate..." msgstr "KhĆ“ng tƬm thįŗ„y bįŗ£ng thįŗ». Đang cố tįŗ”o điều thay thįŗæ..." #: src/pinfo.c:659 #, c-format msgid "Security warning: Unable to get GID of group called: %s\n" msgstr "Cįŗ£nh bĆ”o bįŗ£o mįŗ­t: khĆ“ng thể lįŗ„y GID cį»§a nhóm tĆŖn: %s\n" #: src/pinfo.c:679 #, c-format msgid "Security warning: Unable to get UID of user called: %s\n" msgstr "Cįŗ£nh bĆ”o bįŗ£o mįŗ­t: khĆ“ng thể lįŗ„y UID cį»§a ngĘ°į»i dùng tĆŖn: %s\n" #: src/pinfo.c:694 #, c-format msgid "Unable to drop root privileges: %s" msgstr "" pinfo-0.6.13/src/000077500000000000000000000000001343207050400135015ustar00rootroot00000000000000pinfo-0.6.13/src/Makefile.am000066400000000000000000000041531343207050400155400ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in @SET_MAKE@ bin_PROGRAMS = pinfo pinfo_COMMON_SRC = pinfo.c \ colors.c \ datatypes.c \ filehandling_functions.c \ mainfunction.c \ manual.c \ menu_and_note_utils.c \ parse_config.c \ regexp_search.c \ signal_handler.c \ utils.c \ video.c \ colors.h \ common_includes.h \ datatypes.h \ filehandling_functions.h \ keyboard.h \ mainfunction.h \ manual.h \ menu_and_note_utils.h \ parse_config.h \ regexp_search.h \ signal_handler.h \ utils.h \ video.h \ initializelinks.c \ initializelinks.h \ printinfo.c \ printinfo.h \ localestuff.h pinfo_READLINE = readlinewrapper.c readlinewrapper.h pinfo_SNPRINTF = snprintf.c # snprintf.h pinfo_SIGBLOCK = sigblock.c sigblock.h if HAS_READLINE pinfo_READLINE_OBJ = else pinfo_READLINE_OBJ = readlinewrapper.o endif if HAVE_SNPRINTF pinfo_SNPRINTF_OBJ = else pinfo_SNPRINTF_OBJ = snprintf.o endif if HAVE_SIGBLOCK pinfo_SIGBLOCK_OBJ = else pinfo_SIGBLOCK_OBJ = sigblock.o endif pinfo_SOURCES = $(pinfo_COMMON_SRC) pinfo_LDADD = \ $(pinfo_READLINE_OBJ) $(pinfo_SNPRINTF_OBJ) \ $(pinfo_SIGBLOCK_OBJ) $(READLINE_LIBS) $(INTLLIBS) \ $(CURSES_LIBS) pinfo_CFLAGS = $(CURSES_CFLAGS) $(WCHAR_FLAGS) \ $(READLINE_INCLUDES) $(WFLAGS) \ -DLOCALEDIR=\"$(LOCALEDIR)\" -DCONFIGDIR=\"$(sysconfdir)/pinforc\" pinfo_DEPENDENCIES = $(pinfo_READLINE_OBJ)\ $(pinfo_SNPRINTF_OBJ)\ $(pinfo_SIGBLOCK_OBJ)\ $(INTLDEPS) if HAS_READLINE else readlinewrapper.o: $(pinfo_READLINE) endif if HAVE_SNPRINTF else snprintf.o: $(pinfo_SNPRINTF) endif if HAVE_SIGBLOCK else sigblock.o: $(pinfo_SIGBLOCK) endif install-data-local: if [ ! -f $(DESTDIR)$(sysconfdir)/pinforc ] ; then \ if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ $(INSTALL) -d $(DESTDIR)$(sysconfdir); \ fi; \ $(INSTALL) -m 644 pinforc $(DESTDIR)$(sysconfdir) ; \ else \ echo "WARNING! Old pinforc detected. I'm not installing the new file"; \ fi uninstall-local: rm -f $(DESTDIR)$(sysconfdir)/pinforc EXTRA_DIST = $(pinfo_READLINE) $(pinfo_SNPRINTF) $(pinfo_SIGBLOCK) pinfo-0.6.13/src/colors.c000066400000000000000000000114431343207050400151510ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #ifdef HAVE_CURSES_COLOR extern struct colours cols; #endif /* HAVE_CURSES_COLOR */ int normal; int menuselected; int menu; int noteselected; int note; int topline; int bottomline; int manualbold; int manualitalic; int url; int urlselected; int infohighlight; int searchhighlight; void initcolors() { #ifdef HAVE_CURSES_COLOR if (has_colors()) { start_color(); #ifdef HAVE_DECL_USE_DEFAULT_COLORS use_default_colors(); #endif normal = COLOR_PAIR(NORMAL); /* normal text */ init_pair(NORMAL, cols.normal_fore, cols.normal_back); if (cols.normal_bold) normal |= A_BOLD; if (cols.normal_blink) normal |= A_BLINK; menuselected = COLOR_PAIR(MENUSELECTED); /* selected menu */ init_pair(MENUSELECTED, cols.menuselected_fore, cols.menuselected_back); if (cols.menuselected_bold) menuselected |= A_BOLD; if (cols.menuselected_blink) menuselected |= A_BLINK; menu = COLOR_PAIR(MENU); /* just menu */ init_pair(MENU, cols.menu_fore, cols.menu_back); if (cols.menu_bold) menu |= A_BOLD; if (cols.menu_blink) menu |= A_BLINK; noteselected = COLOR_PAIR(NOTESELECTED); /* selected note */ init_pair(NOTESELECTED, cols.noteselected_fore, cols.noteselected_back); if (cols.noteselected_bold) noteselected |= A_BOLD; if (cols.noteselected_blink) noteselected |= A_BLINK; note = COLOR_PAIR(NOTE); /* just note */ init_pair(NOTE, cols.note_fore, cols.note_back); if (cols.note_bold) note |= A_BOLD; if (cols.note_blink) note |= A_BLINK; topline = COLOR_PAIR(TOPLINE); /* topline color */ init_pair(TOPLINE, cols.topline_fore, cols.topline_back); if (cols.topline_bold) topline |= A_BOLD; if (cols.topline_blink) topline |= A_BLINK; bottomline = COLOR_PAIR(BOTTOMLINE); /* bottomline color */ init_pair(BOTTOMLINE, cols.bottomline_fore, cols.bottomline_back); if (cols.bottomline_bold) bottomline |= A_BOLD; if (cols.bottomline_blink) bottomline |= A_BLINK; manualbold = COLOR_PAIR(MANUALBOLD); /* manual bold color */ init_pair(MANUALBOLD, cols.manualbold_fore, cols.manualbold_back); if (cols.manualbold_bold) manualbold |= A_BOLD; if (cols.manualbold_blink) manualbold |= A_BLINK; manualitalic = COLOR_PAIR(MANUALITALIC); /* manual italic color */ init_pair(MANUALITALIC, cols.manualitalic_fore, cols.manualitalic_back); if (cols.manualitalic_bold) manualitalic |= A_BOLD; if (cols.manualitalic_blink) manualitalic |= A_BLINK; url = COLOR_PAIR(URL); /* url(http, ftp) color */ init_pair(URL, cols.url_fore, cols.url_back); if (cols.url_bold) url |= A_BOLD; if (cols.url_blink) url |= A_BLINK; urlselected = COLOR_PAIR(URLSELECTED); /* selected url */ init_pair(URLSELECTED, cols.urlselected_fore, cols.urlselected_back); if (cols.urlselected_bold) urlselected |= A_BOLD; if (cols.urlselected_blink) urlselected |= A_BLINK; infohighlight = COLOR_PAIR(INFOHIGHLIGHT); /* highlight for info quotes */ init_pair(INFOHIGHLIGHT, cols.infohighlight_fore, cols.infohighlight_back); if (cols.infohighlight_bold) infohighlight |= A_BOLD; if (cols.infohighlight_blink) infohighlight |= A_BLINK; searchhighlight = COLOR_PAIR(SEARCHHIGHLIGHT); /* highlight for info quotes */ init_pair(SEARCHHIGHLIGHT, cols.searchhighlight_fore, cols.searchhighlight_back); if (cols.searchhighlight_bold) searchhighlight |= A_BOLD; if (cols.searchhighlight_blink) searchhighlight |= A_BLINK; } else { #endif /* HAVE_CURSES_COLOR */ normal = A_NORMAL; menu = A_BOLD; note = A_BOLD; url = A_BOLD; menuselected = A_REVERSE; noteselected = A_REVERSE; urlselected = A_REVERSE; topline = A_REVERSE; bottomline = A_REVERSE; manualbold = A_BOLD; manualitalic = A_BOLD; infohighlight = A_BOLD; searchhighlight = A_BOLD; #ifdef HAVE_CURSES_COLOR } #endif /* HAVE_CURSES_COLOR */ } pinfo-0.6.13/src/colors.h000066400000000000000000000036221343207050400151560ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __COLORS_H #define __COLORS_H /* numbers of color pairs in curses color definitions */ #define NORMAL 1 #define MENUSELECTED 2 #define NOTESELECTED 3 #define MENU 4 #define NOTE 5 #define TOPLINE 6 #define BOTTOMLINE 7 #define MANUALBOLD 8 #define MANUALITALIC 9 #define URL 10 #define URLSELECTED 11 #define INFOHIGHLIGHT 12 #define SEARCHHIGHLIGHT 13 /* those bellow hold color attributes for named screen widgets */ extern int menu; extern int menuselected; extern int note; extern int noteselected; extern int normal; extern int topline; extern int bottomline; extern int manualbold; extern int manualitalic; extern int url; extern int urlselected; extern int infohighlight; extern int searchhighlight; /* * initialize color values/attributes/etc. Either for color and monochrome * mode. */ void initcolors (); #endif pinfo-0.6.13/src/common_includes.h000066400000000000000000000061701343207050400170340ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __COMMON_INCLUDES_H #define __COMMON_INCLUDES_H /* make sure unistd.h defines sbrk() */ #define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../config.h" #if HAVE_NCURSESW_H /* if should be used */ # include #elif HAVE_NCURSESW_CURSES_H /* if should be used */ # include #elif HAVE_NCURSES_H /* if should be used */ # include #elif HAVE_NCURSES_CURSES_H /* if should be used */ # include #elif HAVE_CURSES_H /* if is present and should be used */ # include #else # error "No valid curses headers detected" #endif #include "localestuff.h" #include "datatypes.h" #include "filehandling_functions.h" #include "video.h" #include "menu_and_note_utils.h" #include "mainfunction.h" #include "utils.h" #include "signal_handler.h" #include "colors.h" #include "regexp_search.h" #include "manual.h" #include "parse_config.h" #include "keyboard.h" #include "initializelinks.h" #include "printinfo.h" /* * Readline isn't safe for nonlinux terminals (i.e. vt100) * But if you have readline linked with ncurses you may enable readline with * ./configure --with-readline * */ #ifndef HAS_READLINE #include "readlinewrapper.h" #endif /* HAS_READLINE */ #ifndef HAVE_SIGBLOCK #include "sigblock.h" #endif /* I hear voices, that it is needed by RH5.2 ;) */ #define _REGEX_RE_COMP /* somewhat portable way of flagging unused vars * from https://stackoverflow.com/questions/7090998/portable-unused-parameter-macro-used-on-function-signature-for-c-and-c */ #ifdef UNUSED #elif defined(__GNUC__) # define UNUSED(x) x __attribute__((unused)) #elif defined(__LCLINT__) # define UNUSED(x) /*@unused@*/ x #elif defined(__cplusplus) # define UNUSED(x) #else # define UNUSED(x) x #endif #endif pinfo-0.6.13/src/datatypes.c000066400000000000000000000122421343207050400156440ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" int verbose = 1; char *filenameprefix = 0; char *httpviewer = "lynx"; char *ftpviewer = "lynx"; char *maileditor = "mail"; char *printutility = "lpr"; char *manlinks = "1:8:2:3:4:5:6:7:9:n:l:p:o:3X11:3Xt:3X:3x"; char *configuredinfopath = ".:/usr/share/info:/usr/info:/usr/local/share/info:/usr/local/info:/opt/info"; char *ignoredmacros = 0; char *rcfile = NULL; char *tmpfilename1 = 0; char *tmpfilename2 = 0; SearchAgain searchagain; HyperObject *hyperobjects = 0; unsigned long hyperobjectcount = 0; Indirect *indirect = 0; TagTable *tag_table = 0; long FirstNodeOffset = 0; char FirstNodeName[256]; unsigned IndirectEntries = 0; unsigned TagTableEntries = 0; unsigned int maxx, maxy; int CutManHeaders = 0; int CutEmptyManLines = 0; int ForceManualTagTable = 0; int DontHandleWithoutTagTable = 0; int LongManualLinks = 0; char *ManOptions = ""; char *StderrRedirection = "2> /dev/null"; int FilterB7 = 0; int ConfirmQuit = 0; int QuitConfirmDefault = 0; int ClearScreenAtExit = 0; int CallReadlineHistory = 1; InfoHistory infohistory; int npos = -1; int ncursor = -1; int nmenu = -1; int use_apropos = 0; int plain_apropos = 0; int use_manual = 0; int use_raw_filename = 0; int quote_ignored = 0; int grab_mouse = 0; int winchanged = 0; void inithistory() { infohistory.length = 0; infohistory.node = 0; infohistory.file = 0; infohistory.pos = 0; infohistory.cursor = 0; infohistory.menu = 0; } /* * Add history entry */ void addinfohistory(char *file, char *node, int cursor, int mymenu, int pos) { if (!infohistory.length) { infohistory.length++; infohistory.node = xmalloc(sizeof(char *) * 2); infohistory.node[0] = 0; infohistory.file = xmalloc(sizeof(char *) * 2); infohistory.file[0] = 0; infohistory.pos = xmalloc(sizeof(int) * 2); infohistory.cursor = xmalloc(sizeof(int) * 2); infohistory.menu = xmalloc(sizeof(int) * 2); } else { infohistory.length++; infohistory.node = xrealloc(infohistory.node, sizeof(char *) *(infohistory.length + 1)); infohistory.file = xrealloc(infohistory.file, sizeof(char *) *(infohistory.length + 1)); infohistory.pos = xrealloc(infohistory.pos, sizeof(int) *(infohistory.length + 1)); infohistory.cursor = xrealloc(infohistory.cursor, sizeof(int) *(infohistory.length + 1)); infohistory.menu = xrealloc(infohistory.menu, sizeof(int) *(infohistory.length + 1)); } infohistory.node[infohistory.length] = xmalloc(strlen(node) + 1); strcpy(infohistory.node[infohistory.length], node); infohistory.file[infohistory.length] = xmalloc(strlen(file) + 1); strcpy(infohistory.file[infohistory.length], file); infohistory.pos[infohistory.length] = pos; infohistory.cursor[infohistory.length] = cursor; infohistory.menu[infohistory.length] = mymenu; } /* * Delete last history entry */ void dellastinfohistory() { if (infohistory.length) { if (infohistory.node[infohistory.length]) { xfree(infohistory.node[infohistory.length]); infohistory.node[infohistory.length] = 0; } if (infohistory.file[infohistory.length]) { xfree(infohistory.file[infohistory.length]); infohistory.file[infohistory.length] = 0; } if (infohistory.length) infohistory.length--; if (infohistory.length) { infohistory.node = xrealloc(infohistory.node, sizeof(char *) *(infohistory.length + 1)); infohistory.file = xrealloc(infohistory.file, sizeof(char *) *(infohistory.length + 1)); infohistory.pos = xrealloc(infohistory.pos, sizeof(int) *(infohistory.length + 1)); infohistory.cursor = xrealloc(infohistory.cursor, sizeof(int) *(infohistory.length + 1)); infohistory.menu = xrealloc(infohistory.menu, sizeof(int) *(infohistory.length + 1)); } else { if (infohistory.node) { xfree(infohistory.node); infohistory.node = 0; } if (infohistory.file) { xfree(infohistory.file); infohistory.file = 0; } if (infohistory.pos) { xfree(infohistory.pos); infohistory.pos = 0; } if (infohistory.cursor) { xfree(infohistory.cursor); infohistory.cursor = 0; } if (infohistory.menu) { xfree(infohistory.menu); infohistory.menu = 0; } } } } void clearfilenameprefix() { if (filenameprefix) { xfree(filenameprefix); filenameprefix = 0; } } pinfo-0.6.13/src/datatypes.h000066400000000000000000000155751343207050400156650ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __DATATYPES_H #define __DATATYPES_H #define FREE 0 #define LOCKED 1 #define KEEP_HISTORY 1 #define KILL_HISTORY 2 #define SOFT_HYPHEN 0xAD #define KEY_NOTHING 99999 #define HIGHLIGHT 1000 typedef struct { char lastsearch[256]; /* last searched regexp */ char type; /* type of the last search (global/local) */ int search; /* if true -- search again */ } SearchAgain; typedef struct { char filename[256]; /* name of file, where's the given offset */ long offset; /* offset of the node */ } Indirect; typedef struct { char nodename[256]; /* name of the node */ long offset; /* offset of the node */ } TagTable; typedef struct { int length; char **node; /* array of history of nodes */ char **file; /* array of history of files, associated with given nodes */ int *pos; /* history of pos offsets in viewed nodes */ int *cursor; /* history of cursor offsets in viewed nodes */ int *menu; /* history of menu positions (in sequential reading) in viewed nodes */ } InfoHistory; typedef struct { unsigned line; /* line number of the place where the link is */ unsigned col; /* column number ----||---- */ int breakpos; /* col number, where the links breaks to next line */ int type; /* type of link: 0 - * menu::, 1 - * Comment: menu. 2 - *note note:: 3 - *note Comment: note. 4 - http url 5 - ftp url 6 - mailto url */ char node[256]; /* name of the referenced node */ int nodelen; /* length of string node */ char file[256]; /* name of the referenced file -- none=this file */ int filelen; /* length of string file */ int tagtableoffset; /* offset in tag table */ } HyperObject; extern int verbose; /* * Prefix directory of the infopage. It is used when we view a given set of * infopages, eg. bfd* pages. We want all pages to be read from one directory. * And this path points to that directory, and openinfo() will try to open the * file only in this directory (if this variable is set nonzero) */ extern char *filenameprefix; /* name of http viewer (i.e. lynx) */ extern char *httpviewer; /* name of ftp viewer */ extern char *ftpviewer; /* name of maileditor */ extern char *maileditor; /* name of the printing utility */ extern char *printutility; /* man sections, considered to be highlighted as links */ extern char *manlinks; /* configured paths to infopages */ extern char *configuredinfopath; /* groff/troff macros which are removed while preformatting manual page */ extern char *ignoredmacros; /* a user specified rc file */ extern char *rcfile; /* temporary filename */ extern char *tmpfilename1; /* second tmp filename--needed by regexp search, etc */ extern char *tmpfilename2; /* a structure for "search again" feature */ extern SearchAgain searchagain; /* an array of references for info */ extern HyperObject *hyperobjects; extern unsigned long hyperobjectcount; /* an array of indirect entries [1 to n] */ extern Indirect *indirect; /* number of indirect entries */ extern unsigned IndirectEntries; /* an array of tag table entries [1 to n] */ extern TagTable *tag_table; /* offset of the first node in info file */ extern long FirstNodeOffset; /* name of the first node in info file */ extern char FirstNodeName[256]; /* number of tag table entries */ extern unsigned TagTableEntries; /* maximum dimensions of screen */ extern unsigned int maxx, maxy; extern InfoHistory infohistory; /* position to by set when moving via history */ extern int npos; /* cursor pos to be set when..... as above */ extern int ncursor; /* sequential reading menu pos..... as above */ extern int nmenu; /* determines if the apropos should be called if searching for aproprimate * document fails */ extern int use_apropos; /* determines if we want only apropos output to be displayed */ extern int plain_apropos; /* determines if man handling routines should try to cut off the repeating * headers */ extern int CutManHeaders; /* determines if man loading routines should try to cut out the repeating empty * double-newlines */ extern int CutEmptyManLines; /* Determines if you wish to initialize the tag table automaticaly, or you wish * that pinfo does it alone. Some info pages may have corrupt tag table (i.e. * some versions of jed pages */ extern int ForceManualTagTable; /* Causes manual link sections to be treated as long names (i.e. 3x11 instead * of 3) */ extern int LongManualLinks; /* options passed to the `man' program */ extern char *ManOptions; /* shell code to redirect stderr output */ extern char *StderrRedirection; /* convert 0xb7 values in man pages to 'o'? */ extern int FilterB7; /* determines if pinfo should ask for quit confirmation */ extern int ConfirmQuit; /* determines the deafult answer to yes/no dialog, when finishing work with * pinfo */ extern int QuitConfirmDefault; /* determines if pinfo should clear the screen at exit */ extern int ClearScreenAtExit; /* determines whether when using readline wrapper to call the latest history * entry as default prompt or not */ extern int CallReadlineHistory; /* quote ignored macros when watching page */ extern int quote_ignored; /* set by SIGWINCH handler */ extern int winchanged; /* true if we prefer man pages over info pages */ extern int use_manual; /* true if pinfo/curses should grab the mouse and override normal terminal mouse behaviour */ extern int grab_mouse; /* if true, search the current directory first, before checking /sur/share/info etc */ extern int use_raw_filename; /* If set to true , pinfo will not attempt to display texinfo pages without tag tables */ extern int DontHandleWithoutTagTable; /* initialize history (see struct above) * variables for `lastread' history */ void inithistory (); /* adds a history entry to the info file `lastread' history */ void addinfohistory (char *file, char *node, int cursor, int menu, int pos); /* deletes last history entry */ void dellastinfohistory (); /* clears the default searchpath for openinfo() */ void clearfilenameprefix (); #endif pinfo-0.6.13/src/filehandling_functions.c000066400000000000000000000744261343207050400203760ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * Copyright (C) 2005 Nathanael Nerode * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" typedef struct { char *suffix; char *command; } Suffixes; /****************************************************************************** * This piece of declarations says what to do with info files stored with * * different formats/compression methods, before putting them into a temporary * * file. I.e. you don't do anything to plain `.info' suffix; for a `.info.gz' * * you dump the file through `gunzip -d -c', etc. * ******************************************************************************/ #define SuffixesNumber 4 Suffixes suffixes[SuffixesNumber] = { {"", "cat"}, {".gz", "gzip -d -q -c"}, {".Z", "gzip -d -q -c"}, {".bz2", "bzip2 -d -c"} }; /*****************************************************************************/ char **infopaths = 0; int infopathcount = 0; int qsort_cmp(const void *base, const void *compared) { char *cbase =((TagTable *) base)->nodename; char *ccompared =((TagTable *) compared)->nodename; return compare_tag_table_string(cbase, ccompared); } int matchfile(char **buf, char *name) { #define Buf (*buf) DIR *dir; char *bname = basename(name); struct dirent *dp; int matched = 0; /* remove a possible ".info" from the end of the file name * we're looking for */ strip_info_suffix(bname); /* fix the name of the dir */ if (Buf[strlen(Buf)-1]!='/') { strcat(Buf,"/"); } strncat(Buf,name,bname-name); /* open the directory */ dir = opendir(Buf); if (dir == NULL) { return 0; } /* iterate over all files in the directory */ while ((dp = readdir(dir)) != NULL) { /* use strcat rather than strdup, because xmalloc handles all * malloc errors */ char *filename = xmalloc(strlen(dp->d_name)+1); char *pagename = xmalloc(strlen(dp->d_name)+1); strcat(filename, dp->d_name); strcat(pagename, dp->d_name); /* strip suffixes (so "gcc.info.gz" -> "gcc") */ strip_compression_suffix(pagename); strip_info_suffix(pagename); /* strip compression suffix from returned filename * decompresison and type matching will happen later * (sigh) */ strip_compression_suffix(filename); //fprintf(stdout,"Found filename `%s' (%s)\n", filename, pagename); /* compare this file with the file we're looking for */ if (strcmp(pagename,bname) == 0) { /* we found a match! */ matched++; /* put it in the buffer */ strncat(Buf, filename, 1023-strlen(Buf)); /* clean up, and exit the loop */ xfree(filename); xfree(pagename); break; } xfree(filename); xfree(pagename); } closedir(dir); if (matched) return 1; return 0; #undef Buf } FILE * dirpage_lookup(char **type, char ***message, unsigned long *lines, char *filename, char **first_node) { #define Type (*type) #define Message (*message) #define Lines (*lines) FILE *id = 0; int filenamelen = strlen(filename); int goodHit = 0; char name[256]; char file[256]; char *nameend, *filestart, *fileend, *dot; id = opendirfile(0); if (!id) return NULL; read_item(id, type, message, lines); /* search for node-links in every line */ for (unsigned long i = 1; i < Lines; i++) { if ( (Message[i][0] == '*') && (Message[i][1] == ' ') && ( nameend = strchr(Message[i], ':') ) && (*(nameend + 1) != ':') /* form: `* name:(file)node.' */ && (filestart = strchr(nameend, '(') ) && (fileend = strchr(filestart, ')') ) && (dot = strchr(fileend, '.') ) && (strncasecmp(filename, Message[i] + 2, filenamelen) == 0) ) { char *tmp; /* skip this hit if it is not a perfect match and * we have already found a previous partial match */ if ( ! ( (nameend - Message[i]) - 2 == filenamelen ) && goodHit ) { continue; } /* find the name of the node link */ tmp = name; strncpy(file, filestart + 1, fileend - filestart - 1); file[fileend - filestart - 1] = 0; strncpy(name, fileend + 1, dot - fileend - 1); name[dot - fileend - 1] = 0; while (isspace(*tmp)) tmp++; if (strlen(name)) { *first_node = xmalloc(strlen(tmp) + 1); strcpy((*first_node), tmp); } /* close the previously opened file */ if (id) { fclose(id); id = 0; } /* see if this info file exists */ id = openinfo(file, 0); if (id) { goodHit = 1; } } } /* if we haven't found anything, clean up and exit */ if (id && !goodHit) { fclose(id); id = 0; } /* return file we found */ return id; #undef Lines #undef Message #undef Type } void freeitem(char **type, char ***buf, unsigned long *lines) { #define Type (*type) #define Buf (*buf) #define Lines (*lines) if (Type != 0) { xfree(Type); Type = 0; } if (Buf != 0) { for (unsigned long i = 1; i <= Lines; i++) if (Buf[i] != 0) { xfree(Buf[i]); Buf[i] = 0; } xfree(Buf); Buf = 0; } #undef Type #undef Buf #undef Lines } void read_item(FILE * id, char **type, char ***buf, unsigned long *lines) { #define Type (*type) #define Buf (*buf) #define Lines (*lines) int i; freeitem(type, buf, lines); /* free previously allocated memory */ /* set number of lines to 0 */ Lines = 0; /* initial buffer allocation */ Buf = xmalloc(sizeof(char **)); /* seek precisely on the INFO_TAG (the seeknode function may be imprecise * in combination with some weird tag_tables). */ while (!feof(id) && fgetc(id) != INFO_TAG); /* then skip the trailing `\n' */ while (!feof(id) && fgetc(id) != '\n'); /* allocate and read the header line */ Type = xmalloc(1024); if (fgets(Type, 1024, id)==NULL) { /* nothing to do */ return; } Type = xrealloc(Type, strlen(Type) + 1); /* now iterate over the lines */ do { /* don't read after eof in info file */ if (feof(id)) break; /* realloc the previous line for it to fit exactly */ if (Lines) { Buf[Lines] = xrealloc(Buf[Lines], strlen(Buf[Lines]) + 1); } /* TODO: Weirdness going on here; looks like off-by-one error as Buf[0] is always "\0" */ /* increase the read lines number */ Lines++; /* allocate space for the new line */ Buf = xrealloc(Buf, sizeof(char **) *(Lines + 1)); Buf[Lines] = xmalloc(1024); Buf[Lines][0] = 0; /* if the line was not found in input file, fill the allocated space * with empty line. */ if (fgets(Buf[Lines], 1024, id) == NULL) strcpy(Buf[Lines], "\n"); else /* we can be sure that at least 1 char was read! */ { /* *sigh* indices contains \0's * which totally fucks up all strlen()s. * so replace it by a space */ i = 1023; /* find the end of the string */ while (Buf[Lines][i]=='\0' && i>=0) i--; /* and replace all \0's in the rest of the string by spaces */ while (i>=0) { if (Buf[Lines][i]=='\0' || Buf[Lines][i]=='\b') Buf[Lines][i]=' '; i--; } } } while (Buf[Lines][0] != INFO_TAG); /* repeat until new node mark is found */ /* added for simplifing two-line ismenu and isnote functs */ if (Lines) { strcpy(Buf[Lines], "\n"); Buf[Lines] = xrealloc(Buf[Lines], strlen(Buf[Lines]) + 1); } fseek(id, -2, SEEK_CUR); #undef Type #undef Buf #undef Lines } void load_indirect(char **message, unsigned long lines) { char *wsk; int cut = 0; /* number of invalid entries */ indirect = xmalloc((lines + 1) * sizeof(Indirect)); for (unsigned long i = 1; i < lines; i++) { char *check; wsk = message[i]; check = wsk + strlen(wsk); while (*(++wsk) != ':') /* check if this line keeps a real entry */ { if (wsk == check) /* * make sure wsk won't go out of range * in case the wsk would be corrupted. */ break; } if (*wsk) /* if the entry holds some data... */ { (*wsk) = 0; strncpy(indirect[i - cut].filename, message[i], 200); (*wsk) = ':'; indirect[i - cut].offset = atoi(wsk + 2); } else cut++; /* if the entry was invalid, make inirect count shorter */ } IndirectEntries = lines - 1 - cut; } void load_tag_table(char **message, unsigned long lines) { char *wsk, *wsk1; int is_indirect = 0; register unsigned int j; register char *res; int cut = 0; /* holds the number of corrupt lines */ /* * if in the first line there is a(indirect) string, skip that line * by adding the value of is_indirect=1 to all message[line] references. */ if (strcasecmp("(Indirect)", message[1]) == 0) is_indirect = 1; tag_table = xmalloc((lines + 1) * sizeof(TagTable)); for (unsigned long i = 1; i < lines - is_indirect; i++) { char *check; wsk = message[i + is_indirect]; check = wsk + strlen(wsk); while (!isspace(*(++wsk))) { if (wsk >= check) { wsk--; break; } } wsk++; wsk1 = wsk; check = wsk1 + strlen(wsk1); while (*(++wsk1) != INDIRECT_TAG) { if (wsk1 >= check) break; } if (wsk1 < check) { (*wsk1) = 0; /* * original: sprintf(tag_table[i-cut].nodename,"%s",wsk); * below is a faster version. */ res = memcpy(tag_table[i - cut].nodename, wsk, j =(size_t)(wsk1 - wsk)); (*(res += j + 1)) = 0; (*wsk1) = INDIRECT_TAG; wsk1++; tag_table[i - cut].offset = atoi(wsk1); } else cut++; /* increment the number of corrupt entries */ } TagTableEntries = lines - 1 - is_indirect - cut; /* FIXME: info should ALWAYS start at the 'Top' node, not at the first mentioned node(vide ocaml.info) */ for (unsigned int i = 1; i <= TagTableEntries; i++) { if (strcasecmp(tag_table[i].nodename, "Top") == 0) { FirstNodeOffset = tag_table[i].offset; strcpy(FirstNodeName, tag_table[i].nodename); } } qsort(&tag_table[1], TagTableEntries, sizeof(TagTable), qsort_cmp); } /* TODO: seek_indirect() and seek_tag_table() are almost identical: remove duplicate code */ int seek_indirect(FILE * id) { int finito = 0; long seek_pos; int input; char *type = xmalloc(1024); fseek(id, 0, SEEK_SET); while (!finito) /* * scan through the file, searching for "indirect:" * string in the type(header) line of node. */ { while ((input = fgetc(id)) != INFO_TAG) if (input == EOF) { if (type) { xfree(type); type = 0; } return 0; } seek_pos = ftell(id) - 2; fgetc(id); if (fgets(type, 1024, id)==0) { /* we're at the end of the file and haven't found any indirect refs. so bail out */ if (type) { xfree(type); type = 0; } return 0; } if (strncasecmp("Indirect:", type, strlen("Indirect:")) == 0) { finito = 1; } } xfree(type); type = 0; if (!curses_open) { printf(_("Searching for indirect done")); printf("\n"); } else { attrset(bottomline); mvhline(maxy - 1, 0, ' ', maxx); mvaddstr(maxy - 1, 0, _("Searching for indirect done")); attrset(normal); } fseek(id, seek_pos, SEEK_SET); return 1; } /* * second arg for dumping out verbose debug info or not :) */ int seek_tag_table(FILE * id,int quiet) { int finito = 0; long seek_pos; int input; char *type = xmalloc(1024); fseek(id, 0, SEEK_SET); /* * Scan through the file, searching for a string * "Tag Table:" in the type(header) line of node. */ while (!finito) { while ((input = fgetc(id)) != INFO_TAG) { if (input == EOF) { if (!quiet) { if (!curses_open) { printf(_("Warning: could not find tag table")); printf("\n"); } else { attrset(bottomline); mvhline(maxy - 1, 0, ' ', maxx); mvaddstr(maxy - 1, 0, _("Warning: could not find tag table")); attrset(normal); } } if (type) { xfree(type); type = 0; } return 2; } } seek_pos = ftell(id) - 2; while (fgetc(id) != '\n'); if (fgets(type, 1024, id)==NULL) { /* we're at the end of the file and haven't found a tag table. so bail out */ if (type) { xfree(type); type = 0; } return 2; } if (strncasecmp("Tag Table:", type, strlen("Tag Table:")) == 0) { finito = 1; } } xfree(type); type = 0; if (!curses_open) printf(_("Searching for tag table done\n")); else { attrset(bottomline); mvhline(maxy - 1, 0, ' ', maxx); mvaddstr(maxy - 1, 0, "Searching for tag table done"); attrset(normal); } fseek(id, seek_pos, SEEK_SET); return 1; } void buildcommand(char *dest, char *command, char *filename, const char *tmpfilename) { strcpy(dest, command); strcat(dest, " "); strcat(dest, filename); strcat(dest, "> "); strcat(dest, tmpfilename); } void builddircommand(char *dest, char *command, char *filename, const char *tmpfilename) { strcpy(dest, command); strcat(dest, " "); strcat(dest, filename); strcat(dest, ">> "); strcat(dest, tmpfilename); } FILE * opendirfile(int number) { FILE *id = NULL; char buf[1024]; /* holds local copy of filename */ char *bufend; /* points at the trailing 0 of initial name */ char command[1128]; /* holds command to evaluate for decompression of file */ int i, j; char *tmpfilename = NULL; size_t *fileendentries = xmalloc(infopathcount * sizeof(*fileendentries)); /* should really be off_t, but a signed type really doesn't make sense here */ int dir_found = 0; int dircount = 0; int lang_found; struct stat status; if (number == 0) /* initialize tmp filename for file 1 */ { /* close and delete old tmp file */ if (tmpfilename1) { unlink(tmpfilename1); /* erase old tmpfile */ free(tmpfilename1); } tmpfilename1 = make_tempfile(); tmpfilename = tmpfilename1; /* later we will refere only to tmp1 */ } for (i = 0; i < infopathcount; i++) /* go through all paths */ { lang_found = 0; strcpy(buf, infopaths[i]); /* build a filename */ strcat(buf, "/"); if (getenv("LANG") != NULL) strcat(buf, getenv("LANG")); strcat(buf, "/dir"); /* * remember the bufend to make it * possible later to glue compression suffixes. */ bufend = buf; bufend += strlen(buf); for (j = 0; j < SuffixesNumber; j++) /* go through all suffixes */ { strcat(buf, suffixes[j].suffix); if ((id = fopen(buf, "r")) != NULL) { fclose(id); builddircommand(command, suffixes[j].command, buf, tmpfilename); xsystem(command); lstat(tmpfilename, &status); fileendentries[dircount] = status.st_size; dircount++; dir_found = 1; lang_found = 1; } (*bufend) = 0; } /* same as above, but without $LANG support */ if (!lang_found) { strcpy(buf, infopaths[i]); /* build a filename */ strcat(buf, "/"); strcat(buf, "dir"); /* * remember the bufend to make it possible later to glue * compression suffixes. */ bufend = buf; bufend += strlen(buf); for (j = 0; j < SuffixesNumber; j++) /* go through all suffixes */ { strcat(buf, suffixes[j].suffix); if ((id = fopen(buf, "r")) != NULL) { fclose(id); builddircommand(command, suffixes[j].command, buf, tmpfilename); xsystem(command); lstat(tmpfilename, &status); fileendentries[dircount] = status.st_size; dircount++; dir_found = 1; } (*bufend) = 0; } } } if (dir_found) id = fopen(tmpfilename, "r"); /* * Filter the concatenated dir pages to exclude hidden parts of info * entries */ if (id) { char *tmp; size_t filelen, l; int aswitch = 0; int firstswitch = 0; dircount = 0; fseek(id, 0, SEEK_END); filelen = ftell(id); tmp = xmalloc(filelen); fseek(id, 0, SEEK_SET); if (fread(tmp, 1, filelen, id)!=filelen) { printf(_("Error while reading file '%s'"), tmp); closeprogram(); exit(1); } fclose(id); id = fopen(tmpfilename, "w"); for (l = 0; l < filelen; l++) { if (tmp[l] == INFO_TAG) { aswitch ^= 1; if (!firstswitch) fputc(tmp[l], id); firstswitch = 1; } else if ((aswitch) ||(!firstswitch)) fputc(tmp[l], id); if (l + 1 == fileendentries[dircount]) { if (aswitch != 0) aswitch = 0; dircount++; /* the last dircount should fit to the end of filelen */ } } fputc(INFO_TAG, id); fputc('\n', id); xfree(fileendentries); fclose(id); id = fopen(tmpfilename, "r"); xfree(tmp); return id; } return NULL; } /* * Note: openinfo is a function for reading info files, and putting * uncompressed content into a temporary filename. For a flexibility, there * are two temporary files supported, i.e. one for keeping opened info file, * and second for i.e. regexp search across info nodes, which are in other * info-subfiles. The temporary file 1 is refrenced by number=0, and file 2 by * number=1 Openinfo by default first tries the path stored in char * *filenameprefix and then in the rest of userdefined paths. */ FILE * openinfo(char *filename, int number) { FILE *id = NULL; #define BUF_LEN 1024 char *buf = xmalloc(BUF_LEN); /* holds local copy of filename */ char *bufend; /* points at the trailing 0 of initial name */ char command[1128]; /* holds command to evaluate for decompression of file */ int i, j; char *tmpfilename; if ((strncmp(filename, "dir", 3)==0) && !isalnum(filename[3])) { xfree(buf); return opendirfile(number); } if (number == 0) /* initialize tmp filename for file 1 */ { if (tmpfilename1) { unlink(tmpfilename1); /* erase old tmpfile */ free(tmpfilename1); } tmpfilename1 = make_tempfile(); tmpfilename = tmpfilename1; /* later we will refere only to tmp1 */ } else /* initialize tmp filename for file 2 */ { if (tmpfilename2) { unlink(tmpfilename2); /* erase old tmpfile */ free(tmpfilename2); } tmpfilename2 = make_tempfile(); tmpfilename = tmpfilename2; /* later we will refere only to tmp2 */ } for (i = -2; i < infopathcount; i++) /* go through all paths */ { if (i < 0) { /* * no filenameprefix, we don't navigate around any specific * infopage set, so simply scan all directories for a hit */ if (!filenameprefix) continue; /* build a filename: First (i == -2) try filenameprefix/filename, * then try with a .info appended */ if (i == -2) snprintf(buf, BUF_LEN, "%s/%s", filenameprefix, basename(filename)); else snprintf(buf, BUF_LEN, "%s/%s.info", filenameprefix, basename(filename)); } else { /* build a filename */ strcpy(buf, infopaths[i]); /* no match found in this directory */ if (! matchfile(&buf, filename)) continue; } bufend = buf; /* remember the bufend to make it possible later to glue compression * suffixes. */ bufend += strlen(buf); for (j = 0; j < SuffixesNumber; j++) /* go through all suffixes */ { strcat(buf, suffixes[j].suffix); if ((id = fopen(buf, "r")) != NULL) { fclose(id); clearfilenameprefix(); filenameprefix = strdup(buf); { /* small scope for removal of filename */ int prefixi, prefixlen = strlen(filenameprefix); for (prefixi = prefixlen; prefixi > 0; prefixi--) if (filenameprefix[prefixi] == '/') { filenameprefix[prefixi] = 0; break; } } buildcommand(command, suffixes[j].command, buf, tmpfilename); xsystem(command); id = fopen(tmpfilename, "r"); if (id) { xfree(buf); return id; } } (*bufend) = 0; } /* if we have a nonzero filename prefix, that is we view a set of * infopages, we don't want to search for a page in all * directories, but only in the prefix directory. Therefore break * here. */ if ((i == -1) &&(filenameprefix)) break; } xfree(buf); return 0; #undef BUF_LEN } void addrawpath(char *filename) { int len = strlen(filename); int i, pos; char tmp = '\0'; for (i = len; i >= 0; i--) { if (filename[i] == '/') { tmp = filename[i+1]; filename[i+1] = 0; pos = i+1; break; } } if (i < 0) pos = -1; infopaths = xrealloc(infopaths,(infopathcount + 3) *(sizeof(char *))); for (i = infopathcount; i > 0; i--) /* move entries to the right */ infopaths[i] = infopaths[i - 1]; if (pos > 0) infopaths[0]=strdup(filename); /* add new(raw) entry */ else infopaths[0]=strdup("./"); infopathcount++; if (pos > 0) /* recreate original filename */ filename[pos] = tmp; } int isininfopath(char *name) { int i; for (i = 0; i < infopathcount; i++) { if (strcmp(name, infopaths[i]) == 0) return 1; /* path already exists */ } return 0; /* path not found in previous links */ } /* returns the number of chars ch in string str */ unsigned int charcount(const char *str, const char ch) { int num = 0; const char *c; c = str; while (*c != '\0') { if (*c++ == ch) num++; } return num; } /* * find the paths where info files are to be found, * and put them in the global var infopaths[] */ void initpaths() { char emptystr[1] = ""; char **paths = NULL; char *infopath = NULL, *langpath = NULL; char *c, *dir, *env, *next; char *rawlang = NULL, *lang = NULL, *langshort = NULL; int ret; unsigned int i, j, maxpaths, numpaths = 0, infolen, langlen; size_t len; struct stat sbuf; ino_t *inodes; /* first concat the paths */ env = getenv("INFOPATH"); if (env == NULL) { env = emptystr; } infolen = strlen(env) + strlen(configuredinfopath) + 3; infopath = (char *) xmalloc( infolen ); strcat(infopath, env); strcat(infopath, ":"); strcat(infopath, configuredinfopath); /* end with a :, otherwise the strchr below will fail for the last entry */ strcat(infopath, ":"); /* alloc the paths[] array */ maxpaths = 3 * (charcount( infopath, ':' ) + 1); // *3 for $LANG paths = (char **) xmalloc( maxpaths * sizeof(char *) ); /* split at ':' and put the path components into paths[] */ dir = infopath; /* if this actually is a non-empty string, add it to paths[] */ while ( (next = strchr(dir, ':')) != NULL ) { *next = '\0'; /* terminate the string */ /* if the dir actually is a non-empty string, add it to paths[] */ if ( dir && strlen(dir)>0 ) { paths[numpaths++] = dir; } /* and advance the pointer to the next entry */ dir = next+1; } /* get the current $LANG, if any (to use for localized info pages) */ rawlang = getenv("LANG"); if (rawlang) { lang = strdup(rawlang); /* fix the lang string */ for (i=0; lang[i]!='\0'; i++) { /* cut off the charset */ if (lang[i]=='.') { lang[i]='\0'; } /* if lang is sublocalized (nl_BE or so), also use short version */ if (lang[i]=='_' && langshort==NULL) { langshort = strdup(lang); langshort[i] = '\0'; } } } /* if we have a LANG defined, add paths with this lang to the paths[] */ if (lang && strlen(lang)>0 ) { /* crude upper limit */ langlen = infolen + (strlen(lang)+2) * numpaths + 1; if (langshort!=NULL) langlen *= 2; langpath = (char *) xmalloc( langlen * sizeof(char) ); c = langpath; for (i=0; i %s\n", paths[i]); #endif /* ok, now we have all the (possibly) revelevant paths in paths[] */ /* now loop over them, see if they are valid and if they are duplicates*/ /* TODO: cleanup all malloc calls (get rid of cast, use sizeof(varname) instead of sizeof(type) */ inodes = (ino_t *) xmalloc( maxpaths * sizeof(ino_t) ); numpaths = 0; len = 0; for (i=0; i< maxpaths; i++) { /* TODO: check where these NULL paths come from */ if (paths[i]==NULL) continue; /* stat() the dir */ ret = stat( paths[i], &sbuf); /* and see if it could be opened */ if (ret < 0) { #ifdef ___DEBUG___ fprintf(stderr, "error while opening `%s': %s\n", paths[i], strerror(errno) ); #endif paths[i] = NULL; inodes[i] = 0; } else { inodes[i] = sbuf.st_ino; } /* now check if this path is a duplicate */ for (j=0; j %s\n", infopaths[i]); #endif } void create_indirect_tag_table() { FILE *id = 0; int initial; for (unsigned i = 1; i <= IndirectEntries; i++) { id = openinfo(indirect[i].filename, 1); initial = TagTableEntries + 1; if (!id) { /* display error message to make the user aware of * the broken info page */ char msg[1024]; snprintf(msg, 1024, "%s '%s' (%s)", _("Can't open file"), indirect[i].filename, _("press a key to continue") ); attrset(bottomline); mvhline(maxy - 1, 0, ' ', maxx); mvaddstr(maxy - 1, 0, msg); move(0, 0); attrset(normal); getch(); continue; } create_tag_table(id); FirstNodeOffset = tag_table[1].offset; strcpy(FirstNodeName, tag_table[1].nodename); fclose(id); for (unsigned j = initial; j <= TagTableEntries; j++) { tag_table[j].offset +=(indirect[i].offset - FirstNodeOffset); } } FirstNodeOffset = tag_table[1].offset; strcpy(FirstNodeName, tag_table[1].nodename); qsort(&tag_table[1], TagTableEntries, sizeof(TagTable), qsort_cmp); } void create_tag_table(FILE * id) { char *buf = xmalloc(1024); long oldpos; fseek(id, 0, SEEK_SET); if (!tag_table) tag_table = xmalloc((TagTableEntries + 2) * sizeof(TagTable)); else tag_table = xrealloc(tag_table,(TagTableEntries + 2) * sizeof(TagTable)); while (!feof(id)) { if (fgetc(id) == INFO_TAG) /* We've found a node entry! */ { while (fgetc(id) != '\n'); /* skip '\n' */ TagTableEntries++; /* increase the nuber of tag table entries */ oldpos = ftell(id); /* remember this file position! */ /* * it is a an eof-fake-node (in some info files it happens, that * the eof'ish end of node is additionaly signalised by an INFO_TAG * We give to such node an unlike to meet nodename. */ if (fgets(buf, 1024, id) == NULL) { tag_table = xrealloc(tag_table, sizeof(TagTable) *(TagTableEntries + 1)); strcpy(tag_table[TagTableEntries].nodename, "12#!@#4"); tag_table[TagTableEntries].offset = 0; } else { int colons = 0, i, j; int buflen = strlen(buf); for (i = 0; i < buflen; i++) { if (buf[i] == ':') colons++; if (colons == 2) /* * the string after the second colon * holds the name of current node. * The name may then end with `.', * or with a newline, which is scanned * bellow. */ { for (j = i + 2; j < buflen; j++) { if ((buf[j] == ',') ||(buf[j] == '\n')) { tag_table = xrealloc(tag_table, sizeof(TagTable) *(TagTableEntries + 1)); buf[j] = 0; buflen = j; strcpy(tag_table[TagTableEntries].nodename, buf + i + 2); tag_table[TagTableEntries].offset = oldpos - 2; break; } } break; } } /* end: for loop, looking for second colon */ } /* end: not a fake node */ } /* end: we've found a node entry(INFO_TAG) */ } /* end: global while loop, looping until eof */ xfree(buf); buf = 0; if (!indirect) { FirstNodeOffset = tag_table[1].offset; strcpy(FirstNodeName, tag_table[1].nodename); qsort(&tag_table[1], TagTableEntries, sizeof(TagTable), qsort_cmp); } } int seeknode(int tag_table_pos, FILE ** Id) { int i; FILE * newid; #define id (*Id) /* * Indirect nodes are seeked using a formula: * file-offset = tagtable_offset - indirect_offset + * + tagtable[1]_offset */ if (indirect) { for (i = IndirectEntries; i >= 1; i--) { if (indirect[i].offset <= tag_table[tag_table_pos].offset) { long off = tag_table[tag_table_pos].offset - indirect[i].offset + FirstNodeOffset - 4; newid = openinfo(indirect[i].filename, 0); if (newid == NULL) { return -1; closeprogram(); printf(_("Error: could not open info file part")); printf("\n"); exit(1); } fclose(id); id = newid; if (off > 0) fseek(id, off, SEEK_SET); else fseek(id, off, SEEK_SET); break; } } } else { long off = tag_table[tag_table_pos].offset - 4; if (off > 0) fseek(id, off, SEEK_SET); else fseek(id, off, SEEK_SET); } #undef id return 0; } /* removes trailing .gz, .bz2, etc. */ void strip_compression_suffix(char *file) { const size_t len = strlen(file); assert(len<1024); /* just some random limit */ char *found = 0; for (unsigned j = 0; j < SuffixesNumber; j++) { if ( (found = strstr(file, suffixes[j].suffix)) != NULL ) { if ( file + len == found + strlen(suffixes[j].suffix) ) { *found = '\0'; break; } } } } /* strip .info from and of string */ void strip_info_suffix(char *file) { const size_t len = strlen(file); assert(len<1024); /* just some random limit */ char *found = 0; const char suffix[6] = ".info"; if ( (found = strstr(file, suffix)) != NULL ) { if ( file + len == found + strlen(suffix) ) { *found = '\0'; } } } pinfo-0.6.13/src/filehandling_functions.h000066400000000000000000000063211343207050400203700ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __FILEHANDLING_FUNCTIONS_H #define __FILEHANDLING_FUNCTIONS_H #include #include #include #include #include #define INFO_TAG 0x1f #define INDIRECT_TAG 0x7f void initpaths (); void addrawpath (char *filename); /* seek to a node in certain info file */ int seeknode (int tag_table_pos, FILE ** Id); /* * free allocated memory, hold by buf (node** content, stored line by line), * and type (a char* pointer, which stores the node header). */ void freeitem (char **type, char ***buf, unsigned long *lines); /* * reads a node from 'id' to 'buf', and the header of node to 'type'. It sets * the numer of read lines to *lines. Warning! First line of 'buf' is left * empty. */ void read_item (FILE * id, char **type, char ***buf, unsigned long *lines); /* searches for indirect entry of info file */ int seek_indirect (FILE * id); /* as above, but with tag table entry */ int seek_tag_table (FILE * id,int quiet); /* * loads indirect table (from a special node, stored in message, of lines * length) */ void load_indirect (char **message, unsigned long lines); /* loads tag table (as above) */ void load_tag_table (char **message, unsigned long lines); /* opens info file */ FILE *openinfo (char *filename, int number); /* opens dir info file */ FILE *opendirfile (int number); /* creates tag table for info file */ void create_tag_table (FILE * id); /* creates tag table for indirect info */ void create_indirect_tag_table (); /* * look up a name, which was specified by the user in cmd line, in dir * entries. If found, return filedescriptor of the info file, which holds * needed entry. Also set `first node' to the name of node, which describes * the problem. Arguments: * type: a pointer to char*, which will hold the header line of dir entry * message: a pointer to char** buffer, which will hold the dir page line by * line * lines: pointer to long, which holds the number of lines in dir entry */ FILE * dirpage_lookup (char **type, char ***message, unsigned long *lines, char *filename, char **first_node); /* removes trailing .gz, .bz2, etc. */ void strip_compression_suffix (char *file); /* removes trailing .info */ void strip_info_suffix (char *file); #endif pinfo-0.6.13/src/initializelinks.c000066400000000000000000000656341343207050400170650ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #define MENU_DOT 0 #define NOTE_DOT 1 int compare_hyperlink(const void *a, const void *b) { return ((HyperObject *) a)->col -((HyperObject *) b)->col; } void sort_hyperlinks_from_current_line(long startlink, long endlink) { qsort(hyperobjects + startlink, endlink - startlink, sizeof(HyperObject), compare_hyperlink); } /* * Compares two strings, ignoring whitespaces(tabs, spaces) */ int compare_tag_table_string(char *base, char *compared) { int i, j; j = 0; for (i = 0; base[i] != 0; i++) { if (base[i] != compared[j]) { if ((isspace(compared[j])) &&(isspace(base[i]))); /* OK--two blanks */ else if (isspace(compared[j])) i--; /* index of `base' should be unchanged after for's i++ */ else if (isspace(base[i])) j--; /* index of `compared' stands in place and waits for base to skip blanks */ else return (int) base[i] -(int) compared[j]; } j++; } while (compared[j]) /* handle trailing whitespaces of variable `compared' */ { if (!isspace(compared[j])) return (int) base[i] -(int) compared[j]; j++; } return 0; } /* * checks if an item belongs to tag table. returns 1 on success and 0 on * failure. It should be optimised... */ int exists_in_tag_table(char *item) { if (gettagtablepos(item) != -1) return 1; else return 0; } void freelinks() /* frees space allocated previously by node-links */ { if ((hyperobjects)&&(hyperobjectcount)) xfree(hyperobjects); hyperobjects = 0; hyperobjectcount = 0; } /* * Finds url end. It is recognized by an invalid character. */ /* TODO: fix possible string overflow (no bounds checking) */ char * findurlend(char *str) { char *end; char *allowedchars = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890-_/~.%=|:@"; end = str; while (strchr(allowedchars, *end) != NULL) ++end; if (end > str) { if (*(end - 1) == '.') end--; } assert(end>=str); return end; } /* * Searchs for a note/menu delimiter. it may be dot, comma, tab, or newline. */ /* TODO: fix possible string overflow (no bounds checking) */ char * finddot(char *str, int mynote) { char *ptr = str; char *end[4] = { 0, 0, 0, 0 }; char *closest = 0; int i; while (isspace(*ptr)) /* if there are only spaces and newline... */ { if (*ptr == '\n') /* then it's a `Menu: \n' entry--skip it */ return 0; ptr++; } end[0] = strchr(str, '.'); /* nodename entry may end with dot, comma */ end[1] = strchr(str, ','); /* tabulation, or newline */ if (!mynote) { end[2] = strchr(str, '\t'); end[3] = strchr(str, '\n'); } else mynote = 2; if (end[0]) closest = end[0]; else if (end[1]) closest = end[1]; else if (end[2]) closest = end[2]; else if (end[3]) closest = end[3]; for (i = 1; i < mynote; i++) /* find the delimiter, which was found most recently */ { if ((end[i] < closest) &&(end[i])) closest = end[i]; } assert(closest>=str); return closest; } /* * Moves you to the beginning of username in email address. If username has * length=0, NULL is returned. */ /* TODO: fix possible string overflow (no bounds checking) */ char * findemailstart(char *str) { char *allowedchars = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890-_/~.%=|:"; char *at = strchr(str, '@'); if (at) { while (at > str) { at--; if (strchr(allowedchars, *at) == NULL) { if (*(at + 1) != '@') return at + 1; else return 0; } } if (*at != '@') return at; else return 0; } return 0; } void initializelinks(char *line1, char *line2, int line) { char *tmp; char *notestart = 0, *urlstart = 0, *urlend = 0; char *quotestart = 0, *quoteend = 0; char *buf = xmalloc(strlen(line1) + strlen(line2) + 1); /* required to sort properly the hyperlinks from current line only */ unsigned long initialhyperobjectcount = hyperobjectcount; int changed; int line1len = strlen(line1); strcpy(buf, line1); /* copy two lines into one */ if (strlen(line1)) buf[strlen(line1) - 1] = ' '; /* replace trailing '\n' with ' ' */ strcat(buf, line2); /****************************************************************************** * First scan for some highlights ;) -- words enclosed with quotes * ******************************************************************************/ quoteend = buf; do { changed = 0; /* find start of quoted text */ if ( ((quotestart = strchr(quoteend, '`')) != NULL) /* if it's in the first line of the two glued together */ && (quotestart < buf + line1len) /* find the end of quoted text */ && ((quoteend = strchr(quotestart, '\'')) != NULL) && (quoteend - quotestart > 1)) { /* if this apostrophe is not a part of "haven't", * "wouldn't", etc. */ while (!strncmp(quoteend - 1, "n't", 3)) { quoteend = strchr(quoteend + 1, '\''); if (!quoteend) break; } if (quoteend) { changed = 1; if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(buf, quotestart + 1); hyperobjects[hyperobjectcount].breakpos = -1; /* default */ if (quoteend > buf + line1len) { hyperobjects[hyperobjectcount].breakpos = buf + line1len - quotestart - 1; } hyperobjects[hyperobjectcount].type = HIGHLIGHT; strncpy( hyperobjects[hyperobjectcount].node, quotestart + 1, quoteend - quotestart - 1); hyperobjects[hyperobjectcount].node[quoteend - quotestart - 1] = 0; strcpy(hyperobjects[hyperobjectcount].file, ""); hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); hyperobjects[hyperobjectcount].tagtableoffset = -1; hyperobjectcount++; } } } while (changed); /****************************************************************************** * Look for e-mail url's * ******************************************************************************/ urlend = line1; do { changed = 0; if ((urlstart = findemailstart(urlend)) != NULL) { urlend = findurlend(urlstart); /* always successful */ if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(line1, urlstart); hyperobjects[hyperobjectcount].breakpos = -1; hyperobjects[hyperobjectcount].type = 6; strncpy(hyperobjects[hyperobjectcount].node, urlstart, urlend - urlstart); hyperobjects[hyperobjectcount].node[urlend - urlstart] = 0; strcpy(hyperobjects[hyperobjectcount].file, ""); hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); hyperobjects[hyperobjectcount].tagtableoffset = -1; if (strchr(hyperobjects[hyperobjectcount].node, '.') == NULL) { if (!hyperobjectcount) xfree(hyperobjects); } else hyperobjectcount++; changed = 1; } } while (changed); /****************************************************************************** * First try to scan for menu. Use as many security mechanisms, as possible * ******************************************************************************/ if ((line1[0] == '*') &&(line1[1] == ' ')) /* menu */ { /************************************************************************* * Scan for normal menu of kind "*(infofile)reference:: comment", where * * the infofile parameter is optional, and indicates, that a reference * * matches different info file. * *************************************************************************/ tmp = strstr(line1, "::"); /* "* menulink:: comment" */ if (tmp != NULL) { if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } if (line1[2] == '(') /* if cross-info link */ { char *end = strchr(line1, ')'); /* if the ')' char was found, and was before '::' */ if ((end != NULL) &&(end < tmp)) { long FilenameLen =(long)(end - line1 - 3); long NodenameLen =(long)(tmp - end - 1); strncpy(hyperobjects[hyperobjectcount].file, line1 + 3, FilenameLen); hyperobjects[hyperobjectcount].file[FilenameLen] = 0; strncpy(hyperobjects[hyperobjectcount].node, end + 1, NodenameLen); hyperobjects[hyperobjectcount].node[NodenameLen] = 0; hyperobjects[hyperobjectcount].type = 0; hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = 2; hyperobjects[hyperobjectcount].breakpos = -1; hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); hyperobjectcount++; } } else { /* if not cross-info link */ long NodenameLen =(long)(tmp - line1 - 2); int goodHit = 0; strcpy(hyperobjects[hyperobjectcount].file, ""); strncpy(hyperobjects[hyperobjectcount].node, line1 + 2, NodenameLen); hyperobjects[hyperobjectcount].node[NodenameLen] = 0; hyperobjects[hyperobjectcount].type = 0; hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = 2; hyperobjects[hyperobjectcount].breakpos = -1; hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); if (exists_in_tag_table(hyperobjects[hyperobjectcount].node)) { hyperobjectcount++; /* yep, this was a good hit */ goodHit = 1; } if (!goodHit && !hyperobjectcount) { xfree(hyperobjects); hyperobjects = 0; } } } /************************************************************ * Scan for menu references of form * * "* Comment:[spaces](infofile)reference." * ******************************************************************************/ else if ((tmp = strrchr(line1, ':')) != NULL) { char *start = 0, *end = 0, *dot = 0; /* find the trailing dot */ dot = finddot(tmp + 1, MENU_DOT); if (dot != NULL && (dot + 7 < dot + strlen(dot)) ) { /* skip possible '.info' filename suffix when * searching for ending dot */ if (strncmp(dot, ".info)", 6) == 0) dot = finddot(dot + 1, MENU_DOT); } /* we make use of sequential AND evaluation: start must not be NULL! */ if (((start = strchr(tmp, '(')) != NULL) &&(dot != NULL) && ((end = strchr(start, ')')) != NULL)) { if ( (start < dot) && (end < dot) ) /* security mechanism ;) */ { long FilenameLen =(long)(end - start - 1); long NodenameLen =(long)(dot - end - 1); if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } strncpy(hyperobjects[hyperobjectcount].file, start + 1, FilenameLen); hyperobjects[hyperobjectcount].file[FilenameLen] = 0; strncpy(hyperobjects[hyperobjectcount].node, end + 1, NodenameLen); hyperobjects[hyperobjectcount].node[NodenameLen] = 0; hyperobjects[hyperobjectcount].type = 1; hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(line1, start); hyperobjects[hyperobjectcount].breakpos = -1; hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); hyperobjectcount++; } else { goto handle_no_file_menu_label; } } else if (dot != NULL) /* if not cross-info reference */ { handle_no_file_menu_label: { long NodenameLen; int goodHit = 0; /* has val of 1, if it's a good hit */ if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } start = tmp + 1; /* move after the padding spaces */ while (isspace(*start)) start++; NodenameLen =(long)(dot - start); strcpy(hyperobjects[hyperobjectcount].file, ""); strncpy(hyperobjects[hyperobjectcount].node, start, NodenameLen); hyperobjects[hyperobjectcount].node[NodenameLen] = 0; hyperobjects[hyperobjectcount].type = 1; hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(line1, start); hyperobjects[hyperobjectcount].breakpos = -1; hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); if (exists_in_tag_table(hyperobjects[hyperobjectcount].node)) { hyperobjectcount++; /* yep, this was a good hit */ goodHit = 1; } if (!goodHit && !hyperobjectcount) { xfree(hyperobjects); hyperobjects = 0; } } } } } /****************************************************************************** * Handle notes. In similar way as above. * ******************************************************************************/ else if ( ( (notestart = strstr(buf, "*note")) != NULL ) || ( (notestart = strstr(buf, "*Note")) != NULL ) ) { handlenote: /************************************************************************* * Scan for normal note of kind "*(infofile)reference:: comment", where * * the infofile parameter is optional, and indicates, that a reference * * matches different info file. * *************************************************************************/ /* make sure that we don't handle notes, which fit in the second line */ /* Signed-unsigned issues FIXME */ if (notestart < buf + strlen(line1)) { /* we can handle only those, who are in the first line, * or who are split up into two lines */ tmp = strstr(notestart, "::"); /* "*note notelink:: comment" */ if (tmp != NULL) { if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); if (notestart[6] == '(') /* if cross-info link */ { char *end = strchr(notestart, ')'); /* if the ')' char was found, and was before '::' */ if ((end != NULL) &&(end < tmp)) { long FilenameLen =(long)(end - notestart - 7); long NodenameLen =(long)(tmp - end - 1); strncpy(hyperobjects[hyperobjectcount].file, notestart + 7, FilenameLen); hyperobjects[hyperobjectcount].file[FilenameLen] = 0; strncpy(hyperobjects[hyperobjectcount].node, end + 1, NodenameLen); hyperobjects[hyperobjectcount].node[NodenameLen] = 0; hyperobjects[hyperobjectcount].type = 2; if (notestart + 7 < buf + strlen(line1)) { hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(buf, notestart + 7); /* if the note highlight fits int first line */ if (tmp < buf + strlen(line1)) { /* we don't need to break highlighting * into several lines */ hyperobjects[hyperobjectcount].breakpos = -1; } else { /* otherwise we need it */ hyperobjects[hyperobjectcount].breakpos = strlen(line1) -(long)(notestart + 7 - buf) + 1; } } else { hyperobjects[hyperobjectcount].line = line + 1; hyperobjects[hyperobjectcount].col = calculate_len(buf + strlen(line1), notestart + 7); if (tmp < buf + strlen(line1)) /* as above */ hyperobjects[hyperobjectcount].breakpos = -1; else if ((hyperobjects[hyperobjectcount].breakpos = strlen(line1) - (long)(notestart + 7 - buf) + 1) == 0) { hyperobjects[hyperobjectcount].line--; } } hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); hyperobjectcount++; } } else /* if not cross-info link */ { long NodenameLen =(long)(tmp - notestart - 6); int goodHit = 0; strcpy(hyperobjects[hyperobjectcount].file, ""); strncpy(hyperobjects[hyperobjectcount].node, notestart + 6, NodenameLen); hyperobjects[hyperobjectcount].node[NodenameLen] = 0; hyperobjects[hyperobjectcount].type = 2; hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); if (notestart + 7 < buf + strlen(line1)) { hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(buf, notestart + 7) - 1; /* if the note highlight fits int first line */ if (tmp < buf + strlen(line1)) { /* we don't need to break highlighting into * several lines */ hyperobjects[hyperobjectcount].breakpos = -1; } else { /* otherwise we need it */ hyperobjects[hyperobjectcount].breakpos = strlen(line1) -(long)(notestart + 7 - buf) + 1; } } else { hyperobjects[hyperobjectcount].line = line + 1; hyperobjects[hyperobjectcount].col = calculate_len(buf + strlen(line1), notestart + 7) - 1; if (tmp < buf + strlen(line1)) /* as above */ hyperobjects[hyperobjectcount].breakpos = -1; else if ((hyperobjects[hyperobjectcount].breakpos = strlen(line1) -(long)(notestart + 7 - buf) + 1) == 0) { hyperobjects[hyperobjectcount].line--; } } if (exists_in_tag_table(hyperobjects[hyperobjectcount].node)) { hyperobjectcount++; /* yep, this was a good hit */ goodHit = 1; } if (!goodHit && !hyperobjectcount) { xfree(hyperobjects); hyperobjects = 0; } } } /***************************************************************** * Scan for note references of form * * "* Comment:[spaces](infofile)reference." * *****************************************************************/ else if ((tmp = strstr(notestart, ":")) != NULL) { char *start = 0, *end = 0, *dot = 0; dot = finddot(tmp + 1, NOTE_DOT); /* find the trailing dot */ if ( (dot != NULL) && ( dot + 7 < dot + strlen(dot)) ) { if (strncmp(dot, ".info)", 6) == 0) dot = finddot(dot + 1, NOTE_DOT); } if ( ((start = strchr(tmp, '(')) != NULL) && (dot != NULL) && ((end = strchr(start, ')')) != NULL)) /* end may be found only if start is nonNULL!!! */ { if ( (start < dot) && (end < dot) ) /* security mechanism ;) */ { long FilenameLen =(long)(end - start - 1); long NodenameLen =(long)(dot - end - 1); if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } strncpy(hyperobjects[hyperobjectcount].file, start + 1, FilenameLen); hyperobjects[hyperobjectcount].file[FilenameLen] = 0; strncpy(hyperobjects[hyperobjectcount].node, end + 1, NodenameLen); hyperobjects[hyperobjectcount].node[NodenameLen] = 0; hyperobjects[hyperobjectcount].type = 3; if (start < buf + strlen(line1)) { hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(buf, start); if (dot < buf + strlen(line1)) { /* if the note highlight fits in first line * we don't need to break highlighting into * several lines */ hyperobjects[hyperobjectcount].breakpos = -1; } else { /* otherwise we need it */ hyperobjects[hyperobjectcount].breakpos = strlen(line1) -(long)(start - buf); } } else { hyperobjects[hyperobjectcount].line = line + 1; hyperobjects[hyperobjectcount].col = calculate_len(buf + strlen(line1), start); hyperobjects[hyperobjectcount].breakpos = -1; } hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); hyperobjectcount++; } else { goto handle_no_file_note_label; } } else if (dot != NULL) /* if not cross-info reference */ { handle_no_file_note_label: { long NodenameLen; int goodHit = 0; if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } start = tmp + 1; /* move after the padding spaces */ while (isspace(*start)) start++; NodenameLen =(long)(dot - start); strcpy(hyperobjects[hyperobjectcount].file, ""); strncpy(hyperobjects[hyperobjectcount].node, start, NodenameLen); hyperobjects[hyperobjectcount].node[NodenameLen] = 0; hyperobjects[hyperobjectcount].type = 3; hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); if (start < buf + strlen(line1)) { hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(buf, start); if (dot < buf + strlen(line1)) { /* if the note highlight fits in first line * we don't need to break highlighting into * several lines */ hyperobjects[hyperobjectcount].breakpos = -1; } else { /* otherwise we need it */ hyperobjects[hyperobjectcount].breakpos = strlen(line1) -(long)(start - buf); } } else { hyperobjects[hyperobjectcount].line = line + 1; hyperobjects[hyperobjectcount].col = calculate_len(strlen(line1) + buf, start); hyperobjects[hyperobjectcount].breakpos = -1; } if (exists_in_tag_table(hyperobjects[hyperobjectcount].node)) { hyperobjectcount++; /* yep, this was a good hit */ goodHit = 1; } if (!goodHit && !hyperobjectcount) { xfree(hyperobjects); hyperobjects = 0; } } } } } } if (notestart) if (notestart + 6 < buf + strlen(buf) + 1) { tmp = notestart; if ((notestart = strstr(notestart + 6, "*Note")) != NULL) goto handlenote; notestart = tmp; if ((notestart = strstr(notestart + 6, "*note")) != NULL) goto handlenote; } /****************************************************************************** * Try to scan for some url-like objects in single line; mainly * * http://[address][space|\n|\t] * * ftp://[address][space|\n|\t] * * username@something.else[space|\n|\t] * *****************************************************************************/ /* http:// */ urlend = line1; while ((urlstart = strstr(urlend, "http://")) != NULL) { urlend = findurlend(urlstart); /* always successful */ if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(line1, urlstart); hyperobjects[hyperobjectcount].breakpos = -1; hyperobjects[hyperobjectcount].type = 4; strncpy(hyperobjects[hyperobjectcount].node, urlstart, urlend - urlstart); hyperobjects[hyperobjectcount].node[urlend - urlstart] = 0; strcpy(hyperobjects[hyperobjectcount].file, ""); hyperobjects[hyperobjectcount].tagtableoffset = -1; hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); hyperobjectcount++; } /* ftp:// */ urlend = line1; while ((urlstart = strstr(urlend, "ftp://")) != NULL) { urlend = findurlend(urlstart); /* always successful */ if (!hyperobjectcount) hyperobjects = xmalloc(sizeof(HyperObject)); else { hyperobjects = xrealloc(hyperobjects, sizeof(HyperObject) *(hyperobjectcount + 1)); } hyperobjects[hyperobjectcount].line = line; hyperobjects[hyperobjectcount].col = calculate_len(line1, urlstart); hyperobjects[hyperobjectcount].breakpos = -1; hyperobjects[hyperobjectcount].type = 5; strncpy(hyperobjects[hyperobjectcount].node, urlstart, urlend - urlstart); hyperobjects[hyperobjectcount].node[urlend - urlstart] = 0; strcpy(hyperobjects[hyperobjectcount].file, ""); hyperobjects[hyperobjectcount].tagtableoffset = -1; hyperobjects[hyperobjectcount].nodelen = strlen(hyperobjects[hyperobjectcount].node); hyperobjects[hyperobjectcount].filelen = strlen(hyperobjects[hyperobjectcount].file); hyperobjectcount++; } if (initialhyperobjectcount != hyperobjectcount) sort_hyperlinks_from_current_line(initialhyperobjectcount, hyperobjectcount); if (buf) { xfree(buf); buf = 0; } } pinfo-0.6.13/src/initializelinks.h000066400000000000000000000032341343207050400170560ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __INITIALIZELINKS_H #define __INITIALIZELINKS_H void freelinks (); /* frees node-links */ /* initializes node links. */ void initializelinks (char *line1, char *line2, int line); /* * scans for url end in given url-string. * returns a pointer to the found place. */ char *findurlend (char *str); /* scans for the beginning of username. Returns a pointer to it. */ char *findemailstart (char *str); /* strcmp, which is insensitive to whitespaces */ int compare_tag_table_string (char *base, char *compared); /* * calculate length of visible part of string ('\t' included) between start and * end. Returns length. */ int calculate_len (char *start, char *end); #endif pinfo-0.6.13/src/keyboard.h000066400000000000000000000027011343207050400154520ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __KEYBOARD_H #define __KEYBOARD_H /* escape or alt key */ #define META_KEY 0x1b /* adapted from Midnight Commander */ /* macro to get CTRL+key sequence */ #define KEY_CTRL(x) ((x)&31) /* macro to get ALT+key sequence */ #define KEY_ALT(x) (0x200 | (x)) #define is_enter_key(c) ((c) == '\r' || (c) == '\n' || (c) == KEY_ENTER) /***********************************/ /* a structure, which holds the keybindings */ extern struct keybindings keys; #endif pinfo-0.6.13/src/localestuff.h000066400000000000000000000031141343207050400161600ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ /* locale support. Adapted from binutils */ #ifndef __LOCALESTUFF_H #define __LOCALESTUFF_H #ifdef HAVE_CONFIG_H # include "config.h" #endif /* Take care of NLS matters. */ #ifdef HAVE_LOCALE_H # include #endif #ifndef HAVE_SETLOCALE # define setlocale(Category, Locale) /* empty */ #endif #ifdef ENABLE_NLS # include # define _(Text) gettext (Text) #else # undef bindtextdomain # define bindtextdomain(Domain, Directory) /* empty */ # undef textdomain # define textdomain(Domain) /* empty */ # define _(Text) Text #endif #define STREQ(a,b) (strcmp((a), (b)) == 0) #endif pinfo-0.6.13/src/mainfunction.c000066400000000000000000001076441343207050400163530ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #include #ifndef MIN #define MIN(a,b)(((a)<(b))?(a):(b)) #endif void rescan_cursor(); /* set the cursor to 1st item on visible screen */ void next_infomenu(); /* go to the next menu item for sequential reading */ int getnodeoffset(int tag_table_pos, int *Indstart); /* get node offset in file */ int aftersearch = 0; /* * this flag is turned on when the engine receives a simulated `key.back', * caused by the sequential auto-pgdn reading code */ int toggled_by_menu = 0; unsigned pos; long cursor; long infomenu, infocolumn=0; /* strdup src string, but when doing so, strip leading/trailing spaces and * substitute multiple spaces with a single space. This is needed when *Node * links span multiple lines and the margin is embedded in the string */ static char * canonical_strdup(const char *src) { char *dst; int dstlen, srclen, copylen; while (*src == ' ') ++src; for (dstlen = 0, srclen = 0; src[srclen]; ++srclen) { if (src[srclen] != ' ' || (src[srclen + 1] != 0 && src[srclen + 1] != ' ')) ++dstlen; } dst = xmalloc(dstlen + 1); for (copylen = 0, srclen = 0; copylen < dstlen; ++srclen) { if (src[srclen] != ' ' || src[srclen + 1] != ' ') dst[copylen++] = src[srclen]; } dst[dstlen] = 0; return dst; } WorkRVal work(char ***message, char **type, unsigned long *lines, FILE * id, int tag_table_pos) { #define Message (*message) #define Lines (*lines) #define Type (*type) static WorkRVal rval = {0, 0}; FILE *mypipe; int fileoffset; int indirectstart = -1; int cursorchanged = 0; int key = 0; int return_value; int statusline = FREE; char *token; char *tmp = NULL; if (rval.file) /* if the static variable was allocated, free it */ { xfree(rval.file); rval.file = 0; } if (rval.node) { xfree(rval.node); rval.node = 0; } pos = 1, cursor = 0, infomenu = -1; /* default position, and selected number */ #ifdef getmaxyx getmaxyx(stdscr, maxy, maxx); /* initialize maxx, maxy */ #else maxx = 80; maxy = 25; #endif /* getmaxyx */ /* free memory allocated previously by hypertext links */ freelinks(); for (unsigned long i = 1; i < Lines; i++) /* initialize node-links for every line */ { initializelinks(Message[i], Message[i + 1], i); } initializelinks(Message[Lines], "", Lines); next_infomenu(); /* infomenu will remain -1 if it's the last pos, or if there's no menu item */ if (npos != -1) pos = npos; /* set eventual history pos */ /* if we're in a node found using 's'earch function. */ if (aftersearch) { pos = aftersearch; /* set pos to the found position */ /* aftersearch=0; * don't reset this--we want to know if we mus highlight something */ } if (ncursor != -1) { cursor = ncursor; /* set eventual cursor pos */ infomenu = nmenu; /* same with last sequential reading menu pos */ } else { rescan_cursor(); /* scan for cursor position */ } if (toggled_by_menu) /* this node will not be shown to the user--it shouldn't go to history */ dellastinfohistory(); /* delete the history entry for this node--it's not even seen by the user */ npos = -1; /* turn off the `next-time' pos/cursor modifiers */ ncursor = -1; nmenu = -1; addtopline(Type,infocolumn); while (1) { /* * read key, and show screen only if there is nothing in the input * buffer. Otherwise the scrolling would be too slow. */ nodelay(stdscr, TRUE); key = pinfo_getch(); if (key == ERR) { if (statusline == FREE) showscreen(Message, Lines, pos, cursor,infocolumn); waitforgetch(); key = pinfo_getch(); } nodelay(stdscr, FALSE); statusline = FREE; if (winchanged) /* SIGWINCH */ { handlewinch(); winchanged = 0; addtopline(Type,infocolumn); key = pinfo_getch(); } /***************************** keyboard handling ****************************/ if (key != 0) { if ((key == keys.print_1) || (key == keys.print_2)) { if (yesno(_("Are you sure you want to print?"), 0) == 1) printnode(message, lines); } /*==========================================================================*/ if ((key == keys.pgdn_auto_1) || (key == keys.pgdn_auto_2) || (toggled_by_menu)) { int wastoggled = toggled_by_menu; toggled_by_menu = 0; /* if hyperobject type <= 1, then we have a menu */ if ((pos >= Lines -(maxy - 2)) ||(wastoggled)) { if ((infomenu != -1) &&(!wastoggled)) { cursor = infomenu; key = keys.followlink_1; /* the handler for keys.followlink must be bellow this statement! */ } else /* we shouldn't select a menu item if this node is called via `up:' from bottom, or if there is no menu */ { char *typestr = strdup(Type); getnextnode(Type, typestr); if (strcmp(typestr, ERRNODE) != 0) { key = keys.nextnode_1; } else { getnodename(Type, typestr); if (strcmp(FirstNodeName, typestr) != 0) /* if it's not end of all menus */ { if (wastoggled) /* if we're in the temporary called up node */ toggled_by_menu = KILL_HISTORY; else /* if we are calling the up node from non-temporary bottom node */ toggled_by_menu = KEEP_HISTORY; key = keys.upnode_1; ungetch(KEY_NOTHING); } } /* end: else if nextnode==ERRNODE */ } /* end: if we shouldn't select a menu item */ } /* end: if position is right */ } /*==========================================================================*/ if ((key == keys.goline_1) || (key == keys.goline_2)) { unsigned long newpos; attrset(bottomline); /* read user's value */ move(maxy - 1, 0); echo(); curs_set(1); token = getstring(_("Enter line: ")); curs_set(0); noecho(); move(maxy - 1, 0); myclrtoeol(); attrset(normal); if (token) /* * convert string to long. * careful with nondigit strings. */ { int digit_val = 1; for (unsigned i = 0; token[i] != 0; i++) { if (!isdigit(token[i])) digit_val = 0; } if (digit_val) /* go to specified line */ { newpos = atol(token); newpos -=(maxy - 1); if ((newpos > 0) &&(newpos < Lines -(maxy - 2))) pos = newpos; else if ((newpos > 0) &&((Lines -(maxy - 2)) > 0)) pos = Lines -(maxy - 2); else pos = 1; } xfree(token); token = 0; } } /*==========================================================================*/ if ((key == keys.shellfeed_1) || (key == keys.shellfeed_2)) { /* get command name */ attrset(bottomline); move(maxy - 1, 0); echo(); curs_set(1); token = getstring(_("Enter command: ")); noecho(); move(maxy - 1, 0); myclrtoeol(); attrset(normal); myendwin(); xsystem("clear"); mypipe = popen(token, "w"); /* open mypipe */ if (mypipe != NULL) { for (unsigned long i = 1; i <= Lines; i++) /* and flush the msg to stdin */ fprintf(mypipe, "%s", Message[i]); pclose(mypipe); getchar(); } doupdate(); curs_set(0); if (mypipe == NULL) mvaddstr(maxy - 1, 0, _("Operation failed...")); xfree(token); token = 0; } /*==========================================================================*/ if ((key == keys.dirpage_1) || (key == keys.dirpage_2)) { rval.file = malloc(10); strcpy(rval.file, "dir"); rval.node = malloc(2); strcpy(rval.node, ""); aftersearch = 0; return rval; } /*==========================================================================*/ if ((key == keys.refresh_1) || (key == keys.refresh_2)) { myendwin(); doupdate(); refresh(); curs_set(0); } /*==========================================================================*/ if ((key == keys.totalsearch_1) || /* search in all nodes later than this one */ (key == keys.totalsearch_2)) { int tmpaftersearch = aftersearch; indirectstart = -1; move(maxy - 1, 0); attrset(bottomline); echo(); curs_set(1); if (!searchagain.search) /* if searchagain key wasn't hit */ { token = getstring(_("Enter regular expression: ")); /* get the token */ strcpy(searchagain.lastsearch, token); /* and save it to searchagain buffer */ /* * give a hint, which key to ungetch to call this procedure * by searchagain */ searchagain.type = key; } else /* it IS searchagain */ { token = xmalloc(strlen(searchagain.lastsearch) + 1); /* allocate space for token */ strcpy(token, searchagain.lastsearch); /* copy the token from searchagain buffer */ searchagain.search = 0; /* reset the searchagain swith(until it's set again by the keys.searchagain key handler) */ } if (strlen(token) == 0) { xfree(token); goto skip_search; } curs_set(0); noecho(); attrset(normal); /* Calculate current info file offset... */ fileoffset = 0; for (unsigned i = 1; i <= pos + 1; i++) /* count the length of curnode */ fileoffset += strlen(Message[i]); fileoffset += strlen(Type); /* add also header length */ fileoffset += getnodeoffset(tag_table_pos, &indirectstart); /* also load the variable indirectstart */ /* Searching part... */ aftersearch = 0; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ return_value = -1; if (indirect) /* the info is of indirect type; we'll search through several files */ { FILE *fd = NULL; long tokenpos; long starttokenpos; long filelen; for (int j = indirectstart; j <= (int) IndirectEntries; j++) { fd = openinfo(indirect[j].filename, 1); /* get file * length. */ fseek(fd, 0, SEEK_END); filelen = ftell(fd); /* * seek to the beginning of search area. At the first * time it is `fileoffset', then it is the first node's * offset */ if (j == indirectstart) fseek(fd, fileoffset, SEEK_SET); else fseek(fd, FirstNodeOffset, SEEK_SET); starttokenpos = ftell(fd); tmp = xmalloc(filelen - starttokenpos + 10); /* read data */ size_t num_read = fread(tmp, 1, filelen - starttokenpos, fd); tmp[num_read] = 0; tokenpos = regexp_search(token, tmp); /* search */ if (tokenpos != -1) /* if something was found */ { /* * add the offset of the part of file, which wasn't * read to the memory */ tokenpos += starttokenpos; { /* local scope for tmpvar */ int tmpvar = 0; tag_table[0].offset = 0; for (unsigned i = TagTableEntries; i >= 1; i--) { if ((tag_table[i].offset > tag_table[tmpvar].offset) && ((tag_table[i].offset - indirect[j].offset + FirstNodeOffset) <= tokenpos)) { return_value = i; tmpvar = i; } } } /* this means, that indirect entry was found. */ if (return_value != -1) { fseek(fd, tag_table[return_value].offset - indirect[j].offset + FirstNodeOffset, SEEK_SET); /* seek to the found node offset */ while (fgetc(fd) != INFO_TAG); fgetc(fd); /* skip newline */ aftersearch = 1; /* * count, how many lines stands befor the token * line. */ while (ftell(fd) < tokenpos) { int chr = fgetc(fd); if (chr == '\n') aftersearch++; else if (chr == EOF) break; } /* * the number ofline where a token is found, is * now in the variable `aftersearch' */ if (aftersearch > 1) aftersearch--; else aftersearch = 1; } /* end: if (indirect entry was found) */ if (aftersearch) /* if something was found */ { if (tmp) /* free tmp buffer */ { xfree(tmp); tmp = 0; } break; } } /* end: if (tokenpos) */ } /* end: indirect file loop */ if (tmp) /* free tmp buffer */ { xfree(tmp); tmp = 0; } fclose(fd); } /* end: if (indirect) */ else /* if not indirect */ /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ { long filelen; long filepos = ftell(id); long tokenpos; long starttokenpos; fseek(id, 0, SEEK_END); /* calculate filelength */ filelen = ftell(id); /* seek at the start of search area. */ fseek(id, fileoffset, SEEK_SET); /* remember the number of skipped bytes.*/ starttokenpos = ftell(id); /* read data */ tmp = xmalloc(filelen - starttokenpos + 10); size_t num_read = fread(tmp, 1, filelen - starttokenpos, id); tmp[num_read] = 0; /* search */ tokenpos = regexp_search(token, tmp); if (tokenpos != -1) /* if we've found something */ { /* * add offset of the start of search area to this token * position. */ tokenpos += starttokenpos; { /* local scope for tmpvar */ int tmpvar = 0; tag_table[0].offset = 0; for (unsigned i = TagTableEntries; i >= 1; i--) { if ((tag_table[i].offset > tag_table[tmpvar].offset) && (tag_table[i].offset <= tokenpos)) { return_value = i; tmpvar = i; } } } /* * this means, that we've found our entry, and we're * one position too far with the `i' counter. */ if (return_value != -1) { fseek(id, tag_table[return_value].offset, SEEK_SET); /* seek to the node, which holds found line */ while (fgetc(id) != INFO_TAG); fgetc(id); /* skip newline */ aftersearch = 1; /* count lines in found node, until found line is * met. */ while (ftell(id) < tokenpos) { int chr = fgetc(id); if (chr == '\n') aftersearch++; else if (chr == EOF) break; } if (aftersearch > 1) aftersearch--; else aftersearch = 1; fseek(id, filepos, SEEK_SET); /* seek to old * filepos. */ } } /* end: if (tokenpos) <--> token found */ if (tmp) /* free tmp buffer */ { xfree(tmp); tmp = 0; } } /* end: if (!indirect) */ /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ xfree(token); token = 0; if (!aftersearch) { attrset(bottomline); mymvhline(maxy - 1, 0, ' ', maxx); move(maxy - 1, 0); mvaddstr(maxy - 1, 0, _("Search string not found...")); statusline = LOCKED; } if (!aftersearch) aftersearch = tmpaftersearch; if (return_value != -1) { infohistory.pos[infohistory.length] = pos; infohistory.cursor[infohistory.length] = cursor; infohistory.menu[infohistory.length] = infomenu; rval.node = canonical_strdup(tag_table[return_value].nodename); rval.file = xmalloc(1); rval.file[0] = 0; return rval; } } /* end: if key_totalsearch */ /*==========================================================================*/ if ((key == keys.search_1) || /* search in current node */ (key == keys.search_2)) { int success = 0; move(maxy - 1, 0); attrset(bottomline); echo(); curs_set(1); if (!searchagain.search) /* searchagain handler. see totalsearch */ { token = getstring(_("Enter regular expression: ")); strcpy(searchagain.lastsearch, token); searchagain.type = key; } else { token = xmalloc(strlen(searchagain.lastsearch) + 1); strcpy(token, searchagain.lastsearch); searchagain.search = 0; } /* end of searchagain handler */ if (strlen(token) == 0) { xfree(token); goto skip_search; } curs_set(0); noecho(); attrset(normal); /* compile the read token */ if (pinfo_re_comp(token) != 0) { /* we're not in a search! */ aftersearch = 0; /* print error message */ attrset(bottomline); mymvhline(maxy - 1, 0, ' ', maxx); move(maxy - 1, 0); printw(_("Invalid regular expression;")); printw(" "); printw(_("Press any key to continue...")); getch(); goto skip_search; } /* scan for the token in the following lines. */ for (unsigned long i = pos + 1; i < Lines; i++) { tmp = xmalloc(strlen(Message[i]) + strlen(Message[i + 1]) + 2); /* * glue two following lines into one -- to find matches * split up into two lines. */ strcpy(tmp, Message[i]); strcat(tmp, Message[i + 1]); if (pinfo_re_exec(tmp)) /* execute the search command */ { /* if found, enter here */ success = 1; /* if token was found in the second line, make pos=i+1. */ if (pinfo_re_exec(Message[i + 1])) pos = i + 1; else /* othwerwise, pos=i. This happens when we havesplit expression. */ pos = i; xfree(tmp); /* free tmp buffer */ tmp = 0; aftersearch = 1; break; } else /* nothing found */ { xfree(tmp); /* free tmp buffer */ tmp = 0; } } if (!success) { attrset(bottomline); mymvhline(maxy - 1, 0, ' ', maxx); move(maxy - 1, 0); mvaddstr(maxy - 1, 0, _("Search string not found...")); statusline = LOCKED; } xfree(token); /* free user's search token */ token = 0; rescan_cursor(); /* rescan cursor position in the new place */ } skip_search: /*==========================================================================*/ if ((key == keys.search_again_1) || /* search again */ (key == keys.search_again_2)) { if (searchagain.type != 0) /* if a search was made before */ { searchagain.search = 1; /* mark, that search routines should * * use the searchagain token value */ ungetch(searchagain.type); /* ungetch the proper * * search key */ } } /*==========================================================================*/ if ((key == keys.goto_1) || /* goto node */ (key == keys.goto_2)) { return_value = -1; move(maxy - 1, 0); attrset(bottomline); curs_set(1); const char ** tag_completions = completions_from_tag_table(tag_table, TagTableEntries); token = getstring_with_completion(_("Enter node name: "), tag_completions); /* read user's wish */ if (tag_completions!=NULL) { free(tag_completions); } curs_set(0); noecho(); attrset(normal); for (unsigned i = 1; i <= TagTableEntries; i++) { /* if the name was found in the tag table */ if (strcmp(token, tag_table[i].nodename) == 0) { return_value = i; break; } } if (return_value != -1) /* if the name was in tag table */ { xfree(token); token = 0; infohistory.pos[infohistory.length] = pos; infohistory.cursor[infohistory.length] = cursor; infohistory.menu[infohistory.length] = infomenu; rval.node = canonical_strdup(tag_table[return_value].nodename); rval.file = xmalloc(1); rval.file[0] = 0; aftersearch = 0; return rval; } else /* if the name wasn't in tag table */ { /* * scan for filename: filenames may be specified in format: * (file)node */ char *gotostartptr = strchr(token, '('); if (gotostartptr) /* if there was a `(' */ { char *gotoendptr = strchr(token, ')'); /* search for `)' */ /* if they're in the right order... */ if (gotoendptr > gotostartptr) { rval.file = xmalloc(gotoendptr - gotostartptr + 1); strncpy(rval.file, gotostartptr + 1, gotoendptr - gotostartptr - 1); rval.file[gotoendptr - gotostartptr - 1] = 0; gotoendptr++; while (gotoendptr) /* skip whitespaces until nodename */ { if (*gotoendptr != ' ') break; gotoendptr++; } /* skip spaces */ rval.node = canonical_strdup(gotoendptr); xfree(token); token = 0; aftersearch = 0; return rval; } } /* handle the `file.info' format of crossinfo goto. */ else if (strstr(token, ".info")) { rval.file = xmalloc(strlen(token) + 1); strcpy(rval.file, token); xfree(token); token = 0; rval.node = xmalloc(5); strcpy(rval.node, ""); aftersearch = 0; return rval; } else /* node not found */ { attrset(bottomline); mymvhline(maxy - 1, 0, ' ', maxx); move(maxy - 1, 0); printw(_("Node %s not found"), token); attrset(normal); move(0, 0); } } statusline = LOCKED; xfree(token); token = 0; } /*==========================================================================*/ if ((key == keys.prevnode_1) || /* goto previous node */ (key == keys.prevnode_2)) { token = xmalloc(strlen(Type)); getprevnode(Type, token); return_value = gettagtablepos(token); xfree(token); token = 0; if (return_value != -1) { infohistory.pos[infohistory.length] = pos; infohistory.cursor[infohistory.length] = cursor; infohistory.menu[infohistory.length] = infomenu; rval.node = canonical_strdup(tag_table[return_value].nodename); rval.file = xmalloc(1); rval.file[0] = 0; aftersearch = 0; return rval; } } /*==========================================================================*/ if ((key == keys.nextnode_1) || /* goto next node */ (key == keys.nextnode_2)) { token = xmalloc(strlen(Type)); getnextnode(Type, token); return_value = gettagtablepos(token); xfree(token); token = 0; if (return_value != -1) { infohistory.pos[infohistory.length] = pos; infohistory.cursor[infohistory.length] = cursor; infohistory.menu[infohistory.length] = infomenu; rval.node = canonical_strdup(tag_table[return_value].nodename); rval.file = xmalloc(1); rval.file[0] = 0; aftersearch = 0; return rval; } } /*==========================================================================*/ if ((key == keys.upnode_1) || /* goto up node */ (key == keys.upnode_2)) { token = xmalloc(strlen(Type)); getupnode(Type, token); if (strncmp(token, "(dir)", 5) == 0) { ungetch(keys.dirpage_1); } return_value = gettagtablepos(token); xfree(token); token = 0; if (return_value != -1) { if (toggled_by_menu == KEEP_HISTORY) { infohistory.pos[infohistory.length] = pos; infohistory.cursor[infohistory.length] = cursor; infohistory.menu[infohistory.length] = infomenu; } rval.node = canonical_strdup(tag_table[return_value].nodename); rval.file = xmalloc(1); rval.file[0] = 0; aftersearch = 0; return rval; } } /*==========================================================================*/ if ((key == keys.twoup_1) || (key == keys.twoup_2)) { ungetch(keys.up_1); ungetch(keys.up_1); } /*==========================================================================*/ if ((key == keys.up_1) || (key == keys.up_2)) { cursorchanged = 0; if (cursor != -1) /* if we must handle cursor... */ { if ((cursor > 0) &&(hyperobjectcount)) /* if we really must handle it ;) */ /* * look if there's a cursor(link) pos available above, * and if it is visible now. */ for (int i = cursor - 1; i >= 0; i--) { if ((hyperobjects[i].line >= pos) && (hyperobjects[i].line < pos +(maxy - 1))) { /* don't play with `highlight' objects */ if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; cursorchanged = 1; break; } } } } if (!cursorchanged) /* if the cursor wasn't changed */ { if (pos > 1) /* lower the nodepos */ pos--; /* and scan for a hyperlink in the new line */ for (unsigned long i = 0; i < hyperobjectcount; i++) { if (hyperobjects[i].line == pos) { if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; break; } } } } } /*==========================================================================*/ if ((key == keys.end_1) || (key == keys.end_2)) { pos = Lines -(maxy - 2); if (pos < 1) pos = 1; cursor = hyperobjectcount - 1; } /*==========================================================================*/ if ((key == keys.pgdn_1) || (key == keys.pgdn_2)) { if (pos +(maxy - 2) < Lines -(maxy - 2)) { pos +=(maxy - 2); rescan_cursor(); } else if (Lines -(maxy - 2) >= 1) { pos = Lines -(maxy - 2); cursor = hyperobjectcount - 1; } else { pos = 1; cursor = hyperobjectcount - 1; } } /*==========================================================================*/ if ((key == keys.home_1) || (key == keys.home_2)) { pos = 1; rescan_cursor(); } /*==========================================================================*/ if ((key == keys.pgup_1) | (key == keys.pgup_2)) { if (pos >(maxy - 2)) pos -=(maxy - 2); else pos = 1; rescan_cursor(); } /*==========================================================================*/ if ((key == keys.pgup_auto_1) || (key == keys.pgup_auto_2)) { if (pos == 1) ungetch(keys.upnode_1); } /*==========================================================================*/ if ((key == keys.twodown_1) || (key == keys.twodown_2)) /* top+bottom line \|/ */ { ungetch(keys.down_1); ungetch(keys.down_1); } /*==========================================================================*/ if ((key == keys.down_1) || (key == keys.down_2)) /* top+bottom line \|/ */ { cursorchanged = 0; /* works similar to keys.up */ if (cursor < 0) cursor = -1; if (cursor < 0 || (unsigned long) cursor < hyperobjectcount) { for (unsigned long i = (unsigned long) (cursor + 1); i < hyperobjectcount; i++) { if ((hyperobjects[i].line >= pos) && (hyperobjects[i].line < pos +(maxy - 2))) { if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; cursorchanged = 1; break; } } } } if (!cursorchanged) { if (pos <= Lines -(maxy - 2)) pos++; for (unsigned long i = cursor + 1; i < hyperobjectcount; i++) { if ((hyperobjects[i].line >= pos) && (hyperobjects[i].line < pos +(maxy - 2))) { if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; cursorchanged = 1; break; } } } } } /*==========================================================================*/ if ((key == keys.top_1) || (key == keys.top_2)) { infohistory.pos[infohistory.length] = pos; infohistory.cursor[infohistory.length] = cursor; infohistory.menu[infohistory.length] = infomenu; rval.node = canonical_strdup(FirstNodeName); rval.file = xmalloc(1); rval.file[0] = 0; aftersearch = 0; return rval; } /*==========================================================================*/ if ((key == keys.back_1) || (key == keys.back_2)) { if (infohistory.length > 1) { dellastinfohistory(); /* remove history entry for this node */ /* now we deal with the previous node history entry */ rval.node = canonical_strdup(infohistory.node[infohistory.length]); rval.file = xmalloc(strlen(infohistory.file[infohistory.length]) + 1); strcpy(rval.file, infohistory.file[infohistory.length]); npos = infohistory.pos[infohistory.length]; ncursor = infohistory.cursor[infohistory.length]; nmenu = infohistory.menu[infohistory.length]; dellastinfohistory(); /* remove history entry for previous node */ aftersearch = 0; return rval; } } /*==========================================================================*/ if ((key == keys.followlink_1) || (key == keys.followlink_2)) { infohistory.pos[infohistory.length] = pos; infohistory.cursor[infohistory.length] = cursor; infohistory.menu[infohistory.length] = infomenu; if (!toggled_by_menu) infohistory.menu[infohistory.length] = cursor; if ((cursor >= 0) && ((unsigned long) cursor < hyperobjectcount)) if ( ( (hyperobjects[cursor].line >= pos) && (hyperobjects[cursor].line < pos +(maxy - 2) ) ) || (toggled_by_menu) ) { toggled_by_menu = 0; if (hyperobjects[cursor].type < 4) /* normal info link */ { rval.node = canonical_strdup(hyperobjects[cursor].node); rval.file = xmalloc(strlen(hyperobjects[cursor].file) + 1); strcpy(rval.file, hyperobjects[cursor].file); aftersearch = 0; return rval; } else if (hyperobjects[cursor].type < HIGHLIGHT) /* we deal with an url */ { if (hyperobjects[cursor].type == 4) /* http */ { char *tempbuf = xmalloc(strlen(hyperobjects[cursor].node) + strlen(httpviewer) + 10); strcpy(tempbuf, httpviewer); strcat(tempbuf, " "); strcat(tempbuf, hyperobjects[cursor].node); myendwin(); xsystem(tempbuf); doupdate(); xfree(tempbuf); } else if (hyperobjects[cursor].type == 5) /* ftp */ { char *tempbuf = xmalloc(strlen(hyperobjects[cursor].node) + strlen(ftpviewer) + 10); strcpy(tempbuf, ftpviewer); strcat(tempbuf, " "); strcat(tempbuf, hyperobjects[cursor].node); myendwin(); xsystem(tempbuf); doupdate(); xfree(tempbuf); } else if (hyperobjects[cursor].type == 6) /* mail */ { char *tempbuf = xmalloc(strlen(hyperobjects[cursor].node) + strlen(maileditor) + 10); strcpy(tempbuf, maileditor); strcat(tempbuf, " "); strcat(tempbuf, hyperobjects[cursor].node); myendwin(); xsystem("clear"); xsystem(tempbuf); doupdate(); xfree(tempbuf); } } } } /*==========================================================================*/ if ((key == keys.left_1) ||(key == keys.left_2)) { if (infocolumn>0) infocolumn--; addtopline(Type,infocolumn); } /*==========================================================================*/ if ((key == keys.right_1) ||(key == keys.right_2)) { infocolumn++; addtopline(Type,infocolumn); } /*==========================================================================*/ /**************************** end of keyboard handling **********************/ /******************************** mouse handler *****************************/ #ifdef CURSES_MOUSE if (key == KEY_MOUSE) { MEVENT mouse; int done = 0; getmouse(&mouse); if (mouse.x<0 || mouse.y<0) /* should never happen, according to curses docs */ continue; /* copy to unsigned vars to avoid all kinds of signed/unsigned comparison unpleasantness below */ unsigned mouse_x = mouse.x; unsigned mouse_y = mouse.x; if (mouse.bstate == BUTTON1_CLICKED) { if ((mouse_y > 0) &&(mouse_y < maxy - 1)) { for (int i = cursor; i > 0; i--) { if (hyperobjects[i].line == mouse_y + pos - 1) { if (hyperobjects[i].col <= mouse_x - 1) { if (hyperobjects[i].col + strlen(hyperobjects[i].node) + strlen(hyperobjects[i].file) >= mouse_x - 1) { if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; done = 1; break; } } } } } if (!done) for (unsigned i = cursor; i < hyperobjectcount; i++) { if (hyperobjects[i].line == mouse_y + pos - 1) { if (hyperobjects[i].col <= mouse_x - 1) { if (hyperobjects[i].col + strlen(hyperobjects[i].node) + strlen(hyperobjects[i].file) >= mouse_x - 1) { if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; done = 1; break; } } } } } } /* end: if (mouse_y not on top/bottom line) */ else if (mouse_y == 0) ungetch(keys.up_1); else if (mouse_y == maxy - 1) ungetch(keys.down_1); } /* end: button clicked */ if (mouse.bstate == BUTTON1_DOUBLE_CLICKED) { if ((mouse_y > 0) &&(mouse_y < maxy - 1)) { for (int i = cursor; i >= 0; i--) { if (hyperobjects[i].line == mouse_y + pos - 1) { if (hyperobjects[i].col <= mouse_x - 1) { if (hyperobjects[i].col + strlen(hyperobjects[i].node) + strlen(hyperobjects[i].file) >= mouse_x - 1) { if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; done = 1; break; } } } } } if (!done) for (unsigned i = cursor; i < hyperobjectcount; i++) { if (hyperobjects[i].line == mouse_y + pos - 1) { if (hyperobjects[i].col <= mouse_x - 1) { if (hyperobjects[i].col + strlen(hyperobjects[i].node) + strlen(hyperobjects[i].file) >= mouse_x - 1) { if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; done = 1; break; } } } } } if (done) ungetch(keys.followlink_1); } /* end: if (mouse_y not on top/bottom line) */ else if (mouse_y == 0) ungetch(keys.pgup_1); else if (mouse_y == maxy - 1) ungetch(keys.pgdn_1); } /* end: button doubleclicked */ } #endif /* NCURSES_MOUSE */ /*****************************************************************************/ } if ((key == keys.quit_2) ||(key == keys.quit_1)) { if (!ConfirmQuit) break; else { if (yesno(_("Are you sure you want to quit?"), QuitConfirmDefault)) break; } } } aftersearch = 0; return rval; } void next_infomenu() { if (hyperobjectcount == 0) { infomenu = -1; return; } for (unsigned long i = infomenu + 1; i < hyperobjectcount; i++) { if (hyperobjects[i].type <= 1) /* menu item */ { infomenu = i; return; } } infomenu = -1; /* no menuitem left is found */ } void rescan_cursor() { for (unsigned long i = 0; i < hyperobjectcount; i++) { if ((hyperobjects[i].line >= pos) && (hyperobjects[i].line < pos +(maxy - 2))) { if (hyperobjects[i].type < HIGHLIGHT) { cursor = i; break; } } } } int getnodeoffset(int tag_table_pos, int *Indstart) /* count node offset in file */ { #define indirectstart (*Indstart) int i, fileoffset = 0; if (indirect) { for (i = IndirectEntries; i >= 1; i--) { if (indirect[i].offset <= tag_table[tag_table_pos].offset) { fileoffset +=(tag_table[tag_table_pos].offset - indirect[i].offset + FirstNodeOffset); indirectstart = i; break; } } } else { fileoffset +=(tag_table[tag_table_pos].offset - 2); } return fileoffset; #undef indirectstart } pinfo-0.6.13/src/mainfunction.h000066400000000000000000000037251343207050400163530ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __MAINFUNCTION_H #define __MAINFUNCTION_H /* * return value type for work(). it is the name of node, where to go, after * viewing of current node ends. (viewing always takes place inside of the * work() function */ typedef struct { char *node; /* name of node */ char *file; /* name of file, where the node is */ } WorkRVal; /* this determines whether we are in a position, found after search */ extern int aftersearch; /* * this is main function which handles almost all of the work (keyboard * actions while viewing info). Arguments: * message: a pointer to char** node content, stored line by line. * type: a pointer to char*, which holds the header of info node. * lines: pointer to a long, which holds the number of lines in node. * id: file descriptor of current info file * tag_table_pos: position in tag table of the current node (needed for history) */ WorkRVal work (char ***message, char **type, unsigned long *lines, FILE * id, int tag_table_pos); #endif pinfo-0.6.13/src/manual.c000066400000000000000000001444451343207050400151360ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #include #include #include #define HTTPSECTION 100 #define FTPSECTION 101 #define MAILSECTION 102 /* check if a char is a hyphen character */ int ishyphen(unsigned char ch); /* load manual */ void loadmanual(FILE * id); /* handle keyboard */ int manualwork(); void rescan_selected(); /* scan for potential link to select on viewed manual page */ /* self explanatory */ void showmanualscreen(); /* mvaddstr with bold/italic */ void mvaddstr_manual(int y, int x, char *str); /* adds highlights to a painted screen */ void add_highlights(); /* strips line from formatting characters */ void strip_manual(char *buf); /* * Initialize links in a line . Links are entries of form reference(section), * and are stored in `manuallinks' var, described bellow. */ void man_initializelinks(char *line, int carry); int is_in_manlinks(char *in, char *find); void printmanual(char **Message, long Lines); /* line by line stored manual */ char **manual = 0; /* number of lines in manual */ unsigned ManualLines = 0; int selected = -1; /* number of selected link(offset in 'manuallinks', bellow) */ unsigned manualpos = 0; /* number of the first line, which is painted on screen */ unsigned manualcol = 0; /* the first displayed column of manpage-- for moving the screen left/right */ int manual_aftersearch = 0; /* this is set if man page is now after search operation */ int manwidthChanged = 0; /* this flag indicates whether the env variable $MANWIDTH was changed by pinfo */ typedef struct { /* name of a manual */ char name[128]; /* section */ char sect[32]; /* what was last selected on this page */ int selected; /* what was the last manualpos */ int pos; } manhistory; /* * type for the `lastread' history entries, when viewing * man pages. */ /* manual lastread history */ manhistory *manualhistory = 0; /* length of the above table - 1 */ int manualhistorylength = 0; /* this structure describes a hyperlink in manual viewer */ typedef struct { /* struct for hypertext references */ unsigned int line; /* line of the manpage, where the reference is */ /* column of that line */ unsigned int col; /* name of the reference */ char *name; /* section of the reference */ char section[32]; int section_mark; /* determine whether there is a hyphen above */ int carry; } manuallink; /* a set of manual references of man page */ manuallink *manuallinks = 0; /* number of found manual references in man page */ unsigned ManualLinks = 0; /* semaphore for checking if it's a history(left arrow) call */ int historical = 0; void /* free buffers allocated by current man page */ manual_free_buffers() { unsigned int i; /* first free previously allocated memory */ /* for the manual itself... */ if (manual) { for (i = 0; i <= ManualLines; i++) { xfree(manual[i]); } xfree(manual); manual = 0; ManualLines = 0; } /* ...and for the list of manual hypertext */ if (manuallinks) { /* links */ for (i = 0; i < ManualLinks; i++) { xfree(manuallinks[i].name); } xfree(manuallinks); manuallinks = 0; ManualLinks = 0; selected = -1; } } /* initialize history variables for manual pages. */ void set_initial_history(char *name) { int len = strlen(name), i; char *name1 = strdup(name); /* one object of array */ manualhistory = xmalloc(sizeof(manhistory)); /* filter trailing spaces */ while ((len > 1) &&(isspace(name1[len - 1]))) { name1[len - 1] = 0; len--; } i = len; /* find the beginning of the last token */ for (i = len - 1;(i > 0) &&(!isspace(name1[i])); i--); /* if we've found space, then we move to the first nonspace character */ if (i > 0) i++; /* filename->name */ strcpy(manualhistory[0].name, &name1[i]); /* It is essential to know the section name, as otherwise links in the * man page to the same name but different section would be ignored - * see man_initializelinks. An example is sleep(1) which has link to * sleep(3). So we try to find the section directly from man. */ if (manualhistory[0].sect[0] == 0) { char buf[1024]; char *str, *lastSlash, *lastButOneSlash; FILE *pathFile; snprintf(buf, sizeof(buf), "man -w -W %s %s", ManOptions, name); pathFile = popen(buf, "r"); if (fgets(buf, sizeof(buf), pathFile)==NULL) { fprintf(stderr, "Error executing command '%s'\n", buf); exit(1); } pclose(pathFile); /* buf will be of the form "/usr/share/man/man1/sleep.1.gz". We * find the section from the leaf directory "/man1" */ for (str = buf, lastSlash = str, lastButOneSlash = 0; *str; ++str) { if (*str == '/') { lastButOneSlash = lastSlash; lastSlash = str; } } if (lastButOneSlash) { *lastSlash = 0; /* terminate the section */ lastButOneSlash += 4; /* skip "/man", and land on the section */ strncpy(manualhistory[0].sect, lastButOneSlash, sizeof(manualhistory[0].sect)-1); } } /* selected unknown */ manualhistory[0].selected = -1; /* pos=0 */ manualhistory[0].pos = 0; free(name1); } /* construct man name; take care about carry */ void construct_manualname(char *buf, int which) { if (!manuallinks[which].carry) { /* workaround for names starting with '(' */ if (manuallinks[which].name[0] == '(') strcpy(buf, manuallinks[which].name + 1); else strcpy(buf, manuallinks[which].name); return; } else { /* normal manual reference */ if (manuallinks[which].section_mark < HTTPSECTION) { char *base = xmalloc(1024); char *ptr; int tmppos; strncpy(base, manual[manuallinks[which].line - 1],1023); strip_manual(base); ptr = base + strlen(base) - 3; while (((isalpha(*ptr)) ||(*ptr == '.') ||(*ptr == '_')) &&(ptr > base)) ptr--; /* workaround for man pages with leading '(' see svgalib man pages */ if (*ptr == '(') ptr++; strcpy(buf, ptr); tmppos = strlen(buf); if (tmppos > 1) buf[tmppos - 2] = 0; strcat(buf, manuallinks[which].name); xfree(base); } /* url reference */ else { char *base = xmalloc(1024); char *ptr, *eptr; int namelen = strlen(manuallinks[which].name); strcpy(base, manual[manuallinks[which].line + 1]); strip_manual(base); ptr = base; /* skip whitespace */ while (isspace(*ptr)) ptr++; eptr = findurlend(ptr); *eptr = 0; strcpy(buf, manuallinks[which].name); /* cut the hyphen */ buf[namelen - 1] = 0; strcat(buf, ptr); xfree(base); } } } /* this is something like main() function for the manual viewer code. */ int handlemanual(char *name) { int return_value = 0; struct stat statbuf; FILE *id; char manualname[256]; char cmd[4096]; char *raw_tempfilename = 0; char *apropos_tempfilename = 0; if (tmpfilename1) { unlink(tmpfilename1); xfree(tmpfilename1); } tmpfilename1 = make_tempfile(); #ifdef getmaxyx init_curses(); /* if ncurses, get maxx and maxy */ getmaxyx(stdscr, maxy, maxx); myendwin(); if ((!getenv("MANWIDTH")) ||(manwidthChanged)) { /* set MANWIDTH environment variable */ static char tmp[24]; snprintf(tmp, 24, "MANWIDTH=%d", maxx); putenv(tmp); manwidthChanged = 1; } #else /* otherwise hardcode 80x25... */ maxx = 80; maxy = 25; #endif /* getmaxyx */ #ifdef NIETS /**************************************************************************** * Ignore macros part: BEGIN * * PS: Siewca: I still expect that you'll isolate it to a single procedure * * Description(by PB): This code opens a manpage file, and filters it from * * dangerous macros. The output is put into a temporary file, which is then * * used as the `name' filename argument of this(handlemanual) procedure. * * There is a stored variable raw_tempfilename to allow unlinking this temp * * file after usage * ****************************************************************************/ FILE *source; char **ignored_entries; char location[256]; char line[1025]; char *end, *prev; size_t macroline_size; int ignored_items = 0, i = 0; char zipped = 0; /* if the pointer is non-null */ if (ignoredmacros) /* if there are some macros */ if (*ignoredmacros && strlen(ignoredmacros)) { /* that should be ignored */ *location = '\0'; /* we need to know the path */ snprintf(cmd, 255, "man -W %s %s", ManOptions, name); id = popen(cmd, "r"); if (!id) { printf(_("Error: Cannot call man command.\n")); return 1; } fflush(id); fgets(location, 255, id); pclose(id); if (*location == '\0') { printf(_("Error: No manual page found either.\n")); if (use_apropos) { printf(_("Apropos pages:\n")); snprintf(cmd, 255, "apropos %s|cat %s", name, StderrRedirection); xsystem(cmd); } return 1; } ignored_items++; prev = ignoredmacros; /* counting items */ while ((end = strchr(prev, ':'))) { ignored_items++; prev = end + 1; } ignored_entries =(char **) xmalloc(ignored_items * sizeof(char **)); ignored_entries[0] = ignoredmacros; prev = ignoredmacros; i = 0; /* creating pointers */ while ((end = strchr(prev, ':'))) { *end = '\0'; prev = end + 1; i++; ignored_entries[i] = prev; } /* removing newline */ if ((prev = rindex(location, '\n'))) *prev = '\0'; /* checking if it's compressed */ prev = index(location, '\0'); if ((strlen(location)) > 3 &&((*(prev - 1) == 'Z' && *(prev - 2) == '.') ||(*(prev - 1) == 'z' && *(prev - 2) == 'g' && *(prev - 3) == '.') ) ) { if (verbose) printf("%s %s\n", _("Calling gunzip for"), location); snprintf(cmd, 255, "gunzip -c %s", location); source = popen(cmd, "r"); zipped = 1; if (!source) { printf(_("Couldn't call gunzip.\n")); return 1; } } else /* from cmd output */ source = fopen(location, "r"); name = make_tempfile(); raw_tempfilename = name; id = fopen(name, "w"); /* we read until eof */ while (!feof(source)) { if (fgets(line, 1024, source) == NULL) line[0] = '\0'; /* macro starts with a dot*/ if (line[0] != '.' ||(strlen(line)) <(size_t) 2) { fprintf(id, "%s", line); continue; } else while (i >= 0) { macroline_size = strlen(ignored_entries[i]); if (strlen(line + 1) < macroline_size) macroline_size = strlen(line + 1); if ((strncmp(ignored_entries[i], line + 1, macroline_size)) == 0 &&(*(line + 1 +(int) macroline_size) == ' ' || *(line + 1 +(int) macroline_size) == '\n' || *(line + 1 +(int) macroline_size) == '\t')) { if (quote_ignored) { if ((prev = rindex(line, '\n'))) *prev = '\0'; sprintf(cmd, "\n.br\n.nf\n[ [pinfo] - %s: %.42s", _("IGNORING"), line); if ((strlen(line)) >(size_t) 42) strcat(cmd, "(...)]\n.fi\n"); else strcat(cmd, " ]\n.fi\n"); } else { sprintf(cmd, ".\\\" removed macro: %.42s", line); if ((strlen(line)) >(size_t) 42) strcat(cmd, "(...)"); } strcpy(line, cmd); break; } i--; } fprintf(id, "%s", line); i = ignored_items - 1; } /* while (!feof(source)) */ if (zipped) pclose(source); else fclose(source); fclose(id); free(ignored_entries); } /* if (ignored_macros... */ /**************************************************************************** * Ignore macros part: END * ****************************************************************************/ #endif if (!plain_apropos) { snprintf(cmd, 255, "man %s %s %s > %s", ManOptions, name, StderrRedirection, tmpfilename1); } if (plain_apropos || (system_check(cmd) != 0)) { if (!plain_apropos) { unlink(tmpfilename1); printf(_("Error: No manual page found\n")); } plain_apropos = 0; if (use_apropos) { printf(_("Calling apropos \n")); apropos_tempfilename = make_tempfile(); snprintf(cmd, 4096, "apropos %s > %s", name, apropos_tempfilename); if (system_check(cmd) != 0) { printf(_("Nothing appropriate\n")); unlink(apropos_tempfilename); return 1; } id = fopen(apropos_tempfilename, "r"); } else return 1; } else id = fopen(tmpfilename1, "r"); init_curses(); set_initial_history(name); /* load manual to memory */ loadmanual(id); fclose(id); do { /* manualwork handles all actions when viewing man page */ return_value = manualwork(); #ifdef getmaxyx /* if ncurses, get maxx and maxy */ getmaxyx(stdscr, maxy, maxx); if ((!getenv("MANWIDTH")) ||(manwidthChanged)) { /* set MANWIDTH environment variable */ static char tmp[24]; snprintf(tmp, 24, "MANWIDTH=%d", maxx); putenv(tmp); manwidthChanged = 1; } #endif manual_aftersearch = 0; /* -1 is quit key */ if (return_value != -1) { if (tmpfilename2) { unlink(tmpfilename2); xfree(tmpfilename2); } tmpfilename2 = make_tempfile(); /* * key_back is not pressed; and return_value is an offset to * manuallinks */ if (return_value != -2) { construct_manualname(manualname, return_value); snprintf(cmd, 4096, "man %s %s %s %s > %s", ManOptions, manuallinks[return_value].section, manualname, StderrRedirection, tmpfilename2); } else /* key_back was pressed */ { manualhistorylength--; if (manualhistorylength == 0 && apropos_tempfilename) { id = fopen(apropos_tempfilename, "r"); loadmanual(id); fclose(id); continue; } if (manualhistory[manualhistorylength].sect[0] == 0) snprintf(cmd, 255, "man %s %s %s > %s", ManOptions, manualhistory[manualhistorylength].name, StderrRedirection, tmpfilename2); else snprintf(cmd, 255, "man %s %s %s %s > %s", ManOptions, manualhistory[manualhistorylength].sect, manualhistory[manualhistorylength].name, StderrRedirection, tmpfilename2); /* * flag to make sure, that * manualwork will refresh the variables manualpos and selected * when going back to this page */ historical = 1; } xsystem(cmd); stat(tmpfilename2, &statbuf); if (statbuf.st_size > 0) { snprintf(cmd, 255, "mv %s %s", tmpfilename2, tmpfilename1); /* create tmp file containing man page */ xsystem(cmd); /* open man page */ id = fopen(tmpfilename1, "r"); if (id != NULL) { /* now we create history entry for new page */ if (!historical) { manualhistorylength++; manualhistory = xrealloc(manualhistory,(manualhistorylength + 2) * sizeof(manhistory)); /* * we can write so since this code applies * only when it's not a history call */ strcpy(manualhistory[manualhistorylength].name, manualname); strcpy(manualhistory[manualhistorylength].sect, manuallinks[return_value].section); } /* loading manual page and its defaults... */ loadmanual(id); fclose(id); /* continuing with creation of history */ if (!historical) { manualhistory[manualhistorylength].pos = manualpos; manualhistory[manualhistorylength].selected = selected; } else historical = 0; } else return_value = -1; } } } while (return_value != -1); if (apropos_tempfilename) unlink(apropos_tempfilename); /* we were using temporary */ if (raw_tempfilename) unlink(raw_tempfilename); /* raw-manpage for scaning */ return 0; } void /* loads manual from given filedescriptor */ loadmanual(FILE * id) { char prevlinechar = 0; /* tmp variable, set after reading first nonempty line of input */ int cutheader = 0; int carryflag = 0; manualpos = 0; manual_free_buffers(); manual = xmalloc(sizeof(char *)); manuallinks = xmalloc(sizeof(manuallinks)); manual[ManualLines] = xmalloc(1024); /* we read until eof */ while (!feof(id)) { char *tmp; /* * it happens sometimes, that the last line is weird * and causes sigsegvs by not entering anything to buffer, what * confuses strlen */ if (fgets(manual[ManualLines], 1024, id) == NULL) manual[ManualLines][0] = 0; if (cutheader) { if (strcmp(manual[cutheader], manual[ManualLines]) == 0) { manual[ManualLines][0] = '\n'; manual[ManualLines][1] = 0; } } if (FilterB7) { char *filter_pos = index(manual[ManualLines], 0xb7); if (filter_pos) *filter_pos = 'o'; } if (CutManHeaders) if (!cutheader) { if (strlen(manual[ManualLines]) > 1) { cutheader = ManualLines; } } if ((CutEmptyManLines) &&((manual[ManualLines][0]) == '\n') && (prevlinechar == '\n')) ; /* do nothing :)) */ else { int manlinelen = strlen(manual[ManualLines]); manual[ManualLines] = xrealloc(manual[ManualLines], manlinelen + 10); /* temporary variable for determining hypertextuality of fields */ tmp = xmalloc(manlinelen + 10); strcpy(tmp, manual[ManualLines]); /* remove formatting chars */ strip_manual(tmp); man_initializelinks(tmp, carryflag); carryflag = 0; if (manlinelen > 1) if (ishyphen(manual[ManualLines][manlinelen - 2])) carryflag = 1; /* free temporary buffer */ xfree(tmp); prevlinechar = manual[ManualLines][0]; /* increase the number of man lines */ ManualLines++; /* * and realloc manual to add an empty space for * next entry of manual line */ manual = xrealloc(manual,(ManualLines + 5) * sizeof(char *)); manual[ManualLines] = xmalloc(1024); } } } int compare_manuallink(const void *a, const void *b) { return ((manuallink *) a)->col -((manuallink *) b)->col; } void sort_manuallinks_from_current_line(long startlink, long endlink) { qsort(manuallinks + startlink, endlink - startlink, sizeof(manuallink), compare_manuallink); } /* initializes hyperlinks in manual */ void man_initializelinks(char *tmp, int carry) { /* set tmpcnt to the trailing zero of tmp */ int tmpcnt = strlen(tmp) + 1; char *mylink = tmp; char *urlstart, *urlend; unsigned initialManualLinks = ManualLinks; int i, b; /****************************************************************************** * handle url refrences * *****************************************************************************/ urlend = tmp; while ((urlstart = strstr(urlend, "http://")) != NULL) { /* always successfull */ urlend = findurlend(urlstart); manuallinks = xrealloc(manuallinks, sizeof(manuallink) *(ManualLinks + 3)); manuallinks[ManualLinks].line = ManualLines; manuallinks[ManualLinks].col = width_of_string(tmp, urlstart - tmp); strcpy(manuallinks[ManualLinks].section, "HTTPSECTION"); manuallinks[ManualLinks].section_mark = HTTPSECTION; manuallinks[ManualLinks].name = xmalloc(urlend - urlstart + 10); strncpy(manuallinks[ManualLinks].name, urlstart, urlend - urlstart); manuallinks[ManualLinks].name[urlend - urlstart] = 0; if (ishyphen(manuallinks[ManualLinks].name[urlend - urlstart - 1])) manuallinks[ManualLinks].carry = 1; else manuallinks[ManualLinks].carry = 0; ManualLinks++; } urlend = tmp; while ((urlstart = strstr(urlend, "ftp://")) != NULL) { /* always successfull */ urlend = findurlend(urlstart); manuallinks = xrealloc(manuallinks, sizeof(manuallink) *(ManualLinks + 3)); manuallinks[ManualLinks].line = ManualLines; manuallinks[ManualLinks].col = width_of_string(tmp, urlstart - tmp); strcpy(manuallinks[ManualLinks].section, "FTPSECTION"); manuallinks[ManualLinks].section_mark = FTPSECTION; manuallinks[ManualLinks].name = xmalloc(urlend - urlstart + 10); strncpy(manuallinks[ManualLinks].name, urlstart, urlend - urlstart); manuallinks[ManualLinks].name[urlend - urlstart] = 0; if (ishyphen(manuallinks[ManualLinks].name[urlend - urlstart - 1])) manuallinks[ManualLinks].carry = 1; else manuallinks[ManualLinks].carry = 0; ManualLinks++; } urlend = tmp; while ((urlstart = findemailstart(urlend)) != NULL) { /* always successfull */ urlend = findurlend(urlstart); manuallinks = xrealloc(manuallinks, sizeof(manuallink) *(ManualLinks + 3)); manuallinks[ManualLinks].line = ManualLines; manuallinks[ManualLinks].col = width_of_string(tmp, urlstart - tmp); strcpy(manuallinks[ManualLinks].section, "MAILSECTION"); manuallinks[ManualLinks].section_mark = MAILSECTION; manuallinks[ManualLinks].name = xmalloc(urlend - urlstart + 10); strncpy(manuallinks[ManualLinks].name, urlstart, urlend - urlstart); manuallinks[ManualLinks].name[urlend - urlstart] = 0; if (ishyphen(manuallinks[ManualLinks].name[urlend - urlstart - 1])) manuallinks[ManualLinks].carry = 1; else manuallinks[ManualLinks].carry = 0; /* there should be a dot in e-mail domain */ if (strchr(manuallinks[ManualLinks].name, '.') != NULL) ManualLinks++; } /****************************************************************************** * handle normal manual refrences -- reference(section) * ******************************************************************************/ do { /* we look for '(', since manual link */ mylink = strchr(mylink, '('); /* has form of 'blah(x)' */ if (mylink != NULL) { char *temp; /* look for the closing bracket */ if ((temp = strchr(mylink, ')'))) { char *p_t1, *p_t; p_t = p_t1 = xmalloc((strlen(mylink) + 10) * sizeof(char)); for (++mylink; mylink != temp; *p_t++ = *mylink++); *p_t = '\0'; mylink -=(strlen(p_t1) + sizeof(char)); if ((!strchr(p_t1, '(')) &&(!is_in_manlinks(manlinks, p_t1))) { char tempchar; int breakpos, cols_before_link; i = mylink - tmp - 1; if (i < 0) i++; for (; i > 0; --i) { if (!isspace(tmp[i])) /* ignore spaces between linkname and '(x)' */ break; } /* we'll put zero on the last non-textual character of link */ breakpos = i + 1; /* but remember the cleared char for the future */ tempchar = tmp[breakpos]; tmp[breakpos] = 0; /* * scan to the first space sign or to 0 -- that means go to * the beginning of the scanned token */ for (i = breakpos; i > 0; --i) { if (isspace(tmp[i])) { i++; break; } } /* now we have needed string in i..breakpos. We need now to * realloc the * manuallinks table to make free space for new entry */ /* calculate the number of columns in front of the link */ cols_before_link = width_of_string(tmp, i-1); /* a small check */ if (!((use_apropos) &&(manualhistorylength == 0))) { /* * In English: if the name of the link is the name of * the current page and the section of the link is the * current section or if we don't know the current * section, then... */ if ((!strcasecmp(&tmp[i], manualhistory[manualhistorylength].name)) &&((!strcasecmp(p_t1, manualhistory[manualhistorylength].sect)) ||(manualhistory[manualhistorylength].sect[0] == 0) ||(!strcmp(manualhistory[manualhistorylength].sect, " ")))) break; } manuallinks = xrealloc(manuallinks, sizeof(manuallink) *(ManualLinks + 3)); manuallinks[ManualLinks].line = ManualLines; manuallinks[ManualLinks].col = cols_before_link + 1; if (LongManualLinks) { for (b = 1; mylink[b] != ')'; b++) manuallinks[ManualLinks].section[b - 1] = tolower(mylink[b]); manuallinks[ManualLinks].section[b - 1] = 0; } else { manuallinks[ManualLinks].section[0] = mylink[1]; manuallinks[ManualLinks].section[1] = 0; } manuallinks[ManualLinks].section_mark = 0; manuallinks[ManualLinks].name = xmalloc((breakpos - i) + 10); strcpy(manuallinks[ManualLinks].name, tmp + i); tmp[breakpos] = tempchar; /* check whether this is a carry'ed entry(i.e. in the * previous line there was `-' at end, and this is the * first word of this line */ for (b = i - 1; b >= 0; b--) { if (b > 0) if (!isspace(tmp[b])) break; } if (b >= 0) manuallinks[ManualLinks].carry = 0; else manuallinks[ManualLinks].carry = carry; /* increase the number of entries */ ManualLinks++; } /*... if (in man links) */ xfree((void *) p_t1); } } if (mylink) mylink++; if (mylink >(tmp + tmpcnt)) { break; } } /* do this line until strchr() won't find a '(' in string */ while (mylink != NULL); if (initialManualLinks != ManualLinks) sort_manuallinks_from_current_line(initialManualLinks, ManualLinks); } /* viewer function. Handles keyboard actions--main event loop */ int manualwork() { /* for user's shell commands */ FILE *mypipe; /* a temporary buffer */ char *token; /* key, which contains the value entered by user */ int key = 0; /* tmp values */ int selectedchanged; int statusline = FREE; #ifdef getmaxyx /* if ncurses, get maxx and maxy */ getmaxyx(stdscr, maxy, maxx); if ((!getenv("MANWIDTH")) ||(manwidthChanged)) { /* set MANWIDTH environment variable */ static char tmp[24]; snprintf(tmp, 24, "MANWIDTH=%d", maxx); putenv(tmp); manwidthChanged = 1; } #else maxx = 80; /* otherwise hardcode 80x25... */ maxy = 25; #endif /* getmaxyx */ /* get manualpos from history. it is set in handlemanual() */ manualpos = manualhistory[manualhistorylength].pos; /* if there was a valid selected entry, apply it */ if (manualhistory[manualhistorylength].selected != -1) selected = manualhistory[manualhistorylength].selected; else /* otherwise scan for selected on currently viewed page */ rescan_selected(); /* clean screen */ erase(); /* user events loop. finish when key_quit */ while (1) { /* make getch not wait for user */ nodelay(stdscr, TRUE); /* action -- return ERR */ key = pinfo_getch(); /* if there was nothing in buffer */ if (key == ERR) { /* then show screen */ if (statusline == FREE) showmanualscreen(); wrefresh(stdscr); waitforgetch(); key = pinfo_getch(); } nodelay(stdscr, FALSE); statusline = FREE; if (winchanged) { handlewinch(); winchanged = 0; key = pinfo_getch(); } /************************ keyboard handling **********************************/ if (key > 0) { if ((key == keys.print_1) || (key == keys.print_2)) { if (yesno(_("Are you sure you want to print?"), 0)) printmanual(manual, ManualLines); } /*====================================================*/ if ((key == keys.goto_1) || (key == keys.goto_2)) { manuallinks = xrealloc(manuallinks,(ManualLinks + 1) *(sizeof(manuallink) + 3)); /* get user's value */ attrset(bottomline); move(maxy - 1, 0); echo(); curs_set(1); manuallinks[ManualLinks].name = getstring(_("Enter manual name: ")); curs_set(0); noecho(); move(maxy - 1, 0); #ifdef HAVE_DECL_BKGDSET bkgdset(' ' | bottomline); clrtoeol(); bkgdset(0); #else myclrtoeol(); #endif attrset(normal); manuallinks[ManualLinks].carry = 0; manuallinks[ManualLinks].section_mark = 0; strcpy(manuallinks[ManualLinks].section, " "); manuallinks[ManualLinks].line = -1; manuallinks[ManualLinks].col = -1; ManualLinks++; return ManualLinks - 1; } /*====================================================*/ if ((key == keys.goline_1) || (key == keys.goline_2)) { long newpos; /* get user's value */ attrset(bottomline); move(maxy - 1, 0); echo(); curs_set(1); token = getstring(_("Enter line: ")); curs_set(0); noecho(); move(maxy - 1, 0); #ifdef HAVE_DECL_BKGDSET bkgdset(' ' | bottomline); clrtoeol(); bkgdset(0); #else myclrtoeol(); #endif attrset(normal); /* convert string to long. careful with nondigit strings. */ if (token) { int digit_val = 1; for (unsigned i = 0; token[i] != 0; i++) { if (!isdigit(token[i])) digit_val = 0; } /* move cursor position */ if (digit_val) { newpos = atol(token); newpos -=(maxy - 1); if ((newpos >= 0) && ((unsigned long) newpos < ManualLines - (maxy - 2))) manualpos = newpos; else if (newpos > 0) manualpos = ManualLines -(maxy - 2); else manualpos = 0; } xfree(token); token = 0; } } /*=====================================================*/ if ((key == keys.shellfeed_1) || (key == keys.shellfeed_2)) { /* get command name */ curs_set(1); attrset(bottomline); move(maxy - 1, 0); echo(); /* get users cmd */ token = getstring(_("Enter command: ")); noecho(); move(maxy - 1, 0); #ifdef HAVE_DECL_BKGDSET bkgdset(' ' | bottomline); clrtoeol(); bkgdset(0); #else myclrtoeol(); #endif attrset(normal); myendwin(); xsystem("clear"); /* open mypipe */ mypipe = popen(token, "w"); if (mypipe != NULL) { /* and flush the msg to stdin */ for (unsigned i = 0; i < ManualLines; i++) fprintf(mypipe, "%s", manual[i]); pclose(mypipe); } getchar(); doupdate(); curs_set(0); } /*=====================================================*/ if ((key == keys.refresh_1) || (key == keys.refresh_2)) { myendwin(); doupdate(); refresh(); curs_set(0); } /*=====================================================*/ /* search in current node */ if ((key == keys.search_1) || (key == keys.search_2)) { int success = 0; /* procedure of getting regexp string */ move(maxy - 1, 0); attrset(bottomline); echo(); curs_set(1); /* * searchagain handler. see keys.totalsearch at mainfunction.c * for comments */ if (!searchagain.search) { token = getstring(_("Enter regular expression: ")); strcpy(searchagain.lastsearch, token); searchagain.type = key; } else { token = xmalloc(strlen(searchagain.lastsearch) + 1); strcpy(token, searchagain.lastsearch); searchagain.search = 0; } /* end of searchagain handler */ if (strlen(token) == 0) { xfree(token); goto skip_search; } curs_set(0); noecho(); move(maxy - 1, 0); #ifdef HAVE_DECL_BKGDSET bkgdset(' ' | bottomline); clrtoeol(); bkgdset(0); #else myclrtoeol(); #endif attrset(normal); /* compile regexp expression */ if (pinfo_re_comp(token) != 0) { /* We're not in a search! */ aftersearch = 0; /* print error message */ attrset(bottomline); mymvhline(maxy - 1, 0, ' ', maxx); move(maxy - 1, 0); printw(_("Invalid regular expression;")); printw(" "); printw(_("Press any key to continue...")); getch(); goto skip_search; } /* and search for it in all subsequential lines */ for (unsigned i = manualpos + 1; i < ManualLines - 1; i++) { char *tmp; tmp = xmalloc(strlen(manual[i]) + strlen(manual[i + 1]) + 10); /* * glue two following lines together, to find expres- sions * split up into two lines */ strcpy(tmp, manual[i]); strcat(tmp, manual[i + 1]); strip_manual(tmp); /* execute search */ if (pinfo_re_exec(tmp)) { /* if found, enter here... */ success = 1; strcpy(tmp, manual[i + 1]); strip_manual(tmp); /* * if it was found in the second line of the glued * expression. */ if (pinfo_re_exec(tmp)) manualpos = i + 1; else manualpos = i; xfree(tmp); break; } xfree(tmp); } xfree(token); rescan_selected(); if (!success) { attrset(bottomline); mvaddstr(maxy - 1, 0, _("Search string not found...")); statusline = LOCKED; } manual_aftersearch = 1; } /*=====================================================*/ /* search again */ /* see mainfunction.c for comments */ if ((key == keys.search_again_1) || (key == keys.search_again_2)) { if (searchagain.type != 0) { searchagain.search = 1; ungetch(searchagain.type); } } skip_search: /*=====================================================*/ if ((key == keys.twoup_1) || (key == keys.twoup_2)) { ungetch(keys.up_1); ungetch(keys.up_1); } /*=====================================================*/ if ((key == keys.up_1) || (key == keys.up_2)) { selectedchanged = 0; /* if there are links at all */ if (selected != -1) { /* if one is selected */ if (selected > 0) /* * scan for a next visible one, which is above the * current. */ for (int i = selected - 1; i >= 0; i--) { if ((manuallinks[i].line >= manualpos) && (manuallinks[i].line < manualpos +(maxy - 1))) { selected = i; selectedchanged = 1; break; } } } /* if new link not found */ if (!selectedchanged) { /* move one position up */ if (manualpos >= 1) manualpos--; /* and scan for selected again :) */ for (unsigned i = 0; i < ManualLinks; i++) { if (manuallinks[i].line == manualpos) { selected = i; break; } } } } /*=====================================================*/ if ((key == keys.end_1) || (key == keys.end_2)) { if (ManualLines < maxy - 1) manualpos = 0; else manualpos = ManualLines -(maxy - 1); selected = ManualLinks - 1; } /*=====================================================*/ if ((key == keys.nextnode_1) || (key == keys.nextnode_2)) { for (unsigned i = manualpos + 1; i < ManualLines; i++) { if (manual[i][1] == 8) { manualpos = i; break; } } } /*=====================================================*/ if ((key == keys.prevnode_1) || (key == keys.prevnode_2)) { for (unsigned i = manualpos - 1; i > 0; i--) { if (manual[i][1] == 8) { manualpos = i; break; } } } /*=====================================================*/ if ((key == keys.pgdn_1) || (key == keys.pgdn_2)) { if (manualpos +(maxy - 2) < ManualLines -(maxy - 1)) { manualpos +=(maxy - 2); rescan_selected(); } else if (ManualLines -(maxy - 1) >= 1) { manualpos = ManualLines -(maxy - 1); selected = ManualLinks - 1; } else { manualpos = 0; selected = ManualLinks - 1; } } /*=====================================================*/ if ((key == keys.home_1) || (key == keys.home_2)) { manualpos = 0; rescan_selected(); } /*=====================================================*/ if ((key == keys.pgup_1) | (key == keys.pgup_2)) { if (manualpos >(maxy - 1)) manualpos -=(maxy - 1); else manualpos = 0; rescan_selected(); } /*=====================================================*/ /* top+bottom line \|/ */ /* see keys.up for comments */ if ((key == keys.twodown_1) || (key == keys.twodown_2)) { ungetch(keys.down_1); ungetch(keys.down_1); } /*=====================================================*/ /* top+bottom line \|/ */ /* see keys.up for comments */ if ((key == keys.down_1) || (key == keys.down_2)) { selectedchanged = 0; for (unsigned i = selected + 1; i < ManualLinks; i++) { if ((manuallinks[i].line >= manualpos) && (manuallinks[i].line < manualpos +(maxy - 2))) { selected = i; selectedchanged = 1; break; } } if (!selectedchanged) { if (manualpos < ManualLines -(maxy - 1)) manualpos++; for (unsigned i = selected + 1; i < ManualLinks; i++) { if ((manuallinks[i].line >= manualpos) && (manuallinks[i].line < manualpos +(maxy - 2))) { selected = i; selectedchanged = 1; break; } } } } /*=====================================================*/ if ((key == keys.back_1) || (key == keys.back_2)) { if (manualhistorylength) return -2; } /*=====================================================*/ if ((key == keys.followlink_1) || (key == keys.followlink_2)) { manualhistory[manualhistorylength].pos = manualpos; manualhistory[manualhistorylength].selected = selected; if (selected >= 0) if ((manuallinks[selected].line >= manualpos) && (manuallinks[selected].line < manualpos +(maxy - 1))) { if (!strncmp(manuallinks[selected].section, "HTTPSECTION", 11)) { int buflen; char *tempbuf = xmalloc(1024); strcpy(tempbuf, httpviewer); strcat(tempbuf, " "); buflen = strlen(tempbuf); construct_manualname(tempbuf + buflen, selected); myendwin(); xsystem(tempbuf); doupdate(); xfree(tempbuf); } else if (!strncmp(manuallinks[selected].section, "FTPSECTION", 10)) { int buflen; char *tempbuf = xmalloc(1024); strcpy(tempbuf, ftpviewer); strcat(tempbuf, " "); buflen = strlen(tempbuf); construct_manualname(tempbuf + buflen, selected); myendwin(); xsystem(tempbuf); doupdate(); xfree(tempbuf); } else if (!strncmp(manuallinks[selected].section, "MAILSECTION", 11)) { int buflen; char *tempbuf = xmalloc(1024); strcpy(tempbuf, maileditor); strcat(tempbuf, " "); buflen = strlen(tempbuf); construct_manualname(tempbuf + buflen, selected); myendwin(); xsystem(tempbuf); doupdate(); xfree(tempbuf); } else { return selected; } } } /*=====================================================*/ if ((key==keys.left_1)||(key==keys.left_2)) if (manualcol>0) manualcol--; if ((key==keys.right_1)||(key==keys.right_2)) manualcol++; /*=====================================================*/ /********* end of keyboard handling *********************/ /********* mouse handler ********************************/ #ifdef CURSES_MOUSE if (key == KEY_MOUSE) { MEVENT mouse; int done = 0; getmouse(&mouse); if (mouse.x<0 || mouse.y<0) /* should never happen, according to curses docs */ continue; /* copy to unsigned vars to avoid all kinds of signed/unsigned comparison unpleasantness below */ unsigned mouse_x = mouse.x; unsigned mouse_y = mouse.x; if (mouse.bstate == BUTTON1_CLICKED) { if ((mouse_y > 0) &&(mouse_y < maxy - 1)) { for (int i = selected; i >= 0; i--) { if (manuallinks[i].line == mouse_y + manualpos - 1) { if (manuallinks[i].col <= mouse_x - 1) { if (manuallinks[i].col + strlen(manuallinks[i].name) >= mouse_x - 1) { selected = i; done = 1; break; } } } } if (!done) for (unsigned i = selected; i < ManualLinks; i++) { if (manuallinks[i].line == mouse_y + manualpos - 1) { if (manuallinks[i].col <= mouse_x - 1) { if (manuallinks[i].col + strlen(manuallinks[i].name) >= mouse_x - 1) { selected = i; done = 1; break; } } } } } /* end: mouse not on top/bottom line */ if (mouse_y == 0) ungetch(keys.up_1); if (mouse_y == maxy - 1) ungetch(keys.down_1); } /* end: button_clicked */ if (mouse.bstate == BUTTON1_DOUBLE_CLICKED) { if ((mouse_y > 0) &&(mouse_y < maxy - 1)) { for (int i = selected; i >= 0; i--) { if (manuallinks[i].line == mouse_y + manualpos - 1) { if (manuallinks[i].col <= mouse_x - 1) { if (manuallinks[i].col + strlen(manuallinks[i].name) >= mouse_x - 1) { selected = i; done = 1; break; } } } } if (!done) for (unsigned i = selected; i < ManualLinks; i++) { if (manuallinks[i].line == mouse_y + manualpos - 1) { if (manuallinks[i].col <= mouse_x - 1) { if (manuallinks[i].col + strlen(manuallinks[i].name) >= mouse_x - 1) { selected = i; done = 1; break; } } } } if (done) ungetch(keys.followlink_1); } /* end: mouse not at top/bottom line */ if (mouse_y == 0) ungetch(keys.pgup_1); if (mouse_y == maxy - 1) ungetch(keys.pgdn_1); } /* end: button doubleclicked */ } #endif /* CURSES_MOUSE */ /*****************************************************************************/ } if ((key == keys.quit_2) ||(key == keys.quit_1)) { if (!ConfirmQuit) break; else { if (yesno(_("Are you sure you want to quit?"), QuitConfirmDefault)) break; } } } closeprogram(); return -1; } void /* scan for some hyperlink, available on current screen */ rescan_selected() { for (unsigned i = 0; i < ManualLinks; i++) { if ((manuallinks[i].line >= manualpos) && (manuallinks[i].line < manualpos +(maxy - 1))) { selected = i; break; } } } /* * calculate from which to start displaying of manual line *man. Skip `mancol' * columns. But remember, that *man contains also nonprinteble characters for * boldface etc. */ char *getmancolumn(char *man, int mancol) { if (mancol==0) return man; while (mancol>0) { if (*(man+1) == 8) man+=3; else man++; mancol--; } return man; } /* show the currently visible part of manpage */ void showmanualscreen() { #ifdef getmaxyx /* refresh maxy, maxx values */ getmaxyx(stdscr, maxy, maxx); #endif attrset(normal); /* print all visible text lines */ for (unsigned i = manualpos;(i < manualpos +(maxy - 2)) &&(i < ManualLines); i++) { size_t len = strlen(manual[i]); if (len) manual[i][len - 1] = ' '; /* if we have something to display */ if (len>manualcol) mvaddstr_manual((i - manualpos) + 1, 0, getmancolumn(manual[i],manualcol)); else /* otherwise, just clear the line to eol */ { move((i - manualpos) + 1, 0); bkgdset(' ' | normal); clrtoeol(); } if (len) manual[i][len - 1] = '\n'; } #ifdef HAVE_DECL_BKGDSET bkgdset(' ' | normal); #endif /* and clear to bottom */ clrtobot(); #ifdef HAVE_DECL_BKGDSET bkgdset(0); #endif attrset(normal); /* add highlights */ add_highlights(); /* draw bottomline with user informations */ attrset(bottomline); mymvhline(0, 0, ' ', maxx); mymvhline(maxy - 1, 0, ' ', maxx); move(maxy - 1, 0); if (((manualpos + maxy) < ManualLines) &&(ManualLines > maxy - 2)) printw(_("Viewing line %d/%d, %d%%"),(manualpos - 1 + maxy), ManualLines,((manualpos - 1 + maxy) * 100) / ManualLines); else printw(_("Viewing line %d/%d, 100%%"), ManualLines, ManualLines); move(maxy - 1, 0); attrset(normal); } void /* print a manual line */ mvaddstr_manual(int y, int x, char *str) { int i, j, len = strlen(str); static char strippedline[1024]; if ((h_regexp_num) ||(manual_aftersearch)) { memcpy(strippedline, str, len + 1); strip_manual(strippedline); } move(y, x); for (i = 0; i < len; i++) { if ((i > 0) &&(i < len - 1)) { /* handle bold highlight */ if ((str[i] == 8) &&(str[i - 1] == '_')) { attrset(manualbold); addch(str[i] & 0xff); addch(str[i + 1] & 0xff); attrset(normal); i++; goto label_skip_other; } /* * if it wasn't bold, check italic, before default, unhighlighted * line will be painted. We can do it only if i= manualpos) && (manuallinks[i].line < manualpos +(maxy - 2))) { /* if it's a simple man link */ if (manuallinks[i].section_mark < HTTPSECTION) { if (i == selected) attrset(noteselected); else attrset(note); /* if it's a link split into two lines */ if (manuallinks[i].carry == 1) { int x, y, ltline = manuallinks[i].line - 1; /* find the line, where starts the split link */ char *tmpstr = strdup(manual[ltline]); size_t ltlinelen; char *newlinemark; /* remove boldfaces&italics */ strip_manual(tmpstr); /* calculate the length of this line */ ltlinelen = strlen(tmpstr); /* set this var to the last character of this line(to an '\n')*/ newlinemark = tmpstr + ltlinelen - 1; getyx(stdscr, y, x); if (y > 2) { #define TestCh tmpstr[ltlinelen] /* skip \n, -, and the at least one char... */ if (ltlinelen > 2) ltlinelen -= 3; /* * positon ltlinelen to the beginning of the link to be * highlighted */ while ((isalpha(TestCh)) ||(TestCh == '.') ||(TestCh == '_')) ltlinelen--; *newlinemark = 0; /* OK, link horizontally fits into screen */ if (ltlinelen>manualcol) mvaddstr(manuallinks[i].line - manualpos + 1 - 1, ltlinelen-manualcol, &tmpstr[ltlinelen]); /* * we cut here a part of the link, and draw only what's * visible on screen */ else if (ltlinelen+strlen(&tmpstr[ltlinelen])>manualcol) mvaddstr(manuallinks[i].line - manualpos + 1 - 1, ltlinelen-manualcol, &tmpstr[manualcol]); *newlinemark = '\n'; #undef TestCh } xfree(tmpstr); move(y, x); } } else { if (i == selected) attrset(urlselected); else attrset(url); if (manuallinks[i].carry == 1) { int ltline = manuallinks[i].line + 1; /* * the split part to find is lying down * to the line defined in manlinks(line+1) */ char *tmpstr = strdup(manual[ltline]); unsigned long k = 0; char *wskend; strip_manual(tmpstr); /* skip spaces */ while (isspace(tmpstr[k])) k++; /* find the end of url */ wskend = findurlend(tmpstr+k); if (wskendmanualcol) mvaddstr(1 + manuallinks[i].line - manualpos, manuallinks[i].col - manualcol, manuallinks[i].name); else if (manuallinks[i].col+strlen(manuallinks[i].name)>manualcol) mvaddstr(1 + manuallinks[i].line - manualpos, 0, manuallinks[i].name+(manualcol-manuallinks[i].col)); attrset(normal); } } } /* all variables passed here must have, say 10 bytes of overrun buffer */ void strip_manual(char *buf) { int i, tmpcnt = 0; /* in general, tmp buffer will hold a line stripped from highlight marks */ for (i = 0; buf[i] != 0; i++) { /* so we strip the line from "'_',0x8" -- bold marks */ if ((buf[i] == '_') &&(buf[i + 1] == 8)) { buf[tmpcnt++] = buf[i + 2]; i += 2; } /* and 0x8 -- italic marks */ else if ((buf[i + 1] == 8) &&(buf[i + 2] == buf[i])) { buf[tmpcnt++] = buf[i]; i += 2; } else /* else we don't do anything */ buf[tmpcnt++] = buf[i]; } buf[tmpcnt] = 0; } /* * checks if a construction, which looks like hyperlink, belongs to the allowed * manual sections. */ int is_in_manlinks(char *in, char *find) { char *copy, *token; const char delimiters[] = ":"; copy = strdup(in); if ((strcmp(find,(token = strtok(copy, delimiters))) != 0)) { while ((token = strtok(NULL, delimiters))) { #ifdef HAVE_STRCASECMP if (!strcasecmp(token, find)) #else if (!strcmp(token, find)) #endif { xfree((void *) copy); return 0; } } xfree((void *) copy); return 1; } else { xfree((void *) copy); return 0; } } void printmanual(char **Message, long Lines) { /* printer fd */ FILE *prnFD; int i; prnFD = popen(printutility, "w"); /* scan through all lines */ for (i = 0; i < Lines; i++) { fprintf(prnFD, "\r%s", Message[i]); } pclose(prnFD); } int ishyphen(unsigned char ch) { if ((ch == '-') ||(ch == SOFT_HYPHEN)) return 1; return 0; } pinfo-0.6.13/src/manual.h000066400000000000000000000021471343207050400151330ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __MANUAL_H #define __MANUAL_H /* passes control to the manual code */ int handlemanual (char *name); #endif pinfo-0.6.13/src/menu_and_note_utils.c000066400000000000000000000065371343207050400177130ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" void freeindirect() { if (indirect) { xfree(indirect); indirect = 0; } IndirectEntries = 0; } void freetagtable() { if (tag_table) { xfree(tag_table); tag_table = 0; } TagTableEntries = 0; } /* read the `Next:' header entry */ void getnextnode(char *type, char *node) { int j; #ifndef ___USE_STATIC___ char *tmp = xmalloc(strlen(type) + 1); #else static char tmp[1024 + 1]; #endif char *wsk; strcpy(tmp, type); wsk = strstr(tmp, "Next: "); if (wsk == 0) { strcpy(node, ERRNODE); return; } for (j = 6; wsk[j] != 0; j++) { if ((wsk[j] == ',') ||(wsk[j] == '\n')) { wsk[j] = 0; strcpy(node, wsk + 6); #ifndef ___USE_STATIC___ xfree(tmp); #endif return; } } #ifndef ___USE_STATIC___ xfree(tmp); #endif } /* read the `Prev:' header entry */ void getprevnode(char *type, char *node) { int j; #ifndef ___USE_STATIC___ char *tmp = xmalloc(strlen(type) + 1); #else static char tmp[1024 + 1]; #endif char *wsk; strcpy(tmp, type); wsk = strstr(tmp, "Prev: "); if (wsk == 0) { strcpy(node, ERRNODE); return; } for (j = 6; wsk[j] != 0; j++) { if ((wsk[j] == ',') ||(wsk[j] == '\n')) { wsk[j] = 0; strcpy(node, wsk + 6); #ifndef ___USE_STATIC___ xfree(tmp); #endif return; } } #ifndef ___USE_STATIC___ xfree(tmp); #endif } /* read the `Up:' header entry */ void getupnode(char *type, char *node) { int j; #ifndef ___USE_STATIC___ char *tmp = xmalloc(strlen(type) + 1); #else static char tmp[1024 + 1]; #endif char *wsk; strcpy(tmp, type); wsk = strstr(tmp, "Up: "); if (wsk == 0) { strcpy(node, ERRNODE); return; } for (j = 4; wsk[j] != 0; j++) { if ((wsk[j] == ',') ||(wsk[j] == '\n')) { wsk[j] = 0; strcpy(node, wsk + 4); #ifndef ___USE_STATIC___ xfree(tmp); #endif return; } } #ifndef ___USE_STATIC___ xfree(tmp); #endif } /* read the `Node:' header entry */ void getnodename(char *type, char *node) { int j; #ifndef ___USE_STATIC___ char *tmp = xmalloc(strlen(type) + 1); #else static char tmp[1024 + 1]; #endif char *wsk; strcpy(tmp, type); wsk = strstr(tmp, "Node: "); if (wsk == 0) { strcpy(node, ERRNODE); return; } for (j = 6; wsk[j] != 0; j++) { if ((wsk[j] == ',') ||(wsk[j] == '\n')) { wsk[j] = 0; strcpy(node, wsk + 6); #ifndef ___USE_STATIC___ xfree(tmp); #endif return; } } #ifndef ___USE_STATIC___ xfree(tmp); #endif } pinfo-0.6.13/src/menu_and_note_utils.h000066400000000000000000000033761343207050400177160ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __MENU_AND_NOTE_UTILS_H #define __MENU_AND_NOTE_UTILS_H #define ERRNODE "ERR@!#$$@#!%%^#@!OR" /* checks whether a line contains menu */ int ismenu (const char *line); /* checks whether a line contains note */ int isnote (char *line, char *nline); /* reads menu token from line */ int getmenutoken (char *line); /* reads note token from line */ int getnotetoken (char *line, char *nline); /* gets nextnode token from top line */ void getnextnode (char *type, char *node); /* gets prevnode token from top line */ void getprevnode (char *type, char *node); /* gets the up node token from top line */ void getupnode (char *type, char *node); /* reads the nodename from top line */ void getnodename (char *type, char *node); void freeindirect (); void freetagtable (); #endif pinfo-0.6.13/src/parse_config.c000066400000000000000000000563471343207050400163230ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #include #ifdef HAVE_DECL_USE_DEFAULT_COLORS # define COLOR_DEFAULT (-1) /* ncurses extension to use default color, see default_colors(3NCURSES) */ #endif regex_t *h_regexp = 0; /* regexps to highlight */ int h_regexp_num = 0; /* number of those regexps */ struct keybindings keys = { 's', 'S', /* regexp search */ '/', '/', /* regexp search, this page */ 'g', 'G', /* goto node */ 'p', 'P', /* previous node */ 'n', 'N', /* next node */ 'u', 'U', /* up node */ KEY_UP, 'k', /* up one line */ #ifdef KEY_END KEY_END #else 'E' #endif ,'e', /* end */ KEY_NPAGE, ' ', /* down one page */ KEY_HOME, 'H', /* home */ KEY_PPAGE, '-', /* up one page */ KEY_DOWN, 'j', /* down one line */ 't', 'T', /* top */ KEY_LEFT, 'h', /* back */ KEY_RIGHT, '\n', /* follow link */ 'Q', 'q', /* quit */ 12, '~', /* refresh screen -- 12 is C-L */ '!', '!', /* shell feed */ 'D', 'd', /* goto dir page */ 0, ' ', /* pgdn_auto */ 0, '-', /* pgup_auto */ 'f', 0, /* search again */ 'l', 0, /* go to line */ KEY_IC, 0, /* two lines up */ KEY_DC, 1, /* two lines down */ ']', 0, /* print */ '4', 0, /* scroll left */ '6', 0 /* scroll right */ }; #ifdef HAVE_CURSES_COLOR struct colours cols = { COLOR_WHITE, COLOR_BLACK, NO_BOLD, NO_BLINK, /* normal */ COLOR_GREEN, COLOR_WHITE, BOLD, NO_BLINK, /* selected menu */ COLOR_GREEN, COLOR_BLACK, BOLD, NO_BLINK, /* menu */ COLOR_BLUE, COLOR_WHITE, BOLD, NO_BLINK, /* selected note */ COLOR_BLUE, COLOR_BLACK, BOLD, NO_BLINK, /* note */ COLOR_GREEN, COLOR_BLUE, BOLD, NO_BLINK, /* top line */ COLOR_GREEN, COLOR_BLUE, BOLD, NO_BLINK, /* bottom line */ COLOR_YELLOW, COLOR_BLACK, BOLD, NO_BLINK, /* manual bold */ COLOR_WHITE, COLOR_BLACK, BOLD, NO_BLINK, /* manual italic */ COLOR_MAGENTA, COLOR_BLACK, BOLD, NO_BLINK, /* url */ COLOR_MAGENTA, COLOR_GREEN, NO_BOLD, NO_BLINK, /* url selected */ COLOR_WHITE, COLOR_BLACK, BOLD, NO_BLINK, /* info highlight(quoted text) */ COLOR_YELLOW, COLOR_BLACK, BOLD, NO_BLINK /* search highlight */ }; #endif /* HAVE_CURSES_COLOR */ int parse_config(void) { char config_file_name[256], *home = 0; char line[256]; FILE *f; int line_number = 0; if (rcfile != NULL) { f = fopen(rcfile, "r"); if (f == NULL) { fprintf(stderr, _("Can't open config file!\n")); exit(1); } } else { if (rcfile == NULL) { if (getenv("HOME")) home = strdup(getenv("HOME")); else home = 0; } if (home) { strcpy(config_file_name, home); strcat(config_file_name, "/.pinforc"); if (!(f = fopen(config_file_name, "r"))) { strcpy(config_file_name, CONFIGDIR); if (!(f = fopen(config_file_name, "r"))) { free(home); /* home is nonzero; see if (home) above */ return 0; /* no config file available */ } } } else { strcpy(config_file_name, CONFIGDIR); if (!(f = fopen(config_file_name, "r"))) { /* free(home); home is unallocated; see if (home) above */ return 0; } } } while (!feof(f)) { if (!(fgets(line, 255, f))) { fclose(f); if (home) free(home); return 0; } if (parse_line(line)) { line_number++; fclose(f); fprintf(stderr, _("Parse error in config file on line %d\n"), line_number); exit(1); } else line_number++; } fclose(f); if (home) free(home); return 0; } int parse_line(char *line) { char *temp; int *fore = NULL; int *key = NULL; int *back = NULL, *bold = NULL, *blink = NULL, *p = NULL; int i; if (line[0] == '#') return 0; if (!(temp = skip_whitespace(strtok(line, "=")))) return 1; temp = str_toupper(temp); if (strlen(temp) < 1) return 0; if (!strncmp(temp, "KEY", 3)) { fore = NULL; if (!strncmp(temp + 4, "TOTALSEARCH_1", 13)) key = &keys.totalsearch_1; else if (!strncmp(temp + 4, "PGDN_AUTO_1", 11)) key = &keys.pgdn_auto_1; else if (!strncmp(temp + 4, "PGDN_AUTO_2", 11)) key = &keys.pgdn_auto_2; else if (!strncmp(temp + 4, "PGUP_AUTO_1", 11)) key = &keys.pgup_auto_1; else if (!strncmp(temp + 4, "PGUP_AUTO_2", 11)) key = &keys.pgup_auto_2; else if (!strncmp(temp + 4, "TOTALSEARCH_2", 13)) key = &keys.totalsearch_2; else if (!strncmp(temp + 4, "SEARCH_AGAIN_1", 14)) key = &keys.search_again_1; else if (!strncmp(temp + 4, "SEARCH_AGAIN_2", 14)) key = &keys.search_again_2; else if (!strncmp(temp + 4, "SEARCH_1", 8)) key = &keys.search_1; else if (!strncmp(temp + 4, "SEARCH_2", 8)) key = &keys.search_2; else if (!strncmp(temp + 4, "GOTO_1", 6)) key = &keys.goto_1; else if (!strncmp(temp + 4, "GOTO_2", 6)) key = &keys.goto_2; else if (!strncmp(temp + 4, "PREVNODE_1", 10)) key = &keys.prevnode_1; else if (!strncmp(temp + 4, "PREVNODE_2", 10)) key = &keys.prevnode_2; else if (!strncmp(temp + 4, "NEXTNODE_1", 10)) key = &keys.nextnode_1; else if (!strncmp(temp + 4, "NEXTNODE_2", 10)) key = &keys.nextnode_2; else if (!strncmp(temp + 4, "UPNODE_1", 8)) key = &keys.upnode_1; else if (!strncmp(temp + 4, "UPNODE_2", 8)) key = &keys.upnode_2; else if (!strncmp(temp + 4, "UP_1", 4)) key = &keys.up_1; else if (!strncmp(temp + 4, "UP_2", 4)) key = &keys.up_2; else if (!strncmp(temp + 4, "TWOUP_1", 7)) key = &keys.twoup_1; else if (!strncmp(temp + 4, "TWOUP_2", 7)) key = &keys.twoup_2; else if (!strncmp(temp + 4, "END_1", 5)) key = &keys.end_1; else if (!strncmp(temp + 4, "END_2", 5)) key = &keys.end_2; else if (!strncmp(temp + 4, "PGDN_1", 6)) key = &keys.pgdn_1; else if (!strncmp(temp + 4, "PGDN_2", 6)) key = &keys.pgdn_2; else if (!strncmp(temp + 4, "HOME_1", 6)) key = &keys.home_1; else if (!strncmp(temp + 4, "HOME_2", 6)) key = &keys.home_2; else if (!strncmp(temp + 4, "PGUP_1", 6)) key = &keys.pgup_1; else if (!strncmp(temp + 4, "PGUP_2", 6)) key = &keys.pgup_2; else if (!strncmp(temp + 4, "DOWN_1", 6)) key = &keys.down_1; else if (!strncmp(temp + 4, "DOWN_2", 6)) key = &keys.down_2; else if (!strncmp(temp + 4, "TWODOWN_1", 9)) key = &keys.twodown_1; else if (!strncmp(temp + 4, "TWODOWN_2", 9)) key = &keys.twodown_2; else if (!strncmp(temp + 4, "TOP_1", 5)) key = &keys.top_1; else if (!strncmp(temp + 4, "TOP_2", 5)) key = &keys.top_2; else if (!strncmp(temp + 4, "BACK_1", 6)) key = &keys.back_1; else if (!strncmp(temp + 4, "BACK_2", 6)) key = &keys.back_2; else if (!strncmp(temp + 4, "FOLLOWLINK_1", 12)) key = &keys.followlink_1; else if (!strncmp(temp + 4, "FOLLOWLINK_2", 12)) key = &keys.followlink_2; else if (!strncmp(temp + 4, "REFRESH_1", 9)) key = &keys.refresh_1; else if (!strncmp(temp + 4, "REFRESH_2", 9)) key = &keys.refresh_2; else if (!strncmp(temp + 4, "SHELLFEED_1", 11)) key = &keys.shellfeed_1; else if (!strncmp(temp + 4, "SHELLFEED_2", 11)) key = &keys.shellfeed_2; else if (!strncmp(temp + 4, "QUIT_1", 6)) key = &keys.quit_1; else if (!strncmp(temp + 4, "QUIT_2", 6)) key = &keys.quit_2; else if (!strncmp(temp + 4, "DIRPAGE_1", 9)) key = &keys.dirpage_1; else if (!strncmp(temp + 4, "DIRPAGE_2", 9)) key = &keys.dirpage_2; else if (!strncmp(temp + 4, "GOLINE_1", 8)) key = &keys.goline_1; else if (!strncmp(temp + 4, "GOLINE_2", 8)) key = &keys.goline_2; else if (!strncmp(temp + 4, "PRINT_1", 7)) key = &keys.print_1; else if (!strncmp(temp + 4, "PRINT_2", 7)) key = &keys.print_2; else if (!strncmp(temp + 4, "LEFT_1", 6)) key = &keys.left_1; else if (!strncmp(temp + 4, "LEFT_2", 6)) key = &keys.left_2; else if (!strncmp(temp + 4, "RIGHT_1", 7)) key = &keys.right_1; else if (!strncmp(temp + 4, "RIGHT_2", 7)) key = &keys.right_2; else return 1; } #ifdef HAVE_CURSES_COLOR else if (!strncmp(temp, "COL", 3)) { key = NULL; if (!strncmp(temp + 4, "NORMAL", 6)) { fore = &cols.normal_fore; back = &cols.normal_back; bold = &cols.normal_bold; blink = &cols.normal_blink; } else if (!strncmp(temp + 4, "MENUSELECTED", 12)) { fore = &cols.menuselected_fore; back = &cols.menuselected_back; bold = &cols.menuselected_bold; blink = &cols.menuselected_blink; } else if (!strncmp(temp + 4, "MENU", 4)) { fore = &cols.menu_fore; back = &cols.menu_back; bold = &cols.menu_bold; blink = &cols.menu_blink; } else if (!strncmp(temp + 4, "NOTESELECTED", 12)) { fore = &cols.noteselected_fore; back = &cols.noteselected_back; bold = &cols.noteselected_bold; blink = &cols.noteselected_blink; } else if (!strncmp(temp + 4, "NOTE", 4)) { fore = &cols.note_fore; back = &cols.note_back; bold = &cols.note_bold; blink = &cols.note_blink; } else if (!strncmp(temp + 4, "TOPLINE", 7)) { fore = &cols.topline_fore; back = &cols.topline_back; bold = &cols.topline_bold; blink = &cols.topline_blink; } else if (!strncmp(temp + 4, "BOTTOMLINE", 10)) { fore = &cols.bottomline_fore; back = &cols.bottomline_back; bold = &cols.bottomline_bold; blink = &cols.bottomline_blink; } else if (!strncmp(temp + 4, "MANUALBOLD", 10)) { fore = &cols.manualbold_fore; back = &cols.manualbold_back; bold = &cols.manualbold_bold; blink = &cols.manualbold_blink; } else if (!strncmp(temp + 4, "MANUALITALIC", 12)) { fore = &cols.manualitalic_fore; back = &cols.manualitalic_back; bold = &cols.manualitalic_bold; blink = &cols.manualitalic_blink; } else if (!strncmp(temp + 4, "URLSELECTED", 11)) { fore = &cols.urlselected_fore; back = &cols.urlselected_back; bold = &cols.urlselected_bold; blink = &cols.urlselected_blink; } else if (!strncmp(temp + 4, "URL", 3)) { fore = &cols.url_fore; back = &cols.url_back; bold = &cols.url_bold; blink = &cols.url_blink; } else if (!strncmp(temp + 4, "INFOHIGHLIGHT", 13)) { fore = &cols.infohighlight_fore; back = &cols.infohighlight_back; bold = &cols.infohighlight_bold; blink = &cols.infohighlight_blink; } else if (!strncmp(temp + 4, "SEARCHHIGHLIGHT", 15)) { fore = &cols.searchhighlight_fore; back = &cols.searchhighlight_back; bold = &cols.searchhighlight_bold; blink = &cols.searchhighlight_blink; } else return 1; } #endif /* HAVE_CURSES_COLOR */ else if (!strncmp(temp, "MANUAL", 6)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) use_manual = 1; else if (!strncmp(temp, "FALSE", 5)) use_manual = 0; else return 1; } } else if (!strncmp(temp, "GRAB-MOUSE", 10)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) grab_mouse = 1; else if (!strncmp(temp, "FALSE", 5)) grab_mouse = 0; else return 1; } } else if (!strncmp(temp, "RAW-FILENAME", 12)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) use_raw_filename = 1; else if (!strncmp(temp, "FALSE", 5)) use_raw_filename = 0; else return 1; } } else if (!strncmp(temp, "APROPOS", 7)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) use_apropos = 1; else if (!strncmp(temp, "FALSE", 5)) use_apropos = 0; else return 1; } } else if (!strncmp(temp, "VERBOSE", 7)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) verbose = 1; else if (!strncmp(temp, "FALSE", 5)) verbose = 0; else return 1; } } else if (!strncmp(temp, "QUIT-CONFIRMATION", 17)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) ConfirmQuit = 1; else if (!strncmp(temp, "FALSE", 5)) ConfirmQuit = 0; else return 1; } } else if (!strncmp(temp, "QUIT-CONFIRM-DEFAULT", 20)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "YES", 3)) QuitConfirmDefault = 1; else if (!strncmp(temp, "NO", 2)) QuitConfirmDefault = 0; else return 1; } } else if (!strncmp(temp, "CUT-MAN-HEADERS", 15)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) CutManHeaders = 1; else if (!strncmp(temp, "FALSE", 5)) CutManHeaders = 0; else return 1; } } else if (!strncmp(temp, "CLEAR-SCREEN-AT-EXIT", 20)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) ClearScreenAtExit = 1; else if (!strncmp(temp, "FALSE", 5)) ClearScreenAtExit = 0; else return 1; } } else if (!strncmp(temp, "CALL-READLINE-HISTORY", 21)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) CallReadlineHistory = 1; else if (!strncmp(temp, "FALSE", 5)) CallReadlineHistory = 0; else return 1; } } else if (!strncmp(temp, "CUT-EMPTY-MAN-LINES", 19)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) CutEmptyManLines = 1; else if (!strncmp(temp, "FALSE", 5)) CutEmptyManLines = 0; else return 1; } } else if (!strncmp(temp, "DONT-HANDLE-WITHOUT-TAG-TABLE", 28)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) DontHandleWithoutTagTable = 1; else if (!strncmp(temp, "FALSE", 5)) DontHandleWithoutTagTable = 0; else return 1; } } else if (!strncmp(temp, "LONG-MANUAL-LINKS", 17)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) LongManualLinks = 1; else if (!strncmp(temp, "FALSE", 5)) LongManualLinks = 0; else return 1; } } else if (!strncmp(temp, "HTTPVIEWER", 10)) { temp = strtok(NULL, "\n"); if (temp) { httpviewer = strdup(temp); remove_quotes(httpviewer); } else return 1; } else if (!strncmp(temp, "FTPVIEWER", 9)) { temp = strtok(NULL, "\n"); if (temp) { ftpviewer = strdup(temp); remove_quotes(ftpviewer); } else return 1; } else if (!strncmp(temp, "MAILEDITOR", 10)) { temp = strtok(NULL, "\n"); if (temp) { maileditor = strdup(temp); remove_quotes(maileditor); } else return 1; } else if (!strncmp(temp, "PRINTUTILITY", 12)) { temp = strtok(NULL, "\n"); if (temp) { printutility = strdup(temp); remove_quotes(printutility); } else return 1; } else if (!strncmp(temp, "MAN-OPTIONS", 11)) { temp = strtok(NULL, "\n"); if (temp) { ManOptions = strdup(temp); remove_quotes(ManOptions); } else return 1; } else if (!strncmp(temp, "STDERR-REDIRECTION", 18)) { temp = strtok(NULL, "\n"); if (temp) { StderrRedirection = strdup(temp); remove_quotes(StderrRedirection); } else return 1; } else if (!strncmp(temp, "FILTER-0XB7", 11)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) FilterB7 = 1; else if (!strncmp(temp, "FALSE", 5)) FilterB7 = 0; else return 1; } } else if (!strncmp(temp, "MANLINKS", 8)) { temp = strtok(NULL, "\n"); if (temp) { manlinks = strdup(temp); remove_quotes(manlinks); } else return 1; } else if (!strncmp(temp, "INFOPATH", 8)) { temp = strtok(NULL, "\n"); if (temp) { configuredinfopath = strdup(temp); remove_quotes(configuredinfopath); } else return 1; } #ifndef ___DONT_USE_REGEXP_SEARCH___ else if (!strncmp(temp, "HIGHLIGHTREGEXP", 15)) { temp = strtok(NULL, "\n"); if (temp) { char *tmp = strdup(temp); remove_quotes(tmp); if (!h_regexp_num) h_regexp = malloc(sizeof(regex_t)); else h_regexp = realloc(h_regexp, sizeof(regex_t) *(h_regexp_num + 1)); regcomp(&h_regexp[h_regexp_num], tmp, 0); free(tmp); h_regexp_num++; } else return 1; } #endif else if (!strncmp(temp, "SAFE-USER", 9)) { temp = strtok(NULL, "\n"); if (temp) { char *tmp = strdup(temp); remove_quotes(tmp); safe_user = tmp; } else return 1; } else if (!strncmp(temp, "SAFE-GROUP", 10)) { temp = strtok(NULL, "\n"); if (temp) { char *tmp = strdup(temp); remove_quotes(tmp); safe_group = tmp; } else return 1; } else if (!strncmp(temp, "QUOTE-IGNORED-MACROS", 20)) { temp = strtok(NULL, "="); if (temp) { if (!(temp = str_toupper(skip_whitespace(temp)))) return 1; if (!strncmp(temp, "TRUE", 4)) quote_ignored = 1; else if (!strncmp(temp, "FALSE", 5)) quote_ignored = 0; else return 1; } } else if (!strncmp(temp, "IGNORE-MACROS", 8)) { temp = strtok(NULL, "\n"); if (temp) { ignoredmacros = strdup(temp); remove_quotes(ignoredmacros); if (ignoredmacros[0] == '\t' || ignoredmacros[0] == ' ' || !strncasecmp(ignoredmacros, "FALSE", 5)) ignoredmacros[0] = '\0'; } else return 1; } else return 1; #ifdef HAVE_CURSES_COLOR if (fore) { for (i = 0; i < 4; i++) { if (i == 0) p = fore; else if (i == 1) p = back; else if (i == 2) p = bold; else p = blink; if (!(temp = skip_whitespace(strtok(NULL, ",")))) return 1; temp = str_toupper(temp); if (!(strncmp(temp, "COLOR_BLACK", 11))) *p = COLOR_BLACK; else if (!(strncmp(temp, "COLOR_RED", 9))) *p = COLOR_RED; else if (!(strncmp(temp, "COLOR_GREEN", 11))) *p = COLOR_GREEN; else if (!(strncmp(temp, "COLOR_BLUE", 10))) *p = COLOR_BLUE; else if (!(strncmp(temp, "COLOR_WHITE", 11))) *p = COLOR_WHITE; else if (!(strncmp(temp, "COLOR_YELLOW", 12))) *p = COLOR_YELLOW; else if (!(strncmp(temp, "COLOR_CYAN", 10))) *p = COLOR_CYAN; else if (!(strncmp(temp, "COLOR_MAGENTA", 13))) *p = COLOR_MAGENTA; else if (!(strncmp(temp, "COLOR_DEFAULT", 13))) { #ifdef HAVE_DECL_USE_DEFAULT_COLORS *p = COLOR_DEFAULT; #else fprintf(stderr, "COLOR_DEFAULT is not supported on this system\n"); return 1; #endif } else if (!(strncmp(temp, "BOLD", 4))) *p = BOLD; else if (!(strncmp(temp, "NO_BOLD", 7))) *p = 0; else if (!(strncmp(temp, "BLINK", 4))) *p = BOLD; else if (!(strncmp(temp, "NO_BLINK", 7))) *p = 0; else return 1; } } else #endif /* HAVE_CURSES_COLOR */ if (key) { if (!(temp = skip_whitespace(strtok(NULL, "=")))) return 0; if (!(strncmp(temp, "KEY_", 4)) || !(strncmp(temp, "key_", 4))) { str_toupper(temp); /* what other keys should be interesting? all in curs_getch? */ if (!(strncmp(temp + 4, "BREAK", 5))) *key = KEY_BREAK; else if (!(strncmp(temp + 4, "DOWN", 4))) *key = KEY_DOWN; else if (!(strncmp(temp + 4, "UP", 2))) *key = KEY_UP; else if (!(strncmp(temp + 4, "LEFT", 4))) *key = KEY_LEFT; else if (!(strncmp(temp + 4, "RIGHT", 5))) *key = KEY_RIGHT; else if (!(strncmp(temp + 4, "IC", 2))) *key = KEY_IC; else if (!(strncmp(temp + 4, "DC", 2))) *key = KEY_DC; else if (!(strncmp(temp + 4, "HOME", 4))) *key = KEY_HOME; else if (!(strncmp(temp + 4, "BACKSPACE", 9))) *key = KEY_BACKSPACE; else if (!(strncmp(temp + 4, "NPAGE", 5))) *key = KEY_NPAGE; else if (!(strncmp(temp + 4, "PPAGE", 5))) *key = KEY_PPAGE; else if (!(strncmp(temp + 4, "F(1)", 4))) *key = KEY_F(1); else if (!(strncmp(temp + 4, "F(2)", 4))) *key = KEY_F(2); else if (!(strncmp(temp + 4, "F(3)", 4))) *key = KEY_F(3); else if (!(strncmp(temp + 4, "F(4)", 4))) *key = KEY_F(4); else if (!(strncmp(temp + 4, "F(5)", 4))) *key = KEY_F(5); else if (!(strncmp(temp + 4, "F(6)", 4))) *key = KEY_F(6); else if (!(strncmp(temp + 4, "F(7)", 4))) *key = KEY_F(7); else if (!(strncmp(temp + 4, "F(8)", 4))) *key = KEY_F(8); else if (!(strncmp(temp + 4, "(F9)", 4))) *key = KEY_F(9); else if (!(strncmp(temp + 4, "(F10)", 5))) *key = KEY_F(10); else if (!(strncmp(temp + 4, "F(11)", 5))) *key = KEY_F(11); else if (!(strncmp(temp + 4, "F(12)", 5))) *key = KEY_F(12); else if (!(strncmp(temp + 4, "END", 3))) *key = KEY_END; else if (!(strncmp(temp + 4, "CTRL", 4))) { if (!(temp = skip_whitespace(temp + 8))) return 1; if (temp[0] == '(') { if (temp[1] == '\'') *key = KEY_CTRL(temp[2]); else if (isdigit(temp[1])) { char *tail = temp +(strlen(temp)); *key = KEY_CTRL((int) strtol(temp + 1, &tail, 10)); } else return 1; } else return 1; } else if (!(strncmp(temp + 4, "ALT", 3))) { if (!(temp = skip_whitespace(temp + 7))) return 1; if (temp[0] == '(') { if (temp[1] == '\'') *key = KEY_ALT(tolower(temp[2])); else if (isdigit(temp[1])) { char *tail = temp +(strlen(temp)); *key = KEY_ALT((int) strtol(temp + 1, &tail, 10)); } else return 1; } else return 1; } else return 1; } else if (!(strncmp(temp, "\'", 1))) { if (!(strncmp(temp + 1, "\\", 1))) { if (temp[2] == 'n') *key = '\n'; else if (temp[2] == '\\') *key = '\\'; else if (temp[2] == 't') *key = '\t'; else if (temp[2] == '\'') *key = '\''; else *key = temp[2]; } else { *key = temp[1]; } } else if (isdigit(temp[0])) { char *tail = temp +(strlen(temp)); *key =(int) strtol(temp, &tail, 10); } } return 0; } char * str_toupper(char *str) { unsigned int i; for (i = 0; i < strlen(str); ++i) if (islower(str[i])) str[i] = toupper(str[i]); return str; } char * skip_whitespace(char *str) { int i = 0; if (!str) return NULL; while (str[i] == ' ' || str[i] == '\t' || str[i] == '\n') i++; return str + i; } char * remove_quotes(char *str) { size_t i = 0; for (i = 0; i < strlen(str); i++) if (str[i] == '\"') str[i] = ' '; return str; } pinfo-0.6.13/src/parse_config.h000066400000000000000000000063221343207050400163140ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __PARSE_CONFIG_H #define __PARSE_CONFIG_H #ifndef ___DONT_USE_REGEXP_SEARCH___ #include #endif #define BOLD 1 #define NO_BOLD 0 #define BLINK 1 #define NO_BLINK 0 typedef struct keybindings { int totalsearch_1, totalsearch_2; int search_1, search_2; int goto_1, goto_2; int prevnode_1, prevnode_2; int nextnode_1, nextnode_2; int upnode_1, upnode_2; int up_1, up_2; int end_1, end_2; int pgdn_1, pgdn_2; int home_1, home_2; int pgup_1, pgup_2; int down_1, down_2; int top_1, top_2; int back_1, back_2; int followlink_1, followlink_2; int quit_1, quit_2; int refresh_1, refresh_2; int shellfeed_1, shellfeed_2; int dirpage_1, dirpage_2; int pgdn_auto_1, pgdn_auto_2; int pgup_auto_1, pgup_auto_2; int search_again_1, search_again_2; int goline_1, goline_2; int twoup_1, twoup_2; int twodown_1, twodown_2; int print_1, print_2; int left_1, left_2; int right_1, right_2; } keybindings; #ifdef HAVE_CURSES_COLOR typedef struct colours { int normal_fore, normal_back, normal_bold, normal_blink; int menuselected_fore, menuselected_back, menuselected_bold, menuselected_blink; int menu_fore, menu_back, menu_bold, menu_blink; int noteselected_fore, noteselected_back, noteselected_bold, noteselected_blink; int note_fore, note_back, note_bold, note_blink; int topline_fore, topline_back, topline_bold, topline_blink; int bottomline_fore, bottomline_back, bottomline_bold, bottomline_blink; int manualbold_fore, manualbold_back, manualbold_bold, manualbold_blink; int manualitalic_fore, manualitalic_back, manualitalic_bold, manualitalic_blink; int url_fore, url_back, url_bold, url_blink; int urlselected_fore, urlselected_back, urlselected_bold, urlselected_blink; int infohighlight_fore, infohighlight_back, infohighlight_bold, infohighlight_blink; int searchhighlight_fore, searchhighlight_back, searchhighlight_bold, searchhighlight_blink; } colours; #endif /* HAVE_CURSES_COLOR */ int use_manual; int parse_config (void); int parse_line (char *line); char *str_toupper (char *s); char *skip_whitespace (char *s); char *remove_quotes (char *str); #ifndef ___DONT_USE_REGEXP_SEARCH___ extern regex_t *h_regexp; /* regexps to highlight */ extern int h_regexp_num; /* number of those regexps */ #endif #endif pinfo-0.6.13/src/pinfo.c000066400000000000000000000435141343207050400147670ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #ifdef HAVE_GETOPT_LONG #include #endif char *version = PACKAGE_VERSION; /* currently viewed filename */ char *curfile = 0; /* node specified by --node option */ char *pinfo_start_node = 0; /* strip `.info' suffix from "file" */ void strip_file_from_info_suffix(char *file); /* add `.info' suffix to "file" */ char *addinfosuffix(char *file); /* protect against bad, bad macros */ void checksu(); int main(int argc, char *argv[]) { int filenotfound = 0; char filename[256]; WorkRVal work_return_value = {0, 0}; int i, userdefinedrc = 0; int command_line_option; FILE *id = NULL; /* line count in message */ unsigned long lines = 0; /* this will hold node's text */ char **message = 0; /* this will hold the node's header */ char *type = 0; int tag_table_pos = 1; char *file_name_force = NULL; #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", 0, 0, 'h'}, {"version", 0, 0, 'v'}, {"manual", 0, 0, 'm'}, {"file", 0, 0, 'f'}, {"raw-filename", 0, 0, 'r'}, {"apropos", 0, 0, 'a'}, {"plain-apropos", 0, 0, 'p'}, {"cut-man-headers", 0, 0, 'c'}, {"squeeze-manlines", 0, 0, 's'}, {"dont-handle-without-tag-table", 0, 0, 'd'}, {"force-manual-tag-table", 0, 0, 't'}, {"node", 1, 0, 'n'}, {"long-manual-links", 0, 0, 'l'}, {"clear-at-exit", 0, 0, 'x'}, /* no one-letter shortcut :( */ {"rcfile", 1, 0, 1}, {0, 0, 0, 0}}; #endif /* take care of SIGSEGV, SIGTERM, SIGINT */ signal_handler(); searchagain.type = 0; searchagain.search = 0; initlocale(); inithistory(); for (i = 1; i < argc; i++) if (strncmp(argv[i], "--rcfile", 8) == 0) userdefinedrc = 1; /* read config information */ if (!userdefinedrc) parse_config(); if (verbose) printf("Przemek's Info Viewer v%s\n", version); /* if no arguments were given */ if (argc == 1) { id = openinfo("dir", 0); curfile = xmalloc(150); strcpy(curfile, "dir"); strcpy(filename, "dir"); } if ((strlen(argv[0]) >= 3)||(use_manual)) /* handle any 'man' alias to 'pinfo' */ if ((strstr(argv[0], "man") != NULL)||(use_manual)) { if (verbose) printf(_("Looking for man page...\n")); strcpy(filename, ""); /* * pass all arguments to the `man' command(manhandler calls * `man') */ for (i = 1; i < argc; i++) { strncat(filename, argv[i], sizeof(filename)-strlen(filename)-2); strncat(filename, " ", 2); } exit(handlemanual(filename)); } #ifdef HAVE_GETOPT_LONG /****************************************************************************** * Parse command line options(getopt) * ******************************************************************************/ do { char *tmp; command_line_option = getopt_long(argc, argv, "hvmfrapcsdtn:lx", long_options, NULL); switch(command_line_option) { case 'x': ClearScreenAtExit = 1; break; case 'l': LongManualLinks = 1; break; case 'n': if (!optarg) { printf(_("--node option used without argument\n")); exit(1); } pinfo_start_node = malloc(strlen(optarg) + 1); strcpy(pinfo_start_node, optarg); break; /* rcfile */ case 1: if (!optarg) { printf(_("--rcfile option used without argument\n")); exit(1); } rcfile = strdup(optarg); /* parse user-defined config file */ parse_config(); break; case 't': ForceManualTagTable = 1; break; case 'h': printf(_("Usage:\n" \ "%s [options] [info|manual]\n" \ "Options:\n" \ "-h, --help help\n" \ "-v, --version version\n" \ "-m, --manual use man page\n" \ "-r, --raw-filename use raw filename\n" \ "-f, --file synonym for -r\n" \ "-a, --apropos call apropos if nothing found\n" \ "-p, --plain-apropos call only apropos\n" \ "-c, --cut-man-headers cut out repeated man headers\n" \ "-l, --long-manual-links use long link names in manuals\n" \ "-s, --squeeze-manlines cut empty lines from manual pages\n" \ "-d, --dont-handle-without-tag-table don't display texinfo pages without tag\n" \ " tables\n" \ "-t, --force-manual-tag-table force manual detection of tag table\n" \ "-x, --clear-at-exit clear screen at exit\n" \ " --node=nodename, --node nodename jump directly to the node nodename\n" \ " --rcfile=file, --rcfile file use alternate rcfile\n"), argv[0]); exit(0); case 'v': exit(0); case 'm': checksu(); if (verbose) printf(_("Looking for man page...\n")); strcpy(filename, ""); for (i = optind; i < argc; i++) { strncat(filename, argv[i], sizeof(filename)-strlen(filename)-2); strncat(filename, " ", 2); } exit(handlemanual(filename)); case 'f': case 'r': strncpy(filename, argv[argc - 1], 200); /* security check */ checkfilename(filename); /* add the raw path to searchpath */ addrawpath(filename); tmp = filename + strlen(filename) - 1; /* later, openinfo automaticaly adds them */ strip_compression_suffix(filename); /* get basename */ while ((tmp > filename) &&(*tmp != '/')) tmp--; if (*tmp == '/') tmp++; /* and try it without '.info' suffix */ id = openinfo(tmp, 0); break; case 'a': use_apropos = 1; break; case 'p': use_apropos = 1; plain_apropos = 1; strncpy(filename, argv[argc - 1], 200); exit(handlemanual(filename)); break; case 'c': CutManHeaders = 1; break; case 'd': DontHandleWithoutTagTable = 1; break; case 's': CutEmptyManLines = 1; break; case '?': exit(1); } } while (command_line_option != EOF); /***************************************************************/ #endif checksu(); initpaths(); if (argc > 1) { #ifdef HAVE_GETOPT_LONG if (optind < argc) { /* the paths will be searched by openinfo() */ strncpy(filename, argv[optind], 200); } else { strcpy(filename, "dir"); } #else /* the paths will be searched by openinfo() */ strncpy(filename, argv[argc - 1], 200); #endif if (filename[0]=='(') { int fnamelen=strlen(filename); /* erase the leading '(' */ for (i=0;i 5) { if (strcmp(file + strlen(file) - 5, ".info") == 0) { file = file + strlen(file) - 5; *file = 0; } } } char * addinfosuffix(char *info) { char *withsuffix = xmalloc(strlen(info) + 150); strcpy(withsuffix, info); if (strlen(info) == 3) { if (strcmp("dir", info) != 0) strcat(withsuffix, ".info"); } else strcat(withsuffix, ".info"); return withsuffix; } /* * If pinfo was called by root then it should work as nobody. * This protect us against .pso and .open macros which could * be used for breaking the system's security. */ void checksu() { struct passwd *pswd; struct group *grwd; int result = 0; if (!getegid() || !getgid()) { grwd = getgrnam(safe_group); if (!grwd) { if (verbose) { printf(_("Security warning: Unable to get GID of group called: %s\n"), safe_group); sleep(1); } } else { if (!getgid() && !getuid()) result = setgid(grwd->gr_gid); else result = setegid(grwd->gr_gid); } } if (result==0 && (!geteuid() || !getuid()) ) { pswd = getpwnam(safe_user); if (!pswd) { if (verbose) { printf(_("Security warning: Unable to get UID of user called: %s\n"), safe_user); sleep(1); } } else { if (!getuid()) result = setuid(pswd->pw_uid); else result = seteuid(pswd->pw_uid); } } if (result != 0) { printf(_("Unable to drop root privileges: %s"), strerror(errno)); exit(-1); } } pinfo-0.6.13/src/pinforc.in000066400000000000000000000054631343207050400155010ustar00rootroot00000000000000# Here are some colour setting. # Whitespace between the entries is optional. # Format: # Color_ID = Foreground , Background ,forelight, backblink(light) # COL_NORMAL = COLOR_DEFAULT, COLOR_DEFAULT, NO_BOLD, NO_BLINK COL_MENUSELECTED = COLOR_RED , COLOR_DEFAULT, BOLD , NO_BLINK COL_MENU = COLOR_BLUE , COLOR_DEFAULT, BOLD , NO_BLINK COL_NOTESELECTED = COLOR_RED , COLOR_DEFAULT, BOLD , NO_BLINK COL_NOTE = COLOR_GREEN , COLOR_DEFAULT, BOLD , NO_BLINK COL_TOPLINE = COLOR_YELLOW , COLOR_BLUE , BOLD , NO_BLINK COL_BOTTOMLINE = COLOR_YELLOW , COLOR_BLUE , BOLD , NO_BLINK COL_MANUALBOLD = COLOR_DEFAULT, COLOR_DEFAULT, BOLD , NO_BLINK COL_MANUALITALIC = COLOR_DEFAULT, COLOR_DEFAULT, BOLD , NO_BLINK COL_URL = COLOR_MAGENTA, COLOR_DEFAULT, BOLD , NO_BLINK COL_URLSELECTED = COLOR_RED , COLOR_DEFAULT, BOLD , NO_BLINK COL_INFOHIGHLIGHT = COLOR_DEFAULT, COLOR_DEFAULT, BOLD , NO_BLINK COL_SEARCHHIGHLIGHT= COLOR_DEFAULT, COLOR_DEFAULT, BOLD , NO_BLINK # # Here are some keybindings as well... # KEY_TOTALSEARCH_1 = 's' KEY_TOTALSEARCH_2 = 'S' KEY_SEARCH_1 = '/' KEY_SEARCH_2 = '.' KEY_GOTO_1='g' KEY_GOTO_2='m' KEY_HOME_1=KEY_HOME KEY_HOME_2='H' KEY_PREVNODE_1='p' KEY_PREVNODE_2='P' KEY_NEXTNODE_1='n' KEY_NEXTNODE_2='N' KEY_UP_1=KEY_UP KEY_UP_2='k' KEY_TWOUP_1=KEY_IC KEY_TWOUP_2=0 KEY_END_1=KEY_END KEY_END_2='e' KEY_PGDN_1=KEY_NPAGE KEY_PGDN_2=' ' KEY_PGDN_AUTO_1=0 KEY_PGDN_AUTO_2=' ' KEY_PGUP_1=KEY_PPAGE KEY_PGUP_2='b' KEY_PGUP_AUTO_1=0 KEY_PGUP_AUTO_2='b' KEY_DOWN_1=KEY_DOWN KEY_DOWN_2='j' KEY_TWODOWN_1=KEY_DC KEY_TWODOWN_2=0 KEY_TOP_1='t' KEY_TOP_2='T' KEY_BACK_1=KEY_LEFT KEY_BACK_2='h' KEY_FOLLOWLINK_1=KEY_RIGHT KEY_FOLLOWLINK_2='\n' KEY_REFRESH_1=KEY_CTRL('l') KEY_REFRESH_2='~' KEY_SHELLFEED_1='!' KEY_SHELLFEED_2='1' KEY_QUIT_1='q' KEY_QUIT_2='Q' KEY_DIRPAGE_1='d' KEY_DIRPAGE_2='D' KEY_GOLINE_1='l' KEY_GOLINE_2=0 KEY_PRINT_1=']' KEY_PRINT_2=0 KEY_SEARCH_AGAIN_1='f' KEY_SEARCH_AGAIN_2=0 # # Some options, explained in the man page # MANUAL=false CUT-MAN-HEADERS=true CUT-EMPTY-MAN-LINES=true RAW-FILENAME=false APROPOS=false DONT-HANDLE-WITHOUT-TAG-TABLE=false LONG-MANUAL-LINKS=false FILTER-0xB7=true QUIT-CONFIRMATION=false QUIT-CONFIRM-DEFAULT=no CLEAR-SCREEN-AT-EXIT=true CALL-READLINE-HISTORY=true STDERR-REDIRECTION="2> /dev/null" HTTPVIEWER=lynx FTPVIEWER=lynx MAILEDITOR=clear; mail PRINTUTILITY=lpr MANLINKS=1:8:2:3:4:5:6:7:9:n:p:o:3X11:3Xt:3x:3X SAFE-USER=nobody SAFE-GROUP=nogroup # # Remember, HIGHLIGHTREGEXP may be slow (thus it's commented by default) # #HIGHLIGHTREGEXP=Bash rulez # # The bellow instructions are quoted, since although they give # more security, they are quite slow when turned on... # #IGNORE-MACROS=pso:sy:write:open:opena:pi:!:als #QUOTE-IGNORED-MACROS=true pinfo-0.6.13/src/printinfo.c000066400000000000000000000057151343207050400156650ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" /* * Algorithm: We first print highlights, then we send `\r' to the printer, * and we draw the base line. Thus highlights are printed `twice', and * are darker than the rest :) */ void printnode(char ***message, unsigned long *lines) { #define Message (*message) #define Lines (*lines) /* counter, to point at what highlights are already * handled */ unsigned highlight = 0; /* printer fd */ FILE *prnFD; /* temporary buffer */ char *buf = xmalloc(1024); prnFD = popen(printutility, "w"); /* scan through all lines */ for (unsigned i = 1; i < Lines; i++) { /* * this says, where the printer's head is * right now.(offset in cols from the * beginning of line */ int lineprinted = 0; /* * let's handle the highlights, which belong to our(i'th) line. */ while (hyperobjects[highlight].line <= i) { /* build a complete highlighted text */ if (hyperobjects[highlight].file[0] == 0) strcpy(buf, hyperobjects[highlight].node); else { strcpy(buf, "("); strcat(buf, hyperobjects[highlight].file); strcat(buf, ")"); strcat(buf, hyperobjects[highlight].node); } /* if it's a contiunuation of last's line highlight */ if (hyperobjects[highlight].line == i - 1) { int length = 1; if (hyperobjects[highlight].breakpos == -1) length = strlen(buf) - hyperobjects[highlight].breakpos; fprintf(prnFD, "%s", buf + length - hyperobjects[highlight].breakpos); lineprinted += strlen(buf + length - hyperobjects[highlight].breakpos); } else if (hyperobjects[highlight].line == i) { for (unsigned j = 0; j < hyperobjects[highlight].col - lineprinted; j++) fprintf(prnFD, " "); fprintf(prnFD, "%s", buf); lineprinted = hyperobjects[highlight].col + strlen(buf); } if (highlight < hyperobjectcount - 1) highlight++; else break; } fprintf(prnFD, "\r%s", Message[i]); } pclose(prnFD); xfree(buf); #undef Message #undef Lines } pinfo-0.6.13/src/printinfo.h000066400000000000000000000022271343207050400156650ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef PRINTINFO_H #define PRINTINFO_H /* prints node, pointed by `message', of `lines' length. */ void printnode (char ***message, unsigned long *lines); #endif pinfo-0.6.13/src/readlinewrapper.c000066400000000000000000000124541343207050400170370ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" char **rlhistory = 0; int rlhistorylen = 0; int rlhistorypos = 0; #define KEY_BCKSPC 8 char * readlinewrapper(char *prompt) { /* number of keys pressed */ int numkeys = 0; /* initial buffer for the read line */ char *buf = xmalloc(1024); /* start coords of input line */ int origx, origy; /* cursor position in input string */ int cursor = 0; /* key - a variable for getch() */ int key = 0, i; /* initial value of line - "" */ buf[0] = 0; /* print prompt */ addstr(prompt); /* get origx,origy coordinates */ getyx(stdscr, origy, origx); /* turn off echoing chars by getch() */ noecho(); /* create input line bar */ mvhline(origy, origx, ' ', maxx - origx); /* history entry for this line */ rlhistorylen++; /* move history pos to current entry */ rlhistorypos = rlhistorylen; /* alloc memory for this entry */ if (!rlhistory) rlhistory = xmalloc(sizeof(char *)); else rlhistory = xrealloc(rlhistory, sizeof(char *) * rlhistorylen); rlhistory[rlhistorylen - 1] = xmalloc(1024); /* and copy there the current value of input line */ strcpy(rlhistory[rlhistorylen - 1], buf); /* call history to be present */ if (CallReadlineHistory) { ungetch(KEY_UP); numkeys = -1; } while (key != '\n') { /* read key */ key = getch(); switch(key) { /* move cursor left */ case KEY_LEFT: if (cursor > 0) cursor--; break; /* move cursor right */ case KEY_RIGHT: if (cursor < strlen(buf)) cursor++; break; case KEY_END: cursor = strlen(buf); break; /* handle backspace: copy all */ case KEY_BCKSPC: /* chars starting from curpos */ case KEY_BACKSPACE: /* - 1 from buf[n+1] to buf */ if (cursor > 0) { for (i = cursor - 1; buf[i] != 0; i++) buf[i] = buf[i + 1]; cursor--; } break; /* handle delete key. As above */ case KEY_DC: if (cursor <= strlen(buf) - 1) { for (i = cursor; buf[i] != 0; i++) buf[i] = buf[i + 1]; } break; /* backwards-history call */ case KEY_UP: /* if there is history */ if (rlhistorylen) /* and we have */ if (rlhistorypos > 1) { /* where to move */ /* decrement history position */ rlhistorypos--; /* if the previous pos was the input line */ /* save it's value to history */ if (rlhistorypos == rlhistorylen - 1) strcpy(rlhistory[rlhistorylen - 1], buf); /* recall value from history to input buf */ strcpy(buf, rlhistory[rlhistorypos - 1]); } cursor = strlen(buf); numkeys = -1; break; /* forwards-history call */ case KEY_DOWN: if (rlhistorylen) if (rlhistorypos < rlhistorylen) { rlhistorypos++; strcpy(buf, rlhistory[rlhistorypos - 1]); } cursor = strlen(buf); numkeys = -1; break; /* eliminate nonprintable chars */ case '\n': case KEY_PPAGE: case KEY_NPAGE: case KEY_F(1): case KEY_F(2): case KEY_F(3): case KEY_F(4): case KEY_F(5): case KEY_F(6): case KEY_F(7): case KEY_F(8): case KEY_F(9): case KEY_F(10): break; default: if (key >= 32) { /* if this is the first key, delete the buffer */ if (numkeys==0 && cursor!=0) { for (i=0; buf[i]!=0; i++) buf[i] = 0; cursor = 0; /* and empty the line */ move(origy, origx); for (i = origx; i < maxx; i++) addch(' '); move(origy, origx + cursor); } /* if the cursor is not at the last pos */ if (strlen(buf + cursor)) { char *tmp = 0; tmp = xmalloc(strlen(buf + cursor) + 1); strcpy(tmp, buf + cursor); buf[cursor] = key; buf[cursor + 1] = 0; strcat(&buf[cursor + 1], tmp); xfree(tmp); cursor++; } else { buf[cursor + 1] = 0; buf[cursor] = key; cursor++; } } } move(origy, origx); for (i = origx; i < maxx; i++) addch(' '); move(origy, origx); addstr(buf); move(origy, origx + cursor); numkeys++; } strcpy(rlhistory[rlhistorylen - 1], buf); if (strlen(buf)) { rlhistory[rlhistorylen - 1] = xrealloc(rlhistory[rlhistorylen - 1], strlen(rlhistory[rlhistorylen - 1]) + 1); } else { xfree(rlhistory[rlhistorylen - 1]); rlhistorylen--; rlhistorypos = rlhistorylen; } buf = xrealloc(buf, strlen(buf) + 1); return buf; } pinfo-0.6.13/src/readlinewrapper.h000066400000000000000000000021621343207050400170370ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __READLINEWRAPPER_H #define __READLINEWRAPPER_H char *readlinewrapper (char *prompt); #endif /* __READLINEWRAPPER_H */ pinfo-0.6.13/src/regexp_search.c000066400000000000000000000075521343207050400164750ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #ifndef ___DONT_USE_REGEXP_SEARCH___ #include "regex.h" #include /* adapted partialy from midnight commander view regexp search */ enum { match_file, match_normal }; int __regexp_search(char *pattern, char *string) { int match_type = match_normal; static char *old_pattern = NULL; static int old_type; regmatch_t pmatch[1]; int i, flags = REG_ICASE; int rval; if (!old_pattern || strcmp(old_pattern, pattern) || old_type != match_type) { if (old_pattern) { free(old_pattern); old_pattern = 0; } for (i = 0; pattern[i] != 0; i++) { if (isupper((unsigned char) pattern[i])) { flags = 0; break; } } flags |= REG_EXTENDED; if (pinfo_re_offset == -1) { pinfo_re_offset = h_regexp_num; if (!h_regexp_num) h_regexp = malloc(sizeof(regex_t)); else h_regexp = realloc(h_regexp, sizeof(regex_t) *(h_regexp_num + 1)); } else { regfree(&h_regexp[pinfo_re_offset]); } /* invalid regexp */ if (regcomp(&h_regexp[pinfo_re_offset], pattern, flags)) { return -1; } old_pattern = strdup(pattern); old_type = match_type; } rval = regexec(&h_regexp[pinfo_re_offset], string, 1, pmatch, 0); if (rval != 0) return -1; else return pmatch[0].rm_so; } int regexp_search(char *pattern, char *string) { int newlines = 0, ptr_offset = -1; char *__newlines[2]; char *str = string; char *start = str; while (*str) { if (*str == '\n') { __newlines[newlines] = str + 1; newlines++; } if (newlines == 2) { *str = 0; ptr_offset = __regexp_search(pattern, start); *str = '\n'; newlines = 1; if (ptr_offset != -1) return (start - string) + ptr_offset; if (*(__newlines[0] + 1) != 0) start = __newlines[0] + 1; if (ptr_offset == -1) { __newlines[0] = __newlines[1]; } } str++; } ptr_offset = __regexp_search(pattern, start); if (ptr_offset != -1) { return (start - string) + ptr_offset; } else return -1; } #else /* non-regexp version of search */ int __regexp_search(char *pattern, char *string) { char *found = strstr(string, pattern); if (found == NULL) return -1; else return (long)(found - string); } int regexp_search(char *pattern, char *string) { int newlines = 0, ptr_offset = -1; char *found; char *__newlines[2]; char *str = string; char *start = str; while (*str) { if (*str == '\n') { __newlines[newlines] = str + 1; newlines++; } if (newlines == 2) { *str = 0; ptr_offset = __regexp_search(pattern, start); *str = '\n'; newlines = 1; if (ptr_offset != -1) return (start - string) + ptr_offset; if (*(__newlines[0] + 1) != 0) start = __newlines[0] + 1; if (ptr_offset == -1) { __newlines[0] = __newlines[1]; } } str++; } ptr_offset = __regexp_search(pattern, start); if (ptr_offset != -1) { return (start - string) + ptr_offset; } else return -1; } #endif pinfo-0.6.13/src/regexp_search.h000066400000000000000000000022451343207050400164740ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __REGEXP_SEARCH_H #define __REGEXP_SEARCH_H #ifndef ___DONT_USE_REGEXP_SEARCH___ extern int pinfo_re_offset; int regexp_search (char *pattern, char *string); #endif #endif pinfo-0.6.13/src/sigblock.c000066400000000000000000000036021343207050400154430ustar00rootroot00000000000000/* Copyright(C) 1991, 94, 95, 96, 97, 98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or(at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* orginal from glibc 2.1 */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef HAVE_SIGBLOCK #include #include #include "sigblock.h" /* Block signals in MASK, returning the old mask. */ int sigblock(int mask) { register int sig; sigset_t set, oset; if (sigemptyset(&set) < 0) return -1; if (sizeof(mask) == sizeof(set)) *(int *) &set = mask; else if (sizeof(unsigned long int) == sizeof(set)) *(unsigned long int *) &set =(unsigned int) mask; else for (sig = 1; sig < NSIG && sig <= sizeof(mask) * 8; ++sig) if ((mask & sigmask(sig)) && sigaddset(&set, sig) < 0) return -1; if (sigprocmask(SIG_BLOCK, &set, &oset) < 0) return -1; if (sizeof(mask) == sizeof(oset)) mask = *(int *) &oset; else if (sizeof(unsigned long int) == sizeof(oset)) mask = *(unsigned long int *) &oset; else for (sig = 1, mask = 0; sig < NSIG && sig <= sizeof(mask) * 8; ++sig) if (sigismember(&oset, sig)) mask |= sigmask(sig); return mask; } #endif /* HAVE_SIGBLOCK */ pinfo-0.6.13/src/sigblock.h000066400000000000000000000030731343207050400154520ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef _SIG_H #define _SIG_H #ifndef sigmask /* from bash */ #define sigmask(x) (1 << ((x)-1)) /* from glibc */ /* #define sigmask(sig) (((sigset_t) 1) << ((sig) - 1)) */ #endif /* HAVE_SIGMASK */ #if !defined (SIG_BLOCK) #define SIG_UNBLOCK 1 #define SIG_BLOCK 2 #define SIG_SETMASK 3 #endif /* SIG_BLOCK */ /* #define BLOCK_SIGNAL(sig, nvar, ovar) \ sigemptyset (&nvar); \ sigaddset (&nvar, sig); \ sigemptyset (&ovar); \ sigprocmask (SIG_BLOCK, &nvar, &ovar) */ #ifndef HAVE_SIGBLOCK int sigblock (int mask); #endif /* HAVE_SIGBLOCK */ #endif /* _SIG_H */ pinfo-0.6.13/src/signal_handler.c000066400000000000000000000043511343207050400166220ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #include #include void handle_crash(int signum) { closeprogram(); fprintf(stderr, "Caught signal %d, bye!\n", signum); if (signum == SIGSEGV) perror("pinfo: crash with"); exit(1); } void handle_window_resize(int UNUSED(signum)) { winchanged = 1; ungetch(keys.refresh_1); signal(SIGWINCH, handle_window_resize); } void handle_suspend(int UNUSED(signum)) { if (!isendwin()) { curs_set(1); endwin(); } fprintf(stderr, "\n"); signal(SIGTSTP, handle_suspend); kill(0, SIGSTOP); } void handle_resume(int UNUSED(signum)) { if (isendwin()) { refresh(); curs_set(0); } ungetch(keys.refresh_1); signal(SIGCONT, handle_resume); } void signal_handler() { sigset_t sigs; signal(SIGINT, handle_crash); /* handle ^C */ signal(SIGTERM, handle_crash); /* handle soft kill */ signal(SIGSEGV, handle_crash); /* handle seg. fault */ signal(SIGHUP, handle_crash); /* handle hup signal */ signal(SIGTSTP, handle_suspend);/* handle terminal suspend */ signal(SIGCONT, handle_resume); /* handle back from suspend */ #ifdef SIGWINCH signal(SIGWINCH, handle_window_resize); #endif /* block broken pipe signal */ sigemptyset(&sigs); sigaddset(&sigs, SIGPIPE); sigprocmask(SIG_BLOCK, &sigs, NULL); } pinfo-0.6.13/src/signal_handler.h000066400000000000000000000021661343207050400166310ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __SIGNAL_HANDLER_H #define __SIGNAL_HANDLER_H void signal_handler (); /* handles various signals, coming to pinfo */ #endif pinfo-0.6.13/src/snprintf.c000066400000000000000000000431241343207050400155140ustar00rootroot00000000000000/************************************************************** * Original: * Patrick Powell Tue Apr 11 09:48:21 PDT 1995 * A bombproof version of doprnt(dopr) included. * Sigh. This sort of thing is always nasty do deal with. Note that * the version here does not include floating point... * * snprintf() is used instead of sprintf() as it does limit checks * for string length. This covers a nasty loophole. * * The other functions are there to prevent NULL pointers from * causing nast effects. * * More Recently: * Brandon Long 9/15/96 for mutt 0.43 * This was ugly. It is still ugly. I opted out of floating point * numbers, but the formatter understands just about everything * from the normal C string format, at least as far as I can tell from * the Solaris 2.5 printf(3S) man page. * * Brandon Long 10/22/97 for mutt 0.87.1 * Ok, added some minimal floating point support, which means this * probably requires libm on most operating systems. Don't yet * support the exponent(e,E) and sigfig(g,G). Also, fmtint() * was pretty badly broken, it just wasn't being exercised in ways * which showed it, so that's been fixed. Also, formated the code * to mutt conventions, and removed dead code left over from the * original. Also, there is now a builtin-test, just compile with: * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. * * Thomas Roessler 01/27/98 for mutt 0.89i * The PGP code was using unsigned hexadecimal formats. * Unfortunately, unsigned formats simply didn't work. * * Michael Elkins 03/05/98 for mutt 0.90.8 * The original code assumed that both snprintf() and vsnprintf() were * missing. Some systems only have snprintf() but not vsnprintf(), so * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. * **************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) #include #include #include /* Define this as a fall through, HAVE_STDARG_H is probably already set */ #define HAVE_VARARGS_H /* varargs declarations: */ #if defined(HAVE_STDARG_H) #include #define HAVE_STDARGS /* let's hope that works everywhere(mj) */ #define VA_LOCAL_DECL va_list ap #define VA_START(f) va_start(ap, f) #define VA_SHIFT(v,t) ; /* no-op for ANSI */ #define VA_END va_end(ap) #else #if defined(HAVE_VARARGS_H) #include #undef HAVE_STDARGS #define VA_LOCAL_DECL va_list ap #define VA_START(f) va_start(ap) /* f is ignored! */ #define VA_SHIFT(v,t) v = va_arg(ap,t) #define VA_END va_end(ap) #else /*XX ** NO VARARGS ** XX */ #endif #endif /*int snprintf(char *str, size_t count, const char *fmt, ...); */ /*int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); */ static void dopr(char *buffer, size_t maxlen, const char *format, va_list args); static void fmtstr(char *buffer, size_t * currlen, size_t maxlen, char *value, int flags, int min, int max); static void fmtint(char *buffer, size_t * currlen, size_t maxlen, long value, int base, int min, int max, int flags); static void fmtfp(char *buffer, size_t * currlen, size_t maxlen, long double fvalue, int min, int max, int flags); static void dopr_outch(char *buffer, size_t * currlen, size_t maxlen, char c); /* * dopr(): poor man's version of doprintf */ /* format read states */ #define DP_S_DEFAULT 0 #define DP_S_FLAGS 1 #define DP_S_MIN 2 #define DP_S_DOT 3 #define DP_S_MAX 4 #define DP_S_MOD 5 #define DP_S_CONV 6 #define DP_S_DONE 7 /* format flags - Bits */ #define DP_F_MINUS (1 << 0) #define DP_F_PLUS (1 << 1) #define DP_F_SPACE (1 << 2) #define DP_F_NUM (1 << 3) #define DP_F_ZERO (1 << 4) #define DP_F_UP (1 << 5) #define DP_F_UNSIGNED (1 << 6) /* Conversion Flags */ #define DP_C_SHORT 1 #define DP_C_LONG 2 #define DP_C_LDOUBLE 3 #define char_to_int(p)(p - '0') #define MAX(p,q)((p >= q) ? p : q) static void dopr(char *buffer, size_t maxlen, const char *format, va_list args) { char ch; long value; long double fvalue; char *strvalue; int min; int max; int state; int flags; int cflags; size_t currlen; state = DP_S_DEFAULT; currlen = flags = cflags = min = 0; max = -1; ch = *format++; while (state != DP_S_DONE) { if ((ch == '\0') ||(currlen >= maxlen)) state = DP_S_DONE; switch(state) { case DP_S_DEFAULT: if (ch == '%') state = DP_S_FLAGS; else dopr_outch(buffer, &currlen, maxlen, ch); ch = *format++; break; case DP_S_FLAGS: switch(ch) { case '-': flags |= DP_F_MINUS; ch = *format++; break; case '+': flags |= DP_F_PLUS; ch = *format++; break; case ' ': flags |= DP_F_SPACE; ch = *format++; break; case '#': flags |= DP_F_NUM; ch = *format++; break; case '0': flags |= DP_F_ZERO; ch = *format++; break; default: state = DP_S_MIN; break; } break; case DP_S_MIN: if (isdigit((unsigned char) ch)) { min = 10 * min + char_to_int(ch); ch = *format++; } else if (ch == '*') { min = va_arg(args, int); ch = *format++; state = DP_S_DOT; } else state = DP_S_DOT; break; case DP_S_DOT: if (ch == '.') { state = DP_S_MAX; ch = *format++; } else state = DP_S_MOD; break; case DP_S_MAX: if (isdigit((unsigned char) ch)) { if (max < 0) max = 0; max = 10 * max + char_to_int(ch); ch = *format++; } else if (ch == '*') { max = va_arg(args, int); ch = *format++; state = DP_S_MOD; } else state = DP_S_MOD; break; case DP_S_MOD: /* Currently, we don't support Long Long, bummer */ switch(ch) { case 'h': cflags = DP_C_SHORT; ch = *format++; break; case 'l': cflags = DP_C_LONG; ch = *format++; break; case 'L': cflags = DP_C_LDOUBLE; ch = *format++; break; default: break; } state = DP_S_CONV; break; case DP_S_CONV: switch(ch) { case 'd': case 'i': if (cflags == DP_C_SHORT) value = va_arg(args, short int); else if (cflags == DP_C_LONG) value = va_arg(args, long int); else value = va_arg(args, int); fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'o': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg(args, unsigned short int); else if (cflags == DP_C_LONG) value = va_arg(args, unsigned long int); else value = va_arg(args, unsigned int); fmtint(buffer, &currlen, maxlen, value, 8, min, max, flags); break; case 'u': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg(args, unsigned short int); else if (cflags == DP_C_LONG) value = va_arg(args, unsigned long int); else value = va_arg(args, unsigned int); fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags); break; case 'X': flags |= DP_F_UP; case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) value = va_arg(args, unsigned short int); else if (cflags == DP_C_LONG) value = va_arg(args, unsigned long int); else value = va_arg(args, unsigned int); fmtint(buffer, &currlen, maxlen, value, 16, min, max, flags); break; case 'f': if (cflags == DP_C_LDOUBLE) fvalue = va_arg(args, long double); else fvalue = va_arg(args, double); /* um, floating point? */ fmtfp(buffer, &currlen, maxlen, fvalue, min, max, flags); break; case 'E': flags |= DP_F_UP; case 'e': if (cflags == DP_C_LDOUBLE) fvalue = va_arg(args, long double); else fvalue = va_arg(args, double); break; case 'G': flags |= DP_F_UP; case 'g': if (cflags == DP_C_LDOUBLE) fvalue = va_arg(args, long double); else fvalue = va_arg(args, double); break; case 'c': dopr_outch(buffer, &currlen, maxlen, va_arg(args, int)); break; case 's': strvalue = va_arg(args, char *); if (max < 0) max = maxlen; /* ie, no max */ fmtstr(buffer, &currlen, maxlen, strvalue, flags, min, max); break; case 'p': strvalue = va_arg(args, void *); fmtint(buffer, &currlen, maxlen,(long) strvalue, 16, min, max, flags); break; case 'n': if (cflags == DP_C_SHORT) { short int *num; num = va_arg(args, short int *); *num = currlen; } else if (cflags == DP_C_LONG) { long int *num; num = va_arg(args, long int *); *num = currlen; } else { int *num; num = va_arg(args, int *); *num = currlen; } break; case '%': dopr_outch(buffer, &currlen, maxlen, ch); break; case 'w': /* not supported yet, treat as next char */ ch = *format++; break; default: /* Unknown, skip */ break; } ch = *format++; state = DP_S_DEFAULT; flags = cflags = min = 0; max = -1; break; case DP_S_DONE: break; default: /* hmm? */ break; /* some picky compilers need this */ } } if (currlen < maxlen - 1) buffer[currlen] = '\0'; else buffer[maxlen - 1] = '\0'; } static void fmtstr(char *buffer, size_t * currlen, size_t maxlen, char *value, int flags, int min, int max) { int padlen, strln; /* amount to pad */ int cnt = 0; if (value == 0) { value = ""; } for (strln = 0; value[strln]; ++strln); /* strlen */ padlen = min - strln; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ while ((padlen > 0) &&(cnt < max)) { dopr_outch(buffer, currlen, maxlen, ' '); --padlen; ++cnt; } while (*value &&(cnt < max)) { dopr_outch(buffer, currlen, maxlen, *value++); ++cnt; } while ((padlen < 0) &&(cnt < max)) { dopr_outch(buffer, currlen, maxlen, ' '); ++padlen; ++cnt; } } /* Have to handle DP_F_NUM(ie 0x and 0 alternates) */ static void fmtint(char *buffer, size_t * currlen, size_t maxlen, long value, int base, int min, int max, int flags) { int signvalue = 0; unsigned long uvalue; char convert[20]; int place = 0; int spadlen = 0; /* amount to space pad */ int zpadlen = 0; /* amount to zero pad */ int caps = 0; if (max < 0) max = 0; uvalue = value; if (!(flags & DP_F_UNSIGNED)) { if (value < 0) { signvalue = '-'; uvalue = -value; } else if (flags & DP_F_PLUS) /* Do a sign(+/i) */ signvalue = '+'; else if (flags & DP_F_SPACE) signvalue = ' '; } if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ do { convert[place++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef") [uvalue %(unsigned) base]; uvalue =(uvalue /(unsigned) base); } while (uvalue &&(place < 20)); if (place == 20) place--; convert[place] = 0; zpadlen = max - place; spadlen = min - MAX(max, place) -(signvalue ? 1 : 0); if (zpadlen < 0) zpadlen = 0; if (spadlen < 0) spadlen = 0; if (flags & DP_F_ZERO) { zpadlen = MAX(zpadlen, spadlen); spadlen = 0; } if (flags & DP_F_MINUS) spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF dprint(1,(debugfile, "zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", zpadlen, spadlen, min, max, place)); #endif /* Spaces */ while (spadlen > 0) { dopr_outch(buffer, currlen, maxlen, ' '); --spadlen; } /* Sign */ if (signvalue) dopr_outch(buffer, currlen, maxlen, signvalue); /* Zeros */ if (zpadlen > 0) { while (zpadlen > 0) { dopr_outch(buffer, currlen, maxlen, '0'); --zpadlen; } } /* Digits */ while (place > 0) dopr_outch(buffer, currlen, maxlen, convert[--place]); /* Left Justified spaces */ while (spadlen < 0) { dopr_outch(buffer, currlen, maxlen, ' '); ++spadlen; } } static long double abs_val(long double value) { long double result = value; if (value < 0) result = -value; return result; } static long double pow10(int exp) { long double result = 1; while (exp) { result *= 10; exp--; } return result; } static long round(long double value) { long intpart; intpart = value; value = value - intpart; if (value >= 0.5) intpart++; return intpart; } static void fmtfp(char *buffer, size_t * currlen, size_t maxlen, long double fvalue, int min, int max, int flags) { int signvalue = 0; long double ufvalue; char iconvert[20]; char fconvert[20]; int iplace = 0; int fplace = 0; int padlen = 0; /* amount to pad */ int zpadlen = 0; int caps = 0; long intpart; long fracpart; /* * AIX manpage says the default is 0, but Solaris says the default * is 6, and sprintf on AIX defaults to 6 */ if (max < 0) max = 6; ufvalue = abs_val(fvalue); if (fvalue < 0) signvalue = '-'; else if (flags & DP_F_PLUS) /* Do a sign(+/i) */ signvalue = '+'; else if (flags & DP_F_SPACE) signvalue = ' '; #if 0 if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ #endif intpart = ufvalue; /* * Sorry, we only support 9 digits past the decimal because of our * conversion method */ if (max > 9) max = 9; /* We "cheat" by converting the fractional part to integer by * multiplying by a factor of 10 */ fracpart = round((pow10(max)) *(ufvalue - intpart)); if (fracpart >= pow10(max)) { intpart++; fracpart -= pow10(max); } #ifdef DEBUG_SNPRINTF dprint(1,(debugfile, "fmtfp: %f =? %d.%d\n", fvalue, intpart, fracpart)); #endif /* Convert integer part */ do { iconvert[iplace++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef")[intpart % 10]; intpart =(intpart / 10); } while (intpart &&(iplace < 20)); if (iplace == 20) iplace--; iconvert[iplace] = 0; /* Convert fractional part */ do { fconvert[fplace++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef")[fracpart % 10]; fracpart =(fracpart / 10); } while (fracpart &&(fplace < 20)); if (fplace == 20) fplace--; fconvert[fplace] = 0; /* -1 for decimal point, another -1 if we are printing a sign */ padlen = min - iplace - max - 1 -((signvalue) ? 1 : 0); zpadlen = max - fplace; if (zpadlen < 0) zpadlen = 0; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justifty */ if ((flags & DP_F_ZERO) &&(padlen > 0)) { if (signvalue) { dopr_outch(buffer, currlen, maxlen, signvalue); --padlen; signvalue = 0; } while (padlen > 0) { dopr_outch(buffer, currlen, maxlen, '0'); --padlen; } } while (padlen > 0) { dopr_outch(buffer, currlen, maxlen, ' '); --padlen; } if (signvalue) dopr_outch(buffer, currlen, maxlen, signvalue); while (iplace > 0) dopr_outch(buffer, currlen, maxlen, iconvert[--iplace]); /* * Decimal point. This should probably use locale to find the correct * char to print out. */ dopr_outch(buffer, currlen, maxlen, '.'); while (fplace > 0) dopr_outch(buffer, currlen, maxlen, fconvert[--fplace]); while (zpadlen > 0) { dopr_outch(buffer, currlen, maxlen, '0'); --zpadlen; } while (padlen < 0) { dopr_outch(buffer, currlen, maxlen, ' '); ++padlen; } } static void dopr_outch(char *buffer, size_t * currlen, size_t maxlen, char c) { if (*currlen < maxlen) buffer[(*currlen)++] = c; } #endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ #ifndef HAVE_VSNPRINTF int vsnprintf(char *str, size_t count, const char *fmt, va_list args) { str[0] = 0; dopr(str, count, fmt, args); return (strlen(str)); } #endif /* !HAVE_VSNPRINTF */ #ifndef HAVE_SNPRINTF /* VARARGS3 */ #ifdef HAVE_STDARGS int snprintf(char *str, size_t count, const char *fmt,...) #else int snprintf(va_alist) va_dcl #endif { #ifndef HAVE_STDARGS char *str; size_t count; char *fmt; #endif VA_LOCAL_DECL; VA_START(fmt); VA_SHIFT(str, char *); VA_SHIFT(count, size_t); VA_SHIFT(fmt, char *); (void) vsnprintf(str, count, fmt, ap); VA_END; return (strlen(str)); } #ifdef TEST_SNPRINTF #ifndef LONG_STRING #define LONG_STRING 1024 #endif int main(void) { char buf1[LONG_STRING]; char buf2[LONG_STRING]; char *fp_fmt[] = { "%-1.5f", "%1.5f", "%123.9f", "%10.5f", "% 10.5f", "%+22.9f", "%+4.9f", "%01.3f", "%4f", "%3.1f", "%3.2f", NULL }; double fp_nums[] = {-1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, 0.9996, 1.996, 4.136, 0}; char *int_fmt[] = { "%-1.5d", "%1.5d", "%123.9d", "%5.5d", "%10.5d", "% 10.5d", "%+22.33d", "%01.3d", "%4d", NULL }; long int_nums[] = {-1, 134, 91340, 341, 0203, 0}; int x, y; int fail = 0; int num = 0; printf("Testing snprintf format codes against system sprintf...\n"); for (x = 0; fp_fmt[x] != NULL; x++) for (y = 0; fp_nums[y] != 0; y++) { snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]); sprintf(buf2, fp_fmt[x], fp_nums[y]); if (strcmp(buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", fp_fmt[x], buf1, buf2); fail++; } num++; } for (x = 0; int_fmt[x] != NULL; x++) for (y = 0; int_nums[y] != 0; y++) { snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]); sprintf(buf2, int_fmt[x], int_nums[y]); if (strcmp(buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", int_fmt[x], buf1, buf2); fail++; } num++; } printf("%d tests failed out of %d.\n", fail, num); } #endif /* SNPRINTF_TEST */ #endif /* !HAVE_SNPRINTF */ pinfo-0.6.13/src/utils.c000066400000000000000000000421171343207050400150120ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" #include #include #include #ifdef USE_WCHAR #include #endif char *safe_user = "nobody"; char *safe_group = "nogroup"; #ifndef HAVE_DECL_CURS_SET void curs_set(int a) { } #endif #ifdef ___DONT_USE_REGEXP_SEARCH___ char *pinfo_re_pattern = 0; #else int pinfo_re_offset = -1; #endif #ifdef HAS_READLINE #include #include /* HAS_READLINE */ #endif /* * the bellow define enables malloc/realloc/free logging to stderr. * They start to log their argument values. * * #define ___DEBUG___ * */ #ifdef ___DEBUG___ unsigned long malloc_addr[1000]; unsigned long msizes[1000]; long addrescount = 0; /* ___DEBUG___ */ #endif int curses_open = 0; int shell_cursor = 1; void xfree(void *ptr) { #ifdef ___DEBUG___ int i, j; int flag = 0; unsigned long msize = 0; for (i = 0; i < addrescount; i++) msize += msizes[i]; fprintf(stderr, "Size: %lu, count: %ld, freeing %lu\n", msize, addrescount,(unsigned long) ptr); for (i = 0; i < addrescount; i++) if (malloc_addr[i] ==(unsigned long) ptr) { flag = 1; for (j = i + 1; j < addrescount; j++) { malloc_addr[j - 1] = malloc_addr[j]; msizes[j - 1] = msizes[j]; } addrescount--; break; } if (flag == 0) { fprintf(stderr, "ERROR!!!\n"); getchar(); } /* ___DEBUG___ */ #endif free(ptr); } /* TODO: get rid of this xmalloc nonsense */ void * xmalloc(size_t size) { register void *value = malloc(size); #ifdef ___DEBUG___ unsigned long msize = 0; int i; /* ___DEBUG___ */ #endif if (value == 0) { closeprogram(); printf(_("Virtual memory exhausted\n")); exit(1); } #ifdef ___DEBUG___ for (i = 0; i < addrescount; i++) msize += msizes[i]; fprintf(stderr, "Size %lu, count: %ld, allocated %lu\n", msize, addrescount,(unsigned long) value); malloc_addr[addrescount] =(unsigned long) value; msizes[addrescount] = size; if (addrescount < 1000) addrescount++; else { fprintf(stderr, "trace buffer exhausted\n"); } /* ___DEBUG___ */ #endif memset(value, 0, size); return value; } void * xrealloc(void *ptr, size_t size) { #ifdef ___DEBUG___ int i, j, flag = 0; register void *value; unsigned long msize = 0; for (i = 0; i < addrescount; i++) msize += msizes[i]; fprintf(stderr, "Size: %lu, count: %ld, reallocating %lu to ", msize, addrescount,(unsigned long) ptr); for (i = 0; i < addrescount; i++) if (malloc_addr[i] ==(unsigned long) ptr) { flag = 1; for (j = i + 1; j < addrescount; j++) { malloc_addr[j - 1] = malloc_addr[j]; msizes[j - 1] = msizes[j]; } addrescount--; break; } if (flag == 0) { fprintf(stderr, "ERROR!!!\n"); getchar(); } value = realloc(ptr, size); #else register void *value = realloc(ptr, size + 1024); /* ___DEBUG___ */ #endif if (value == 0) { closeprogram(); printf(_("Virtual memory exhausted\n")); exit(1); } #ifdef ___DEBUG___ fprintf(stderr, "%lu, with size %lu\n",(unsigned long) value,(unsigned long) size); malloc_addr[addrescount] =(unsigned long) value; msizes[addrescount] = size; if (addrescount < 1000) addrescount++; else { fprintf(stderr, "trace buffer exhausted\n"); } /* ___DEBUG___ */ #endif return value; } int system_check(const char *command) { if (command==NULL) { return -1; } int result = system(command); if (WIFEXITED(result)) { return WEXITSTATUS(result); } return -1; } void xsystem(const char *command) { int result = system_check(command); if (result!=0) { printf(_("Failed to execute command '%s': %i"), command, result); exit(2); } } void initlocale() { #ifdef ___DEBUG___ int i; for (i = 0; i < 1000; i++) malloc_addr[i] = 0; /* ___DEBUG___ */ #endif setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); } void mymvhline(int y, int x, char ch, int len) { int i; for (i = 0; i < len; i++) mvaddch(y, x + i, ch); } void checkfilename(char *filename) { if ((strchr(filename, '<')) || (strchr(filename, '>')) || (strchr(filename, '|')) || (strchr(filename, '(')) || (strchr(filename, ')')) || (strchr(filename, '!')) || (strchr(filename, '`')) || (strchr(filename, '&')) || (strchr(filename, ';'))) { printf(_("Illegal characters in filename!\n*** %s\n"), filename); exit(1); } } #ifdef HAS_READLINE /* custom function that readline will use to display text */ void my_rl_display() { static size_t len = 0; /* if the user's input has changed, clear the entire line to remove possible leftover completions */ size_t newlen = strlen(rl_line_buffer); if (newlen!=len) { mymvhline(maxy - 1, 0, ' ', maxx); len = newlen; } /* go to the bottom line, print the prompt and buffer */ attrset(bottomline); move(maxy-1,0); printw("%s%s", rl_prompt, rl_line_buffer); refresh(); } void my_rl_completion_display(char **matches, int num_matches, int UNUSED(max_length)) { if (num_matches<1) { return; } /* redraw entire prompt line, appended with possible matches */ move(maxy-1,0); printw("%s", rl_prompt); /* note: first entry is the entered text, matches start at index 1 */ printw("%s ", matches[0]); for (int i=1; i < num_matches+1; i++) { printw("%s ", matches[i]); } /* and return prompt to correct position */ move(maxy-1, strlen(rl_prompt) + strlen(matches[0]) ); refresh(); } /* note: if set, last string MUST be set to NULL */ static const char * const *completion_values = NULL; /* readline completion functions, see https://thoughtbot.com/blog/tab-completion-in-gnu-readline */ /* this function is called for each attempted match */ char * getstring_completion_generator(const char *text, int state) { static int list_index, len; const char *name; if (!state) { list_index = 0; len = strlen(text); } while ((name = completion_values[list_index++]) && name!=NULL) { if (strncmp(name, text, len) == 0) { return strdup(name); } } return NULL; } /* this function is called when readline attempts completions. Return a matching function or NULL for no matching */ char ** getstring_completion(const char *text, int UNUSED(start), int UNUSED(end)) { /* do not fall back to default filename completion */ rl_attempted_completion_over = 1; rl_completion_append_character = '\0'; if (completion_values==NULL) { return NULL; } return rl_completion_matches(text, getstring_completion_generator); } #endif const char ** completions_from_tag_table(TagTable * table, size_t num) { /* allocate an extra entry at the end, which is set to NULL to terminate the table */ const char ** completions = calloc(num+1, sizeof(*completions)); for (size_t i=0, j=0; i> 1); int compare_result = compare_tag_table_string(tag_table[thispos].nodename, node); if (compare_result == 0) return thispos; else { if (left == right) return -1; if (compare_result > 0) { if (thispos > left) return gettagtablepos_search_internal(node, left, thispos - 1); else return -1; } else if (compare_result < 0) { if (thispos < right) return gettagtablepos_search_internal(node, thispos + 1, right); else return -1; } } return -1; } int gettagtablepos(char *node) { /* strip spaces from the beginning */ while (1) { if ((*node != ' ') &&(*node != '\t')) break; node++; } return gettagtablepos_search_internal(node, 1, TagTableEntries); } int pinfo_getch() { int key = getch(); /* following key will be alt's value */ if (key == META_KEY) { key = getch(); key |= 0x200; } return key; } void waitforgetch() { int ret; fd_set rdfs; FD_ZERO(&rdfs); FD_SET(0, &rdfs); /* we might get interrupted by e.g. SIGTSTP/SIGCONT */ do ret = select(1, &rdfs, NULL, NULL, NULL); while (ret == -1 && errno == EINTR); } /* returns 0 on success, 1 on error */ int pinfo_re_comp(char *name) { #ifdef ___DONT_USE_REGEXP_SEARCH___ if (pinfo_re_pattern) { free(pinfo_re_pattern); pinfo_re_pattern = 0; } pinfo_re_pattern = strdup(name); return 0; #else /* first see if we can compile the regexp */ regex_t preg; if (regcomp(&preg, name, REG_ICASE) != 0) { /* compilation failed, so return */ return -1; } /* compilation succeeded */ /* first make some space in h_regexp[] to store the compiled regexp */ if (pinfo_re_offset == -1) { pinfo_re_offset = h_regexp_num; if (!h_regexp_num) h_regexp = malloc(sizeof(regex_t)); else h_regexp = realloc(h_regexp, sizeof(regex_t) *(h_regexp_num + 1)); } else { regfree(&h_regexp[pinfo_re_offset]); } /* then copy the compiled expression into the newly allocated space */ memcpy(&h_regexp[pinfo_re_offset], &preg, sizeof(preg)); /* and finally return 0 for success */ return 0; #endif } int pinfo_re_exec(char *name) { #ifdef ___DONT_USE_REGEXP_SEARCH___ char *found; if (pinfo_re_pattern) { found = strstr(name, pinfo_re_pattern); if (found != NULL) return 1; else return 0; } #else regmatch_t pmatch[1]; return !regexec(&h_regexp[pinfo_re_offset], name, 1, pmatch, 0); #endif } int yesno(char *prompt, int def) { char *yes = _("yes"); char *no = _("no"); int key; attrset(bottomline); mymvhline(maxy - 1, 0, ' ', maxx); move(maxy - 1, 0); /* if default answer is yes */ if (def) printw("%s([%c]/%c)", prompt, *yes, *no); else printw("%s([%c]/%c)", prompt, *no, *yes); nodelay(stdscr, FALSE); while (1) { key = getch(); if (key == ERR) return -1; if (is_enter_key(key)) break; else { if (tolower(key) == tolower(*yes)) { def = 1; break; } else { if (tolower(key) == tolower(*no)) { def = 0; break; } else beep(); } } } nodelay(stdscr, TRUE); if (def) addstr(yes); else addstr(no); attrset(normal); return def; } void myclrtoeol() { unsigned x, y; getyx(stdscr, y, x); for (unsigned i = x; i < maxx; i++) mvaddch(y, i, ' '); } void copy_stripped_from_regexp(char *src, char *dest) { char *forbidden = "*.\\()[]\n"; while (strchr(forbidden, *src) == NULL) { if (*src == 0) break; *dest = *src; src++; dest++; } *dest = 0; } void myendwin() { curs_set(shell_cursor); endwin(); } void handlewinch() { myendwin(); init_curses(); doupdate(); getmaxyx(stdscr, maxy, maxx); ungetch(keys.refresh_1); } /* * this functions checks whether the node header node_header * corresponds to node node_name * * e.g. the header is something like: * File: bash.info, Node: Introduction, Next: Defs, Prev: Top, Up: Top * and we check here if the Node: entry in this header is equal to node_name * * returns 0 if node_header does not belong to a node with name node_name * returns -1 if no checking was done * returns 1 if check turned out ok */ int check_node_name( const char * const node_name, const char * const node_header) { size_t header_len; char *header, *str_start, *c; int res; /* if either one of node_name or node_header is NULL or a zero * sized string, we have nothing to check, so return success */ if ( (node_name==NULL) || (node_header==NULL) || (strlen(node_name)==0) || (strlen(node_header)==0) ) { return 1; } header_len = strlen(node_header); /* copy node_header to a local string which can be mutilated */ /* don't use strdup here, as xmalloc handles all errors */ header = xmalloc( header_len + 1 ); strcpy(header, node_header); /* search for "Node: foobar," in node_header */ str_start = strstr(header, "Node: "); if (str_start==NULL) /* no match */ { return 0; } /* advance str_start to the start of the node name */ str_start += strlen("Node: "); /* and search for the next comma, tab, or newline */ c = str_start; while ( (*c!=',') && (*c!='\t') && (*c!='\n') && (*c!='\0') ) c++; *c = '\0'; /* so, now str_start point to a \0-terminated string containing the * node name from the header. * Let's compare it with the node_name we're looking for */ res = strcmp(str_start, node_name); /* we're done, so free alloc'ed vars */ xfree(header); /* check result of strcmp() and return */ if ( res==0 ) { /* match found */ return 1; } else { /* no match */ return 0; } } /* * The wcswidth function returns the number of columns needed to represent * the wide-character string pointed to by s, but at most n wide charac‐ * ters. If a non-printable wide character occurs among these characters, * -1 is returned. */ #if defined(USE_WCHAR) && !defined(HAVE_WCSWIDTH) int wcswidth(const wchar_t *wstr, size_t max_len) { int width = 0; size_t i; size_t len = wcslen(wstr); /* never count more than max_len chars */ if (len>max_len) len=max_len; for (i=0; i * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __UTILS_H #define __UTILS_H extern char *safe_user; extern char *safe_group; #ifndef HAVE_DECL_CURS_SET void curs_set (int a); #endif #ifdef ___DONT_USE_REGEXP_SEARCH___ extern char *pinfo_re_pattern; #endif /* wrappers for re_comp and re_exec */ int pinfo_re_comp (char *name); int pinfo_re_exec (char *name); /* user defined getch, capable of handling ALT keybindings */ int pinfo_getch (); /* free() wrapper */ void xfree (void *ptr); /* malloc() wrapper */ void *xmalloc (size_t size); /* realloc() wrapper */ void *xrealloc (void *ptr, size_t size); /* system(), but return sane error code */ int system_check(const char *command); /* safe, error-checking, command execution */ void xsystem(const char *command); /* initializes GNU locales */ void initlocale (); /* checks if file name does not cause secuirity problems */ void checkfilename (char *filename); /* closes the program, and removes temporary files */ void closeprogram (); /* initializes curses interface */ void init_curses (); /* an interface to gnu readline */ char *getstring (char *prompt); char *getstring_with_completion (char *prompt, const char * const *completions); /* create a completion table from a tag_table */ const char ** completions_from_tag_table(TagTable * table, size_t num); /* for some reasons mvhline does not work quite properly... */ void mymvhline (int y, int x, char ch, int len); /* this one supports color back/foreground */ void myclrtoeol (); /* takes care of the cursor, which is turned off */ void myendwin (); /* ? */ void handlewinch (); /* get offset of "node" in tag_table variable */ int gettagtablepos (char *node); /* handle localized `(y/n)' dialog box. */ int yesno (char *prompt, int def); /* copies the first part of string, which is without regexp */ void copy_stripped_from_regexp (char *src, char *dest); /* Block until something's on STDIN */ void waitforgetch (); /* is curses screen open? */ extern int curses_open; /* * this functions checks whether the node header node_header * corresponds to node node_name * * returns 0 if node_header does not belong to a node with name node_name * returns -1 if no checking was done (e.g. because node_name was NULL) * returns 1 if check turned out ok */ int check_node_name( const char * const node_name, const char * const node_header); /* calculate width of string, handling multibyte encodings * correctly */ int width_of_string( const char * const mbs, const int len); /* * calculates the length of string between start and end, counting `\t' as * filling up to 8 chars. (i.e. at line 22 tab will increment the counter by 2 * [8-(22-int(22/8)*8)] spaces) */ int calculate_len(char *start, char *end); /* * * create a temporary file in a safe way, and return its name in a newly * * allocated string * */ char * make_tempfile(); #endif pinfo-0.6.13/src/video.c000066400000000000000000000213361343207050400147600ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * Copyright 2005 Nathanael Nerode * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #include "common_includes.h" void info_add_highlights(unsigned pos, unsigned cursor, unsigned long lines, unsigned column, char **message); void substitutestr(char *src, char *dest, char *from, char *to) /* * Utility for substituting strings in given string. * Used for internationalization of info headers. */ { char *start = strstr(src, from); char tmp; if (!start) strcpy(dest, src); else { tmp = *start; *start = 0; strcpy(dest, src); strcat(dest, to); *start = tmp; start += strlen(from); strcat(dest, start); } } void addtopline(char *type, int column) { char *buf1 = xmalloc(strlen(type) + 50); char *buf2 = xmalloc(strlen(type) + 50); int buf2len; strcpy(buf1, type); substitutestr(buf1, buf2, "File:", _("File:")); substitutestr(buf2, buf1, "Node:", _("Node:")); substitutestr(buf1, buf2, "Next:", _("Next:")); substitutestr(buf2, buf1, "Prev:", _("Prev:")); substitutestr(buf1, buf2, "Up:", _("Up:")); attrset(topline); mymvhline(0, 0, ' ', maxx); /* pads line with spaces -- estetic */ buf2len=strlen(buf2); if (buf2len) buf2[buf2len - 1] = '\0'; if (buf2len>column) mvaddstr(0, 0, buf2+column); attrset(normal); xfree(buf1); xfree(buf2); } void showscreen(char **message, unsigned long lines, unsigned long pos, long cursor, int column) { #ifdef getmaxyx getmaxyx(stdscr, maxy, maxx); #endif #ifdef HAVE_BKGDSET bkgdset(' ' | normal); #endif attrset(normal); for (unsigned long i = pos; (i < lines) && (i < pos + maxy - 2); i++) { int tmp; if (!message[i]) continue; tmp = strlen(message[i]) - 1; message[i][tmp] = 0; if (tmp>column) mvaddstr(i + 1 - pos, 0, message[i]+column); else move(i + 1 - pos,0); #ifdef HAVE_BKGDSET clrtoeol(); #else myclrtoeol(); #endif message[i][tmp] = '\n'; } clrtobot(); #ifdef HAVE_BKGDSET bkgdset(0); #endif attrset(bottomline); mymvhline(maxy - 1, 0, ' ', maxx); move(maxy - 1, 0); if ((pos < lines - 1) &&(lines > pos + maxy - 2)) printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines); else printw(_("Viewing line %d/%d, 100%%"), lines, lines); info_add_highlights(pos, cursor, lines, column, message); attrset(normal); move(0, 0); refresh(); } /* * prints a line, taking care for the horizontal scrolling. * if the string fits in the window, it is drawn. If not, * it is either cut, or completely omitted. */ void info_addstr(int y, int x, char *txt, int column, int txtlen) { int xmax, UNUSED(ymax); getmaxyx(stdscr, ymax, xmax); /* Use xmax and mvaddnstr to force clipping. * Fairly blunt instrument, but the best I could come up with. * Breaks in the presence of tabs; I don't see how to handle them. */ if (x>column) mvaddnstr(y,x-column,txt, xmax-(x-column) ); else if (x+txtlen>column) mvaddnstr(y,0,txt+(column-x), xmax ); #ifdef __DEBUG__ refresh(); #endif /* __DEBUG__ */ } void info_add_highlights(unsigned pos, unsigned cursor, unsigned long lines, unsigned column, char **message) { for (unsigned long i = 0; i < hyperobjectcount; i++) { if ((hyperobjects[i].line >= pos) && (hyperobjects[i].line < pos +(maxy - 2))) { /* first part of if's sets the required attributes */ if (hyperobjects[i].type < 2) /* menu */ { if (i == cursor) attrset(menuselected); else attrset(menu); } else if (hyperobjects[i].type < 4) /* note */ { if (i == cursor) attrset(noteselected); else attrset(note); } else if (hyperobjects[i].type < HIGHLIGHT) /* url */ { if (i == cursor) attrset(urlselected); else attrset(url); } else /* quoted text -- highlight it */ { attrset(infohighlight); } /* now we start actual drawing */ if (hyperobjects[i].file[0] == 0) { if (hyperobjects[i].breakpos == -1) { info_addstr(1 + hyperobjects[i].line - pos, hyperobjects[i].col, hyperobjects[i].node, column, hyperobjects[i].nodelen); } else { int j; char tmp = hyperobjects[i].node[hyperobjects[i].breakpos]; hyperobjects[i].node[hyperobjects[i].breakpos] = 0; info_addstr(1 + hyperobjects[i].line - pos, hyperobjects[i].col, hyperobjects[i].node, column, hyperobjects[i].breakpos); hyperobjects[i].node[hyperobjects[i].breakpos] = tmp; j = hyperobjects[i].breakpos; /* skip leading spaces after newline */ while (hyperobjects[i].node[j] == ' ') j++; if (hyperobjects[i].line - pos + 3 < maxy) info_addstr(1 + hyperobjects[i].line - pos + 1, j - hyperobjects[i].breakpos, hyperobjects[i].node + j, column, hyperobjects[i].nodelen-j); } } else { if (hyperobjects[i].breakpos == -1) { char *buf=xmalloc(hyperobjects[i].filelen+hyperobjects[i].nodelen+3); snprintf(buf,hyperobjects[i].filelen+hyperobjects[i].nodelen+3, "(%s)%s",hyperobjects[i].file,hyperobjects[i].node); info_addstr(1 + hyperobjects[i].line - pos, hyperobjects[i].col, buf, column, hyperobjects[i].filelen+hyperobjects[i].nodelen+2); xfree(buf); } else { static char buf[1024]; char tmp; int j; strcpy(buf, "("); strcat(buf, hyperobjects[i].file); strcat(buf, ")"); strcat(buf, hyperobjects[i].node); tmp = buf[hyperobjects[i].breakpos]; buf[hyperobjects[i].breakpos] = 0; info_addstr(1 + hyperobjects[i].line - pos, hyperobjects[i].col, buf, column, hyperobjects[i].breakpos+2); buf[hyperobjects[i].breakpos] = tmp; j = hyperobjects[i].breakpos; /* skip leading spaces after newline */ while (buf[j] == ' ') j++; if (hyperobjects[i].line - pos + 3 < maxy) info_addstr(1 + hyperobjects[i].line - pos + 1, j - hyperobjects[i].breakpos, buf + j, column, hyperobjects[i].filelen+hyperobjects[i].nodelen+2-j); } } attrset(normal); } } #ifndef ___DONT_USE_REGEXP_SEARCH___ if ((h_regexp_num) ||(aftersearch)) { regmatch_t pmatch[1]; if (maxy<2) maxy=2; unsigned long maxpos = pos +(maxy - 2); int maxregexp; if (maxpos > lines) { maxpos = lines; } maxregexp = aftersearch ? h_regexp_num + 1 : h_regexp_num; /* * if it is after search, then we have user defined regexps+ * a searched regexp to highlight */ /* loop over all the lines currently in the window */ for (unsigned i = pos; (i < lines) && (i < pos + maxy - 2); i++) { char *str = message[i]; /* loop over all regexps we might want to show */ int j; for (j = 0; j < maxregexp; j++) { /* check if this regexp is present on this line */ while (!regexec(&h_regexp[j], str, 1, pmatch, 0)) { int x, y; char tmp; /* yes, found something, so highlight it */ int n = pmatch[0].rm_eo - pmatch[0].rm_so; if (n==0) { /* matched empty string! */ /* display error message */ char msg[81]; snprintf(msg, 81, "%s", _("Warning: matched empty string") ); attrset(bottomline); mvhline(maxy - 1, 0, ' ', maxx); mvaddstr(maxy - 1, 0, msg); move(0, 0); attrset(normal); break; } /* point str at start of match */ str += pmatch[0].rm_so; /* calculate position on screen */ x = calculate_len(message[i], str); y = i - pos + 1; /* save the char after the end of the match, * and replace it by \0 */ tmp = str[n]; str[n] = 0; /* write out the highlighted match to screen */ attrset(searchhighlight); mvaddstr(y, x, str); attrset(normal); /* restore the original char at the end of the match */ str[n] = tmp; /* skip past this match */ str += n; } } } } #endif } pinfo-0.6.13/src/video.h000066400000000000000000000032611343207050400147620ustar00rootroot00000000000000/*************************************************************************** * Pinfo is a ncurses based lynx style info documentation browser * * Copyright (C) 1999 Przemek Borys * Copyright (C) 2005 Bas Zoetekouw * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA ***************************************************************************/ #ifndef __VIDEO_H #define __VIDEO_H /* paints the screen while viewing info file */ void showscreen (char **message, unsigned long lines, unsigned long pos, long cursor, int column); /* prints unselected menu option */ void mvaddstr_menu (int y, int x, char *line, int linenumber); /* prints selected menu option */ void mvaddstr_menu_selected (int y, int x, char *line, int linenumber); /* prints unselected note option */ void mvaddstr_note (int y, int x, char *line, char *nline, int linenumber); /* prints selected note option */ void mvaddstr_note_selected (int y, int x, char *line, char *nline, int linenumber); /* adds top line of info page */ void addtopline (char *type, int column); #endif pinfo-0.6.13/stamp-h.in000066400000000000000000000000121343207050400146040ustar00rootroot00000000000000timestamp