1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
2: /* $Header: term.c,v 2.5 85/08/22 16:09:34 timo Exp $ */
3:
4: /*
5: * B editor -- Init/end terminal-related modules.
6: *
7: * This file should be wiped out completely.
8: */
9:
10:
11: #include "b.h"
12: #include "erro.h"
13:
14: extern bool dflag;
15:
16: extern bool nosense;
17:
18:
19: /*
20: * Call initialization code of other terminal-dependent modules.
21: * N.B. the order of initializations is determined by black magic.
22: * Don't change!
23: */
24:
25: Visible Procedure
26: initterm()
27: {
28: #ifndef NDEBUG
29: if (dflag)
30: fprintf(stderr, "*** initterm();\n\r");
31: #endif NDEBUG
32: /* initshow(); */
33: initgetc();
34: }
35:
36:
37: /*
38: * Extermination code, reverse of initterm().
39: * N.B. the order of exterminations is determined by black magic.
40: * Don't change!
41: */
42:
43: Visible Procedure
44: endterm()
45: {
46: #ifndef NDEBUG
47: if (dflag)
48: fprintf(stderr, "*** endterm();\n\r");
49: #endif NDEBUG
50: /* endshow(); */
51: endgetc();
52: }
53:
54:
55: /*
56: * Compatible interface with trmsense; return No if not sensed.
57: */
58:
59: Visible bool
60: sense(py, px)
61: int *py;
62: int *px;
63: {
64: trmsense(py, px);
65: if (*py >= 0 && *px >= 0)
66: return Yes;
67: if (nosense)
68: error(GOTO_NO);
69: else
70: error(GOTO_BAD);
71: return No;
72: }
Defined functions
sense
defined in line
59; used 1 times