1 --- microcom.c.orig 2007-10-04 13:06:39.000000000 +0300
2 +++ microcom.c 2007-10-04 13:06:56.000000000 +0300
4 int script = 0; /* script active flag */
5 char scr_name[MAX_SCRIPT_NAME] = "script.scr"; /* default name of the script */
6 char device[MAX_DEVICE_NAME]; /* serial device name */
7 -int log = 0; /* log active flag */
8 +int ilog = 0; /* log active flag */
9 FILE* flog; /* log file */
10 int pf = 0; /* port file descriptor */
11 struct termios pots; /* old port termios settings to restore */
13 /* restore original terminal settings on exit */
14 void cleanup_termios(int signal) {
15 /* cloase the log file first */
21 --- help.c.orig 2007-10-04 13:07:24.000000000 +0300
22 +++ help.c 2007-10-04 13:07:45.000000000 +0300
24 extern int script; /* script active flag */
25 extern char scr_name[MAX_SCRIPT_NAME]; /* default name of the script */
26 extern char device[MAX_DEVICE_NAME]; /* serial device name */
27 -extern int log; /* log active flag */
28 +extern int ilog; /* log active flag */
29 extern FILE* flog; /* log file */
31 static int help_state = 0;
34 write(STDOUT_FILENO, str1, strlen(str1));
38 write(STDOUT_FILENO, " l - log on \n", 26);
40 write(STDOUT_FILENO, " l - log off \n", 26);
42 case 'q': /* quit help */
44 case 'l': /* log on/off */
45 - log = (log == 0)? 1: 0;
46 - if (log) { /* open log file */
47 + ilog = (ilog == 0)? 1: 0;
48 + if (ilog) { /* open log file */
49 if ((flog = fopen("microcom.log", "a")) == (FILE *)0) {
50 write(STDOUT_FILENO, "Cannot open microcom.log \n", 26);
55 else { /* cloase log file */
56 --- mux.c.orig 2007-10-04 13:07:04.000000000 +0300
57 +++ mux.c 2007-10-04 13:07:14.000000000 +0300
61 extern char scr_name[];
66 void mux_clear_sflag(void) {
68 i = read(pf, buf, BUFSIZE);
70 write(STDOUT_FILENO, buf, i);
73 fwrite(buf, 1, i, flog);
75 i = script_process(S_DCE, buf, i);