myadm

Simple MySQL client for the terminal
git clone git://git.bitsmanent.org/myadm
Log | Files | Refs | README | LICENSE

commit f8832aaf04bc7f623622cd892fa7f499be13ce72
parent 434476f733fa46f58ccb6d5906ca557245479683
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Mon, 14 Mar 2016 22:36:04 +0100

s/choose/ask/g

Diffstat:
Mconfig.def.h | 4++--
Mcore.c | 10+++++-----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -21,8 +21,8 @@ static Key keys[] = { { "databases", L"q", quit, {.i = 0} }, { "databases", L"ENTER", tables, {0} }, { "databases", L"SPACE", tables, {0} }, - { "tables", L"ENTER", records, {0} }, - { "tables", L"SPACE", records, {0} }, + { "tables", L"ENTER", records, {.i = 500} }, + { "tables", L"SPACE", records, {.i = 500} }, { "records", L"d", flagas, {.v = "D"} }, { "records", L"t", flagas, {.v = "*"} }, }; diff --git a/core.c b/core.c @@ -78,7 +78,7 @@ void apply(const Arg *arg); void attach(View *v); void attachfieldto(Field *f, Field **ff); void attachitemto(Item *i, Item **ii); -char choose(const char *msg, char *opts); +char ask(const char *msg, char *opts); void cleanup(void); void cleanupfields(Field **fields); void cleanupitems(Item **items); @@ -130,7 +130,7 @@ apply(const Arg *arg) { /* XXX if no pending changes, notice and returns */ if(arg->i) { char *opts = "yn"; - if(choose("Apply changes ([y]/n)?", opts) != opts[0]) + if(ask("Apply changes ([y]/n)?", opts) != opts[0]) return; } /* XXX ... */ @@ -166,7 +166,7 @@ attachitemto(Item *i, Item **ii) { } char -choose(const char *msg, char *opts) { +ask(const char *msg, char *opts) { char *o, c; stfl_setf("status", msg); @@ -257,8 +257,8 @@ cloneitem(Item *item) { void databases(const Arg *arg) { - MYSQL_RES *res; int refresh = (selview && !strcmp(selview->mode->name, "databases")); + MYSQL_RES *res; if(!(res = mysql_exec("show databases"))) die("databases\n"); @@ -543,7 +543,7 @@ void quit(const Arg *arg) { if(arg->i) { char *opts = "yn"; - if(choose("Do you want to quit ([y]/n)?", opts) != opts[0]) + if(ask("Do you want to quit ([y]/n)?", opts) != opts[0]) return; } running = 0;