diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-08 10:21:39 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-08 10:21:39 +0000 |
commit | 5fb792ec40e438e9cd7918da37379ffc7b939f57 (patch) | |
tree | 6a484c4c331eaff587ffc7a7e47508674b5b1110 /ndb/src/mgmsrv | |
parent | d93ff572cde923210d902988e4aeedcd0d56e99b (diff) | |
download | mariadb-git-5fb792ec40e438e9cd7918da37379ffc7b939f57.tar.gz |
removed editline and replaced with mysql readline
created new facade object for CommandInterpreter
removed CPC #if 0 code
removed editline from mgmtsrver, no replace with readline since interface is obsolete anyways
BitKeeper/deleted/.del-MANIFEST~e8c948c4a4413f8d:
Delete: ndb/src/common/editline/MANIFEST
BitKeeper/deleted/.del-Makefile.am~dfbe493d6e2d25f4:
Delete: ndb/src/common/editline/Makefile.am
BitKeeper/deleted/.del-Makefile_old~90ac19a1668ecdd5:
Delete: ndb/src/common/editline/Makefile_old
BitKeeper/deleted/.del-README~3f39f9b8294466e8:
Delete: ndb/src/common/editline/README
BitKeeper/deleted/.del-complete.c~a1bc3055fd90e27f:
Delete: ndb/src/common/editline/complete.c
BitKeeper/deleted/.del-editline.3~1f9bb4274cf4381:
Delete: ndb/src/common/editline/editline.3
BitKeeper/deleted/.del-editline.c~5b759f3e5fd3c196:
Delete: ndb/src/common/editline/editline.c
BitKeeper/deleted/.del-editline_internal.h~96ca8d53fb758586:
Delete: ndb/src/common/editline/editline_internal.h
BitKeeper/deleted/.del-editline_win32.c~45b257bec279826e:
Delete: ndb/src/common/editline/editline_win32.c
BitKeeper/deleted/.del-sysunix.c~8e7a6901783efd17:
Delete: ndb/src/common/editline/sysunix.c
BitKeeper/deleted/.del-unix.h~1c244c1d4ba6c6fb:
Delete: ndb/src/common/editline/unix.h
BitKeeper/deleted/.del-Makefile~46cecfa6cd1a4e6b:
Delete: ndb/src/common/editline/test/Makefile
BitKeeper/deleted/.del-testit.c~82837111b1876e44:
Delete: ndb/src/common/editline/test/testit.c
BitKeeper/deleted/.del-Makefile_old~59409aa4debaeb90:
Delete: ndb/src/common/Makefile_old
BitKeeper/deleted/.del-Makefile_old~92af3f5a7f24caf:
Delete: ndb/src/mgmclient/Makefile_old
ndb/test/src/CpcClient.cpp:
Rename: ndb/src/mgmclient/CpcClient.cpp -> ndb/test/src/CpcClient.cpp
ndb/test/include/CpcClient.hpp:
Rename: ndb/src/mgmclient/CpcClient.hpp -> ndb/test/include/CpcClient.hpp
configure.in:
removed editline
ndb/src/common/Makefile.am:
removed editline
ndb/src/mgmclient/CommandInterpreter.cpp:
removed editline and replaced with mysql readline
created new facade object for CommandInterpreter
removed CPC #if 0 code
ndb/src/mgmclient/Makefile.am:
removed editline and replaced with mysql readline
created new facade object for CommandInterpreter
removed CPC #if 0 code
ndb/src/mgmclient/main.cpp:
removed editline and replaced with mysql readline
created new facade object for CommandInterpreter
removed CPC #if 0 code
ndb/src/mgmclient/ndb_mgmclient.hpp:
new facade object for CommandInterpreter
ndb/src/mgmsrv/CommandInterpreter.hpp:
removed editline from mgmtsrver, no replace with readline since interface is obsolete anyways
ndb/src/mgmsrv/Makefile.am:
removed editline from mgmtsrver, no replace with readline since interface is obsolete anyways
ndb/test/run-test/Makefile.am:
moved cpc code to test
ndb/test/src/Makefile.am:
moved cpc code to test
ndb/test/tools/Makefile.am:
moved cpc code to test
Diffstat (limited to 'ndb/src/mgmsrv')
-rw-r--r-- | ndb/src/mgmsrv/CommandInterpreter.hpp | 28 | ||||
-rw-r--r-- | ndb/src/mgmsrv/Makefile.am | 1 |
2 files changed, 14 insertions, 15 deletions
diff --git a/ndb/src/mgmsrv/CommandInterpreter.hpp b/ndb/src/mgmsrv/CommandInterpreter.hpp index 3466ee76226..db23f76a5bd 100644 --- a/ndb/src/mgmsrv/CommandInterpreter.hpp +++ b/ndb/src/mgmsrv/CommandInterpreter.hpp @@ -23,7 +23,6 @@ #include <ndb_global.h> #include <Vector.hpp> -#include <editline/editline.h> #include <BaseString.hpp> class MgmtSrvr; @@ -63,26 +62,27 @@ private: */ char *readline_gets () { + static char linebuffer[254]; static char *line_read = (char *)NULL; - // Disable the default file-name completion action of TAB - // rl_bind_key ('\t', rl_insert); - /* If the buffer has already been allocated, return the memory to the free pool. */ if (line_read) - { - free (line_read); - line_read = (char *)NULL; - } + { + free (line_read); + line_read = (char *)NULL; + } /* Get a line from the user. */ - line_read = readline ("NDB> "); - - /* If the line has any text in it, save it on the history. */ - if (line_read && *line_read) - add_history (line_read); - + fputs("ndb_mgmd> ", stdout); + linebuffer[sizeof(linebuffer)-1]=0; + line_read = fgets(linebuffer, sizeof(linebuffer)-1, stdin); + if (line_read == linebuffer) { + char *q=linebuffer; + while (*q > 31) q++; + *q=0; + line_read= strdup(linebuffer); + } return (line_read); } diff --git a/ndb/src/mgmsrv/Makefile.am b/ndb/src/mgmsrv/Makefile.am index 3b57b027827..4cb164d48fe 100644 --- a/ndb/src/mgmsrv/Makefile.am +++ b/ndb/src/mgmsrv/Makefile.am @@ -24,7 +24,6 @@ INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi \ -I$(top_srcdir)/ndb/src/common/mgmcommon LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la \ - $(top_builddir)/ndb/src/common/editline/libeditline.a \ $(top_builddir)/dbug/libdbug.a \ $(top_builddir)/mysys/libmysys.a \ $(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@ |