[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] gvars3 configure configure.ac src/GUI.cc src/GU...
From: |
Edward Rosten |
Subject: |
[libcvd-members] gvars3 configure configure.ac src/GUI.cc src/GU... |
Date: |
Thu, 18 Oct 2007 16:16:26 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: gvars3
Changes by: Edward Rosten <edrosten> 07/10/18 16:16:26
Modified files:
. : configure configure.ac
src : GUI.cc GUI_readline.cc
Log message:
Maybe optional readline works this time...
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gvars3/configure?cvsroot=libcvd&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gvars3/configure.ac?cvsroot=libcvd&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gvars3/src/GUI.cc?cvsroot=libcvd&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/gvars3/src/GUI_readline.cc?cvsroot=libcvd&r1=1.6&r2=1.7
Patches:
Index: configure
===================================================================
RCS file: /cvsroot/libcvd/gvars3/configure,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- configure 18 Oct 2007 16:10:12 -0000 1.11
+++ configure 18 Oct 2007 16:16:25 -0000 1.12
@@ -2550,6 +2550,9 @@
done
+optionlist="fltk motif fltk2 readline"
+options=""
+
#Host detection
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -3025,9 +3028,10 @@
if test x$ac_cv_lib_readline_rl_done == xyes
then
- break
have_readline=yes
+ options="$options readline"
+ break
else
unset ac_cv_lib_readline_rl_done
fi
@@ -3070,8 +3074,6 @@
echo "Checking for widget libraries (provides GUI_...)"
echo ------------------------------------------------
-optionlist="fltk motif fltk2"
-options=""
#dnl check_GUI(fltk,FL/Fl.h,fltk)
Index: configure.ac
===================================================================
RCS file: /cvsroot/libcvd/gvars3/configure.ac,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- configure.ac 18 Oct 2007 16:07:55 -0000 1.10
+++ configure.ac 18 Oct 2007 16:16:25 -0000 1.11
@@ -4,6 +4,9 @@
AC_CHECK_HEADERS(iostream)
+optionlist="fltk motif fltk2 readline"
+options=""
+
#Host detection
AC_CANONICAL_HOST
if test "$host_vendor" = apple
@@ -133,8 +136,9 @@
if test x$ac_cv_lib_readline_rl_done == xyes
then
- break
AC_SUBST(have_readline,yes)
+ options="$options readline"
+ break
else
unset ac_cv_lib_readline_rl_done
fi
@@ -168,8 +172,6 @@
echo "Checking for widget libraries (provides GUI_...)"
echo ------------------------------------------------
-optionlist="fltk motif fltk2"
-options=""
#dnl check_GUI(fltk,FL/Fl.h,fltk)
Index: src/GUI.cc
===================================================================
RCS file: /cvsroot/libcvd/gvars3/src/GUI.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/GUI.cc 17 May 2007 12:01:57 -0000 1.15
+++ src/GUI.cc 18 Oct 2007 16:16:25 -0000 1.16
@@ -677,80 +677,6 @@
///////////////////////////////////////
-#include <readline/readline.h>
-#include <readline/history.h>
-
-void print_history(ostream &ost);
-void builtin_history(void* ptr, string sCommand, string sParams)
-{
- cout << "History: " << endl;
- print_history(cout);
-};
-
-void builtin_save_history(void* ptr, string sCommand, string sParams)
-{
- vector<string> v = ChopAndUnquoteString(sParams);
- if(v.size()!=1)
- cout << "? GUI internal savehistory command: need one param (filename)."
<< endl;
- else
- {
- ofstream ofs;
- ofs.open(v[0].c_str());
- if(!ofs.good())
- cout << "? GUI internal savehistory command: cannot open " << v[0] << "
for write." << endl;
- else
- {
- print_history(ofs);
- ofs.close();
- cout << " Saved to " << v[0] << endl;
- }
- };
-};
-
-
-char * GUI::ReadlineCommandGeneratorCB(const char *szText, int nState)
-{
- return mpReadlineCompleterGUI->ReadlineCommandGenerator(szText, nState);
-
-}
-
-char * GUI::ReadlineCommandGenerator(const char *szText, int nState)
-{
- static map<string,CallbackVector>::iterator iRegistered;
- static int nTextLength;
- static int nOffset;
- const char *pcName;
- static char acMyTextCopy[1000];
-
- if(!nState)
- {
- iRegistered = mmCallBackMap.begin();
- nTextLength = strlen(szText);
- nOffset=-1;
- }
-
- while(iRegistered!=mmCallBackMap.end())
- {
- pcName = iRegistered->first.c_str();
- iRegistered++;
- if(strncmp(pcName,szText,nTextLength) == 0)
- {
- char *t = (char*) malloc(strlen(pcName)+2);
- if(!t) return NULL;
- strcpy(t,pcName);
- t[strlen(pcName)]=' ';
- t[strlen(pcName)+1]=0;
- return t;
- };
- };
-
- if(nOffset==-1)
- nOffset = nState;
-
- return GV3ReadlineCommandGenerator(szText, nState-nOffset);
-
-};
-
int GUI::parseArguments( const int argc, char * argv[], int start, const
string prefix, const string execKeyword ){
while(start < argc){
string opt = argv[start];
Index: src/GUI_readline.cc
===================================================================
RCS file: /cvsroot/libcvd/gvars3/src/GUI_readline.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- src/GUI_readline.cc 14 Jun 2007 21:37:27 -0000 1.6
+++ src/GUI_readline.cc 18 Oct 2007 16:16:25 -0000 1.7
@@ -148,3 +148,74 @@
}
+void print_history(ostream &ost);
+void builtin_history(void* ptr, string sCommand, string sParams)
+{
+ cout << "History: " << endl;
+ print_history(cout);
+};
+
+void builtin_save_history(void* ptr, string sCommand, string sParams)
+{
+ vector<string> v = ChopAndUnquoteString(sParams);
+ if(v.size()!=1)
+ cout << "? GUI internal savehistory command: need one param (filename)."
<< endl;
+ else
+ {
+ ofstream ofs;
+ ofs.open(v[0].c_str());
+ if(!ofs.good())
+ cout << "? GUI internal savehistory command: cannot open " << v[0] << "
for write." << endl;
+ else
+ {
+ print_history(ofs);
+ ofs.close();
+ cout << " Saved to " << v[0] << endl;
+ }
+ };
+};
+
+
+char * GUI::ReadlineCommandGeneratorCB(const char *szText, int nState)
+{
+ return mpReadlineCompleterGUI->ReadlineCommandGenerator(szText, nState);
+
+}
+
+char * GUI::ReadlineCommandGenerator(const char *szText, int nState)
+{
+ static map<string,CallbackVector>::iterator iRegistered;
+ static int nTextLength;
+ static int nOffset;
+ const char *pcName;
+ static char acMyTextCopy[1000];
+
+ if(!nState)
+ {
+ iRegistered = mmCallBackMap.begin();
+ nTextLength = strlen(szText);
+ nOffset=-1;
+ }
+
+ while(iRegistered!=mmCallBackMap.end())
+ {
+ pcName = iRegistered->first.c_str();
+ iRegistered++;
+ if(strncmp(pcName,szText,nTextLength) == 0)
+ {
+ char *t = (char*) malloc(strlen(pcName)+2);
+ if(!t) return NULL;
+ strcpy(t,pcName);
+ t[strlen(pcName)]=' ';
+ t[strlen(pcName)+1]=0;
+ return t;
+ };
+ };
+
+ if(nOffset==-1)
+ nOffset = nState;
+
+ return GV3ReadlineCommandGenerator(szText, nState-nOffset);
+
+};
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] gvars3 configure configure.ac src/GUI.cc src/GU...,
Edward Rosten <=