diff options
-rw-r--r-- | include/proto.h | 9 | ||||
-rw-r--r-- | mbbsd/name.c | 34 |
2 files changed, 3 insertions, 40 deletions
diff --git a/include/proto.h b/include/proto.h index eb303221..680a2b9c 100644 --- a/include/proto.h +++ b/include/proto.h @@ -433,15 +433,6 @@ extern void ShowVector(struct Vector *self, int row, int column, const char *pro extern void ToggleVector(struct Vector *list, int *recipient, const char *listfile, const char *msg); void usercomplete(const char *prompt, char *data); -void namecomplete(const char *prompt, char *data); -void AddNameList(const char *name); -void FreeNameList(void); -void CreateNameList(void); -int chkstr(char *otag, const char *tag, const char *name); -int InNameList(const char *name); -void ShowNameList(int row, int column, const char *prompt); -int RemoveNameList(const char *name); -void ToggleNameList(int *reciper, const char *listfile, const char *msg); int generalnamecomplete(const char *prompt, char *data, int len, size_t nmemb, gnc_comp_func compar, gnc_perm_func permission, gnc_getname_func getname); diff --git a/mbbsd/name.c b/mbbsd/name.c index fd0ce441..1a11e967 100644 --- a/mbbsd/name.c +++ b/mbbsd/name.c @@ -1,18 +1,7 @@ /* $Id$ */ #include "bbs.h" -typedef char (*arrptr)[]; -/* name complete for user ID */ - -static void -prompt_more() -{ - move(b_lines, 0); clrtoeol(); - outs(ANSI_COLOR(1;36;44)); - prints("%-*s" ANSI_RESET, t_columns-2, " ◆ 按空白鍵可列出更多項目 "); -} - -//----------------------------------------------------------------------- +#define MORE_MSG "按空白鍵可列出更多項目" void ShowVector(struct Vector *self, int row, int column, const char *prompt) @@ -63,23 +52,6 @@ ToggleVector(struct Vector *list, int *recipient, const char *listfile, const ch } } -int -chkstr(char *otag, const char *tag, const char *name) -{ - char ch; - const char *oname = name; - - while (*tag) { - ch = *name++; - if (*tag != chartoupper(ch)) - return 0; - tag++; - } - if (*tag && *name == '\0') - strcpy(otag, oname); - return 1; -} - void namecomplete2(struct Vector *namelist, const char *prompt, char *data) { @@ -158,7 +130,7 @@ namecomplete2(struct Vector *namelist, const char *prompt, char *data) len = Vector_MaxLen(&sublist, viewoffset, p_lines); } if (viewoffset < Vector_length(&sublist)) { - prompt_more(); + vshowmsg(MORE_MSG); } continue; } @@ -373,7 +345,7 @@ generalnamecomplete(const char *prompt, char *data, int len, size_t nmemb, col += len + 2; } if (morelist != end + 1) { - prompt_more(); + vshowmsg(MORE_MSG); } continue; |