1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
--- mshell.c.orig Sun Oct 20 16:13:17 2002
+++ mshell.c Sun Oct 20 16:13:45 2002
@@ -1,5 +1,6 @@
#include "mshell.h"
#include <setjmp.h>
+#include <stdlib.h>
char * index ();
@@ -26,8 +27,7 @@
exec_string [DESCLEN],
*args [MAXARGS],
*menu_array [LINES],
- tmpword [WORDLEN],
- *malloc();
+ tmpword [WORDLEN];
int i,
idx,
@@ -35,8 +35,7 @@
firsttime = TRUE,
dontdisplay = FALSE,
unix_flag,
- menu_flag,
- exit();
+ menu_flag;
static jmp_buf topenv;
static int topenvset;
@@ -49,7 +48,7 @@
signal (SIGPIPE, SIG_IGN); /* ignore dead pipes */
log("enter", m);
- while TRUE {
+ while (TRUE) {
if (!topenvset) {
topenvset = TRUE;
@@ -142,7 +141,7 @@
if ( strcmp (action_string, NULLSTR) == 0 ) {
invalid_option = TRUE;
- printf ("\tNo such help option name as: %s\!\!\n", opt2);
+ printf ("\tNo such help option name as: %s!!\n", opt2);
}
else {
tmpword[0] = EOS;
--- mshell.c~ Tue Aug 19 16:42:36 2003
+++ mshell.c Tue Aug 19 16:47:53 2003
@@ -46,7 +46,7 @@
signal (SIGQUIT, SIG_IGN); /* ignore all ^\ interrupts */
signal (SIGTSTP, SIG_IGN); /* ignore all ^Z interrupts */
signal (SIGPIPE, SIG_IGN); /* ignore dead pipes */
- log("enter", m);
+ Log("enter", m);
while (TRUE) {
@@ -85,7 +85,7 @@
printf ("\tSelect choice [or help, x, top, bye]: ");
opt[0] = 0;
read_input_line (opt);
- log(" ", opt);
+ Log(" ", opt);
invalid_option = FALSE;
putchar('\n');
@@ -170,7 +170,7 @@
for (i = 0; i < LINES; i++)
if (menu_array[i])
free(menu_array[i]);
- log("exit", m);
+ Log("exit", m);
return;
}
else if (strcmp(opt, "T") == 0 || strcmp(opt, "top") == 0) {
|