head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.48 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.46 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.44 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.42 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.40 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.38 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.36 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.34 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.32 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.30 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.28 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.26 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.24 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.22 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.20 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.18 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.16 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.14 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.12 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.10 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.8 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.6 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.4 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.2 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.2.0.14 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.12 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.10 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.2.0.6 netbsd-1-6-1-base:1.2 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 netbsd-1-5-PATCH001:1.1.1.1 netbsd-1-5-RELEASE:1.1.1.1 netbsd-1-4-PATCH003:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2004.09.11.14.56.33; author jmmv; state dead; branches; next 1.2; 1.2 date 2001.05.17.20.28.19; author jlam; state Exp; branches; next 1.1; 1.1 date 2000.08.25.16.15.54; author jlam; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.08.25.16.15.54; author jlam; state Exp; branches; next ; desc @@ 1.3 log @Remove devel/cmdline: it is unmaintained and does not build with recent versions of GCC 3 (in fact, it already had lots of patches to fix C++ stuff, but still had problems). Ok'ed by jlam@@, who imported it in the first place. Not used by any other package nor anyone else (as seen in tech-pkg@@). @ text @$NetBSD: patch-bg,v 1.2 2001/05/17 20:28:19 jlam Exp $ --- src/lib/private.c.orig Thu Jan 2 13:33:34 1997 +++ src/lib/private.c @@@@ -18,14 +18,19 @@@@ // // 03/03/93 Brad Appleton // - Added exit_handler() and quit() member-functions to CmdLine +// +// 08/16/00 Johnny Lam +// - Wrapped in namespace cmdline +// - Updated to follow ISO C++ standard +// - Find readline.h in newer versions of readline //-^^--------------------------------------------------------------------- -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include extern "C" { int isatty(int fd); @@@@ -48,8 +53,14 @@@@ #include "cmdline.h" #include "states.h" -#include "arglist.h" +namespace cmdline { + +using std::cerr; +using std::cin; +using std::isupper; +using std::ostrstream; +using std::tolower; // Need a portable version of tolower // @@@@ -236,7 +247,7 @@@@ // ^FUNCTION: CmdLine::prompt_user - prompt the user for a missing argument // // ^SYNOPSIS: -// unsigned CmdLine::prompt_user(cmdarg); +// unsigned int CmdLine::prompt_user(cmdarg); // // ^PARAMETERS: // CmdArg * cmdarg; @@@@ -274,7 +285,7 @@@@ // - if an invalid value was given return ARG_MISSING // - else return 0 //-^^---- -unsigned +unsigned int CmdLine::prompt_user(CmdArg * cmdarg) { // dont prompt if cin or cerr is not interactive @@@@ -316,7 +327,7 @@@@ // try to handle the value we read (remember - buf is temporary) if (! errs) { const char * arg = buf; - unsigned save_cmd_flags = cmd_flags; + unsigned int save_cmd_flags = cmd_flags; cmd_flags |= TEMP; errs = handle_arg(cmdarg, arg); if (errs) { @@@@ -387,7 +398,7 @@@@ // ^FUNCTION: CmdLine::missing_args - check for missing required arguments // // ^SYNOPSIS: -// unsigned CmdLine::missing_args(void); +// unsigned int CmdLine::missing_args(void); // // ^PARAMETERS: // @@@@ -424,7 +435,7 @@@@ // endfor // return the current cmd-status //-^^---- -unsigned +unsigned int CmdLine::missing_args(void) { char buf[256]; @@@@ -649,3 +660,5 @@@@ } //for list_iter return last_pos_list ; } + +} // namespace cmdline @ 1.2 log @Use devel/readline/Makefile.readline to check for libedit readline emulation. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @d5 1 a5 1 @@@@ -18,20 +18,29 @@@@ d31 1 a31 12 #ifdef GNU_READLINE -# include +# ifdef HAVE_READLINE_H +# include +# elif HAVE_READLINE_READLINE_H +# include +# endif #endif } @@@@ -48,8 +57,14 @@@@ d47 1 a47 1 @@@@ -236,7 +251,7 @@@@ d56 1 a56 1 @@@@ -274,7 +289,7 @@@@ d65 1 a65 1 @@@@ -316,7 +331,7 @@@@ d74 1 a74 1 @@@@ -387,7 +402,7 @@@@ d83 1 a83 1 @@@@ -424,7 +439,7 @@@@ d92 1 a92 1 @@@@ -649,3 +664,5 @@@@ @ 1.1.1.1 log @cmdline - C++ library for parsing command arguments @ text @@