home *** CD-ROM | disk | FTP | other *** search
- /*---------------------------------------------------------------------------*
- *
- * cwish - windowing user friendly shell
- * -------------------------------------
- *
- * Copyright (c) 1988-1994 Hellmuth Michaelis
- *
- * Eggerstedtstr. 28
- * 22765 Hamburg
- * Europe
- *
- * Tel: +49 / 40 / 384298 (private)
- * Tel: +49 / 40 / 55903-170 (at work)
- * e-mail: hm@hcswork.hcs.de
- *
- * --------oOo--------
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *---------------------------------------------------------------------------*
- *
- * Last Edit-Date: [Fri Apr 29 12:15:14 1994]
- *
- * -hm fkey labels for help screen
- * -hm update help screen
- *
- *----------------------------------------------------------------------------*/
-
- #include "cwish.h"
-
- #define MAXHELPL 20
-
-
- /*---------------------------------------------------------------------------*
- * help function keys
- *---------------------------------------------------------------------------*/
-
- static struct fk_tab help_keys[] =
- {
- {" ", " "},
- {" ", " "},
- {" ", " "},
- {" ", " "},
- {" ", " "},
- {" ", " "},
- {" ", " "},
- {" ", " "}
- };
-
- static char *helpstr[MAXHELPL] =
- {
- " ----------------------- Command Window Commands: -------------------------",
- "",
- " Backspace - Delete left character Delete - Delete cursor character",
- " Control-F - Character forward Control-B - Character backward",
- " Control-A - Begin of line Control-E - End of line",
- " Control-N - Next line Control-P - Previous line",
- " Control-K - Kill line from cursor Control-Y - Yank back killed line",
- " Control-D - Exit back to system \"%\" is the marked files wildcard char",
- "",
- " ------------------------- File Window Commands: --------------------------",
- "",
- " Cursor up, Cursor down, Cursor right, Cursor left - Select a file",
- " Page Up - Previous file page Page Down - Next file page",
- " F1 - Edit current file F2 - Echo name to commandline",
- " F3 - Display this help F4 - Enter configuration menu",
- " F5 - Mark the current file F6 - Unmark all marked files",
- " F7 - Alternate attribute line F8 - Close current directory",
- "",
- " Alternate Invocation of F1...F8 by pressing ESCAPE and then '1'...'8'",
- " Alternate Invocation of Page up/down by pressing ESCAPE and then 'N' or 'P'",
- };
-
- char *contin = {"Press any key to continue ..."};
-
- /*---------------------------------------------------------------------------*
- * help page
- *---------------------------------------------------------------------------*/
- void
- help(void)
- {
- int i;
-
- suspend_time(); /* stop updating time */
-
- cur_fktab = &help_keys; /* help screen fkey label table */
- init_flabels();
-
- wmove(stdscr, 0, 0); /* first line */
- wclear(stdscr); /* clear window */
- touchwin(stdscr);
- wnoutrefresh(stdscr);
-
- move(0, 0); /* first line */
- attron(A_REVERSE); /* highlight on */
- addstr(headerline); /* program/copyright header */
- attroff(A_REVERSE); /* highlight off */
-
- for (i = 0; i < MAXHELPL; i++)
- mvaddstr(2 + i, 0, helpstr[i]); /* print help screen */
-
- move(LINES - 1, 0); /* last line */
-
- attron(A_REVERSE); /* highlight on */
- addstr(contin);
- attroff(A_REVERSE); /* highlight on */
- move(LINES - 1, strlen(contin)); /* last line */
- refresh(); /* show it */
-
- getch(); /* get any char from user */
-
- wmove(stdscr, 0, 0); /* first line */
- wclear(stdscr); /* clear window */
- touchwin(stdscr);
- wnoutrefresh(stdscr);
-
- touchwin(cmnd_w);
- touchwin(fst_w);
- touchwin(file_w);
- if (opt_attrib)
- touchwin(attr_w);
- if (opt_labels)
- touchwin(flbl_w);
-
- resume_time(); /* restart updating time */
-
- header(); /* new header */
- dis_hist(); /* display current commandline */
- fresh_files(); /* refresh files */
- attribs(1); /* new attributes */
- update_all(); /* update complete screen */
-
- cur_fktab = &sys_keys; /* system fkey label table */
- init_flabels();
- }
-
- /*----------------------- E O F -------------------------------------------*/
-