#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "util.h"
#include "cmd.h"
#include "options.h"
#include "log2lines.h"
#include "help.h"
Go to the source code of this file.
◆ backSpaceEdit()
Definition at line 24 of file cmd.c.
25{
29
30 while ((
c = *edit++ ))
31 {
33 {
37 break;
38 default:
40 }
41 }
43
45}
Referenced by handle_escape_cmd().
◆ handle_address_cmd()
static int handle_address_cmd |
( |
FILE * |
outFile, |
|
|
char * |
arg |
|
) |
| |
|
static |
Definition at line 105 of file cmd.c.
106{
110 int cnt;
112
114 {
117 {
119 {
122 else
123 esclog(outFile,
"Relocated base missing for '%s' ('mod' will update)\n",
Image);
124 }
125 else
127 }
128 else
129 esclog(outFile,
"usage: `a <Image>:<offset>\n");
130 }
131 else
132 esclog(outFile,
"':' expected\n");
133
134 return 1;
135}
char * strchr(const char *String, int ch)
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
_In_ ULONG _In_ ULONG Offset
Referenced by handle_escape_cmd().
◆ handle_escape_cmd()
Definition at line 138 of file cmd.c.
139{
141 char sep = '\n';
145 int cnt = 0;
146 int changed = 0;
147
151
153
156 {
157 esclog(outFile,
"Command expected\n");
159 }
160
161 if (
res && cnt==2 && sep !=
' ')
162 {
163 esclog(outFile,
"' ' expected\n");
165 }
167 while ( *
l ==
' ')
l++;
171 {
172 case 'a':
174 break;
175 case 'h':
177 break;
178 case 'b':
181 break;
182 case 'c':
184 break;
185 case 'd':
187 break;
188 case 'l':
190 {
193 }
194 break;
195 case 'L':
197 {
200 }
201 break;
202 case 'm':
204 break;
205 case 'M':
207 break;
208 case 'P':
210 break;
211 case 'q':
213 esclog(outFile,
"Bye!\n");
214 break;
215 case 'r':
217 break;
218 case 's':
220 {
222 esclog(outFile,
"Statistics cleared\n");
223 }
224 else
226 break;
227 case 'S':
230 {
233 }
235 esclog(outFile,
"(Setting source tree not implemented)\n");
236 break;
237 case 't':
239 break;
240 case 'T':
243 break;
244 case 'u':
246 break;
247 case 'U':
250 break;
251 case 'v':
253 break;
254 case 'z':
256 break;
257 default:
259 esclog(outFile,
"Command not implemented in cli: %c %s\n",
cmd,
arg)
260 else
262 }
264
266
268}
int strcmp(const char *String1, const char *String2)
GLsizeiptr const GLvoid GLenum usage
Referenced by translate_files().
◆ handle_switch()
Definition at line 48 of file cmd.c.
49{
50 int changed =0;
52
54 {
57 {
59 changed = 1;
60 }
61 }
63 {
64 esclog(outFile,
"%s is %d (%s)\n",
desc, *sw, changed ?
"changed":
"unchanged");
66 esclog(outFile,
"(readonly)\n");
67 }
68
69 return changed;
70}
GLint GLint GLint GLint GLint x
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
static const WCHAR desc[]
Referenced by handle_escape_cmd().
◆ handle_switch_str()
Definition at line 73 of file cmd.c.
74{
75 int changed =0;
76
78 {
80 {
82 {
83 if (*sw)
84 changed = 1;
85 *sw = '\0';
86 }
88 {
90 changed = 1;
91 }
92 }
93 }
95 {
96 esclog(outFile,
"%s is \"%s\" (%s)\n",
desc, sw, changed ?
"changed":
"unchanged");
98 esclog(outFile,
"(readonly)\n");
99 }
100
101 return changed;
102}
char * strcpy(char *DstString, const char *SrcString)
Referenced by handle_escape_cmd().