#include "spice.h"
#include "hlpdefs.h"
Go to the source code of this file.
Definition at line 27 of file textdisp.c.
struct wordlist * wl_next
void cprint(int clr, char *buf)
Definition at line 82 of file textdisp.c.
102 mesg =
"Selection (`?' for help): ";
111 for (s = buf; *s && isspace(*s); s++)
116 "\nType the number of a sub-topic or see also, or one of:\n\ 117 \tr\tReprint the current topic\n\ 118 \tp or CR\tReturn to the previous topic\n\ 120 \t?\tPrint this message\n\n");
129 if ((ss = strchr(s,
'\n')) !=
NULL)
132 if ((ss = strchr(s,
'>')) ==
NULL) {
170 fprintf(
cp_err,
"Invalid command\n");
175 fprintf(
cp_err,
"Bad choice.\n");
187 fprintf(
cp_err,
"Bad choice.\n");
static char buf[MAXPROMPT]
char * SCEDfgets(char *s, int n, FILE *fp, char *prompt)
bool hlp_tdisplay(topic *top)
void hlp_tkillwin |
( |
topic * |
top | ) |
|
Definition at line 198 of file textdisp.c.
bool hlp_tdisplay(topic *top)
static void putline |
( |
char * |
s | ) |
|
|
static |
Definition at line 212 of file textdisp.c.
221 if (((*
s ==
'\033') &&
s[1]) ||
222 ((*
s ==
'_') && (
s[1] ==
'\b')))
static char buf[MAXPROMPT]
static int putstuff |
( |
toplink * |
tl, |
|
|
int |
base |
|
) |
| |
|
static |
Definition at line 234 of file textdisp.c.
242 int width, maxwidth = 0, ncols, nrows, nbuts = 0, i, j, k;
250 for (tt = tl; tt; tt = tt->
next) {
255 ncols = width / maxwidth;
257 fprintf(stderr,
"Help, button too big!!\n");
262 maxwidth = width / ncols;
263 nrows = nbuts / ncols;
264 if (nrows * ncols < nbuts)
267 for (i = 0; i < nrows; i++) {
268 for (tt = tl, j = 0; j < i; j++, tt = tt->
next)
270 for (j = 0; j < ncols; j++) {
272 out_printf(
"%2d) %-*s ", base + j * nrows + i +
273 1, maxwidth - 5, tt->description);
274 for (k = 0; k < nrows; k++)