From cbffab246997fb5a06211dfb706b54e5ae5bb59f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 16:58:51 +0200 Subject: Adding upstream version 1.21.22. Signed-off-by: Daniel Baumann --- dselect/Makefile.am | 72 ++ dselect/Makefile.in | 995 ++++++++++++++++++ dselect/basecmds.cc | 320 ++++++ dselect/baselist.cc | 412 ++++++++ dselect/basetop.cc | 52 + dselect/bindings.cc | 179 ++++ dselect/bindings.h | 96 ++ dselect/curkeys.cc | 31 + dselect/cxx-support.cc | 82 ++ dselect/dselect-curses.h | 38 + dselect/dselect.h | 204 ++++ dselect/helpmsgs.cc | 217 ++++ dselect/helpmsgs.h | 38 + dselect/keyoverride | 58 ++ dselect/main.cc | 563 +++++++++++ dselect/methkeys.cc | 109 ++ dselect/methlist.cc | 229 +++++ dselect/method.cc | 257 +++++ dselect/method.h | 95 ++ dselect/methods/Dselect/Ftp.pm | 410 ++++++++ dselect/methods/Makefile.am | 56 + dselect/methods/Makefile.in | 755 ++++++++++++++ dselect/methods/file/desc.file | 8 + dselect/methods/file/install.sh | 124 +++ dselect/methods/file/names | 1 + dselect/methods/file/setup.sh | 305 ++++++ dselect/methods/file/update.sh | 84 ++ dselect/methods/ftp/desc.ftp | 2 + dselect/methods/ftp/install.pl | 624 ++++++++++++ dselect/methods/ftp/names | 1 + dselect/methods/ftp/setup.pl | 177 ++++ dselect/methods/ftp/update.pl | 250 +++++ dselect/methods/media/README.media | 101 ++ dselect/methods/media/desc.media | 3 + dselect/methods/media/install.sh | 285 ++++++ dselect/methods/media/names | 1 + dselect/methods/media/setup.sh | 485 +++++++++ dselect/methods/media/update.sh | 125 +++ dselect/methparse.cc | 304 ++++++ dselect/mkcurkeys.pl | 145 +++ dselect/pkgcmds.cc | 353 +++++++ dselect/pkgdepcon.cc | 460 +++++++++ dselect/pkgdisplay.cc | 272 +++++ dselect/pkginfo.cc | 188 ++++ dselect/pkgkeys.cc | 144 +++ dselect/pkglist.cc | 639 ++++++++++++ dselect/pkglist.h | 263 +++++ dselect/pkgsublist.cc | 227 +++++ dselect/pkgtop.cc | 308 ++++++ dselect/po/ChangeLog.old | 372 +++++++ dselect/po/LINGUAS | 32 + dselect/po/Makefile.in.in | 510 ++++++++++ dselect/po/Makevars | 82 ++ dselect/po/POTFILES.in | 21 + dselect/po/Rules-quot | 62 ++ dselect/po/boldquot.sed | 10 + dselect/po/bs.gmo | Bin 0 -> 3283 bytes dselect/po/bs.po | 1408 ++++++++++++++++++++++++++ dselect/po/ca.gmo | Bin 0 -> 41625 bytes dselect/po/ca.po | 1764 ++++++++++++++++++++++++++++++++ dselect/po/cs.gmo | Bin 0 -> 41112 bytes dselect/po/cs.po | 1773 ++++++++++++++++++++++++++++++++ dselect/po/da.gmo | Bin 0 -> 28807 bytes dselect/po/da.po | 1801 ++++++++++++++++++++++++++++++++ dselect/po/de.gmo | Bin 0 -> 41235 bytes dselect/po/de.po | 1764 ++++++++++++++++++++++++++++++++ dselect/po/dselect.pot | 1367 +++++++++++++++++++++++++ dselect/po/el.gmo | Bin 0 -> 33198 bytes dselect/po/el.po | 1862 ++++++++++++++++++++++++++++++++++ dselect/po/en@boldquot.header | 25 + dselect/po/en@quot.header | 22 + dselect/po/es.gmo | Bin 0 -> 43130 bytes dselect/po/es.po | 1884 ++++++++++++++++++++++++++++++++++ dselect/po/et.gmo | Bin 0 -> 17964 bytes dselect/po/et.po | 1654 ++++++++++++++++++++++++++++++ dselect/po/eu.gmo | Bin 0 -> 28548 bytes dselect/po/eu.po | 1922 +++++++++++++++++++++++++++++++++++ dselect/po/fr.gmo | Bin 0 -> 44132 bytes dselect/po/fr.po | 1868 ++++++++++++++++++++++++++++++++++ dselect/po/gl.gmo | Bin 0 -> 27930 bytes dselect/po/gl.po | 1932 +++++++++++++++++++++++++++++++++++ dselect/po/hu.gmo | Bin 0 -> 16518 bytes dselect/po/hu.po | 1544 ++++++++++++++++++++++++++++ dselect/po/id.gmo | Bin 0 -> 25100 bytes dselect/po/id.po | 1922 +++++++++++++++++++++++++++++++++++ dselect/po/insert-header.sin | 28 + dselect/po/it.gmo | Bin 0 -> 25495 bytes dselect/po/it.po | 1944 +++++++++++++++++++++++++++++++++++ dselect/po/ja.gmo | Bin 0 -> 34649 bytes dselect/po/ja.po | 1774 ++++++++++++++++++++++++++++++++ dselect/po/ko.gmo | Bin 0 -> 29827 bytes dselect/po/ko.po | 1498 +++++++++++++++++++++++++++ dselect/po/nb.gmo | Bin 0 -> 28626 bytes dselect/po/nb.po | 1898 ++++++++++++++++++++++++++++++++++ dselect/po/nl.gmo | Bin 0 -> 40565 bytes dselect/po/nl.po | 1617 +++++++++++++++++++++++++++++ dselect/po/nn.gmo | Bin 0 -> 23659 bytes dselect/po/nn.po | 1835 +++++++++++++++++++++++++++++++++ dselect/po/pl.gmo | Bin 0 -> 29519 bytes dselect/po/pl.po | 1918 +++++++++++++++++++++++++++++++++++ dselect/po/pt.gmo | Bin 0 -> 29632 bytes dselect/po/pt.po | 1916 +++++++++++++++++++++++++++++++++++ dselect/po/pt_BR.gmo | Bin 0 -> 28071 bytes dselect/po/pt_BR.po | 1949 +++++++++++++++++++++++++++++++++++ dselect/po/quot.sed | 6 + dselect/po/remove-potcdate.sin | 25 + dselect/po/ro.gmo | Bin 0 -> 28836 bytes dselect/po/ro.po | 1970 ++++++++++++++++++++++++++++++++++++ dselect/po/ru.gmo | Bin 0 -> 55106 bytes dselect/po/ru.po | 1736 +++++++++++++++++++++++++++++++ dselect/po/sk.gmo | Bin 0 -> 29338 bytes dselect/po/sk.po | 1944 +++++++++++++++++++++++++++++++++++ dselect/po/stamp-po | 1 + dselect/po/sv.gmo | Bin 0 -> 39720 bytes dselect/po/sv.po | 1787 ++++++++++++++++++++++++++++++++ dselect/po/tl.gmo | Bin 0 -> 25147 bytes dselect/po/tl.po | 1889 ++++++++++++++++++++++++++++++++++ dselect/po/vi.gmo | Bin 0 -> 31797 bytes dselect/po/vi.po | 1906 ++++++++++++++++++++++++++++++++++ dselect/po/zh_CN.gmo | Bin 0 -> 40186 bytes dselect/po/zh_CN.po | 1763 ++++++++++++++++++++++++++++++++ dselect/po/zh_TW.gmo | Bin 0 -> 39613 bytes dselect/po/zh_TW.po | 1740 +++++++++++++++++++++++++++++++ 123 files changed, 67892 insertions(+) create mode 100644 dselect/Makefile.am create mode 100644 dselect/Makefile.in create mode 100644 dselect/basecmds.cc create mode 100644 dselect/baselist.cc create mode 100644 dselect/basetop.cc create mode 100644 dselect/bindings.cc create mode 100644 dselect/bindings.h create mode 100644 dselect/curkeys.cc create mode 100644 dselect/cxx-support.cc create mode 100644 dselect/dselect-curses.h create mode 100644 dselect/dselect.h create mode 100644 dselect/helpmsgs.cc create mode 100644 dselect/helpmsgs.h create mode 100644 dselect/keyoverride create mode 100644 dselect/main.cc create mode 100644 dselect/methkeys.cc create mode 100644 dselect/methlist.cc create mode 100644 dselect/method.cc create mode 100644 dselect/method.h create mode 100644 dselect/methods/Dselect/Ftp.pm create mode 100644 dselect/methods/Makefile.am create mode 100644 dselect/methods/Makefile.in create mode 100644 dselect/methods/file/desc.file create mode 100755 dselect/methods/file/install.sh create mode 100644 dselect/methods/file/names create mode 100755 dselect/methods/file/setup.sh create mode 100755 dselect/methods/file/update.sh create mode 100644 dselect/methods/ftp/desc.ftp create mode 100755 dselect/methods/ftp/install.pl create mode 100644 dselect/methods/ftp/names create mode 100755 dselect/methods/ftp/setup.pl create mode 100755 dselect/methods/ftp/update.pl create mode 100644 dselect/methods/media/README.media create mode 100644 dselect/methods/media/desc.media create mode 100755 dselect/methods/media/install.sh create mode 100644 dselect/methods/media/names create mode 100755 dselect/methods/media/setup.sh create mode 100755 dselect/methods/media/update.sh create mode 100644 dselect/methparse.cc create mode 100755 dselect/mkcurkeys.pl create mode 100644 dselect/pkgcmds.cc create mode 100644 dselect/pkgdepcon.cc create mode 100644 dselect/pkgdisplay.cc create mode 100644 dselect/pkginfo.cc create mode 100644 dselect/pkgkeys.cc create mode 100644 dselect/pkglist.cc create mode 100644 dselect/pkglist.h create mode 100644 dselect/pkgsublist.cc create mode 100644 dselect/pkgtop.cc create mode 100644 dselect/po/ChangeLog.old create mode 100644 dselect/po/LINGUAS create mode 100644 dselect/po/Makefile.in.in create mode 100644 dselect/po/Makevars create mode 100644 dselect/po/POTFILES.in create mode 100644 dselect/po/Rules-quot create mode 100644 dselect/po/boldquot.sed create mode 100644 dselect/po/bs.gmo create mode 100644 dselect/po/bs.po create mode 100644 dselect/po/ca.gmo create mode 100644 dselect/po/ca.po create mode 100644 dselect/po/cs.gmo create mode 100644 dselect/po/cs.po create mode 100644 dselect/po/da.gmo create mode 100644 dselect/po/da.po create mode 100644 dselect/po/de.gmo create mode 100644 dselect/po/de.po create mode 100644 dselect/po/dselect.pot create mode 100644 dselect/po/el.gmo create mode 100644 dselect/po/el.po create mode 100644 dselect/po/en@boldquot.header create mode 100644 dselect/po/en@quot.header create mode 100644 dselect/po/es.gmo create mode 100644 dselect/po/es.po create mode 100644 dselect/po/et.gmo create mode 100644 dselect/po/et.po create mode 100644 dselect/po/eu.gmo create mode 100644 dselect/po/eu.po create mode 100644 dselect/po/fr.gmo create mode 100644 dselect/po/fr.po create mode 100644 dselect/po/gl.gmo create mode 100644 dselect/po/gl.po create mode 100644 dselect/po/hu.gmo create mode 100644 dselect/po/hu.po create mode 100644 dselect/po/id.gmo create mode 100644 dselect/po/id.po create mode 100644 dselect/po/insert-header.sin create mode 100644 dselect/po/it.gmo create mode 100644 dselect/po/it.po create mode 100644 dselect/po/ja.gmo create mode 100644 dselect/po/ja.po create mode 100644 dselect/po/ko.gmo create mode 100644 dselect/po/ko.po create mode 100644 dselect/po/nb.gmo create mode 100644 dselect/po/nb.po create mode 100644 dselect/po/nl.gmo create mode 100644 dselect/po/nl.po create mode 100644 dselect/po/nn.gmo create mode 100644 dselect/po/nn.po create mode 100644 dselect/po/pl.gmo create mode 100644 dselect/po/pl.po create mode 100644 dselect/po/pt.gmo create mode 100644 dselect/po/pt.po create mode 100644 dselect/po/pt_BR.gmo create mode 100644 dselect/po/pt_BR.po create mode 100644 dselect/po/quot.sed create mode 100644 dselect/po/remove-potcdate.sin create mode 100644 dselect/po/ro.gmo create mode 100644 dselect/po/ro.po create mode 100644 dselect/po/ru.gmo create mode 100644 dselect/po/ru.po create mode 100644 dselect/po/sk.gmo create mode 100644 dselect/po/sk.po create mode 100644 dselect/po/stamp-po create mode 100644 dselect/po/sv.gmo create mode 100644 dselect/po/sv.po create mode 100644 dselect/po/tl.gmo create mode 100644 dselect/po/tl.po create mode 100644 dselect/po/vi.gmo create mode 100644 dselect/po/vi.po create mode 100644 dselect/po/zh_CN.gmo create mode 100644 dselect/po/zh_CN.po create mode 100644 dselect/po/zh_TW.gmo create mode 100644 dselect/po/zh_TW.po (limited to 'dselect') diff --git a/dselect/Makefile.am b/dselect/Makefile.am new file mode 100644 index 0000000..ebf8c76 --- /dev/null +++ b/dselect/Makefile.am @@ -0,0 +1,72 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = methods po + +AM_CPPFLAGS = \ + -DLOCALEDIR=\"$(localedir)\" \ + -DADMINDIR=\"$(admindir)\" \ + -DLIBDIR=\"$(pkglibexecdir)\" \ + -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \ + -idirafter $(top_srcdir)/lib/compat \ + -iquote $(builddir) \ + -I$(top_builddir) \ + -I$(top_srcdir)/lib \ + # EOL +AM_CXXFLAGS = \ + -fno-rtti \ + -fno-exceptions \ + # EOL +if HAVE_LINKER_AS_NEEDED +AM_LDFLAGS = \ + -Wl,--as-needed \ + # EOL +endif + + +bin_PROGRAMS = dselect + +dselect_SOURCES = \ + cxx-support.cc \ + dselect.h \ + dselect-curses.h \ + basecmds.cc \ + baselist.cc \ + basetop.cc \ + bindings.cc bindings.h \ + curkeys.cc \ + helpmsgs.cc helpmsgs.h \ + main.cc \ + methkeys.cc \ + methlist.cc \ + method.cc method.h \ + methparse.cc \ + pkgcmds.cc \ + pkgdepcon.cc \ + pkgdisplay.cc \ + pkginfo.cc \ + pkgkeys.cc \ + pkglist.cc pkglist.h \ + pkgsublist.cc \ + pkgtop.cc \ + # EOL + +dselect_LDADD = \ + $(CURSES_LIBS) \ + ../lib/dpkg/libdpkg.la \ + $(LIBINTL) \ + ../lib/compat/libcompat.la \ + # EOL + + +EXTRA_DIST = keyoverride mkcurkeys.pl +CLEANFILES = curkeys.hpp curkeys.h + +curkeys.$(OBJEXT): curkeys.h +curkeys.hpp: dselect-curses.h + $(AM_V_GEN) echo '#include "dselect-curses.h"' | \ + $(CPP) -dD $(CPPFLAGS) -I$(top_builddir) -I $(srcdir) - >$@ +curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl curkeys.hpp + $(AM_V_GEN) $(PERL) $(srcdir)/mkcurkeys.pl $< curkeys.hpp >$@ + +install-data-local: + $(MKDIR_P) $(DESTDIR)$(pkgconfdir)/dselect.cfg.d diff --git a/dselect/Makefile.in b/dselect/Makefile.in new file mode 100644 index 0000000..338c8df --- /dev/null +++ b/dselect/Makefile.in @@ -0,0 +1,995 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = dselect$(EXEEXT) +subdir = dselect +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/dpkg-arch.m4 \ + $(top_srcdir)/m4/dpkg-build.m4 \ + $(top_srcdir)/m4/dpkg-compiler.m4 \ + $(top_srcdir)/m4/dpkg-coverage.m4 \ + $(top_srcdir)/m4/dpkg-funcs.m4 $(top_srcdir)/m4/dpkg-libs.m4 \ + $(top_srcdir)/m4/dpkg-linker.m4 $(top_srcdir)/m4/dpkg-progs.m4 \ + $(top_srcdir)/m4/dpkg-types.m4 \ + $(top_srcdir)/m4/dpkg-unicode.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_dselect_OBJECTS = cxx-support.$(OBJEXT) basecmds.$(OBJEXT) \ + baselist.$(OBJEXT) basetop.$(OBJEXT) bindings.$(OBJEXT) \ + curkeys.$(OBJEXT) helpmsgs.$(OBJEXT) main.$(OBJEXT) \ + methkeys.$(OBJEXT) methlist.$(OBJEXT) method.$(OBJEXT) \ + methparse.$(OBJEXT) pkgcmds.$(OBJEXT) pkgdepcon.$(OBJEXT) \ + pkgdisplay.$(OBJEXT) pkginfo.$(OBJEXT) pkgkeys.$(OBJEXT) \ + pkglist.$(OBJEXT) pkgsublist.$(OBJEXT) pkgtop.$(OBJEXT) +dselect_OBJECTS = $(am_dselect_OBJECTS) +am__DEPENDENCIES_1 = +dselect_DEPENDENCIES = $(am__DEPENDENCIES_1) ../lib/dpkg/libdpkg.la \ + $(am__DEPENDENCIES_1) ../lib/compat/libcompat.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/basecmds.Po ./$(DEPDIR)/baselist.Po \ + ./$(DEPDIR)/basetop.Po ./$(DEPDIR)/bindings.Po \ + ./$(DEPDIR)/curkeys.Po ./$(DEPDIR)/cxx-support.Po \ + ./$(DEPDIR)/helpmsgs.Po ./$(DEPDIR)/main.Po \ + ./$(DEPDIR)/methkeys.Po ./$(DEPDIR)/methlist.Po \ + ./$(DEPDIR)/method.Po ./$(DEPDIR)/methparse.Po \ + ./$(DEPDIR)/pkgcmds.Po ./$(DEPDIR)/pkgdepcon.Po \ + ./$(DEPDIR)/pkgdisplay.Po ./$(DEPDIR)/pkginfo.Po \ + ./$(DEPDIR)/pkgkeys.Po ./$(DEPDIR)/pkglist.Po \ + ./$(DEPDIR)/pkgsublist.Po ./$(DEPDIR)/pkgtop.Po +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(dselect_SOURCES) +DIST_SOURCES = $(dselect_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOM4TE = @AUTOM4TE@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_DEVEL_DOCS = @BUILD_DEVEL_DOCS@ +BZ2_LIBS = @BZ2_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CURSES_LIBS = @CURSES_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GCOV = @GCOV@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +KVM_LIBS = @KVM_LIBS@ +LCOV = @LCOV@ +LCOV_GENHTML = @LCOV_GENHTML@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LZMA_LIBS = @LZMA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MD_LIBS = @MD_LIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_BUG_WEB = @PACKAGE_BUG_WEB@ +PACKAGE_COPYRIGHT_HOLDER = @PACKAGE_COPYRIGHT_HOLDER@ +PACKAGE_CPAN_NAME = @PACKAGE_CPAN_NAME@ +PACKAGE_DIST_IS_RELEASE = @PACKAGE_DIST_IS_RELEASE@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_RELEASE_DATE = @PACKAGE_RELEASE_DATE@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VCS_TYPE = @PACKAGE_VCS_TYPE@ +PACKAGE_VCS_URL = @PACKAGE_VCS_URL@ +PACKAGE_VCS_WEB = @PACKAGE_VCS_WEB@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL_COVER = @PERL_COVER@ +PERL_COVERAGE = @PERL_COVERAGE@ +PERL_LIBDIR = @PERL_LIBDIR@ +PERL_MIN_VERSION = @PERL_MIN_VERSION@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PO4A = @PO4A@ +POD2MAN = @POD2MAN@ +POSUB = @POSUB@ +PS_LIBS = @PS_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOCKET_LIBS = @SOCKET_LIBS@ +STRIP = @STRIP@ +TAR = @TAR@ +USE_NLS = @USE_NLS@ +USE_PO4A = @USE_PO4A@ +USE_UNICODE = @USE_UNICODE@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +ZSTD_LIBS = @ZSTD_LIBS@ +Z_LIBS = @Z_LIBS@ +Z_NG_LIBS = @Z_NG_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +admindir = @admindir@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +backupsdir = @backupsdir@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +devlibdir = @devlibdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfdir = @pkgconfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +zshcompletionsdir = @zshcompletionsdir@ +SUBDIRS = methods po +AM_CPPFLAGS = \ + -DLOCALEDIR=\"$(localedir)\" \ + -DADMINDIR=\"$(admindir)\" \ + -DLIBDIR=\"$(pkglibexecdir)\" \ + -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \ + -idirafter $(top_srcdir)/lib/compat \ + -iquote $(builddir) \ + -I$(top_builddir) \ + -I$(top_srcdir)/lib \ + # EOL + +AM_CXXFLAGS = \ + -fno-rtti \ + -fno-exceptions \ + # EOL + +@HAVE_LINKER_AS_NEEDED_TRUE@AM_LDFLAGS = \ +@HAVE_LINKER_AS_NEEDED_TRUE@ -Wl,--as-needed \ +@HAVE_LINKER_AS_NEEDED_TRUE@ # EOL + +dselect_SOURCES = \ + cxx-support.cc \ + dselect.h \ + dselect-curses.h \ + basecmds.cc \ + baselist.cc \ + basetop.cc \ + bindings.cc bindings.h \ + curkeys.cc \ + helpmsgs.cc helpmsgs.h \ + main.cc \ + methkeys.cc \ + methlist.cc \ + method.cc method.h \ + methparse.cc \ + pkgcmds.cc \ + pkgdepcon.cc \ + pkgdisplay.cc \ + pkginfo.cc \ + pkgkeys.cc \ + pkglist.cc pkglist.h \ + pkgsublist.cc \ + pkgtop.cc \ + # EOL + +dselect_LDADD = \ + $(CURSES_LIBS) \ + ../lib/dpkg/libdpkg.la \ + $(LIBINTL) \ + ../lib/compat/libcompat.la \ + # EOL + +EXTRA_DIST = keyoverride mkcurkeys.pl +CLEANFILES = curkeys.hpp curkeys.h +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .cc .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dselect/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign dselect/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +dselect$(EXEEXT): $(dselect_OBJECTS) $(dselect_DEPENDENCIES) $(EXTRA_dselect_DEPENDENCIES) + @rm -f dselect$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(dselect_OBJECTS) $(dselect_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basecmds.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/baselist.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basetop.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bindings.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curkeys.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cxx-support.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helpmsgs.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/methkeys.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/methlist.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/method.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/methparse.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgcmds.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgdepcon.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgdisplay.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkginfo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgkeys.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkglist.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgsublist.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgtop.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.cc.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f ./$(DEPDIR)/basecmds.Po + -rm -f ./$(DEPDIR)/baselist.Po + -rm -f ./$(DEPDIR)/basetop.Po + -rm -f ./$(DEPDIR)/bindings.Po + -rm -f ./$(DEPDIR)/curkeys.Po + -rm -f ./$(DEPDIR)/cxx-support.Po + -rm -f ./$(DEPDIR)/helpmsgs.Po + -rm -f ./$(DEPDIR)/main.Po + -rm -f ./$(DEPDIR)/methkeys.Po + -rm -f ./$(DEPDIR)/methlist.Po + -rm -f ./$(DEPDIR)/method.Po + -rm -f ./$(DEPDIR)/methparse.Po + -rm -f ./$(DEPDIR)/pkgcmds.Po + -rm -f ./$(DEPDIR)/pkgdepcon.Po + -rm -f ./$(DEPDIR)/pkgdisplay.Po + -rm -f ./$(DEPDIR)/pkginfo.Po + -rm -f ./$(DEPDIR)/pkgkeys.Po + -rm -f ./$(DEPDIR)/pkglist.Po + -rm -f ./$(DEPDIR)/pkgsublist.Po + -rm -f ./$(DEPDIR)/pkgtop.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f ./$(DEPDIR)/basecmds.Po + -rm -f ./$(DEPDIR)/baselist.Po + -rm -f ./$(DEPDIR)/basetop.Po + -rm -f ./$(DEPDIR)/bindings.Po + -rm -f ./$(DEPDIR)/curkeys.Po + -rm -f ./$(DEPDIR)/cxx-support.Po + -rm -f ./$(DEPDIR)/helpmsgs.Po + -rm -f ./$(DEPDIR)/main.Po + -rm -f ./$(DEPDIR)/methkeys.Po + -rm -f ./$(DEPDIR)/methlist.Po + -rm -f ./$(DEPDIR)/method.Po + -rm -f ./$(DEPDIR)/methparse.Po + -rm -f ./$(DEPDIR)/pkgcmds.Po + -rm -f ./$(DEPDIR)/pkgdepcon.Po + -rm -f ./$(DEPDIR)/pkgdisplay.Po + -rm -f ./$(DEPDIR)/pkginfo.Po + -rm -f ./$(DEPDIR)/pkgkeys.Po + -rm -f ./$(DEPDIR)/pkglist.Po + -rm -f ./$(DEPDIR)/pkgsublist.Po + -rm -f ./$(DEPDIR)/pkgtop.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +curkeys.$(OBJEXT): curkeys.h +curkeys.hpp: dselect-curses.h + $(AM_V_GEN) echo '#include "dselect-curses.h"' | \ + $(CPP) -dD $(CPPFLAGS) -I$(top_builddir) -I $(srcdir) - >$@ +curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl curkeys.hpp + $(AM_V_GEN) $(PERL) $(srcdir)/mkcurkeys.pl $< curkeys.hpp >$@ + +install-data-local: + $(MKDIR_P) $(DESTDIR)$(pkgconfdir)/dselect.cfg.d + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/dselect/basecmds.cc b/dselect/basecmds.cc new file mode 100644 index 0000000..18f88e1 --- /dev/null +++ b/dselect/basecmds.cc @@ -0,0 +1,320 @@ +/* + * dselect - Debian package maintenance user interface + * basecmds.cc - base list keyboard commands display + * + * Copyright © 1994,1995 Ian Jackson + * Copyright © 2000,2001 Wichert Akkerman + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "dselect.h" +#include "helpmsgs.h" + +void baselist::kd_scrollon() { + topofscreen += list_height; + if (topofscreen > nitems - list_height) topofscreen= nitems - list_height; + if (topofscreen < 0) topofscreen= 0; + if (cursorline < topofscreen) + setcursor(topofscreen); + refreshlist(); +} + +void baselist::kd_scrollon1() { + if (topofscreen >= nitems - list_height) return; + topofscreen++; + if (cursorline < topofscreen) + setcursor(topofscreen); + refreshlist(); +} + +void baselist::kd_scrollback() { + topofscreen -= list_height; + if (topofscreen < 0) topofscreen= 0; + if (cursorline >= topofscreen + list_height) + setcursor(topofscreen + list_height - 1); + refreshlist(); +} + +void baselist::kd_scrollback1() { + if (topofscreen <= 0) return; + topofscreen--; + if (cursorline >= topofscreen + list_height) + setcursor(topofscreen + list_height - 1); + refreshlist(); +} + +void baselist::kd_top() { + topofscreen= 0; setcursor(0); +} + +void baselist::kd_bottom() { + topofscreen= nitems - list_height; + if (topofscreen < 0) topofscreen= 0; + setcursor(min(topofscreen + list_height - 1, nitems - 1)); +} + +void baselist::kd_redraw() { + clearok(curscr,TRUE); + redrawall(); + debug(dbg_general, "baselist[%p]::kd_redraw() done", this); +} + +void baselist::kd_searchagain() { + if (!searchstring[0]) { beep(); return; } + dosearch(); +} + +bool +baselist::checksearch(char *str) +{ + return true; +} + +bool +baselist::matchsearch(int index) +{ + int lendiff, searchlen, i; + const char *name; + + name = itemname(index); + if (!name) + return false; /* Skip things without a name (separators). */ + + searchlen=strlen(searchstring); + lendiff = strlen(name) - searchlen; + for (i=0; i<=lendiff; i++) + if (strncasecmp(name + i, searchstring, searchlen) == 0) + return true; + + return false; +} + +void baselist::kd_search() { + char newsearchstring[128]; + strcpy(newsearchstring,searchstring); + werase(querywin); + mvwaddstr(querywin,0,0, _("Search for ? ")); + echo(); + if (wgetnstr(querywin,newsearchstring,sizeof(newsearchstring)-1) == ERR) + searchstring[0]= 0; + resize_window(); + noecho(); + if (whatinfo_height) { touchwin(whatinfowin); refreshinfo(); } + else if (info_height) { touchwin(infopad); refreshinfo(); } + else if (thisstate_height) redrawthisstate(); + else { touchwin(listpad); refreshlist(); } + if (newsearchstring[0]) { + if (!checksearch(newsearchstring)) { + beep(); + return; + } + strcpy(searchstring,newsearchstring); + dosearch(); + } else + kd_searchagain(); +} + +void +baselist::displayerror(const char *str) +{ + const char *pr = _("Error: "); + int prlen=strlen(pr); + + beep(); + werase(querywin); + mvwaddstr(querywin,0,0,pr); + mvwaddstr(querywin,0,prlen,str); + wgetch(querywin); + if (whatinfo_height) { touchwin(whatinfowin); refreshinfo(); } + else if (info_height) { touchwin(infopad); refreshinfo(); } + else if (thisstate_height) redrawthisstate(); +} + + +void baselist::displayhelp(const struct helpmenuentry *helpmenu, int key) { + int maxx, maxy, i, nextkey; + + wbkgdset(stdscr, ' ' | part_attr[helpscreen]); + clearok(stdscr,TRUE); + for (;;) { + getmaxyx(stdscr, maxy, maxx); + werase(stdscr); + const struct helpmenuentry *hme = helpmenu; + while (hme->key && hme->key != key) + hme++; + if (hme->key) { + int x, y DPKG_ATTR_UNUSED; + + attrset(part_attr[helpscreen]); + mvaddstr(1,0, gettext(hme->msg->text)); + attrset(part_attr[title]); + mvaddstr(0,0, _("Help: ")); + addstr(gettext(hme->msg->title)); + getyx(stdscr,y,x); + while (++x to exit help.")); + getyx(stdscr,y,x); + while (++xkey; hme++,i++) { + attrset(A_BOLD); + mvaddch(i+3,3, hme->key); + attrset(A_NORMAL); + mvaddstr(i+3,6, gettext(hme->msg->title)); + } + mvaddstr(i+4,1, + _("Press a key from the list above, or 'q' to exit help,\n" + " or '.' (full stop) to read each help page in turn. ")); + nextkey= helpmenu[0].key; + } + refresh(); + do { + int curkey = key; + + key = getch(); + if (key == KEY_RESIZE) { + resize_window(); + key = curkey; + } + } while (key == ERR && errno == EINTR); + if (key == EOF) ohshite(_("error reading keyboard in help")); + if (key == ' ' || key == 'q') { + break; + } else if (key == '?' || key == 'h') { + key= 0; + } else if (key == '.') { + key= nextkey; + } + } + werase(stdscr); + clearok(stdscr,TRUE); + wnoutrefresh(stdscr); + + redrawtitle(); + refreshcolheads(); + refreshlist(); + redrawthisstate(); + refreshinfo(); + wnoutrefresh(whatinfowin); +} + +void baselist::kd_help() { + displayhelp(helpmenulist(),0); +} + +void baselist::setcursor(int index) { + if (listpad && cursorline != -1) { + redrawitemsrange(cursorline,cursorline+1); + redraw1itemsel(cursorline,0); + } + if (cursorline != index) infotopofscreen= 0; + cursorline= index; + if (listpad) { + redrawitemsrange(cursorline,cursorline+1); + redraw1itemsel(cursorline,1); + refreshlist(); + redrawthisstate(); + } + redrawinfo(); +} + +void baselist::kd_down() { + int ncursor= cursorline; + // scroll by one line unless the bottom is already visible + // or we're in the top half of the screen ... + if (topofscreen < nitems - list_height && + ncursor >= topofscreen + list_height - 3) topofscreen++; + // move cursor if there are any more ... + if (cursorline+1 < nitems) ncursor++; + setcursor(ncursor); +} + +void baselist::kd_up() { + int ncursor= cursorline; + // scroll by one line if there are any lines not shown yet + // and we're not in the bottom half the screen ... + if (topofscreen > 0 && + ncursor <= topofscreen + 2) topofscreen--; + // move cursor if there are any to move it to ... + if (cursorline > 0) ncursor--; + setcursor(ncursor); +} + +void baselist::kd_iscrollon() { + infotopofscreen += info_height; + if (infotopofscreen > infolines - info_height) + infotopofscreen= infolines - info_height; + if (infotopofscreen < 0) infotopofscreen= 0; + refreshinfo(); +} + +void baselist::kd_iscrollback() { + infotopofscreen -= info_height; + if (infotopofscreen < 0) infotopofscreen= 0; + refreshinfo(); +} + +void baselist::kd_iscrollon1() { + if (infotopofscreen >= infolines - info_height) return; + infotopofscreen++; refreshinfo(); +} + +void baselist::kd_iscrollback1() { + if (infotopofscreen <= 0) return; + infotopofscreen--; refreshinfo(); +} + +void baselist::kd_panon() { + leftofscreen += xmax/3; + if (leftofscreen > total_width - xmax) leftofscreen= total_width - xmax; + if (leftofscreen < 0) leftofscreen= 0; + refreshcolheads(); refreshlist(); redrawthisstate(); refreshinfo(); +} + +void baselist::kd_panback() { + leftofscreen -= xmax/3; + if (leftofscreen < 0) leftofscreen= 0; + refreshcolheads(); refreshlist(); redrawthisstate(); refreshinfo(); +} + +void baselist::kd_panon1() { + leftofscreen++; + if (leftofscreen > total_width - xmax) leftofscreen= total_width - xmax; + if (leftofscreen < 0) leftofscreen= 0; + refreshcolheads(); refreshlist(); redrawthisstate(); refreshinfo(); +} + +void baselist::kd_panback1() { + leftofscreen--; + if (leftofscreen < 0) leftofscreen= 0; + refreshcolheads(); refreshlist(); redrawthisstate(); refreshinfo(); +} diff --git a/dselect/baselist.cc b/dselect/baselist.cc new file mode 100644 index 0000000..ec8cf4d --- /dev/null +++ b/dselect/baselist.cc @@ -0,0 +1,412 @@ +/* + * dselect - Debian package maintenance user interface + * baselist.cc - list of somethings + * + * Copyright © 1994,1995 Ian Jackson + * Copyright © 2001 Wichert Akkerman + * Copyright © 2007-2013 Guillem Jover + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "dselect.h" +#include "bindings.h" + +void mywerase(WINDOW *win) { + int my,mx,y,x; + getmaxyx(win,my,mx); + for (y=0; y=7) { + list_height= 5; + whatinfo_height= 1; + info_height= y-6; + } else if (showinfo==1 && y>=10) { + list_height= y/2; + info_height= (y-1)/2; + whatinfo_height= 1; + } else { + list_height= y; + info_height= 0; + whatinfo_height= 0; + } + colheads_row= title_height; + list_row= colheads_row + colheads_height; + thisstate_row= list_row + list_height; + info_row= thisstate_row + thisstate_height; + whatinfo_row= ymax - 1; +} + +void baselist::startdisplay() { + debug(dbg_general, "baselist[%p]::startdisplay()", this); + cbreak(); noecho(); nonl(); keypad(stdscr,TRUE); + clear(); wnoutrefresh(stdscr); + + // find attributes + if (has_colors() && start_color()==OK && COLOR_PAIRS >= numscreenparts) { + int i; + printf("allocing\n"); + for (i = 1; i < numscreenparts; i++) { + if (init_pair(i, color[i].fore, color[i].back) != OK) + ohshite(_("failed to allocate colour pair")); + part_attr[i] = COLOR_PAIR(i) | color[i].attr; + } + } else { + /* User defined attributes for B&W mode are not currently supported. */ + part_attr[title] = A_REVERSE; + part_attr[thisstate] = A_STANDOUT; + part_attr[list] = 0; + part_attr[listsel] = A_STANDOUT; + part_attr[selstate] = A_BOLD; + part_attr[selstatesel] = A_STANDOUT; + part_attr[colheads]= A_BOLD; + part_attr[query] = part_attr[title]; + part_attr[info_body] = part_attr[list]; + part_attr[info_head] = A_BOLD; + part_attr[whatinfo] = part_attr[thisstate]; + part_attr[helpscreen] = A_NORMAL; + } + + // set up windows and pads, based on screen size + getmaxyx(stdscr,ymax,xmax); + title_height= ymax>=6; + colheads_height= ymax>=5; + thisstate_height= ymax>=3; + + setheights(); + setwidths(); + + titlewin= newwin(1,xmax, 0,0); + if (!titlewin) ohshite(_("failed to create title window")); + wattrset(titlewin, part_attr[title]); + + whatinfowin= newwin(1,xmax, whatinfo_row,0); + if (!whatinfowin) ohshite(_("failed to create whatinfo window")); + wattrset(whatinfowin, part_attr[whatinfo]); + + listpad = newpad(ymax, total_width); + if (!listpad) ohshite(_("failed to create baselist pad")); + + colheadspad= newpad(1, total_width); + if (!colheadspad) ohshite(_("failed to create heading pad")); + wattrset(colheadspad, part_attr[colheads]); + + thisstatepad= newpad(1, total_width); + if (!thisstatepad) ohshite(_("failed to create thisstate pad")); + wattrset(thisstatepad, part_attr[thisstate]); + + infopad= newpad(MAX_DISPLAY_INFO, total_width); + if (!infopad) ohshite(_("failed to create info pad")); + wattrset(infopad, part_attr[info_body]); + wbkgdset(infopad, ' ' | part_attr[info_body]); + + querywin= newwin(1,xmax,ymax-1,0); + if (!querywin) ohshite(_("failed to create query window")); + wbkgdset(querywin, ' ' | part_attr[query]); + + if (cursorline >= topofscreen + list_height) topofscreen= cursorline; + if (topofscreen > nitems - list_height) topofscreen= nitems - list_height; + if (topofscreen < 0) topofscreen= 0; + + infotopofscreen= 0; leftofscreen= 0; + + redrawall(); + + debug(dbg_general, + "baselist::startdisplay() done ...\n\n" + " xmax=%d, ymax=%d;\n\n" + " title_height=%d, colheads_height=%d, list_height=%d;\n" + " thisstate_height=%d, info_height=%d, whatinfo_height=%d;\n\n" + " colheads_row=%d, thisstate_row=%d, info_row=%d;\n" + " whatinfo_row=%d, list_row=%d;\n\n", + xmax, ymax, title_height, colheads_height, list_height, + thisstate_height, info_height, whatinfo_height, + colheads_row, thisstate_row, info_row, whatinfo_row, list_row); +} + +void baselist::enddisplay() { + delwin(titlewin); + delwin(whatinfowin); + delwin(listpad); + delwin(colheadspad); + delwin(thisstatepad); + delwin(infopad); + wmove(stdscr,ymax,0); wclrtoeol(stdscr); + listpad = nullptr; + col_cur_x = 0; +} + +void baselist::redrawall() { + redrawtitle(); + redrawcolheads(); + wattrset(listpad, part_attr[list]); + mywerase(listpad); + ldrawnstart= ldrawnend= -1; // start is first drawn; end is first undrawn; -1=none + refreshlist(); + redrawthisstate(); + redrawinfo(); +} + +void baselist::redraw1item(int index) { + redraw1itemsel(index, index == cursorline); +} + +baselist::baselist(keybindings *kb) { + debug(dbg_general, "baselist[%p]::baselist()", this); + + bindings= kb; + nitems= 0; + + col_cur_x = 0; + gap_width = 1; + total_width = max(TOTAL_LIST_WIDTH, COLS); + + xmax= -1; + ymax = -1; + + list_height = 0; + info_height = 0; + title_height = 0; + whatinfo_height = 0; + colheads_height = 0; + thisstate_height = 0; + + list_row = 0; + info_row = 0; + whatinfo_row = 0; + colheads_row = 0; + thisstate_row = 0; + + topofscreen = 0; + leftofscreen = 0; + infotopofscreen = 0; + infolines = 0; + + listpad = nullptr; + infopad = nullptr; + colheadspad = nullptr; + thisstatepad = nullptr; + titlewin = nullptr; + querywin = nullptr; + whatinfowin = nullptr; + + cursorline = -1; + ldrawnstart = 0; + ldrawnend = 0; + showinfo= 1; + + searchstring[0]= 0; +} + +void baselist::itd_keys() { + whatinfovb(_("Keybindings")); + + const int givek= xmax/3; + bindings->describestart(); + const char **ta; + while ((ta = bindings->describenext()) != nullptr) { + const char **tap= ta+1; + for (;;) { + waddstr(infopad, gettext(*tap)); + tap++; if (!*tap) break; + waddstr(infopad, ", "); + } + int y,x; + getyx(infopad,y,x); + if (x >= givek) y++; + mvwaddstr(infopad, y,givek, ta[0]); + waddch(infopad,'\n'); + delete [] ta; + } +} + +void baselist::dosearch() { + int offset, index; + debug(dbg_general, "baselist[%p]::dosearch(); searchstring='%s'", + this, searchstring); + for (offset = 1, index = max(topofscreen, cursorline + 1); + offset= nitems) index -= nitems; + if (matchsearch(index)) { + topofscreen= index-1; + if (topofscreen > nitems - list_height) topofscreen= nitems-list_height; + if (topofscreen < 0) topofscreen= 0; + setcursor(index); + return; + } + } + beep(); +} + +void baselist::refreshinfo() { + pnoutrefresh(infopad, infotopofscreen,leftofscreen, info_row,0, + min(info_row + info_height - 1, info_row + MAX_DISPLAY_INFO - 1), + min(total_width - leftofscreen - 1, xmax - 1)); + + if (whatinfo_height) { + mywerase(whatinfowin); + mvwaddstr(whatinfowin,0,0, whatinfovb.string()); + if (infolines > info_height) { + wprintw(whatinfowin,_(" -- %d%%, press "), + (infotopofscreen + info_height) * 100 / infolines); + if (infotopofscreen + info_height < infolines) { + wprintw(whatinfowin,_("%s for more"), bindings->find("iscrollon")); + if (infotopofscreen) waddstr(whatinfowin, ", "); + } + if (infotopofscreen) + wprintw(whatinfowin, _("%s to go back"),bindings->find("iscrollback")); + waddch(whatinfowin,'.'); + } + wnoutrefresh(whatinfowin); + } +} + +void baselist::wordwrapinfo(int offset, const char *m) { + ssize_t usemax = xmax - 5; + debug(dbg_general, "baselist[%p]::wordwrapinfo(%d, '%s')", this, offset, m); + bool wrapping = false; + + for (;;) { + int offleft=offset; while (*m == ' ' && offleft>0) { m++; offleft--; } + const char *p = strchrnul(m, '\n'); + ptrdiff_t l = p - m; + + while (l && c_isspace(m[l - 1])) + l--; + if (!l || (*m == '.' && l == 1)) { + if (wrapping) waddch(infopad,'\n'); + waddch(infopad, '\n'); + wrapping = false; + } else if (*m == ' ' || usemax < 10) { + if (wrapping) waddch(infopad,'\n'); + waddnstr(infopad, m, l); + waddch(infopad, '\n'); + wrapping = false; + } else { + int x, y DPKG_ATTR_UNUSED; + + if (wrapping) { + getyx(infopad, y,x); + if (x+1 >= usemax) { + waddch(infopad,'\n'); + } else { + waddch(infopad,' '); + } + } + for (;;) { + getyx(infopad, y,x); + ssize_t dosend = usemax - x; + if (l <= dosend) { + dosend=l; + } else { + ssize_t i = dosend; + while (i > 0 && m[i] != ' ') i--; + if (i > 0 || x > 0) dosend=i; + } + if (dosend) waddnstr(infopad, m, dosend); + while (dosend < l && m[dosend] == ' ') dosend++; + l-= dosend; m+= dosend; + if (l <= 0) break; + waddch(infopad,'\n'); + } + wrapping = true; + } + if (*p == '\0') + break; + if (getcury(infopad) == (MAX_DISPLAY_INFO - 1)) { + waddstr(infopad, + "[The package description is too long and has been truncated...]"); + break; + } + m= ++p; + } + debug(dbg_general, "baselist[%p]::wordwrapinfo() done", this); +} + +baselist::~baselist() { } diff --git a/dselect/basetop.cc b/dselect/basetop.cc new file mode 100644 index 0000000..7176fc1 --- /dev/null +++ b/dselect/basetop.cc @@ -0,0 +1,52 @@ +/* + * dselect - Debian package maintenance user interface + * basetop.cc - base list class redraw of top + * + * Copyright © 1994,1995 Ian Jackson + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#include +#include + +#include + +#include "dselect.h" + +void baselist::refreshlist() { + redrawitemsrange(topofscreen, min(nitems, topofscreen + list_height)); + int y, x, maxy, maxx; + y = min(list_row + list_height - 1, list_row + nitems - topofscreen - 1); + x = min(total_width - leftofscreen - 1, xmax - 1); + pnoutrefresh(listpad, 0, leftofscreen, list_row, 0, y, x); + getmaxyx(listpad,maxy,maxx); + y++; + while (y < list_row + list_height - 1) { + pnoutrefresh(listpad, maxy-1,leftofscreen, y,0, y,x); + y++; + } +} + +void baselist::redrawitemsrange(int start, int end) { + int i; + for (i = start; i < end; i++) { + redraw1item(i); + } +} + +void baselist::refreshcolheads() { + pnoutrefresh(colheadspad, 0,leftofscreen, colheads_row,0, + colheads_row, min(total_width - leftofscreen - 1, xmax - 1)); +} diff --git a/dselect/bindings.cc b/dselect/bindings.cc new file mode 100644 index 0000000..fe65c45 --- /dev/null +++ b/dselect/bindings.cc @@ -0,0 +1,179 @@ +/* + * dselect - Debian package maintenance user interface + * bindings.cc - keybinding manager object definitions and default bindings + * + * Copyright © 1995 Ian Jackson + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#include +#include + +#include +#include + +#include +#include +#include + +#include "dselect.h" +#include "bindings.h" + +keybindings::keybindings(const interpretation *ints, const orgbinding *orgbindings) { + interps= ints; + bindings = nullptr; + const orgbinding *b= orgbindings; + while (b->action) { bind(b->key,b->action); b++; } + describestart(); +} + +bool +keybindings::bind(int key, const char *action) +{ + if (key == -1) + return false; + + const interpretation *interp = interps; + while (interp->action && strcmp(interp->action, action)) + interp++; + if (!interp->action) + return false; + + const description *desc = descriptions; + while (desc->action && strcmp(desc->action, action)) + desc++; + + binding *b = bindings; + while (b && b->key != key) + b = b->next; + + if (!b) { + b = new binding; + b->key = key; + b->next = bindings; + bindings = b; + } + b->interp = interp; + b->desc = desc->desc; + + return true; +} + +const char *keybindings::find(const char *action) { + binding *b = bindings; + while (b && strcmp(action, b->interp->action)) + b = b->next; + if (!b) return _("[not bound]"); + const char *n= key2name(b->key); + if (n) return n; + static char buf[50]; + sprintf(buf,_("[unk: %d]"),b->key); + return buf; +} + +const keybindings::interpretation *keybindings::operator()(int key) { + binding *b = bindings; + while (b && b->key != key) + b = b->next; + if (!b) + return nullptr; + return b->interp; +} + +const char **keybindings::describenext() { + binding *search; + int count; + for (;;) { + if (!iterate->action) + return nullptr; + for (count=0, search=bindings; search; search=search->next) + if (strcmp(search->interp->action, iterate->action) == 0) + count++; + if (count) break; + iterate++; + } + const char **retarray= new const char *[count+2]; + retarray[0]= iterate->desc; + for (count=1, search=bindings; search; search=search->next) + if (strcmp(search->interp->action, iterate->action) == 0) + retarray[count++]= key2name(search->key); + retarray[count] = nullptr; + iterate++; + return retarray; +} + +const char *keybindings::key2name(int key) { + const keyname *search = keynames; + while (search->key != -1 && search->key != key) + search++; + return search->kname; +} + +int keybindings::name2key(const char *name) { + const keyname *search = keynames; + while (search->kname && strcasecmp(search->kname, name)) + search++; + return search->key; +} + +keybindings::~keybindings() { + binding *search, *next; + for (search=bindings; search; search=next) { + next= search->next; + delete search; + } +} + +const keybindings::description keybindings::descriptions[]= { + // Actions which apply to both types of list. + { "iscrollon", N_("Scroll onwards through help/information") }, + { "iscrollback", N_("Scroll backwards through help/information") }, + { "up", N_("Move up") }, + { "down", N_("Move down") }, + { "top", N_("Go to top of list") }, + { "bottom", N_("Go to end of list") }, + { "help", N_("Request help (cycle through help screens)") }, + { "info", N_("Cycle through information displays") }, + { "redraw", N_("Redraw display") }, + { "scrollon1", N_("Scroll onwards through list by 1 line") }, + { "scrollback1", N_("Scroll backwards through list by 1 line") }, + { "iscrollon1", N_("Scroll onwards through help/information by 1 line") }, + { "iscrollback1", N_("Scroll backwards through help/information by 1 line") }, + { "scrollon", N_("Scroll onwards through list") }, + { "scrollback", N_("Scroll backwards through list") }, + + // Actions which apply only to lists of packages. + { "install", N_("Mark package(s) for installation") }, + { "remove", N_("Mark package(s) for deinstallation") }, + { "purge", N_("Mark package(s) for deinstall and purge") }, + { "morespecific", N_("Make highlight more specific") }, + { "lessspecific", N_("Make highlight less specific") }, + { "search", N_("Search for a package whose name contains a string") }, + { "searchagain", N_("Repeat last search") }, + { "swaporder", N_("Swap sort order priority/section") }, + { "quitcheck", N_("Quit, confirming, and checking dependencies") }, + { "quitnocheck", N_("Quit, confirming without check") }, + { "quitrejectsug", N_("Quit, rejecting conflict/dependency suggestions") }, + { "abortnocheck", N_("Abort - quit without making changes") }, + { "revert", N_("Revert to old state for all packages") }, + { "revertsuggest", N_("Revert to suggested state for all packages") }, + { "revertdirect", N_("Revert to directly requested state for all packages") }, + { "revertinstalled", N_("Revert to currently installed state for all packages") }, + + // Actions which apply only to lists of methods. + { "select-and-quit", N_("Select currently-highlighted access method") }, + { "abort", N_("Quit without changing selected access method") }, + { nullptr, nullptr } +}; diff --git a/dselect/bindings.h b/dselect/bindings.h new file mode 100644 index 0000000..47ef838 --- /dev/null +++ b/dselect/bindings.h @@ -0,0 +1,96 @@ +/* + * dselect - Debian package maintenance user interface + * bindings.h - keybindings class header file + * + * Copyright © 1994,1995 Ian Jackson + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#ifndef BINDINGS_H +#define BINDINGS_H + +struct keybindings { + struct interpretation; + + struct orgbinding { + int key; + const char *action; + }; + + struct keyname { + int key; + const char *kname; + }; + + struct description { + const char *action, *desc; + }; + + struct binding { + binding *next; + int key; + const struct interpretation *interp; + const char *desc; + }; + + private: + static const keyname keynames[]; + static const description descriptions[]; + + binding *bindings; + const description *iterate; + const interpretation *interps; + + bool bind(int key, const char *action); + + public: + int name2key(const char *name); + const char *key2name(int key); + + bool bind(const char *name, const char *action) + { return bind(name2key(name), action); } + const interpretation *operator()(int key); + const char *find(const char *action); + + void describestart() { iterate=descriptions; } + const char **describenext(); + //... returns array, null-term, first element is description, rest are key strings + // caller must delete[] the array. Null means end. + + keybindings(const interpretation *ints, const orgbinding *orgbindings); + ~keybindings(); +}; + +#include "pkglist.h" +#include "method.h" + +struct keybindings::interpretation { + const char *action; + void (methodlist::*mfn)(); + void (packagelist::*pfn)(); + quitaction qa; +}; + +extern const keybindings::interpretation packagelist_kinterps[]; +extern const keybindings::orgbinding packagelist_korgbindings[]; + +extern const keybindings::interpretation methodlist_kinterps[]; +extern const keybindings::orgbinding methodlist_korgbindings[]; + +#ifndef CTRL +#define CTRL(x) ((x) - 'a' + 1) +#endif + +#endif /* BINDINGS_H */ diff --git a/dselect/curkeys.cc b/dselect/curkeys.cc new file mode 100644 index 0000000..fd9a599 --- /dev/null +++ b/dselect/curkeys.cc @@ -0,0 +1,31 @@ +/* + * dselect - Debian package maintenance user interface + * curkeys.cc - list of ncurses keys for name <-> key mapping + * + * Copyright © 1995 Ian Jackson + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#include +#include + +#include + +#include "dselect.h" +#include "bindings.h" + +const keybindings::keyname keybindings::keynames[] = { +#include "curkeys.h" +}; diff --git a/dselect/cxx-support.cc b/dselect/cxx-support.cc new file mode 100644 index 0000000..dc3b36d --- /dev/null +++ b/dselect/cxx-support.cc @@ -0,0 +1,82 @@ +/* + * dselect - Debian package maintenance user interface + * cxx-support.cc - C++ support code for dselect + * + * Copyright © 1994-1996 Ian Jackson + * Copyright © 2006-2015 Guillem Jover + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#include +#include + +#include + +#include +#ifdef HAVE_CXXABI_H +#include +#endif + +#include + +#include + +extern void * +operator new(size_t size) DPKG_ATTR_THROW(std::bad_alloc) +{ + return m_malloc(size); +} + +extern void * +operator new[](size_t size) DPKG_ATTR_THROW(std::bad_alloc) +{ + return m_malloc(size); +} + +extern void +operator delete(void *p) DPKG_ATTR_NOEXCEPT +{ + free(p); +} + +extern void +operator delete(void *p, size_t size) DPKG_ATTR_NOEXCEPT +{ + free(p); +} + +extern void +operator delete[](void *a) DPKG_ATTR_NOEXCEPT +{ + free(a); +} + +extern void +operator delete[](void *a, size_t size) DPKG_ATTR_NOEXCEPT +{ + free(a); +} + +#ifdef HAVE___CXA_PURE_VIRTUAL +namespace __cxxabiv1 { + +extern "C" void +__cxa_pure_virtual() +{ + internerr("pure virtual function called"); +} + +} +#endif diff --git a/dselect/dselect-curses.h b/dselect/dselect-curses.h new file mode 100644 index 0000000..6cb6994 --- /dev/null +++ b/dselect/dselect-curses.h @@ -0,0 +1,38 @@ +/* + * dselect - Debian package maintenance user interface + * dselect-curses.h - curses header wrapper + * + * Copyright © 2009 Guillem Jover + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#ifndef DSELECT_CURSES_H +#define DSELECT_CURSES_H + +#include + +#undef ERR + +#if defined(HAVE_NCURSESW_NCURSES_H) +#include +#elif defined(HAVE_NCURSES_NCURSES_H) +#include +#elif defined(HAVE_NCURSES_H) +#include +#else +#include +#endif + +#endif /* DSELECT_CURSES_H */ diff --git a/dselect/dselect.h b/dselect/dselect.h new file mode 100644 index 0000000..3d18567 --- /dev/null +++ b/dselect/dselect.h @@ -0,0 +1,204 @@ +/* + * dselect - Debian package maintenance user interface + * dselect.h - external definitions for this program + * + * Copyright © 1994,1995 Ian Jackson + * Copyright © 2001 Wichert Akkerman + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#ifndef DSELECT_H +#define DSELECT_H + +#include + +#include + +using std::min; +using std::max; + +#include + +#include "dselect-curses.h" + +#define DSELECT "dselect" + +#define TOTAL_LIST_WIDTH 180 +#define MAX_DISPLAY_INFO 120 + +struct helpmenuentry { + char key; + const struct helpmessage *msg; +}; + +struct keybindings; + +enum screenparts { + background, + list, + listsel, + title, + thisstate, + selstate, + selstatesel, + colheads, + query, + info_body, + info_head, + whatinfo, + helpscreen, + numscreenparts, +}; + +struct column { + column(): title(nullptr), x(0), width(0) {}; + void blank() { title = nullptr; x = 0; width = 0; }; + + const char *title; + int x; + int width; +}; + +class baselist { +protected: + // Screen dimensions &c. + int xmax, ymax; + int title_height, colheads_height, list_height; + int thisstate_height, info_height, whatinfo_height; + int colheads_row, thisstate_row, info_row, whatinfo_row, list_row; + + int part_attr[numscreenparts]; + + int gap_width; + int col_cur_x; + int total_width; + + void add_column(column &col, const char *title, int width); + void end_column(column &col, const char *title); + void draw_column_head(const column &col); + void draw_column_sep(const column &col, int y); + void draw_column_item(const column &col, int y, const char *item); + + // (n)curses stuff + WINDOW *listpad, *infopad, *colheadspad, *thisstatepad; + WINDOW *titlewin, *whatinfowin, *querywin; + // If listpad is null, then we have not started to display yet, and + // so none of the auto-displaying update routines need to display. + + // Window resize handling (via SIGWINCH). + void resize_window(); + + int nitems, ldrawnstart, ldrawnend, showinfo; + int topofscreen, leftofscreen, cursorline; + int infotopofscreen, infolines; + varbuf whatinfovb; + char searchstring[128]; + + virtual void setheights(); + void unsizes(); + void dosearch(); + void displayhelp(const struct helpmenuentry *menu, int key); + void displayerror(const char *str); + + void redrawall(); + void redrawitemsrange(int start /*inclusive*/, int end /*exclusive*/); + void redraw1item(int index); + void refreshlist(); + void refreshinfo(); + void refreshcolheads(); + void setcursor(int index); + + void itd_keys(); + + virtual void redraw1itemsel(int index, int selected) =0; + virtual void redrawcolheads() =0; + virtual void redrawthisstate() =0; + virtual void redrawinfo() =0; + virtual void redrawtitle() =0; + virtual void setwidths() =0; + virtual const char *itemname(int index) =0; + virtual const struct helpmenuentry *helpmenulist() =0; + + virtual bool checksearch(char *str); + virtual bool matchsearch(int index); + void wordwrapinfo(int offset, const char *string); + +public: + + keybindings *bindings; + + void kd_up(); + void kd_down(); + void kd_redraw(); + void kd_scrollon(); + void kd_scrollback(); + void kd_scrollon1(); + void kd_scrollback1(); + void kd_panon(); + void kd_panback(); + void kd_panon1(); + void kd_panback1(); + void kd_top(); + void kd_bottom(); + void kd_iscrollon(); + void kd_iscrollback(); + void kd_iscrollon1(); + void kd_iscrollback1(); + void kd_search(); + void kd_searchagain(); + void kd_help(); + + void startdisplay(); + void enddisplay(); + + explicit baselist(keybindings *); + virtual ~baselist(); +}; + +void displayhelp(const struct helpmenuentry *menu, int key); + +void mywerase(WINDOW *win); + +void curseson(); +void cursesoff(); + +extern bool expertmode; + +struct colordata { + int fore; + int back; + int attr; +}; +extern colordata color[]; + +/* Evil recommends flag variable. */ +extern bool manual_install; + +enum urqresult { + urqr_normal, + urqr_fail, + urqr_quitmenu, +}; +enum quitaction { + qa_noquit, + qa_quitchecksave, + qa_quitnochecksave, +}; + +typedef urqresult urqfunction(void); +urqfunction urq_list, urq_quit, urq_menu; +urqfunction urq_setup, urq_update, urq_install, urq_config, urq_remove; + +#endif /* DSELECT_H */ diff --git a/dselect/helpmsgs.cc b/dselect/helpmsgs.cc new file mode 100644 index 0000000..54d3e6a --- /dev/null +++ b/dselect/helpmsgs.cc @@ -0,0 +1,217 @@ +/* + * dselect - Debian package maintenance user interface + * helpmsgs.cc - list of help messages + * + * Copyright © 1995 Ian Jackson + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#include +#include + +#include + +#include "helpmsgs.h" + +const struct helpmessage hlp_listkeys = { + N_("Keystrokes"), N_("\ +Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:\n\ + j, Down-arrow k, Up-arrow move highlight\n\ + N, Page-down, Space P, Page-up, Backspace scroll list by 1 page\n\ + ^n ^p scroll list by 1 line\n\ + t, Home e, End jump to top/end of list\n\ + u d scroll info by 1 page\n\ + ^u ^d scroll info by 1 line\n\ + B, Left-arrow F, Right-arrow pan display by 1/3 screen\n\ + ^b ^f pan display by 1 character\n\n\ +\ +Mark packages for later processing:\n\ + +, Insert install or upgrade =, H hold in present version\n\ + -, Delete remove :, G unhold: upgrade or leave uninstalled\n\ + _ remove & purge config\n\ + Miscellaneous:\n\ +Quit, exit, overwrite (note capitals!): ?, F1 request help (also Help)\n\ + Return Confirm, quit (check dependencies) i, I toggle/cycle info displays\n\ + Q Confirm, quit (override dep.s) o, O cycle through sort options\n\ + X, Esc eXit, abandoning any changes made v, A, V change status display opts\n\ + R Revert to state before this list ^l redraw display\n\ + U set all to sUggested state / search (Return to cancel)\n\ + D set all to Directly requested state n, \\ repeat last search\n") +}; + +const struct helpmessage hlp_mainintro = { + N_("Introduction to package selections"), N_("\ +Welcome to dselect's main package listing.\n\n\ +\ +You will be presented with a list of packages which are installed or available\n\ +for installation. You can navigate around the list using the cursor keys,\n\ +mark packages for installation (using '+') or deinstallation (using '-').\n\ +Packages can be marked either singly or in groups; initially you will see that\n\ +the line 'All packages' is selected. '+', '-' and so on will affect all the\n\ +packages described by the highlighted line.\n\n\ +\ +Some of your choices will cause conflicts or dependency problems; you will be\n\ +given a sub-list of the relevant packages, so that you can solve the problems.\n\n\ +\ +You should read the list of keys and the explanations of the display.\n\ +Much on-line help is available, please make use of it - press '?' at\n\ +any time for help.\n\n\ +\ +When you have finished selecting packages, press to confirm changes,\n\ +or 'X' to quit without saving changes. A final check on conflicts and\n\ +dependencies will be done - here too you may see a sublist.\n\n\ +\ +Press to leave help and enter the list now.\n") +}; + +const struct helpmessage hlp_readonlyintro = { + N_("Introduction to read-only package list browser"), N_("\ +Welcome to dselect's main package listing.\n\n\ +\ +You will be presented with a list of packages which are installed or available\n\ +for installation. Since you do not have the privilege necessary to update\n\ +package states, you are in a read-only mode. You can navigate around the\n\ +list using the cursor keys (please see the 'Keystrokes' help screen), observe\n\ +the status of the packages and read information about them.\n\n\ +\ +You should read the list of keys and the explanations of the display.\n\ +Much on-line help is available, please make use of it - press '?' at\n\ +any time for help.\n\n\ +\ +When you have finished browsing, press 'Q' or to quit.\n\n\ +\ +Press to leave help and enter the list now.\n") +}; + +const struct helpmessage hlp_recurintro = { + N_("Introduction to conflict/dependency resolution sub-list"), N_("\ +Dependency/conflict resolution - introduction.\n\n\ +\ +One or more of your choices have raised a conflict or dependency problem -\n\ +some packages should only be installed in conjunction with certain others, and\n\ +some combinations of packages may not be installed together.\n\n\ +\ +You will see a sub-list containing the packages involved. The bottom half of\n\ +the display shows relevant conflicts and dependencies; use 'i' to cycle between\n\ +that, the package descriptions and the internal control information.\n\n\ +\ +A set of 'suggested' packages has been calculated, and the initial markings in\n\ +this sub-list have been set to match those, so you can just hit Return to\n\ +accept the suggestions if you wish. You may abort the change(s) which caused\n\ +the problem(s), and go back to the main list, by pressing capital 'X'.\n\n\ +\ +You can also move around the list and change the markings so that they are more\n\ +like what you want, and you can 'reject' my suggestions by using the capital\n\ +'D' or 'R' keys (see the keybindings help screen). You can use capital 'Q' to\n\ +force to accept the situation currently displayed, in case you want to\n\ +override a recommendation or think that the program is mistaken.\n\n\ +\ +Press to leave help and enter the sub-list; remember: press '?' for help.\n") +}; + +const struct helpmessage hlp_displayexplain1 = { + N_("Display, part 1: package listing and status chars"), N_("\ +The top half of the screen shows a list of packages. For each package you see\n\ +four columns for its current status on the system and mark. In terse mode (use\n\ +'v' to toggle verbose display) these are single characters, from left to right:\n\n\ +\ + Error flag: Space - no error (but package may be in broken state - see below)\n\ + 'R' - serious error during installation, needs reinstallation;\n\ + Installed state: Space - not installed;\n\ + '*' - installed;\n\ + '-' - not installed but config files remain;\n\ + packages in these { 'U' - unpacked but not yet configured;\n\ + states are not { 'C' - half-configured (an error happened);\n\ + (quite) properly { 'I' - half-installed (an error happened);\n\ + installed { 'W','t' - triggers are awaited resp. pending.\n\ + Old mark: what was requested for this package before presenting this list;\n\ + Mark: what is requested for this package:\n\ + '*': marked for installation or upgrade;\n\ + '-': marked for removal, but any configuration files will remain;\n\ + '=': on hold: package will not be installed, upgraded or removed;\n\ + '_': marked for purge completely - even remove configuration;\n\ + 'n': package is new and has yet to be marked for install/remove/&c.\n\n\ +\ +Also displayed are each package's Priority, Section, name, installed and\n\ +available version numbers (shift-V to display/hide) and summary description.\n") +}; + +const struct helpmessage hlp_displayexplain2 = { + N_("Display, part 2: list highlight; information display"), N_("\ +* Highlight: One line in the package list will be highlighted. It indicates\n\ + which package(s) will be affected by presses of '+', '-' and '_'.\n\n\ +\ +* The dividing line in the middle of the screen shows a brief explanation of\n\ + the status of the currently-highlighted package, or a description of which\n\ + group is highlighted if a group line is. If you don't understand the\n\ + meaning of some of the status characters displayed, go to the relevant\n\ + package and look at this divider line, or use the 'v' key for a verbose\n\ + display (press 'v' again to go back to the terse display).\n\n\ +\ +* The bottom of the screen shows more information about the\n\ + currently-highlighted package (if there is only one).\n\n\ +\ + It can show an extended description of the package, the internal package\n\ + control details (either for the installed or available version of the\n\ + package), or information about conflicts and dependencies involving the\n\ + current package (in conflict/dependency resolution sublists).\n\n\ +\ + Use the 'i' key to cycle through the displays, and 'I' to hide the\n\ + information display or expand it to use almost all of the screen.\n") +}; + +const struct helpmessage hlp_methintro = { + N_("Introduction to method selection display"), N_("\ +dselect and dpkg can do automatic installation, loading the package files to be\n\ +installed from one of a number of different possible places.\n\n\ +\ +This list allows you to select one of these installation methods.\n\n\ +\ +Move the highlight to the method you wish to use, and hit Enter. You will then\n\ +be prompted for the information required to do the installation.\n\n\ +\ +As you move the highlight a description of each method, where available, is\n\ +displayed in the bottom half of the screen.\n\n\ +\ +If you wish to quit without changing anything use the 'x' key while in the list\n\ +of installation methods.\n\n\ +\ +A full list of keystrokes is available by pressing 'k' now, or from the help\n\ +menu reachable by pressing '?'.\n") +}; + +const struct helpmessage hlp_methkeys = { + N_("Keystrokes for method selection"), N_("\ +Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:\n\ + j, Down-arrow k, Up-arrow move highlight\n\ + N, Page-down, Space P, Page-up, Backspace scroll list by 1 page\n\ + ^n ^p scroll list by 1 line\n\ + t, Home e, End jump to top/end of list\n\ + u d scroll info by 1 page\n\ + ^u ^d scroll info by 1 line\n\ + B, Left-arrow F, Right-arrow pan display by 1/3 screen\n\ + ^b ^f pan display by 1 character\n\ +(These are the same motion keys as in the package list display.)\n\n\ +\ +Quit:\n\ + Return, Enter select this method and go to its configuration dialogue\n\ + x, X exit without changing or setting up the installation method\n\n\ +\ +Miscellaneous:\n\ + ?, Help, F1 request help\n\ + ^l redraw display\n\ + / search (just return to cancel)\n\ + \\ repeat last search\n") +}; diff --git a/dselect/helpmsgs.h b/dselect/helpmsgs.h new file mode 100644 index 0000000..7872ac6 --- /dev/null +++ b/dselect/helpmsgs.h @@ -0,0 +1,38 @@ +/* + * dselect - Debian package maintenance user interface + * helpmsgs.h - external definitions for the list of help messages + * + * Copyright © 1995 Ian Jackson + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#ifndef HELPMSGS_H +#define HELPMSGS_H + +struct helpmessage { + const char *title; + const char *text; +}; + +extern const struct helpmessage hlp_listkeys; +extern const struct helpmessage hlp_mainintro; +extern const struct helpmessage hlp_readonlyintro; +extern const struct helpmessage hlp_recurintro; +extern const struct helpmessage hlp_displayexplain1; +extern const struct helpmessage hlp_displayexplain2; +extern const struct helpmessage hlp_methintro; +extern const struct helpmessage hlp_methkeys; + +#endif /* HELPMSGS_H */ diff --git a/dselect/keyoverride b/dselect/keyoverride new file mode 100644 index 0000000..35967ff --- /dev/null +++ b/dselect/keyoverride @@ -0,0 +1,58 @@ +# dselect - Debian package maintenance user interface +# keyoverride - override strings for ncurses key names +# +# Copyright © 1995 Ian Jackson +# +# This 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 the License, or +# (at your option) any later version. +# +# This 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 . + +32 Space +13 Return +27 Escape +28 ^\ +29 ^] +30 ^^ +31 ^_ +34 Quote +39 Apostrophe +44 Comma +45 Hyphen +47 Slash +59 Semicolon +92 Backslash +96 Backquote +127 DEL +KEY_UP Up +KEY_DOWN Down +KEY_RIGHT Right +KEY_LEFT Left +KEY_IC Insert +KEY_SIC Shift Insert +KEY_DC Delete +KEY_SDC Shift Delete +KEY_NPAGE Page Down +KEY_PPAGE Page Up +KEY_CATAB Clear Tabs +KEY_EIC EIC +KEY_EOL EOL +KEY_SEOL Shift EOL +KEY_EOS EOS +KEY_LL Bottom +KEY_SF Scroll Forward +KEY_SR Scroll Reverse +KEY_SRESET Soft Reset +KEY_SLEFT Shift Left +KEY_SRIGHT Shift Right +KEY_SPREVIOUS Shift Previous +KEY_MAX [elide] +KEY_MIN [elide] diff --git a/dselect/main.cc b/dselect/main.cc new file mode 100644 index 0000000..451ec0a --- /dev/null +++ b/dselect/main.cc @@ -0,0 +1,563 @@ +/* + * dselect - Debian package maintenance user interface + * main.cc - main program + * + * Copyright © 1994-1996 Ian Jackson + * Copyright © 2000,2001 Wichert Akkerman + * Copyright © 2006-2015 Guillem Jover + * + * This 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 the License, or + * (at your option) any later version. + * + * This 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 . + */ + +#include +#include + +#include +#include + +#include +#include +#if HAVE_LOCALE_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +// Solaris requires curses.h to be included before term.h +#include "dselect-curses.h" + +#if defined(HAVE_NCURSESW_TERM_H) +#include +#elif defined(HAVE_NCURSES_TERM_H) +#include +#else +#include +#endif + +#include +#include +#include +#include +#include + +#include "dselect.h" +#include "bindings.h" +#include "pkglist.h" + +static const char printforhelp[] = N_("Type dselect --help for help."); + +bool expertmode = false; + +static keybindings packagelistbindings(packagelist_kinterps,packagelist_korgbindings); + +struct table_t { + const char *name; + const int num; +}; + +static const struct table_t colourtable[]= { + {"black", COLOR_BLACK }, + {"red", COLOR_RED }, + {"green", COLOR_GREEN }, + {"yellow", COLOR_YELLOW }, + {"blue", COLOR_BLUE }, + {"magenta", COLOR_MAGENTA }, + {"cyan", COLOR_CYAN }, + {"white", COLOR_WHITE }, + {nullptr, 0}, +}; + +static const struct table_t attrtable[]= { + {"normal", A_NORMAL }, + {"standout", A_STANDOUT }, + {"underline", A_UNDERLINE }, + {"reverse", A_REVERSE }, + {"blink", A_BLINK }, + {"bright", A_BLINK }, // on some terminals + {"dim", A_DIM }, + {"bold", A_BOLD }, + {nullptr, 0}, +}; + +/* A slightly confusing mapping from dselect's internal names to + * the user-visible names.*/ +static const struct table_t screenparttable[]= { + {"list", list }, + {"listsel", listsel }, + {"title", title }, + {"infohead", thisstate }, + {"pkgstate", selstate }, + {"pkgstatesel", selstatesel }, + {"listhead", colheads }, + {"query", query }, + {"info", info_body }, + {"infodesc", info_head }, + {"infofoot", whatinfo }, + {"helpscreen", helpscreen }, + {nullptr, 0}, +}; + +/* Historical (patriotic?) colours. */ +struct colordata color[]= { + /* fore back attr */ + {COLOR_WHITE, COLOR_BLACK, 0 }, // default, not used + {COLOR_WHITE, COLOR_BLACK, 0 }, // list + {COLOR_WHITE, COLOR_BLACK, A_REVERSE }, // listsel + {COLOR_WHITE, COLOR_RED, 0 }, // title + {COLOR_WHITE, COLOR_BLUE, 0 }, // thisstate + {COLOR_WHITE, COLOR_BLACK, A_BOLD }, // selstate + {COLOR_WHITE, COLOR_BLACK, A_REVERSE | A_BOLD }, // selstatesel + {COLOR_WHITE, COLOR_BLUE, 0 }, // colheads + {COLOR_WHITE, COLOR_RED, 0 }, // query + {COLOR_WHITE, COLOR_BLACK, 0 }, // info_body + {COLOR_WHITE, COLOR_BLACK, A_BOLD }, // info_head + {COLOR_WHITE, COLOR_BLUE, 0 }, // whatinfo + {COLOR_WHITE, COLOR_BLACK, 0 }, // help +}; + +struct menuentry { + const char *command; + const char *key; + const char *option; + const char *menuent; + urqfunction *fn; +}; + +static const menuentry menuentries[]= { + { "access", N_("a"), N_("[A]ccess"), N_("Choose the access method to use."), &urq_setup }, + { "update", N_("u"), N_("[U]pdate"), N_("Update list of available packages, if possible."), &urq_update }, + { "select", N_("s"), N_("[S]elect"), N_("Request which packages you want on your system."), &urq_list }, + { "install", N_("i"), N_("[I]nstall"),N_("Install and upgrade wanted packages."), &urq_install }, + { "config", N_("c"), N_("[C]onfig"), N_("Configure any packages that are unconfigured."), &urq_config }, + { "remove", N_("r"), N_("[R]emove"), N_("Remove unwanted software."), &urq_remove }, + { "quit", N_("q"), N_("[Q]uit"), N_("Quit dselect."), &urq_quit }, + { nullptr, nullptr, N_("menu"), nullptr, &urq_menu }, + { nullptr } +}; + +static const char programdesc[]= + N_("Debian '%s' package handling frontend version %s.\n"); + +static const char licensestring[]= N_( + "This is free software; see the GNU General Public License version 2 or\n" + "later for copying conditions. There is NO warranty.\n"); + +static void DPKG_ATTR_NORET +printversion(const struct cmdinfo *ci, const char *value) +{ + printf(gettext(programdesc), DSELECT, PACKAGE_RELEASE); + printf("%s", gettext(licensestring)); + + m_output(stdout, _("")); + + exit(0); +} + +static void DPKG_ATTR_NORET +usage(const struct cmdinfo *ci, const char *value) +{ + int i; + + printf(_( +"Usage: %s [