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