librsync  2.3.4
prototab.h
Go to the documentation of this file.
1/*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 *
3 * librsync -- library for network deltas
4 *
5 * Copyright 2000, 2001, 2014, 2015 by Martin Pool <mbp@sourcefrog.net>
6 * Copyright (C) 2003 by Donovan Baarda <abo@minkirri.apana.org.au>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 /*=
24 | I think if you've ordered
25 | somebody to do something you
26 | should probably resist the urge
27 | to thank them.
28 | -- http://abc.net.au/thegames/
29 */
30
31/** \file prototab.h
32 * Delta file commands.
33 *
34 * This file defines an array mapping command IDs to the operation kind,
35 * implied literal value, and length of the first and second parameters. The
36 * implied value is only used if the first parameter length is zero. */
37#ifndef PROTOTAB_H
38# define PROTOTAB_H
39
40# include "command.h"
41
42typedef struct rs_prototab_ent {
43 enum rs_op_kind kind;
44 int immediate;
45 int len_1, len_2;
47
48extern const rs_prototab_ent_t rs_prototab[];
49
50enum {
51 RS_OP_END = 0,
52 RS_OP_LITERAL_1 = 0x1,
53 RS_OP_LITERAL_2 = 0x2,
54 RS_OP_LITERAL_3 = 0x3,
55 RS_OP_LITERAL_4 = 0x4,
56 RS_OP_LITERAL_5 = 0x5,
57 RS_OP_LITERAL_6 = 0x6,
58 RS_OP_LITERAL_7 = 0x7,
59 RS_OP_LITERAL_8 = 0x8,
60 RS_OP_LITERAL_9 = 0x9,
61 RS_OP_LITERAL_10 = 0xa,
62 RS_OP_LITERAL_11 = 0xb,
63 RS_OP_LITERAL_12 = 0xc,
64 RS_OP_LITERAL_13 = 0xd,
65 RS_OP_LITERAL_14 = 0xe,
66 RS_OP_LITERAL_15 = 0xf,
67 RS_OP_LITERAL_16 = 0x10,
68 RS_OP_LITERAL_17 = 0x11,
69 RS_OP_LITERAL_18 = 0x12,
70 RS_OP_LITERAL_19 = 0x13,
71 RS_OP_LITERAL_20 = 0x14,
72 RS_OP_LITERAL_21 = 0x15,
73 RS_OP_LITERAL_22 = 0x16,
74 RS_OP_LITERAL_23 = 0x17,
75 RS_OP_LITERAL_24 = 0x18,
76 RS_OP_LITERAL_25 = 0x19,
77 RS_OP_LITERAL_26 = 0x1a,
78 RS_OP_LITERAL_27 = 0x1b,
79 RS_OP_LITERAL_28 = 0x1c,
80 RS_OP_LITERAL_29 = 0x1d,
81 RS_OP_LITERAL_30 = 0x1e,
82 RS_OP_LITERAL_31 = 0x1f,
83 RS_OP_LITERAL_32 = 0x20,
84 RS_OP_LITERAL_33 = 0x21,
85 RS_OP_LITERAL_34 = 0x22,
86 RS_OP_LITERAL_35 = 0x23,
87 RS_OP_LITERAL_36 = 0x24,
88 RS_OP_LITERAL_37 = 0x25,
89 RS_OP_LITERAL_38 = 0x26,
90 RS_OP_LITERAL_39 = 0x27,
91 RS_OP_LITERAL_40 = 0x28,
92 RS_OP_LITERAL_41 = 0x29,
93 RS_OP_LITERAL_42 = 0x2a,
94 RS_OP_LITERAL_43 = 0x2b,
95 RS_OP_LITERAL_44 = 0x2c,
96 RS_OP_LITERAL_45 = 0x2d,
97 RS_OP_LITERAL_46 = 0x2e,
98 RS_OP_LITERAL_47 = 0x2f,
99 RS_OP_LITERAL_48 = 0x30,
100 RS_OP_LITERAL_49 = 0x31,
101 RS_OP_LITERAL_50 = 0x32,
102 RS_OP_LITERAL_51 = 0x33,
103 RS_OP_LITERAL_52 = 0x34,
104 RS_OP_LITERAL_53 = 0x35,
105 RS_OP_LITERAL_54 = 0x36,
106 RS_OP_LITERAL_55 = 0x37,
107 RS_OP_LITERAL_56 = 0x38,
108 RS_OP_LITERAL_57 = 0x39,
109 RS_OP_LITERAL_58 = 0x3a,
110 RS_OP_LITERAL_59 = 0x3b,
111 RS_OP_LITERAL_60 = 0x3c,
112 RS_OP_LITERAL_61 = 0x3d,
113 RS_OP_LITERAL_62 = 0x3e,
114 RS_OP_LITERAL_63 = 0x3f,
115 RS_OP_LITERAL_64 = 0x40,
116 RS_OP_LITERAL_N1 = 0x41,
117 RS_OP_LITERAL_N2 = 0x42,
118 RS_OP_LITERAL_N4 = 0x43,
119 RS_OP_LITERAL_N8 = 0x44,
120 RS_OP_COPY_N1_N1 = 0x45,
121 RS_OP_COPY_N1_N2 = 0x46,
122 RS_OP_COPY_N1_N4 = 0x47,
123 RS_OP_COPY_N1_N8 = 0x48,
124 RS_OP_COPY_N2_N1 = 0x49,
125 RS_OP_COPY_N2_N2 = 0x4a,
126 RS_OP_COPY_N2_N4 = 0x4b,
127 RS_OP_COPY_N2_N8 = 0x4c,
128 RS_OP_COPY_N4_N1 = 0x4d,
129 RS_OP_COPY_N4_N2 = 0x4e,
130 RS_OP_COPY_N4_N4 = 0x4f,
131 RS_OP_COPY_N4_N8 = 0x50,
132 RS_OP_COPY_N8_N1 = 0x51,
133 RS_OP_COPY_N8_N2 = 0x52,
134 RS_OP_COPY_N8_N4 = 0x53,
135 RS_OP_COPY_N8_N8 = 0x54,
136 RS_OP_RESERVED_85 = 0x55,
137 RS_OP_RESERVED_86 = 0x56,
138 RS_OP_RESERVED_87 = 0x57,
139 RS_OP_RESERVED_88 = 0x58,
140 RS_OP_RESERVED_89 = 0x59,
141 RS_OP_RESERVED_90 = 0x5a,
142 RS_OP_RESERVED_91 = 0x5b,
143 RS_OP_RESERVED_92 = 0x5c,
144 RS_OP_RESERVED_93 = 0x5d,
145 RS_OP_RESERVED_94 = 0x5e,
146 RS_OP_RESERVED_95 = 0x5f,
147 RS_OP_RESERVED_96 = 0x60,
148 RS_OP_RESERVED_97 = 0x61,
149 RS_OP_RESERVED_98 = 0x62,
150 RS_OP_RESERVED_99 = 0x63,
151 RS_OP_RESERVED_100 = 0x64,
152 RS_OP_RESERVED_101 = 0x65,
153 RS_OP_RESERVED_102 = 0x66,
154 RS_OP_RESERVED_103 = 0x67,
155 RS_OP_RESERVED_104 = 0x68,
156 RS_OP_RESERVED_105 = 0x69,
157 RS_OP_RESERVED_106 = 0x6a,
158 RS_OP_RESERVED_107 = 0x6b,
159 RS_OP_RESERVED_108 = 0x6c,
160 RS_OP_RESERVED_109 = 0x6d,
161 RS_OP_RESERVED_110 = 0x6e,
162 RS_OP_RESERVED_111 = 0x6f,
163 RS_OP_RESERVED_112 = 0x70,
164 RS_OP_RESERVED_113 = 0x71,
165 RS_OP_RESERVED_114 = 0x72,
166 RS_OP_RESERVED_115 = 0x73,
167 RS_OP_RESERVED_116 = 0x74,
168 RS_OP_RESERVED_117 = 0x75,
169 RS_OP_RESERVED_118 = 0x76,
170 RS_OP_RESERVED_119 = 0x77,
171 RS_OP_RESERVED_120 = 0x78,
172 RS_OP_RESERVED_121 = 0x79,
173 RS_OP_RESERVED_122 = 0x7a,
174 RS_OP_RESERVED_123 = 0x7b,
175 RS_OP_RESERVED_124 = 0x7c,
176 RS_OP_RESERVED_125 = 0x7d,
177 RS_OP_RESERVED_126 = 0x7e,
178 RS_OP_RESERVED_127 = 0x7f,
179 RS_OP_RESERVED_128 = 0x80,
180 RS_OP_RESERVED_129 = 0x81,
181 RS_OP_RESERVED_130 = 0x82,
182 RS_OP_RESERVED_131 = 0x83,
183 RS_OP_RESERVED_132 = 0x84,
184 RS_OP_RESERVED_133 = 0x85,
185 RS_OP_RESERVED_134 = 0x86,
186 RS_OP_RESERVED_135 = 0x87,
187 RS_OP_RESERVED_136 = 0x88,
188 RS_OP_RESERVED_137 = 0x89,
189 RS_OP_RESERVED_138 = 0x8a,
190 RS_OP_RESERVED_139 = 0x8b,
191 RS_OP_RESERVED_140 = 0x8c,
192 RS_OP_RESERVED_141 = 0x8d,
193 RS_OP_RESERVED_142 = 0x8e,
194 RS_OP_RESERVED_143 = 0x8f,
195 RS_OP_RESERVED_144 = 0x90,
196 RS_OP_RESERVED_145 = 0x91,
197 RS_OP_RESERVED_146 = 0x92,
198 RS_OP_RESERVED_147 = 0x93,
199 RS_OP_RESERVED_148 = 0x94,
200 RS_OP_RESERVED_149 = 0x95,
201 RS_OP_RESERVED_150 = 0x96,
202 RS_OP_RESERVED_151 = 0x97,
203 RS_OP_RESERVED_152 = 0x98,
204 RS_OP_RESERVED_153 = 0x99,
205 RS_OP_RESERVED_154 = 0x9a,
206 RS_OP_RESERVED_155 = 0x9b,
207 RS_OP_RESERVED_156 = 0x9c,
208 RS_OP_RESERVED_157 = 0x9d,
209 RS_OP_RESERVED_158 = 0x9e,
210 RS_OP_RESERVED_159 = 0x9f,
211 RS_OP_RESERVED_160 = 0xa0,
212 RS_OP_RESERVED_161 = 0xa1,
213 RS_OP_RESERVED_162 = 0xa2,
214 RS_OP_RESERVED_163 = 0xa3,
215 RS_OP_RESERVED_164 = 0xa4,
216 RS_OP_RESERVED_165 = 0xa5,
217 RS_OP_RESERVED_166 = 0xa6,
218 RS_OP_RESERVED_167 = 0xa7,
219 RS_OP_RESERVED_168 = 0xa8,
220 RS_OP_RESERVED_169 = 0xa9,
221 RS_OP_RESERVED_170 = 0xaa,
222 RS_OP_RESERVED_171 = 0xab,
223 RS_OP_RESERVED_172 = 0xac,
224 RS_OP_RESERVED_173 = 0xad,
225 RS_OP_RESERVED_174 = 0xae,
226 RS_OP_RESERVED_175 = 0xaf,
227 RS_OP_RESERVED_176 = 0xb0,
228 RS_OP_RESERVED_177 = 0xb1,
229 RS_OP_RESERVED_178 = 0xb2,
230 RS_OP_RESERVED_179 = 0xb3,
231 RS_OP_RESERVED_180 = 0xb4,
232 RS_OP_RESERVED_181 = 0xb5,
233 RS_OP_RESERVED_182 = 0xb6,
234 RS_OP_RESERVED_183 = 0xb7,
235 RS_OP_RESERVED_184 = 0xb8,
236 RS_OP_RESERVED_185 = 0xb9,
237 RS_OP_RESERVED_186 = 0xba,
238 RS_OP_RESERVED_187 = 0xbb,
239 RS_OP_RESERVED_188 = 0xbc,
240 RS_OP_RESERVED_189 = 0xbd,
241 RS_OP_RESERVED_190 = 0xbe,
242 RS_OP_RESERVED_191 = 0xbf,
243 RS_OP_RESERVED_192 = 0xc0,
244 RS_OP_RESERVED_193 = 0xc1,
245 RS_OP_RESERVED_194 = 0xc2,
246 RS_OP_RESERVED_195 = 0xc3,
247 RS_OP_RESERVED_196 = 0xc4,
248 RS_OP_RESERVED_197 = 0xc5,
249 RS_OP_RESERVED_198 = 0xc6,
250 RS_OP_RESERVED_199 = 0xc7,
251 RS_OP_RESERVED_200 = 0xc8,
252 RS_OP_RESERVED_201 = 0xc9,
253 RS_OP_RESERVED_202 = 0xca,
254 RS_OP_RESERVED_203 = 0xcb,
255 RS_OP_RESERVED_204 = 0xcc,
256 RS_OP_RESERVED_205 = 0xcd,
257 RS_OP_RESERVED_206 = 0xce,
258 RS_OP_RESERVED_207 = 0xcf,
259 RS_OP_RESERVED_208 = 0xd0,
260 RS_OP_RESERVED_209 = 0xd1,
261 RS_OP_RESERVED_210 = 0xd2,
262 RS_OP_RESERVED_211 = 0xd3,
263 RS_OP_RESERVED_212 = 0xd4,
264 RS_OP_RESERVED_213 = 0xd5,
265 RS_OP_RESERVED_214 = 0xd6,
266 RS_OP_RESERVED_215 = 0xd7,
267 RS_OP_RESERVED_216 = 0xd8,
268 RS_OP_RESERVED_217 = 0xd9,
269 RS_OP_RESERVED_218 = 0xda,
270 RS_OP_RESERVED_219 = 0xdb,
271 RS_OP_RESERVED_220 = 0xdc,
272 RS_OP_RESERVED_221 = 0xdd,
273 RS_OP_RESERVED_222 = 0xde,
274 RS_OP_RESERVED_223 = 0xdf,
275 RS_OP_RESERVED_224 = 0xe0,
276 RS_OP_RESERVED_225 = 0xe1,
277 RS_OP_RESERVED_226 = 0xe2,
278 RS_OP_RESERVED_227 = 0xe3,
279 RS_OP_RESERVED_228 = 0xe4,
280 RS_OP_RESERVED_229 = 0xe5,
281 RS_OP_RESERVED_230 = 0xe6,
282 RS_OP_RESERVED_231 = 0xe7,
283 RS_OP_RESERVED_232 = 0xe8,
284 RS_OP_RESERVED_233 = 0xe9,
285 RS_OP_RESERVED_234 = 0xea,
286 RS_OP_RESERVED_235 = 0xeb,
287 RS_OP_RESERVED_236 = 0xec,
288 RS_OP_RESERVED_237 = 0xed,
289 RS_OP_RESERVED_238 = 0xee,
290 RS_OP_RESERVED_239 = 0xef,
291 RS_OP_RESERVED_240 = 0xf0,
292 RS_OP_RESERVED_241 = 0xf1,
293 RS_OP_RESERVED_242 = 0xf2,
294 RS_OP_RESERVED_243 = 0xf3,
295 RS_OP_RESERVED_244 = 0xf4,
296 RS_OP_RESERVED_245 = 0xf5,
297 RS_OP_RESERVED_246 = 0xf6,
298 RS_OP_RESERVED_247 = 0xf7,
299 RS_OP_RESERVED_248 = 0xf8,
300 RS_OP_RESERVED_249 = 0xf9,
301 RS_OP_RESERVED_250 = 0xfa,
302 RS_OP_RESERVED_251 = 0xfb,
303 RS_OP_RESERVED_252 = 0xfc,
304 RS_OP_RESERVED_253 = 0xfd,
305 RS_OP_RESERVED_254 = 0xfe,
306 RS_OP_RESERVED_255 = 0xff
307};
308
309#endif /* !PROTOTAB_H */
Types of commands present in the encoding stream.
rs_op_kind
Classes of operation that can be present.
Definition: command.h:33