-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
commands.h
executable file
·222 lines (111 loc) · 8.53 KB
/
commands.h
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
// Copyright (C) 2015-2022 Scott Dwyer.
// You may use/distribute/modify this freely, under the terms of
// the GNU General Public License version 2 or later version.
// This software is distributed WITHOUT ANY WARRANTY.
#define MAX_SUB_LEVEL 256
#define MAX_ENDIF_LEVEL 256
#define MAX_WHILE_LEVEL 256
unsigned int ccc_subroutine_stack_ccc[MAX_SUB_LEVEL];
unsigned int subroutine_while_stack_ccc[MAX_SUB_LEVEL];
unsigned int subroutine_endif_stack_ccc[MAX_SUB_LEVEL];
int subroutine_stack_counter_ccc = 0;
int subroutine_count_ccc = 0;
int return_count_ccc = 0;
unsigned int ccc_endif_stack_ccc[MAX_ENDIF_LEVEL];
int endif_stack_counter_ccc = 0;
bool statement_condition_ccc[MAX_ENDIF_LEVEL];
unsigned int ccc_while_stack_ccc[MAX_WHILE_LEVEL];
unsigned int while_endif_stack_ccc[MAX_WHILE_LEVEL];
unsigned int done_stack_ccc[MAX_WHILE_LEVEL];
bool while_condition_ccc[MAX_WHILE_LEVEL];
int while_stack_counter_ccc = 0;
bool setting_buffer_ccc = false;
bool setting_scratchpad_ccc = false;
bool setting_usbbuffer_ccc = false;
char script_list_ccc[MAX_SCRIPT_DEPTH][MAX_LINE_LENGTH];
int script_count_ccc = 0;
int echo_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int seti_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int sets_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int printbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int setmainbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int endmainbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int change_main_buffer_size_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int print_sense_buffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int write_buffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int read_buffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int set_direction_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int scsi_6_cmd_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int scsi_10_cmd_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int scsi_12_cmd_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int scsi_16_cmd_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int set_protocol_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int set_tlength_field_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int set_byte_block_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int set_check_condition_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int ata_28_cmd_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int ata_48_cmd_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int write_log_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int get_time_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int string_to_buffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int setup_pio_read_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int setup_dma_read_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int setup_pio_write_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int setup_dma_write_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int get_status_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int perform_soft_reset_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int perform_hard_reset_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int u_sleep_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int busytimeout_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int resettimeout_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int softtimeout_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int hardtimeout_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int generaltimeout_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int load_script_file_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int previous_script_file_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int include_script_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int string_to_scratchpad_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int wordflip_buffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int wordflip_scratchpad_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int get_file_size_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int write_scratchpad_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int read_scratchpad_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int delete_file_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int call_command_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int user_input_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int copy_buffer_to_scratch_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int copy_scratch_to_buffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int variable_check_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int printscratchpad_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int setmainscratchpad_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int endmainscratchpad_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int change_main_scratchpad_size_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int gosub_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int ccc_subroutine_ccc(bool perform_check, unsigned int line_number);
int endsubroutine_ccc(bool perform_check, unsigned int line_number);
int returnsub_ccc(bool perform_check, unsigned int line_number);
int ifstate_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int ccc_endif_ccc(bool perform_check, unsigned int line_number);
int elsestate_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int ccc_elseif_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int dowhile_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int ccc_done_ccc(bool perform_check, unsigned int line_number);
int dobreak_ccc(bool perform_check, unsigned int line_number);
int exit_with_code_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int string_to_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int wordflip_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int write_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int read_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int print_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int set_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int end_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int change_usbbuffer_size_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int copy_usbbuffer_to_buffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int copy_buffer_to_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int copy_usbbuffer_to_scratch_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int copy_scratch_to_usbbuffer_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int usbtimeout_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int send_usb_control_msg_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int usb_raw_read_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int usb_raw_write_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);
int usb_reset_ccc(bool perform_check, unsigned int line_number, char *rest_of_line);