1 /* ***********************************************************
 2    *                                                         *
 3    * Copyright, (C) Honeywell Bull Inc., 1987                *
 4    *                                                         *
 5    * Copyright, (C) Honeywell Information Systems Inc., 1986 *
 6    *                                                         *
 7    *********************************************************** */
 8 
 9 /* HISTORY COMMENTS:
10   1) change(86-08-22,Lee), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw),
11      install(87-08-07,MR12.1-1072):
12      Created.
13                                                    END HISTORY COMMENTS */
14 
15 /* : PROCEDURE FUNCTION (process_options)
16 
17 Processes options in the emulator, depending on the key pressed.  The value
18 of the terminate flag passed will always be FALSE unless the 'exit emulator'
19 key was pressed.
20 */
21 
22 #include <ctype.h>
23 #include <ws.h>
24 #include <ws_dcls.h>
25 #include <wsmincap.h>
26 #include <keydefs.h>
27 #include <emulator.h>
28 
29 extern char *print_mode_type[];
30 extern char *on_off_status[];
31 extern int packetize_flag;
32 extern int em_print_mode;
33 extern int em_tab_size;
34 extern int local_edit;
35 extern int fg_data_only;
36 extern int bg_sender_in;
37 extern int bg_sender_out;
38 extern int bg_sender_buff[];
39 extern int dbgpkts;
40 extern int dbgrejs;
41 extern int dbgxchr;
42 extern char *buff;
43 
44 process_options(option,terminate_flag)
45 
46 int option;
47 int *terminate_flag;
48 {
49 
50 /* : process special options */
51 
52    switch(option) {
53 
54 /* : sit in a tight loop until any key is pressed */
55 
56       case OP_FREEZE:
57          freeze();
58          break;
59 
60 /* : pass a command to the command interpreter */
61 
62       case OP_EXEDOSCMD:
63          execute_dos_cmd();
64          break;
65 
66 /* : send a foreground break */
67 
68       case OP_BREAK:
69          puttdata(FG_BREAK,0,0);
70          break;
71 
72 /* : set flag to exit the emulator */
73 
74       case OP_EXIT:
75          *terminate_flag = FALSE;
76          break;
77 
78       case OP_BG_REPLY:
79          reply_to_query();
80          break;
81    }
82 }
83 ^Z