📄 help.c
字号:
/* help.c - Display of assorted help texts */#ifndef lintstatic char *rcsid = "$Header: /xtel/isode/isode/others/quipu/uips/sd/RCS/help.c,v 9.0 1992/06/16 12:45:08 isode Rel $";#endif/* * $Header: /xtel/isode/isode/others/quipu/uips/sd/RCS/help.c,v 9.0 1992/06/16 12:45:08 isode Rel $ */#include "sequence.h"#include <stdio.h>#include "quipu/util.h"#include "tailor.h"#define BUFLEN 1024#define TEXT 1#ifdef lint#define ETCDIR "/etc"#endif #define HELPDIR "sd/helpdir/"extern str_seq textseq;extern str_seq curr_dnseq;extern int text_state;extern int current_entry, entry_number, display_entry;void tprint(), scrollbar();void get_help();void help_cncs(){ get_help("help", " Press <KEY> to get detailed help.\n");}void help_init(){ get_help("help", " SD X.500 Directory Agent - Concise Help\n");}void help_up(){ get_help("widen", " The \"Widen Area\" Function.\n");}void help_back(){ get_help("look", " The \"Look Back\" Function.\n");}void help_number(){ get_help("number", " The \"Go To Number\" Function.\n");}void help_srch(){ get_help("search", " The \"Search\" Function");}void help_list(){ get_help("list", " The \"List\" Function");}void get_help(filename, line)char *filename, *line;{ FILE * helpfp; char helpbuf[BUFLEN]; char filebuf[BUFLEN]; char *str; text_state = TEXT; entry_number = 0; display_entry = current_entry = 1; free_seq(curr_dnseq); free_seq(textseq); curr_dnseq = 0; textseq = 0; (void) strcpy(filebuf, HELPDIR); (void) strcat(filebuf, filename); (void) strcpy(helpbuf, isodefile(filebuf, 0)); if ((helpfp = fopen(helpbuf, "r")) == (FILE *)NULL ) { tprint("Can't open help file '%s'.\n",helpbuf); return; } if (line) { add_seq(&textseq, line); entry_number++; } while(fgets(filebuf, BUFLEN, helpfp) != (char *) NULL) { str = filebuf; while(*str != '\n' && *str != '\0') str++; *str = '\0'; add_seq(&textseq, filebuf); entry_number++; } (void) fclose(helpfp); scrollbar('\0');}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -