X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=textclient%2Fsrc%2Fcommands.c;h=1af9e8f68caa22643e40b18051f6564041f43f55;hb=9a7546b0fd81cebb759c3b8732c9ff5d9d71aa0f;hp=4fe088316685f4eaeb22d26bda1542a82ab13253;hpb=7974c7b863e396a87e1479525a10db9b9cf93ca9;p=citadel.git diff --git a/textclient/src/commands.c b/textclient/src/commands.c index 4fe088316..1af9e8f68 100644 --- a/textclient/src/commands.c +++ b/textclient/src/commands.c @@ -2,7 +2,7 @@ * This file contains functions which implement parts of the * text-mode user interface. * - * Copyright (c) 1987-2012 by the citadel.org team + * Copyright (c) 1987-2017 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -51,7 +51,6 @@ #include #include #include -///#include "citadel.h" #include "citadel_ipc.h" #include "commands.h" #include "messages.h" @@ -60,11 +59,8 @@ #include "routines2.h" #include "rooms.h" #include "client_chat.h" -////#include "citadel_dirs.h" +#include "help.h" #include "tuiconfig.h" -//#ifndef HAVE_SNPRINTF -//#include "snprintf.h" -///#endif #include "screen.h" #include "ecrash.h" @@ -312,9 +308,11 @@ static void really_do_keepalive(void) { } } -/* threaded nonblocking keepalive stuff starts here. I'm going for a simple - encapsulated interface; in theory there should be no need to touch these - globals outside of the async_ka_* functions. */ +/* + * threaded nonblocking keepalive stuff starts here. I'm going for a simple + * encapsulated interface; in theory there should be no need to touch these + * globals outside of the async_ka_* functions. + */ #ifdef THREADED_CLIENT static pthread_t ka_thr_handle; @@ -356,9 +354,9 @@ static void async_ka_exec(void) #endif /* THREADED_CLIENT */ /* I changed this from static to not because I need to call it from - screen.c, either that or make something in screen.c not static. - Fix it how you like. Why all the staticness? stu */ - + * screen.c, either that or make something in screen.c not static. + * Fix it how you like. Why all the staticness? stu + */ void do_keepalive(void) { time_t now; @@ -381,11 +379,13 @@ void do_keepalive(void) /* Now the actual async-keepalve API that we expose to higher levels: - async_ka_start() and async_ka_end(). These do nothing when we don't have - threading enabled, so we avoid sprinkling ifdef's throughout the code. */ + * async_ka_start() and async_ka_end(). These do nothing when we don't have + * threading enabled, so we avoid sprinkling ifdef's throughout the code. + */ /* wait for a background keepalive to complete. this must be done before - attempting any further server requests! */ + * attempting any further server requests! + */ void async_ka_end(void) { #ifdef THREADED_CLIENT @@ -979,7 +979,20 @@ int getcmd(CtdlIPC *ipc, char *argbuf) enable_color = 0; } /* if we're running in idiot mode, display a cute little menu */ - IFNEXPERT formout(ipc, "mainmenu"); + + IFNEXPERT { + scr_printf("-----------------------------------------------------------------------\n"); + scr_printf("Room cmds: nown rooms, oto next room, <.G>oto a specific room,\n"); + scr_printf(" kip this room, bandon this room, ap this room,\n"); + scr_printf(" ngoto (move back)\n"); + scr_printf("Message cmds: ew msgs, orward read, everse read, ld msgs,\n"); + scr_printf(" ast five msgs, nter a message\n"); + scr_printf("General cmds: help, erminate, hat, ho is online\n"); + scr_printf("Misc: toggle eXpert mode, irectory\n"); + scr_printf("\n"); + scr_printf(" (Type .Help SUMMARY for extended commands, to hide this menu)\n"); + scr_printf("-----------------------------------------------------------------------\n"); + } print_instant(); strcpy(argbuf, ""); @@ -1192,11 +1205,24 @@ void stty_ctdl(int cmd) /* - * display_help() - help file viewer + * display_help() - help text viewer */ void display_help(CtdlIPC *ipc, char *name) { - formout(ipc, name); + int i; + int num_helps = sizeof(helpnames) / sizeof(char *) ; + + for (i=0; i