Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/oldagsrc/good/scr4d.h @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 #ifndef SCR4D_H | |
2 #define SCR4D_H | |
3 | |
4 typedef union { | |
5 long alignment; | |
6 char ag_vt_2[sizeof(int)]; | |
7 char ag_vt_4[sizeof(dc *)]; | |
8 } scr_vs_type; | |
9 | |
10 typedef enum { | |
11 scr_edit_session_token = 1, scr_any_window_token, scr_quit_token, | |
12 scr_change_directory_token, scr_any_edit_string_token, scr_exit_token, | |
13 scr_session_complete_token, scr_any_search_key_token, | |
14 scr_line_number_token, scr_begin_token, scr_req_c_menu_token, | |
15 scr_search_key_token, scr_adjust_search_key_token, scr_edit_string_token, | |
16 scr_adjust_edit_string_token, scr_window_token, scr_req_w_menu_token, | |
17 scr_escape_token = 19, scr_adjust_window_token, scr_return_token, | |
18 scr_specify_line_number_token, scr_specify_lines_back_token, | |
19 scr_specify_lines_forward_token = 25, scr_enter_line_number_token = 27, | |
20 scr_digit_token, scr_backspace_token, scr_delete_token, scr_help_token, | |
21 scr_req_help_index_token, scr_req_key_assign_token, | |
22 scr_req_cursor_assign_token, scr_print_table_token, scr_control_key_token, | |
23 scr_previous_window_token, scr_bottom_window_token, scr_bury_window_token, | |
24 scr_non_cursor_key_token, scr_search_forward_token, | |
25 scr_search_reverse_token, scr_edit_search_key_token = 44, | |
26 scr_clone_window_token, scr_cycle_clone_token, scr_req_aux_win_menu_token, | |
27 scr_req_aux_cmnd_menu_token, scr_req_plane_menu_token, scr_previous_token, | |
28 scr_bottom_token, scr_bury_token, scr_search_next_token, | |
29 scr_down_token = 55, scr_search_previous_token, scr_up_token, | |
30 scr_create_key_token, scr_left_token, scr_right_token, | |
31 scr_text_char_token, scr_home_token, scr_end_token, | |
32 scr_control_left_token, scr_control_right_token, scr_new_directory_token, | |
33 scr_init_string_edit_token, scr_reduce_edit_string_token, | |
34 scr_move_edit_string_token, scr_reduce_search_key_token = 71, | |
35 scr_move_search_key_token, scr_resize_window_token = 74, | |
36 scr_move_window_token, scr_move_token = 77, scr_cursor_control_token, | |
37 scr_reduce_token, scr_page_up_token, scr_page_down_token, | |
38 scr_control_home_token, scr_control_end_token, scr_control_page_up_token, | |
39 scr_control_page_down_token, scr_control_w_token, scr_control_z_token | |
40 } scr_token_type; | |
41 | |
42 typedef struct scr_pcb_struct{ | |
43 scr_token_type token_number, reduction_token, error_frame_token; | |
44 int input_code; | |
45 int input_value; | |
46 int line, column; | |
47 int ssx, sn, error_frame_ssx; | |
48 int drt, dssx, dsn; | |
49 int ss[128]; | |
50 scr_vs_type vs[128]; | |
51 int ag_ap; | |
52 const char *error_message; | |
53 char read_flag; | |
54 char exit_flag; | |
55 int bts[128], btsx; | |
56 const int *ag_dtl; | |
57 int ag_dsn; | |
58 } scr_pcb_type; | |
59 | |
60 #ifndef PRULE_CONTEXT | |
61 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx])) | |
62 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx]) | |
63 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx]) | |
64 #endif | |
65 | |
66 #ifndef AG_RUNNING_CODE | |
67 /* PCB.exit_flag values */ | |
68 #define AG_RUNNING_CODE 0 | |
69 #define AG_SUCCESS_CODE 1 | |
70 #define AG_SYNTAX_ERROR_CODE 2 | |
71 #define AG_REDUCTION_ERROR_CODE 3 | |
72 #define AG_STACK_ERROR_CODE 4 | |
73 #define AG_SEMANTIC_ERROR_CODE 5 | |
74 #endif | |
75 void init_scr(void); | |
76 void scr(void); | |
77 #endif | |
78 |