ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbShell.h
Go to the documentation of this file.
1
8#ifndef ngcbShell_h
9#define ngcbShell_h
10
11
12#include <stdio.h>
13#include <stdlib.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#ifndef USE
20#define USE(x) do {(void)(x);} while (0)
21#endif
22
23/*
24 * Command line editor
25 */
26#define ngcbSHELL_FUNCTION_KEY(x) ((x == 91) || (x == 79))
27#define ngcbSHELL_ESC 27
28#define ngcbSHELL_F_CRSR_UP 65
29#define ngcbSHELL_F_CRSR_DOWN 66
30#define ngcbSHELL_F_CRSR_LEFT 68
31#define ngcbSHELL_F_CRSR_RIGHT 67
32#define ngcbSHELL_F_END 70
33#define ngcbSHELL_F_BEGIN 72
34#define ngcbSHELL_F_INSERT 50
35#define ngcbSHELL_COMMENT '#'
36#define ngcbSHELL_MAX_FILES 32
37#define ngcbSHELL_MAX_CMDLEN 256
38#define ngcbSHELL_STACK_SIZE 20
39
40/*
41 * Control keys
42 */
43#define ngcbSHELL_CR 13
44#define ngcbSHELL_BS 8
45#define ngcbSHELL_INSERT 9
46#define ngcbSHELL_END 5
47#define ngcbSHELL_BEGIN 1
48#define ngcbSHELL_LEFT 2
49#define ngcbSHELL_RIGHT 6
50#define ngcbSHELL_DEL 4
51#define ngcbSHELL_DELLINE 11
52
53/*
54 * Protoypes
55 */
56
60FILE *ngcbShellOpenRepStream(const char *outDev, char *erms);
61
65int ngcbShellTerminate(const char *inDev, char *erms);
66
70int ngcbShellGetLine(const char *inDev, char *cmdLine, char *erms);
71
76int ngcbShellReadStream(FILE *inputStream, char *cmdLine, char *erms);
77
81int ngcbShellReadKeyboard(char *cmdLine, char *erms);
82
86int ngcbShellGetKey(char *key, char *erms);
87
91int ngcbShellPollKey(char *key, char *erms);
92
96int ngcbShellTermTty(char *erms);
97
98#ifdef __cplusplus
99}
100#endif
101
102#endif
int ngcbShellGetKey(char *key, char *erms)
Definition ngcbShellTty.c:52
int ngcbShellGetLine(const char *inDev, char *cmdLine, char *erms)
Definition ngcbShellGetLine.c:73
int ngcbShellTermTty(char *erms)
Definition ngcbShellTty.c:130
int ngcbShellReadStream(FILE *inputStream, char *cmdLine, char *erms)
Definition ngcbShellStreamIo.c:25
FILE * ngcbShellOpenRepStream(const char *outDev, char *erms)
Definition ngcbShellGetLine.c:30
int ngcbShellReadKeyboard(char *cmdLine, char *erms)
Definition ngcbShellKeyIo.c:154
int ngcbShellTerminate(const char *inDev, char *erms)
Definition ngcbShellGetLine.c:63
int ngcbShellPollKey(char *key, char *erms)
Definition ngcbShellTty.c:89