diff options
author | josh.macdonald <jmacd@users.noreply.github.com> | 2007-01-28 19:12:08 +0000 |
---|---|---|
committer | josh.macdonald <jmacd@users.noreply.github.com> | 2007-01-28 19:12:08 +0000 |
commit | 5fedf82fa4041ee12ea636df57b7456c4b57ff6d (patch) | |
tree | dc70ebbaf9a19d3e80c583fd51b6c5c2513b56b3 /xdelta1 | |
parent | 42660ea8bae2254e0a6ccf5bc7457e2ded8f8495 (diff) |
More cleanup.
Diffstat (limited to 'xdelta1')
-rwxr-xr-x | xdelta1/doc/xdelta.1 | 2 | ||||
-rw-r--r-- | xdelta1/libedsio/Makefile | 454 | ||||
-rwxr-xr-x | xdelta1/libedsio/base64.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/default.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/edsio.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/edsio.el | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/edsio.h | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/edsio_edsio.c | 806 | ||||
-rwxr-xr-x | xdelta1/libedsio/edsio_edsio.h | 379 | ||||
-rwxr-xr-x | xdelta1/libedsio/edsiotest.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/fh.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/generic.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/library.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/maketime.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/partime.c | 2 | ||||
-rwxr-xr-x | xdelta1/libedsio/simple.c | 2 | ||||
-rwxr-xr-x | xdelta1/xd_edsio.c | 1330 | ||||
-rwxr-xr-x | xdelta1/xd_edsio.h | 401 | ||||
-rwxr-xr-x | xdelta1/xdelta.prj | 18 |
19 files changed, 19 insertions, 3395 deletions
diff --git a/xdelta1/doc/xdelta.1 b/xdelta1/doc/xdelta.1 index ce0b361..7bd0a8c 100755 --- a/xdelta1/doc/xdelta.1 +++ b/xdelta1/doc/xdelta.1 | |||
@@ -196,6 +196,6 @@ and info commands exit with status 0 on success and 2 on failure. | |||
196 | Author: Joshua P. MacDonald, jmacd@cs.berkeley.edu | 196 | Author: Joshua P. MacDonald, jmacd@cs.berkeley.edu |
197 | .br | 197 | .br |
198 | .\" $Format: "Manual Page Revision: $Revision$; Release Date: $ProjectDate$."$ | 198 | .\" $Format: "Manual Page Revision: $Revision$; Release Date: $ProjectDate$."$ |
199 | Manual Page Revision: 1.6; Release Date: Sat, 27 Jan 2007 17:53:47 -0800. | 199 | Manual Page Revision: 1.6; Release Date: Sun, 28 Jan 2007 10:02:26 -0800. |
200 | .br | 200 | .br |
201 | Copyright \(co 1997, 1998, 1999, 2000, 2001 | 201 | Copyright \(co 1997, 1998, 1999, 2000, 2001 |
diff --git a/xdelta1/libedsio/Makefile b/xdelta1/libedsio/Makefile deleted file mode 100644 index d8a042c..0000000 --- a/xdelta1/libedsio/Makefile +++ /dev/null | |||
@@ -1,454 +0,0 @@ | |||
1 | # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am | ||
2 | |||
3 | # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. | ||
4 | # This Makefile.in is free software; the Free Software Foundation | ||
5 | # gives unlimited permission to copy and/or distribute it, | ||
6 | # with or without modifications, as long as this notice is preserved. | ||
7 | |||
8 | # This program is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
10 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
11 | # PARTICULAR PURPOSE. | ||
12 | |||
13 | |||
14 | SHELL = /bin/sh | ||
15 | |||
16 | srcdir = . | ||
17 | top_srcdir = .. | ||
18 | |||
19 | prefix = /usr/local | ||
20 | exec_prefix = ${prefix} | ||
21 | |||
22 | bindir = ${exec_prefix}/bin | ||
23 | sbindir = ${exec_prefix}/sbin | ||
24 | libexecdir = ${exec_prefix}/libexec | ||
25 | datadir = ${prefix}/share | ||
26 | sysconfdir = ${prefix}/etc | ||
27 | sharedstatedir = ${prefix}/com | ||
28 | localstatedir = ${prefix}/var | ||
29 | libdir = ${exec_prefix}/lib | ||
30 | infodir = ${prefix}/info | ||
31 | mandir = ${prefix}/man | ||
32 | includedir = ${prefix}/include | ||
33 | oldincludedir = /usr/include | ||
34 | |||
35 | DESTDIR = | ||
36 | |||
37 | pkgdatadir = $(datadir)/xdelta | ||
38 | pkglibdir = $(libdir)/xdelta | ||
39 | pkgincludedir = $(includedir)/xdelta | ||
40 | |||
41 | top_builddir = .. | ||
42 | |||
43 | ACLOCAL = aclocal-1.4 | ||
44 | AUTOCONF = autoconf | ||
45 | AUTOMAKE = automake-1.4 | ||
46 | AUTOHEADER = autoheader | ||
47 | |||
48 | INSTALL = /usr/bin/install -c | ||
49 | INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) | ||
50 | INSTALL_DATA = ${INSTALL} -m 644 | ||
51 | INSTALL_SCRIPT = ${INSTALL} | ||
52 | transform = s,x,x, | ||
53 | |||
54 | NORMAL_INSTALL = : | ||
55 | PRE_INSTALL = : | ||
56 | POST_INSTALL = : | ||
57 | NORMAL_UNINSTALL = : | ||
58 | PRE_UNINSTALL = : | ||
59 | POST_UNINSTALL = : | ||
60 | host_alias = | ||
61 | host_triplet = i686-pc-linux-gnu | ||
62 | AR = ar | ||
63 | AS = @AS@ | ||
64 | CC = gcc-4.1.1 | ||
65 | CPP = gcc-4.1.1 -E | ||
66 | CXX = g++ | ||
67 | CXXCPP = g++ -E | ||
68 | DLLTOOL = @DLLTOOL@ | ||
69 | ECHO = echo | ||
70 | EGREP = grep -E | ||
71 | EMACS = /usr/bin/emacs | ||
72 | EXEEXT = | ||
73 | F77 = g77 | ||
74 | GCJ = @GCJ@ | ||
75 | GCJFLAGS = @GCJFLAGS@ | ||
76 | GLIB_CFLAGS = -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include | ||
77 | GLIB_CONFIG = /usr/local/bin/glib-config | ||
78 | GLIB_LIBS = -L/usr/local/lib -lglib | ||
79 | HAVE_LIB = @HAVE_LIB@ | ||
80 | LIB = @LIB@ | ||
81 | LIBTOOL = $(SHELL) $(top_builddir)/libtool | ||
82 | LN_S = ln | ||
83 | LTLIB = @LTLIB@ | ||
84 | MAINT = # | ||
85 | MAKEINFO = makeinfo | ||
86 | OBJDUMP = @OBJDUMP@ | ||
87 | OBJEXT = o | ||
88 | PACKAGE = xdelta | ||
89 | RANLIB = ranlib | ||
90 | RC = @RC@ | ||
91 | STRIP = strip | ||
92 | VERSION = 1.1.4 | ||
93 | top_srcdir_absolute = /mnt/polaroid/Polaroid/orbit_linux/home/jmacd/projects/xdelta1 | ||
94 | |||
95 | INCLUDES = $(GLIB_CFLAGS) | ||
96 | |||
97 | noinst_SCRIPTS = edsio-comp | ||
98 | |||
99 | lib_LTLIBRARIES = libedsio.la | ||
100 | |||
101 | noinst_PROGRAMS = edsiotest | ||
102 | |||
103 | edsiotest_SOURCES = edsiotest.c | ||
104 | |||
105 | edsiotest_LDADD = libedsio.la $(GLIB_LIBS) | ||
106 | |||
107 | noinst_HEADERS = maketime.h partime.h | ||
108 | |||
109 | include_HEADERS = edsio.h edsio_edsio.h | ||
110 | |||
111 | libedsio_la_LIBADD = $(GLIB_LIBS) | ||
112 | |||
113 | libedsio_la_SOURCES = library.c simple.c edsio.c edsio_edsio.c sha.c md5c.c fh.c generic.c default.c base64.c maketime.c partime.c | ||
114 | |||
115 | |||
116 | EXTRA_DIST = edsio.el edsio.ser $(SER_OUT1) edsio-comp.in edsio.prj stamp-ser1 | ||
117 | |||
118 | SER_OUT1 = edsio_edsio.c edsio_edsio.h | ||
119 | |||
120 | BUILT_SOURCES = edsio_edsio.c | ||
121 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs | ||
122 | CONFIG_HEADER = ../config.h | ||
123 | CONFIG_CLEAN_FILES = edsio-comp | ||
124 | LTLIBRARIES = $(lib_LTLIBRARIES) | ||
125 | |||
126 | |||
127 | DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. | ||
128 | CPPFLAGS = | ||
129 | LDFLAGS = | ||
130 | LIBS = | ||
131 | libedsio_la_LDFLAGS = | ||
132 | libedsio_la_DEPENDENCIES = | ||
133 | libedsio_la_OBJECTS = library.lo simple.lo edsio.lo edsio_edsio.lo \ | ||
134 | sha.lo md5c.lo fh.lo generic.lo default.lo base64.lo maketime.lo \ | ||
135 | partime.lo | ||
136 | noinst_PROGRAMS = edsiotest$(EXEEXT) | ||
137 | PROGRAMS = $(noinst_PROGRAMS) | ||
138 | |||
139 | edsiotest_OBJECTS = edsiotest.$(OBJEXT) | ||
140 | edsiotest_DEPENDENCIES = libedsio.la | ||
141 | edsiotest_LDFLAGS = | ||
142 | SCRIPTS = $(noinst_SCRIPTS) | ||
143 | |||
144 | CFLAGS = -Wall -O3 | ||
145 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
146 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
147 | CCLD = $(CC) | ||
148 | LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ | ||
149 | HEADERS = $(include_HEADERS) $(noinst_HEADERS) | ||
150 | |||
151 | DIST_COMMON = Makefile.am Makefile.in edsio-comp.in | ||
152 | |||
153 | |||
154 | DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) | ||
155 | |||
156 | TAR = tar | ||
157 | GZIP_ENV = --best | ||
158 | DEP_FILES = .deps/base64.P .deps/default.P .deps/edsio.P \ | ||
159 | .deps/edsio_edsio.P .deps/edsiotest.P .deps/fh.P .deps/generic.P \ | ||
160 | .deps/library.P .deps/maketime.P .deps/md5c.P .deps/partime.P \ | ||
161 | .deps/sha.P .deps/simple.P | ||
162 | SOURCES = $(libedsio_la_SOURCES) $(edsiotest_SOURCES) | ||
163 | OBJECTS = $(libedsio_la_OBJECTS) $(edsiotest_OBJECTS) | ||
164 | |||
165 | all: all-redirect | ||
166 | .SUFFIXES: | ||
167 | .SUFFIXES: .S .c .lo .o .obj .s | ||
168 | $(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) | ||
169 | cd $(top_srcdir) && $(AUTOMAKE) --gnu libedsio/Makefile | ||
170 | |||
171 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) | ||
172 | cd $(top_builddir) \ | ||
173 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | ||
174 | |||
175 | edsio-comp: $(top_builddir)/config.status edsio-comp.in | ||
176 | cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | ||
177 | |||
178 | mostlyclean-libLTLIBRARIES: | ||
179 | |||
180 | clean-libLTLIBRARIES: | ||
181 | -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) | ||
182 | |||
183 | distclean-libLTLIBRARIES: | ||
184 | |||
185 | maintainer-clean-libLTLIBRARIES: | ||
186 | |||
187 | install-libLTLIBRARIES: $(lib_LTLIBRARIES) | ||
188 | @$(NORMAL_INSTALL) | ||
189 | $(mkinstalldirs) $(DESTDIR)$(libdir) | ||
190 | @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | ||
191 | if test -f $$p; then \ | ||
192 | echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ | ||
193 | $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ | ||
194 | else :; fi; \ | ||
195 | done | ||
196 | |||
197 | uninstall-libLTLIBRARIES: | ||
198 | @$(NORMAL_UNINSTALL) | ||
199 | list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | ||
200 | $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ | ||
201 | done | ||
202 | |||
203 | # FIXME: We should only use cygpath when building on Windows, | ||
204 | # and only if it is available. | ||
205 | .c.obj: | ||
206 | $(COMPILE) -c `cygpath -w $<` | ||
207 | |||
208 | .s.o: | ||
209 | $(COMPILE) -c $< | ||
210 | |||
211 | .S.o: | ||
212 | $(COMPILE) -c $< | ||
213 | |||
214 | mostlyclean-compile: | ||
215 | -rm -f *.o core *.core | ||
216 | -rm -f *.$(OBJEXT) | ||
217 | |||
218 | clean-compile: | ||
219 | |||
220 | distclean-compile: | ||
221 | -rm -f *.tab.c | ||
222 | |||
223 | maintainer-clean-compile: | ||
224 | |||
225 | .s.lo: | ||
226 | $(LIBTOOL) --mode=compile $(COMPILE) -c $< | ||
227 | |||
228 | .S.lo: | ||
229 | $(LIBTOOL) --mode=compile $(COMPILE) -c $< | ||
230 | |||
231 | mostlyclean-libtool: | ||
232 | -rm -f *.lo | ||
233 | |||
234 | clean-libtool: | ||
235 | -rm -rf .libs _libs | ||
236 | |||
237 | distclean-libtool: | ||
238 | |||
239 | maintainer-clean-libtool: | ||
240 | |||
241 | libedsio.la: $(libedsio_la_OBJECTS) $(libedsio_la_DEPENDENCIES) | ||
242 | $(LINK) -rpath $(libdir) $(libedsio_la_LDFLAGS) $(libedsio_la_OBJECTS) $(libedsio_la_LIBADD) $(LIBS) | ||
243 | |||
244 | mostlyclean-noinstPROGRAMS: | ||
245 | |||
246 | clean-noinstPROGRAMS: | ||
247 | -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) | ||
248 | |||
249 | distclean-noinstPROGRAMS: | ||
250 | |||
251 | maintainer-clean-noinstPROGRAMS: | ||
252 | |||
253 | edsiotest$(EXEEXT): $(edsiotest_OBJECTS) $(edsiotest_DEPENDENCIES) | ||
254 | @rm -f edsiotest$(EXEEXT) | ||
255 | $(LINK) $(edsiotest_LDFLAGS) $(edsiotest_OBJECTS) $(edsiotest_LDADD) $(LIBS) | ||
256 | |||
257 | install-includeHEADERS: $(include_HEADERS) | ||
258 | @$(NORMAL_INSTALL) | ||
259 | $(mkinstalldirs) $(DESTDIR)$(includedir) | ||
260 | @list='$(include_HEADERS)'; for p in $$list; do \ | ||
261 | if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ | ||
262 | echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \ | ||
263 | $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \ | ||
264 | done | ||
265 | |||
266 | uninstall-includeHEADERS: | ||
267 | @$(NORMAL_UNINSTALL) | ||
268 | list='$(include_HEADERS)'; for p in $$list; do \ | ||
269 | rm -f $(DESTDIR)$(includedir)/$$p; \ | ||
270 | done | ||
271 | |||
272 | tags: TAGS | ||
273 | |||
274 | ID: $(HEADERS) $(SOURCES) $(LISP) | ||
275 | list='$(SOURCES) $(HEADERS)'; \ | ||
276 | unique=`for i in $$list; do echo $$i; done | \ | ||
277 | awk ' { files[$$0] = 1; } \ | ||
278 | END { for (i in files) print i; }'`; \ | ||
279 | here=`pwd` && cd $(srcdir) \ | ||
280 | && mkid -f$$here/ID $$unique $(LISP) | ||
281 | |||
282 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) | ||
283 | tags=; \ | ||
284 | here=`pwd`; \ | ||
285 | list='$(SOURCES) $(HEADERS)'; \ | ||
286 | unique=`for i in $$list; do echo $$i; done | \ | ||
287 | awk ' { files[$$0] = 1; } \ | ||
288 | END { for (i in files) print i; }'`; \ | ||
289 | test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ | ||
290 | || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) | ||
291 | |||
292 | mostlyclean-tags: | ||
293 | |||
294 | clean-tags: | ||
295 | |||
296 | distclean-tags: | ||
297 | -rm -f TAGS ID | ||
298 | |||
299 | maintainer-clean-tags: | ||
300 | |||
301 | distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) | ||
302 | |||
303 | subdir = libedsio | ||
304 | |||
305 | distdir: $(DISTFILES) | ||
306 | here=`cd $(top_builddir) && pwd`; \ | ||
307 | top_distdir=`cd $(top_distdir) && pwd`; \ | ||
308 | distdir=`cd $(distdir) && pwd`; \ | ||
309 | cd $(top_srcdir) \ | ||
310 | && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu libedsio/Makefile | ||
311 | @for file in $(DISTFILES); do \ | ||
312 | d=$(srcdir); \ | ||
313 | if test -d $$d/$$file; then \ | ||
314 | cp -pr $$d/$$file $(distdir)/$$file; \ | ||
315 | else \ | ||
316 | test -f $(distdir)/$$file \ | ||
317 | || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ | ||
318 | || cp -p $$d/$$file $(distdir)/$$file || :; \ | ||
319 | fi; \ | ||
320 | done | ||
321 | |||
322 | DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) | ||
323 | |||
324 | -include $(DEP_FILES) | ||
325 | |||
326 | mostlyclean-depend: | ||
327 | |||
328 | clean-depend: | ||
329 | |||
330 | distclean-depend: | ||
331 | -rm -rf .deps | ||
332 | |||
333 | maintainer-clean-depend: | ||
334 | |||
335 | %.o: %.c | ||
336 | @echo '$(COMPILE) -c $<'; \ | ||
337 | $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< | ||
338 | @-cp .deps/$(*F).pp .deps/$(*F).P; \ | ||
339 | tr ' ' '\012' < .deps/$(*F).pp \ | ||
340 | | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ | ||
341 | >> .deps/$(*F).P; \ | ||
342 | rm .deps/$(*F).pp | ||
343 | |||
344 | %.lo: %.c | ||
345 | @echo '$(LTCOMPILE) -c $<'; \ | ||
346 | $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< | ||
347 | @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ | ||
348 | < .deps/$(*F).pp > .deps/$(*F).P; \ | ||
349 | tr ' ' '\012' < .deps/$(*F).pp \ | ||
350 | | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ | ||
351 | >> .deps/$(*F).P; \ | ||
352 | rm -f .deps/$(*F).pp | ||
353 | info-am: | ||
354 | info: info-am | ||
355 | dvi-am: | ||
356 | dvi: dvi-am | ||
357 | check-am: all-am | ||
358 | check: check-am | ||
359 | installcheck-am: | ||
360 | installcheck: installcheck-am | ||
361 | install-exec-am: install-libLTLIBRARIES | ||
362 | install-exec: install-exec-am | ||
363 | |||
364 | install-data-am: install-includeHEADERS | ||
365 | install-data: install-data-am | ||
366 | |||
367 | install-am: all-am | ||
368 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
369 | install: install-am | ||
370 | uninstall-am: uninstall-libLTLIBRARIES uninstall-includeHEADERS | ||
371 | uninstall: uninstall-am | ||
372 | all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(HEADERS) | ||
373 | all-redirect: all-am | ||
374 | install-strip: | ||
375 | $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install | ||
376 | installdirs: | ||
377 | $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) | ||
378 | |||
379 | |||
380 | mostlyclean-generic: | ||
381 | |||
382 | clean-generic: | ||
383 | |||
384 | distclean-generic: | ||
385 | -rm -f Makefile $(CONFIG_CLEAN_FILES) | ||
386 | -rm -f config.cache config.log stamp-h stamp-h[0-9]* | ||
387 | |||
388 | maintainer-clean-generic: | ||
389 | -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) | ||
390 | mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \ | ||
391 | mostlyclean-libtool mostlyclean-noinstPROGRAMS \ | ||
392 | mostlyclean-tags mostlyclean-depend mostlyclean-generic | ||
393 | |||
394 | mostlyclean: mostlyclean-am | ||
395 | |||
396 | clean-am: clean-libLTLIBRARIES clean-compile clean-libtool \ | ||
397 | clean-noinstPROGRAMS clean-tags clean-depend \ | ||
398 | clean-generic mostlyclean-am | ||
399 | |||
400 | clean: clean-am | ||
401 | |||
402 | distclean-am: distclean-libLTLIBRARIES distclean-compile \ | ||
403 | distclean-libtool distclean-noinstPROGRAMS \ | ||
404 | distclean-tags distclean-depend distclean-generic \ | ||
405 | clean-am | ||
406 | -rm -f libtool | ||
407 | |||
408 | distclean: distclean-am | ||
409 | |||
410 | maintainer-clean-am: maintainer-clean-libLTLIBRARIES \ | ||
411 | maintainer-clean-compile maintainer-clean-libtool \ | ||
412 | maintainer-clean-noinstPROGRAMS maintainer-clean-tags \ | ||
413 | maintainer-clean-depend maintainer-clean-generic \ | ||
414 | distclean-am | ||
415 | @echo "This command is intended for maintainers to use;" | ||
416 | @echo "it deletes files that may require special tools to rebuild." | ||
417 | |||
418 | maintainer-clean: maintainer-clean-am | ||
419 | |||
420 | .PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ | ||
421 | clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ | ||
422 | uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \ | ||
423 | distclean-compile clean-compile maintainer-clean-compile \ | ||
424 | mostlyclean-libtool distclean-libtool clean-libtool \ | ||
425 | maintainer-clean-libtool mostlyclean-noinstPROGRAMS \ | ||
426 | distclean-noinstPROGRAMS clean-noinstPROGRAMS \ | ||
427 | maintainer-clean-noinstPROGRAMS uninstall-includeHEADERS \ | ||
428 | install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \ | ||
429 | maintainer-clean-tags distdir mostlyclean-depend distclean-depend \ | ||
430 | clean-depend maintainer-clean-depend info-am info dvi-am dvi check \ | ||
431 | check-am installcheck-am installcheck install-exec-am install-exec \ | ||
432 | install-data-am install-data install-am install uninstall-am uninstall \ | ||
433 | all-redirect all-am all installdirs mostlyclean-generic \ | ||
434 | distclean-generic clean-generic maintainer-clean-generic clean \ | ||
435 | mostlyclean distclean maintainer-clean | ||
436 | |||
437 | |||
438 | # | ||
439 | # Rules for the generated code | ||
440 | # | ||
441 | |||
442 | stamp-ser1: $(top_srcdir)/libedsio/edsio.el edsio.ser | ||
443 | $(top_srcdir)/libedsio/edsio-comp edsio.ser | ||
444 | touch stamp-ser1 | ||
445 | |||
446 | $(SER_OUT1): stamp-ser1 | ||
447 | |||
448 | # | ||
449 | # | ||
450 | # | ||
451 | |||
452 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
453 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
454 | .NOEXPORT: | ||
diff --git a/xdelta1/libedsio/base64.c b/xdelta1/libedsio/base64.c index 75c6c97..c37ddae 100755 --- a/xdelta1/libedsio/base64.c +++ b/xdelta1/libedsio/base64.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: base64.c 1.14 Wed, 31 Mar 1999 17:39:58 -0800 jmacd $ | 2 | * $Id: base64.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/libedsio/default.c b/xdelta1/libedsio/default.c index 53f47cd..8c9f347 100755 --- a/xdelta1/libedsio/default.c +++ b/xdelta1/libedsio/default.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: default.c 1.5 Wed, 31 Mar 1999 17:39:58 -0800 jmacd $ | 2 | * $Id: default.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/libedsio/edsio.c b/xdelta1/libedsio/edsio.c index 74fd7b3..4d110f6 100755 --- a/xdelta1/libedsio/edsio.c +++ b/xdelta1/libedsio/edsio.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: edsio.c 1.24.1.1 Mon, 11 Jun 2001 01:56:01 -0700 jmacd $ | 2 | * $Id: edsio.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/libedsio/edsio.el b/xdelta1/libedsio/edsio.el index 58c3a4e..b28f623 100755 --- a/xdelta1/libedsio/edsio.el +++ b/xdelta1/libedsio/edsio.el | |||
@@ -505,7 +505,7 @@ the definition file.") | |||
505 | * | 505 | * |
506 | * This file was AUTOMATICALLY GENERATED using: | 506 | * This file was AUTOMATICALLY GENERATED using: |
507 | * | 507 | * |
508 | * $Id: edsio.el 1.16 Tue, 06 Apr 1999 23:40:10 -0700 jmacd $ | 508 | * $Id: edsio.el 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
509 | */ | 509 | */ |
510 | 510 | ||
511 | ") | 511 | ") |
diff --git a/xdelta1/libedsio/edsio.h b/xdelta1/libedsio/edsio.h index da77188..06b5647 100755 --- a/xdelta1/libedsio/edsio.h +++ b/xdelta1/libedsio/edsio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: edsio.h 1.15.1.1 Mon, 11 Jun 2001 01:56:01 -0700 jmacd $ | 2 | * $Id: edsio.h 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/libedsio/edsio_edsio.c b/xdelta1/libedsio/edsio_edsio.c deleted file mode 100755 index 01113df..0000000 --- a/xdelta1/libedsio/edsio_edsio.c +++ /dev/null | |||
@@ -1,806 +0,0 @@ | |||
1 | /* -*-Mode: C;-*- | ||
2 | * Copyright (C) 1997, 1998, 1999 Josh MacDonald | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | * | ||
18 | * Author: Josh MacDonald <jmacd@CS.Berkeley.EDU> | ||
19 | * | ||
20 | * This file was AUTOMATICALLY GENERATED using: | ||
21 | * | ||
22 | * $Id: edsio.el 1.16 Tue, 06 Apr 1999 23:40:10 -0700 jmacd $ | ||
23 | */ | ||
24 | |||
25 | #include "edsio.h" | ||
26 | |||
27 | #include <errno.h> | ||
28 | |||
29 | /* Declarations. */ | ||
30 | |||
31 | static const char* Edsio_StringStringString_event_field_to_string (GenericEvent* ev, gint field); | ||
32 | static const char* Edsio_Int_event_field_to_string (GenericEvent* ev, gint field); | ||
33 | static const char* Edsio_String_event_field_to_string (GenericEvent* ev, gint field); | ||
34 | static const char* Edsio_StringString_event_field_to_string (GenericEvent* ev, gint field); | ||
35 | static const char* Edsio_Source_event_field_to_string (GenericEvent* ev, gint field); | ||
36 | static const char* Edsio_IntInt_event_field_to_string (GenericEvent* ev, gint field); | ||
37 | static const char* Edsio_Errno_event_field_to_string (GenericEvent* ev, gint field); | ||
38 | static void print_spaces (guint n) { int i; for (i = 0; i < n; i += 1) g_print (" "); } | ||
39 | |||
40 | |||
41 | /* initialize this library. */ | ||
42 | |||
43 | gboolean | ||
44 | edsio_edsio_init (void) | ||
45 | { | ||
46 | static gboolean once = FALSE; | ||
47 | static gboolean result = FALSE; | ||
48 | if (once) return result; | ||
49 | once = TRUE; | ||
50 | eventdelivery_initialize_event_def (EC_EdsioGModuleErrorValue, EL_Error, EF_None, "GModuleError", "GModule: ${0}: ${1}", & Edsio_StringString_event_field_to_string); | ||
51 | eventdelivery_initialize_event_def (EC_EdsioUnregisteredLibraryValue, EL_Error, EF_None, "UnregisteredLibrary", "Unregistered library: ${0}", & Edsio_Int_event_field_to_string); | ||
52 | eventdelivery_initialize_event_def (EC_EdsioMD5StringLongValue, EL_Error, EF_None, "MD5StringLong", "MD5 string too long: ${0}", & Edsio_String_event_field_to_string); | ||
53 | eventdelivery_initialize_event_def (EC_EdsioMD5StringShortValue, EL_Error, EF_None, "MD5StringShort", "MD5 string too short: ${0}", & Edsio_String_event_field_to_string); | ||
54 | eventdelivery_initialize_event_def (EC_EdsioInvalidHexDigitValue, EL_Error, EF_None, "InvalidHexDigit", "Invalid hex digit ${0} in context: ${1}", & Edsio_StringString_event_field_to_string); | ||
55 | eventdelivery_initialize_event_def (EC_EdsioInvalidStreamChecksumValue, EL_Error, EF_None, "InvalidStreamChecksum", "Incorrect stream checksum", NULL); | ||
56 | eventdelivery_initialize_event_def (EC_EdsioPersistenceUnavailableValue, EL_Error, EF_None, "PersistenceUnavailable", "Persistence is unavailable in host ${1} for property ${0}", & Edsio_StringString_event_field_to_string); | ||
57 | eventdelivery_initialize_event_def (EC_EdsioPropertyNotSetValue, EL_Error, EF_None, "PropertyNotSet", "${0} property not set", & Edsio_String_event_field_to_string); | ||
58 | eventdelivery_initialize_event_def (EC_EdsioWrongDataTypeValue, EL_Error, EF_None, "WrongDataType", "Wrong property data type: received ${1}, expected ${2}", & Edsio_StringStringString_event_field_to_string); | ||
59 | eventdelivery_initialize_event_def (EC_EdsioWrongHostTypeValue, EL_Error, EF_None, "WrongHostType", "Wrong property host type: received ${1}, expected ${2}", & Edsio_StringStringString_event_field_to_string); | ||
60 | eventdelivery_initialize_event_def (EC_EdsioNoSuchHostTypeValue, EL_Error, EF_None, "NoSuchHostType", "Unregistered host type: ${0}", & Edsio_String_event_field_to_string); | ||
61 | eventdelivery_initialize_event_def (EC_EdsioNoSuchPropertyTypeValue, EL_Error, EF_None, "NoSuchPropertyType", "Unregistered property type: ${0}", & Edsio_String_event_field_to_string); | ||
62 | eventdelivery_initialize_event_def (EC_EdsioNoSuchPropertyValue, EL_Error, EF_None, "NoSuchProperty", "Unregistered property: ${0}", & Edsio_Int_event_field_to_string); | ||
63 | eventdelivery_initialize_event_def (EC_EdsioDuplicatePropertyNameRegisteredValue, EL_Warning, EF_None, "DuplicatePropertyNameRegistered", "Property name registered twice (ignored): ${0}", & Edsio_String_event_field_to_string); | ||
64 | eventdelivery_initialize_event_def (EC_EdsioDuplicateHostTypeRegisteredValue, EL_Error, EF_None, "DuplicateHostTypeRegistered", "Property host registered twice: ${0}", & Edsio_String_event_field_to_string); | ||
65 | eventdelivery_initialize_event_def (EC_EdsioDuplicatePropertyTypeRegisteredValue, EL_Error, EF_None, "DuplicatePropertyTypeRegistered", "Property type registered twice: ${0}", & Edsio_String_event_field_to_string); | ||
66 | eventdelivery_initialize_event_def (EC_EdsioInvalidIntegerSignValue, EL_Error, EF_None, "InvalidIntegerSign", "${0}: expected an unsigned integer: ${1}", & Edsio_StringString_event_field_to_string); | ||
67 | eventdelivery_initialize_event_def (EC_EdsioIntegerOutOfRangeValue, EL_Error, EF_None, "IntegerOutOfRange", "${0}: integer out of range: ${1}", & Edsio_StringString_event_field_to_string); | ||
68 | eventdelivery_initialize_event_def (EC_EdsioInvalidIntegerStringValue, EL_Error, EF_None, "InvalidIntegerString", "${0}: not an integer: ${1}", & Edsio_StringString_event_field_to_string); | ||
69 | eventdelivery_initialize_event_def (EC_EdsioIncorrectAllocationValue, EL_Error, EF_None, "IncorrectAllocation", "${0}: Incorrect allocation", & Edsio_Source_event_field_to_string); | ||
70 | eventdelivery_initialize_event_def (EC_EdsioSourceEofValue, EL_Error, EF_None, "SourceEof", "${0}: Unexpected EOF", & Edsio_Source_event_field_to_string); | ||
71 | eventdelivery_initialize_event_def (EC_EdsioInvalidChecksumValue, EL_Error, EF_None, "InvalidChecksum", "Checksum verification failed", NULL); | ||
72 | eventdelivery_initialize_event_def (EC_EdsioMissingChecksumValue, EL_Error, EF_None, "MissingChecksum", "Missing embedded checksum in base64 encoding", NULL); | ||
73 | eventdelivery_initialize_event_def (EC_EdsioInvalidBase64EncodingValue, EL_Error, EF_None, "InvalidBase64Encoding", "Invalid base64 encoding", NULL); | ||
74 | eventdelivery_initialize_event_def (EC_EdsioOutputBufferShortValue, EL_Error, EF_None, "OutputBufferShort", "Output buffer is too short", NULL); | ||
75 | eventdelivery_initialize_event_def (EC_EdsioUnexpectedTypeValue, EL_Error, EF_None, "UnexpectedType", "Unexpected serial type", NULL); | ||
76 | eventdelivery_initialize_event_def (EC_EdsioUnexpectedLibraryTypeValue, EL_Error, EF_None, "UnexpectedLibraryType", "Unexpected serial library type: expected ${0}, received ${1}", & Edsio_IntInt_event_field_to_string); | ||
77 | eventdelivery_initialize_event_def (EC_EdsioUnregisteredTypeValue, EL_Error, EF_None, "UnregisteredType", "Unregistered serial type: library=${0} number=${1}", & Edsio_IntInt_event_field_to_string); | ||
78 | eventdelivery_initialize_event_def (EC_EdsioTimeFailureValue, EL_Error, EF_None, "TimeFailure", "Time failed: ${0}", & Edsio_Errno_event_field_to_string); | ||
79 | eventdelivery_initialize_event_def (EC_EdsioGetTimeOfDayFailureValue, EL_Error, EF_None, "GetTimeOfDayFailure", "Gettimeofday failed: ${0}", & Edsio_Errno_event_field_to_string); | ||
80 | serializeio_initialize_type ("ST_GenericTime", ST_GenericTime, &unserialize_generictime_internal, &serialize_generictime_obj_internal, &serializeio_count_generictime_obj, &serializeio_print_generictime_obj); | ||
81 | serializeio_initialize_type ("ST_EdsioString", ST_EdsioString, &unserialize_edsiostring_internal, &serialize_edsiostring_obj_internal, &serializeio_count_edsiostring_obj, &serializeio_print_edsiostring_obj); | ||
82 | serializeio_initialize_type ("ST_EdsioBytes", ST_EdsioBytes, &unserialize_edsiobytes_internal, &serialize_edsiobytes_obj_internal, &serializeio_count_edsiobytes_obj, &serializeio_print_edsiobytes_obj); | ||
83 | serializeio_initialize_type ("ST_EdsioUint", ST_EdsioUint, &unserialize_edsiouint_internal, &serialize_edsiouint_obj_internal, &serializeio_count_edsiouint_obj, &serializeio_print_edsiouint_obj); | ||
84 | edsio_initialize_host_type ("PropTest", (PropertyTableFunc) & edsio_proptest_property_table, (PersistSourceFunc) & edsio_persist_proptest_source, (PersistSinkFunc) & edsio_persist_proptest_sink, (PersistIssetFunc) & edsio_persist_proptest_isset, (PersistUnsetFunc) & edsio_persist_proptest_unset); | ||
85 | edsio_initialize_property_type ("EdsioUint", & edsio_property_vptr_free, & edsio_property_vptr_getter, & edsio_property_vptr_setter, serialize_edsiouint_obj, unserialize_edsiouint); | ||
86 | edsio_initialize_property_type ("string", & edsio_property_string_free, & edsio_property_string_getter, & edsio_property_string_setter, serialize_string_obj, unserialize_string); | ||
87 | edsio_initialize_property_type ("bytes", & edsio_property_bytes_free, & edsio_property_bytes_getter, & edsio_property_bytes_setter, serialize_bytes_obj, unserialize_bytes); | ||
88 | edsio_initialize_property_type ("uint", & edsio_property_uint_free, & edsio_property_uint_getter, & edsio_property_uint_setter, serialize_uint_obj, unserialize_uint); | ||
89 | edsio_library_register (6, "edsio"); | ||
90 | result = TRUE; | ||
91 | return TRUE; | ||
92 | }; | ||
93 | |||
94 | gboolean edsio_new_proptest_edsiouint_property (const char* name, guint32 flags, EdsioPropTestEdsioUintProperty* prop) | ||
95 | { | ||
96 | return edsio_new_property (name, "PropTest", "EdsioUint", flags, (EdsioGenericProperty*) prop); | ||
97 | } | ||
98 | |||
99 | gboolean | ||
100 | proptest_get_edsiouint (PropTest* obj, EdsioPropTestEdsioUintProperty prop, SerialEdsioUint** arg) | ||
101 | { | ||
102 | EdsioProperty* ep; | ||
103 | g_return_val_if_fail (obj, FALSE); | ||
104 | return (* edsio_property_getter ("PropTest", "EdsioUint", prop.code, & ep)) (obj, ep, arg); | ||
105 | } | ||
106 | |||
107 | gboolean | ||
108 | proptest_set_edsiouint (PropTest* obj, EdsioPropTestEdsioUintProperty prop, SerialEdsioUint* arg) | ||
109 | { | ||
110 | EdsioProperty* ep; | ||
111 | g_return_val_if_fail (obj, FALSE); | ||
112 | return (* edsio_property_setter ("PropTest", "EdsioUint", prop.code, & ep)) (obj, ep, arg); | ||
113 | } | ||
114 | |||
115 | gboolean | ||
116 | proptest_unset_edsiouint (PropTest* obj, EdsioPropTestEdsioUintProperty prop) | ||
117 | { | ||
118 | g_return_val_if_fail (obj, FALSE); | ||
119 | return edsio_property_unset ("PropTest", "EdsioUint", prop.code, obj); | ||
120 | } | ||
121 | |||
122 | gboolean | ||
123 | proptest_isset_edsiouint (PropTest* obj, EdsioPropTestEdsioUintProperty prop) | ||
124 | { | ||
125 | g_return_val_if_fail (obj, FALSE); | ||
126 | return edsio_property_isset ("PropTest", "EdsioUint", prop.code, obj); | ||
127 | } | ||
128 | |||
129 | gboolean edsio_new_proptest_string_property (const char* name, guint32 flags, EdsioPropTestStringProperty* prop) | ||
130 | { | ||
131 | return edsio_new_property (name, "PropTest", "string", flags, (EdsioGenericProperty*) prop); | ||
132 | } | ||
133 | |||
134 | gboolean | ||
135 | proptest_get_string (PropTest* obj, EdsioPropTestStringProperty prop, const gchar** arg) | ||
136 | { | ||
137 | EdsioProperty* ep; | ||
138 | g_return_val_if_fail (obj, FALSE); | ||
139 | return (* edsio_property_getter ("PropTest", "string", prop.code, & ep)) (obj, ep, arg); | ||
140 | } | ||
141 | |||
142 | gboolean | ||
143 | proptest_set_string (PropTest* obj, EdsioPropTestStringProperty prop, const gchar* arg) | ||
144 | { | ||
145 | EdsioProperty* ep; | ||
146 | g_return_val_if_fail (obj, FALSE); | ||
147 | return (* edsio_property_setter ("PropTest", "string", prop.code, & ep)) (obj, ep, arg); | ||
148 | } | ||
149 | |||
150 | gboolean | ||
151 | proptest_unset_string (PropTest* obj, EdsioPropTestStringProperty prop) | ||
152 | { | ||
153 | g_return_val_if_fail (obj, FALSE); | ||
154 | return edsio_property_unset ("PropTest", "string", prop.code, obj); | ||
155 | } | ||
156 | |||
157 | gboolean | ||
158 | proptest_isset_string (PropTest* obj, EdsioPropTestStringProperty prop) | ||
159 | { | ||
160 | g_return_val_if_fail (obj, FALSE); | ||
161 | return edsio_property_isset ("PropTest", "string", prop.code, obj); | ||
162 | } | ||
163 | |||
164 | gboolean edsio_new_proptest_bytes_property (const char* name, guint32 flags, EdsioPropTestBytesProperty* prop) | ||
165 | { | ||
166 | return edsio_new_property (name, "PropTest", "bytes", flags, (EdsioGenericProperty*) prop); | ||
167 | } | ||
168 | |||
169 | gboolean | ||
170 | proptest_get_bytes (PropTest* obj, EdsioPropTestBytesProperty prop, const guint8** arg, guint32* arg_len) | ||
171 | { | ||
172 | EdsioProperty* ep; | ||
173 | g_return_val_if_fail (obj, FALSE); | ||
174 | return (* edsio_property_getter ("PropTest", "bytes", prop.code, & ep)) (obj, ep, arg, arg_len); | ||
175 | } | ||
176 | |||
177 | gboolean | ||
178 | proptest_set_bytes (PropTest* obj, EdsioPropTestBytesProperty prop, const guint8* arg, guint32 arg_len) | ||
179 | { | ||
180 | EdsioProperty* ep; | ||
181 | g_return_val_if_fail (obj, FALSE); | ||
182 | return (* edsio_property_setter ("PropTest", "bytes", prop.code, & ep)) (obj, ep, arg, arg_len); | ||
183 | } | ||
184 | |||
185 | gboolean | ||
186 | proptest_unset_bytes (PropTest* obj, EdsioPropTestBytesProperty prop) | ||
187 | { | ||
188 | g_return_val_if_fail (obj, FALSE); | ||
189 | return edsio_property_unset ("PropTest", "bytes", prop.code, obj); | ||
190 | } | ||
191 | |||
192 | gboolean | ||
193 | proptest_isset_bytes (PropTest* obj, EdsioPropTestBytesProperty prop) | ||
194 | { | ||
195 | g_return_val_if_fail (obj, FALSE); | ||
196 | return edsio_property_isset ("PropTest", "bytes", prop.code, obj); | ||
197 | } | ||
198 | |||
199 | gboolean edsio_new_proptest_uint_property (const char* name, guint32 flags, EdsioPropTestUintProperty* prop) | ||
200 | { | ||
201 | return edsio_new_property (name, "PropTest", "uint", flags, (EdsioGenericProperty*) prop); | ||
202 | } | ||
203 | |||
204 | gboolean | ||
205 | proptest_get_uint (PropTest* obj, EdsioPropTestUintProperty prop, guint32* arg) | ||
206 | { | ||
207 | EdsioProperty* ep; | ||
208 | g_return_val_if_fail (obj, FALSE); | ||
209 | return (* edsio_property_getter ("PropTest", "uint", prop.code, & ep)) (obj, ep, arg); | ||
210 | } | ||
211 | |||
212 | gboolean | ||
213 | proptest_set_uint (PropTest* obj, EdsioPropTestUintProperty prop, guint32 arg) | ||
214 | { | ||
215 | EdsioProperty* ep; | ||
216 | g_return_val_if_fail (obj, FALSE); | ||
217 | return (* edsio_property_setter ("PropTest", "uint", prop.code, & ep)) (obj, ep, arg); | ||
218 | } | ||
219 | |||
220 | gboolean | ||
221 | proptest_unset_uint (PropTest* obj, EdsioPropTestUintProperty prop) | ||
222 | { | ||
223 | g_return_val_if_fail (obj, FALSE); | ||
224 | return edsio_property_unset ("PropTest", "uint", prop.code, obj); | ||
225 | } | ||
226 | |||
227 | gboolean | ||
228 | proptest_isset_uint (PropTest* obj, EdsioPropTestUintProperty prop) | ||
229 | { | ||
230 | g_return_val_if_fail (obj, FALSE); | ||
231 | return edsio_property_isset ("PropTest", "uint", prop.code, obj); | ||
232 | } | ||
233 | |||
234 | /* EdsioUint Print | ||
235 | */ | ||
236 | |||
237 | void | ||
238 | serializeio_print_edsiouint_obj (SerialEdsioUint* obj, guint indent_spaces) { | ||
239 | print_spaces (indent_spaces); | ||
240 | g_print ("[ST_EdsioUint]\n"); | ||
241 | print_spaces (indent_spaces); | ||
242 | g_print ("val = "); | ||
243 | g_print ("%d\n", obj->val); | ||
244 | } | ||
245 | |||
246 | /* EdsioUint Serialize | ||
247 | */ | ||
248 | |||
249 | gboolean | ||
250 | serialize_edsiouint_internal (SerialSink *sink, guint32 val) | ||
251 | { | ||
252 | if (! (* sink->next_uint) (sink, val)) goto bail; | ||
253 | return TRUE; | ||
254 | bail: | ||
255 | return FALSE; | ||
256 | } | ||
257 | |||
258 | gboolean | ||
259 | serialize_edsiouint_obj_internal (SerialSink *sink, SerialEdsioUint* obj) | ||
260 | { | ||
261 | return serialize_edsiouint_internal (sink, obj->val); | ||
262 | } | ||
263 | |||
264 | gboolean | ||
265 | serialize_edsiouint (SerialSink *sink, guint32 val) | ||
266 | { | ||
267 | if (! (* sink->sink_type) (sink, ST_EdsioUint, serializeio_count_edsiouint (val), TRUE)) goto bail; | ||
268 | if (! serialize_edsiouint_internal (sink, val)) goto bail; | ||
269 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
270 | return TRUE; | ||
271 | bail: | ||
272 | return FALSE; | ||
273 | } | ||
274 | |||
275 | gboolean | ||
276 | serialize_edsiouint_obj (SerialSink *sink, const SerialEdsioUint* obj) { | ||
277 | |||
278 | return serialize_edsiouint (sink, obj->val); | ||
279 | } | ||
280 | |||
281 | /* EdsioUint Unserialize | ||
282 | */ | ||
283 | |||
284 | gboolean | ||
285 | unserialize_edsiouint_internal_noalloc (SerialSource *source, SerialEdsioUint* result) | ||
286 | { | ||
287 | if (! (* source->next_uint) (source, &result->val)) goto bail; | ||
288 | return TRUE; | ||
289 | bail: | ||
290 | return FALSE; | ||
291 | } | ||
292 | |||
293 | gboolean | ||
294 | unserialize_edsiouint_internal (SerialSource *source, SerialEdsioUint** result) | ||
295 | { | ||
296 | SerialEdsioUint* unser; | ||
297 | (*result) = NULL; | ||
298 | unser = serializeio_source_alloc (source, sizeof (SerialEdsioUint)); | ||
299 | if (! unser) goto bail; | ||
300 | if (! unserialize_edsiouint_internal_noalloc (source, unser)) goto bail; | ||
301 | (*result) = unser; | ||
302 | return TRUE; | ||
303 | bail: | ||
304 | return FALSE; | ||
305 | } | ||
306 | |||
307 | gboolean | ||
308 | unserialize_edsiouint (SerialSource *source, SerialEdsioUint** result) | ||
309 | { | ||
310 | if ( (* source->source_type) (source, TRUE) != ST_EdsioUint) goto bail; | ||
311 | if (! unserialize_edsiouint_internal (source, result)) goto bail; | ||
312 | if (! serializeio_source_object_received (source)) goto bail; | ||
313 | return TRUE; | ||
314 | bail: | ||
315 | return FALSE; | ||
316 | } | ||
317 | |||
318 | /* EdsioBytes Print | ||
319 | */ | ||
320 | |||
321 | void | ||
322 | serializeio_print_edsiobytes_obj (SerialEdsioBytes* obj, guint indent_spaces) { | ||
323 | print_spaces (indent_spaces); | ||
324 | g_print ("[ST_EdsioBytes]\n"); | ||
325 | print_spaces (indent_spaces); | ||
326 | g_print ("val = "); | ||
327 | serializeio_print_bytes (obj->val, obj->val_len); | ||
328 | } | ||
329 | |||
330 | /* EdsioBytes Serialize | ||
331 | */ | ||
332 | |||
333 | gboolean | ||
334 | serialize_edsiobytes_internal (SerialSink *sink, guint32 val_len, const guint8* val) | ||
335 | { | ||
336 | if (! (* sink->next_bytes) (sink, val, val_len)) goto bail; | ||
337 | return TRUE; | ||
338 | bail: | ||
339 | return FALSE; | ||
340 | } | ||
341 | |||
342 | gboolean | ||
343 | serialize_edsiobytes_obj_internal (SerialSink *sink, SerialEdsioBytes* obj) | ||
344 | { | ||
345 | return serialize_edsiobytes_internal (sink, obj->val_len, obj->val); | ||
346 | } | ||
347 | |||
348 | gboolean | ||
349 | serialize_edsiobytes (SerialSink *sink, guint32 val_len, const guint8* val) | ||
350 | { | ||
351 | if (! (* sink->sink_type) (sink, ST_EdsioBytes, serializeio_count_edsiobytes (val_len, val), TRUE)) goto bail; | ||
352 | if (! serialize_edsiobytes_internal (sink, val_len, val)) goto bail; | ||
353 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
354 | return TRUE; | ||
355 | bail: | ||
356 | return FALSE; | ||
357 | } | ||
358 | |||
359 | gboolean | ||
360 | serialize_edsiobytes_obj (SerialSink *sink, const SerialEdsioBytes* obj) { | ||
361 | |||
362 | return serialize_edsiobytes (sink, obj->val_len, obj->val); | ||
363 | } | ||
364 | |||
365 | /* EdsioBytes Unserialize | ||
366 | */ | ||
367 | |||
368 | gboolean | ||
369 | unserialize_edsiobytes_internal_noalloc (SerialSource *source, SerialEdsioBytes* result) | ||
370 | { | ||
371 | if (! (* source->next_bytes) (source, &result->val, &result->val_len)) goto bail; | ||
372 | return TRUE; | ||
373 | bail: | ||
374 | return FALSE; | ||
375 | } | ||
376 | |||
377 | gboolean | ||
378 | unserialize_edsiobytes_internal (SerialSource *source, SerialEdsioBytes** result) | ||
379 | { | ||
380 | SerialEdsioBytes* unser; | ||
381 | (*result) = NULL; | ||
382 | unser = serializeio_source_alloc (source, sizeof (SerialEdsioBytes)); | ||
383 | if (! unser) goto bail; | ||
384 | if (! unserialize_edsiobytes_internal_noalloc (source, unser)) goto bail; | ||
385 | (*result) = unser; | ||
386 | return TRUE; | ||
387 | bail: | ||
388 | return FALSE; | ||
389 | } | ||
390 | |||
391 | gboolean | ||
392 | unserialize_edsiobytes (SerialSource *source, SerialEdsioBytes** result) | ||
393 | { | ||
394 | if ( (* source->source_type) (source, TRUE) != ST_EdsioBytes) goto bail; | ||
395 | if (! unserialize_edsiobytes_internal (source, result)) goto bail; | ||
396 | if (! serializeio_source_object_received (source)) goto bail; | ||
397 | return TRUE; | ||
398 | bail: | ||
399 | return FALSE; | ||
400 | } | ||
401 | |||
402 | /* EdsioString Print | ||
403 | */ | ||
404 | |||
405 | void | ||
406 | serializeio_print_edsiostring_obj (SerialEdsioString* obj, guint indent_spaces) { | ||
407 | print_spaces (indent_spaces); | ||
408 | g_print ("[ST_EdsioString]\n"); | ||
409 | print_spaces (indent_spaces); | ||
410 | g_print ("val = "); | ||
411 | g_print ("%s\n", obj->val); | ||
412 | } | ||
413 | |||
414 | /* EdsioString Serialize | ||
415 | */ | ||
416 | |||
417 | gboolean | ||
418 | serialize_edsiostring_internal (SerialSink *sink, const gchar* val) | ||
419 | { | ||
420 | if (! (* sink->next_string) (sink, val)) goto bail; | ||
421 | return TRUE; | ||
422 | bail: | ||
423 | return FALSE; | ||
424 | } | ||
425 | |||
426 | gboolean | ||
427 | serialize_edsiostring_obj_internal (SerialSink *sink, SerialEdsioString* obj) | ||
428 | { | ||
429 | return serialize_edsiostring_internal (sink, obj->val); | ||
430 | } | ||
431 | |||
432 | gboolean | ||
433 | serialize_edsiostring (SerialSink *sink, const gchar* val) | ||
434 | { | ||
435 | if (! (* sink->sink_type) (sink, ST_EdsioString, serializeio_count_edsiostring (val), TRUE)) goto bail; | ||
436 | if (! serialize_edsiostring_internal (sink, val)) goto bail; | ||
437 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
438 | return TRUE; | ||
439 | bail: | ||
440 | return FALSE; | ||
441 | } | ||
442 | |||
443 | gboolean | ||
444 | serialize_edsiostring_obj (SerialSink *sink, const SerialEdsioString* obj) { | ||
445 | |||
446 | return serialize_edsiostring (sink, obj->val); | ||
447 | } | ||
448 | |||
449 | /* EdsioString Unserialize | ||
450 | */ | ||
451 | |||
452 | gboolean | ||
453 | unserialize_edsiostring_internal_noalloc (SerialSource *source, SerialEdsioString* result) | ||
454 | { | ||
455 | if (! (* source->next_string) (source, &result->val)) goto bail; | ||
456 | return TRUE; | ||
457 | bail: | ||
458 | return FALSE; | ||
459 | } | ||
460 | |||
461 | gboolean | ||
462 | unserialize_edsiostring_internal (SerialSource *source, SerialEdsioString** result) | ||
463 | { | ||
464 | SerialEdsioString* unser; | ||
465 | (*result) = NULL; | ||
466 | unser = serializeio_source_alloc (source, sizeof (SerialEdsioString)); | ||
467 | if (! unser) goto bail; | ||
468 | if (! unserialize_edsiostring_internal_noalloc (source, unser)) goto bail; | ||
469 | (*result) = unser; | ||
470 | return TRUE; | ||
471 | bail: | ||
472 | return FALSE; | ||
473 | } | ||
474 | |||
475 | gboolean | ||
476 | unserialize_edsiostring (SerialSource *source, SerialEdsioString** result) | ||
477 | { | ||
478 | if ( (* source->source_type) (source, TRUE) != ST_EdsioString) goto bail; | ||
479 | if (! unserialize_edsiostring_internal (source, result)) goto bail; | ||
480 | if (! serializeio_source_object_received (source)) goto bail; | ||
481 | return TRUE; | ||
482 | bail: | ||
483 | return FALSE; | ||
484 | } | ||
485 | |||
486 | /* GenericTime Print | ||
487 | */ | ||
488 | |||
489 | void | ||
490 | serializeio_print_generictime_obj (SerialGenericTime* obj, guint indent_spaces) { | ||
491 | print_spaces (indent_spaces); | ||
492 | g_print ("[ST_GenericTime]\n"); | ||
493 | print_spaces (indent_spaces); | ||
494 | g_print ("seconds = "); | ||
495 | g_print ("%d\n", obj->seconds); | ||
496 | print_spaces (indent_spaces); | ||
497 | g_print ("nanos = "); | ||
498 | g_print ("%d\n", obj->nanos); | ||
499 | } | ||
500 | |||
501 | /* GenericTime Serialize | ||
502 | */ | ||
503 | |||
504 | gboolean | ||
505 | serialize_generictime_internal (SerialSink *sink, guint32 seconds, guint32 nanos) | ||
506 | { | ||
507 | if (! (* sink->next_uint) (sink, seconds)) goto bail; | ||
508 | if (! (* sink->next_uint) (sink, nanos)) goto bail; | ||
509 | return TRUE; | ||
510 | bail: | ||
511 | return FALSE; | ||
512 | } | ||
513 | |||
514 | gboolean | ||
515 | serialize_generictime_obj_internal (SerialSink *sink, SerialGenericTime* obj) | ||
516 | { | ||
517 | return serialize_generictime_internal (sink, obj->seconds, obj->nanos); | ||
518 | } | ||
519 | |||
520 | gboolean | ||
521 | serialize_generictime (SerialSink *sink, guint32 seconds, guint32 nanos) | ||
522 | { | ||
523 | if (! (* sink->sink_type) (sink, ST_GenericTime, serializeio_count_generictime (seconds, nanos), TRUE)) goto bail; | ||
524 | if (! serialize_generictime_internal (sink, seconds, nanos)) goto bail; | ||
525 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
526 | return TRUE; | ||
527 | bail: | ||
528 | return FALSE; | ||
529 | } | ||
530 | |||
531 | gboolean | ||
532 | serialize_generictime_obj (SerialSink *sink, const SerialGenericTime* obj) { | ||
533 | |||
534 | return serialize_generictime (sink, obj->seconds, obj->nanos); | ||
535 | } | ||
536 | |||
537 | /* GenericTime Unserialize | ||
538 | */ | ||
539 | |||
540 | gboolean | ||
541 | unserialize_generictime_internal_noalloc (SerialSource *source, SerialGenericTime* result) | ||
542 | { | ||
543 | if (! (* source->next_uint) (source, &result->seconds)) goto bail; | ||
544 | if (! (* source->next_uint) (source, &result->nanos)) goto bail; | ||
545 | return TRUE; | ||
546 | bail: | ||
547 | return FALSE; | ||
548 | } | ||
549 | |||
550 | gboolean | ||
551 | unserialize_generictime_internal (SerialSource *source, SerialGenericTime** result) | ||
552 | { | ||
553 | SerialGenericTime* unser; | ||
554 | (*result) = NULL; | ||
555 | unser = serializeio_source_alloc (source, sizeof (SerialGenericTime)); | ||
556 | if (! unser) goto bail; | ||
557 | if (! unserialize_generictime_internal_noalloc (source, unser)) goto bail; | ||
558 | (*result) = unser; | ||
559 | return TRUE; | ||
560 | bail: | ||
561 | return FALSE; | ||
562 | } | ||
563 | |||
564 | gboolean | ||
565 | unserialize_generictime (SerialSource *source, SerialGenericTime** result) | ||
566 | { | ||
567 | if ( (* source->source_type) (source, TRUE) != ST_GenericTime) goto bail; | ||
568 | if (! unserialize_generictime_internal (source, result)) goto bail; | ||
569 | if (! serializeio_source_object_received (source)) goto bail; | ||
570 | return TRUE; | ||
571 | bail: | ||
572 | return FALSE; | ||
573 | } | ||
574 | |||
575 | void | ||
576 | edsio_generate_errno_event_internal (EdsioErrnoEventCode _code, const char* _srcfile, gint _srcline) | ||
577 | { | ||
578 | EdsioErrnoEvent *_e = g_new0 (EdsioErrnoEvent, 1); | ||
579 | _e->code = _code.code; | ||
580 | _e->srcline = _srcline; | ||
581 | _e->srcfile = _srcfile; | ||
582 | _e->ev_errno = errno; | ||
583 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
584 | } | ||
585 | |||
586 | const char* | ||
587 | Edsio_Errno_event_field_to_string (GenericEvent* ev, gint field) | ||
588 | { | ||
589 | EdsioErrnoEvent* it = (EdsioErrnoEvent*) ev; | ||
590 | switch (field) | ||
591 | { | ||
592 | case 0: return g_strdup (g_strerror (it->ev_errno)); | ||
593 | default: abort (); | ||
594 | } | ||
595 | } | ||
596 | |||
597 | const EdsioErrnoEventCode EC_EdsioGetTimeOfDayFailure = { EC_EdsioGetTimeOfDayFailureValue }; | ||
598 | |||
599 | const EdsioErrnoEventCode EC_EdsioTimeFailure = { EC_EdsioTimeFailureValue }; | ||
600 | |||
601 | void | ||
602 | edsio_generate_intint_event_internal (EdsioIntIntEventCode _code, const char* _srcfile, gint _srcline, int library, int number) | ||
603 | { | ||
604 | EdsioIntIntEvent *_e = g_new0 (EdsioIntIntEvent, 1); | ||
605 | _e->code = _code.code; | ||
606 | _e->srcline = _srcline; | ||
607 | _e->srcfile = _srcfile; | ||
608 | _e->library = library; | ||
609 | _e->number = number; | ||
610 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
611 | } | ||
612 | |||
613 | const char* | ||
614 | Edsio_IntInt_event_field_to_string (GenericEvent* ev, gint field) | ||
615 | { | ||
616 | EdsioIntIntEvent* it = (EdsioIntIntEvent*) ev; | ||
617 | switch (field) | ||
618 | { | ||
619 | case 0: return eventdelivery_int_to_string (it->library); | ||
620 | case 1: return eventdelivery_int_to_string (it->number); | ||
621 | default: abort (); | ||
622 | } | ||
623 | } | ||
624 | |||
625 | const EdsioIntIntEventCode EC_EdsioUnregisteredType = { EC_EdsioUnregisteredTypeValue }; | ||
626 | |||
627 | const EdsioIntIntEventCode EC_EdsioUnexpectedLibraryType = { EC_EdsioUnexpectedLibraryTypeValue }; | ||
628 | |||
629 | void | ||
630 | edsio_generate_void_event_internal (EdsioVoidEventCode _code, const char* _srcfile, gint _srcline) | ||
631 | { | ||
632 | EdsioVoidEvent *_e = g_new0 (EdsioVoidEvent, 1); | ||
633 | _e->code = _code.code; | ||
634 | _e->srcline = _srcline; | ||
635 | _e->srcfile = _srcfile; | ||
636 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
637 | } | ||
638 | |||
639 | const EdsioVoidEventCode EC_EdsioUnexpectedType = { EC_EdsioUnexpectedTypeValue }; | ||
640 | |||
641 | const EdsioVoidEventCode EC_EdsioOutputBufferShort = { EC_EdsioOutputBufferShortValue }; | ||
642 | |||
643 | const EdsioVoidEventCode EC_EdsioInvalidBase64Encoding = { EC_EdsioInvalidBase64EncodingValue }; | ||
644 | |||
645 | const EdsioVoidEventCode EC_EdsioMissingChecksum = { EC_EdsioMissingChecksumValue }; | ||
646 | |||
647 | const EdsioVoidEventCode EC_EdsioInvalidChecksum = { EC_EdsioInvalidChecksumValue }; | ||
648 | |||
649 | void | ||
650 | edsio_generate_source_event_internal (EdsioSourceEventCode _code, const char* _srcfile, gint _srcline, SerialSource* source) | ||
651 | { | ||
652 | EdsioSourceEvent *_e = g_new0 (EdsioSourceEvent, 1); | ||
653 | _e->code = _code.code; | ||
654 | _e->srcline = _srcline; | ||
655 | _e->srcfile = _srcfile; | ||
656 | _e->source = source; | ||
657 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
658 | } | ||
659 | |||
660 | const char* | ||
661 | Edsio_Source_event_field_to_string (GenericEvent* ev, gint field) | ||
662 | { | ||
663 | EdsioSourceEvent* it = (EdsioSourceEvent*) ev; | ||
664 | switch (field) | ||
665 | { | ||
666 | case 0: return eventdelivery_source_to_string (it->source); | ||
667 | default: abort (); | ||
668 | } | ||
669 | } | ||
670 | |||
671 | const EdsioSourceEventCode EC_EdsioSourceEof = { EC_EdsioSourceEofValue }; | ||
672 | |||
673 | const EdsioSourceEventCode EC_EdsioIncorrectAllocation = { EC_EdsioIncorrectAllocationValue }; | ||
674 | |||
675 | void | ||
676 | edsio_generate_stringstring_event_internal (EdsioStringStringEventCode _code, const char* _srcfile, gint _srcline, const char* msg, const char* arg) | ||
677 | { | ||
678 | EdsioStringStringEvent *_e = g_new0 (EdsioStringStringEvent, 1); | ||
679 | _e->code = _code.code; | ||
680 | _e->srcline = _srcline; | ||
681 | _e->srcfile = _srcfile; | ||
682 | _e->msg = msg; | ||
683 | _e->arg = arg; | ||
684 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
685 | } | ||
686 | |||
687 | const char* | ||
688 | Edsio_StringString_event_field_to_string (GenericEvent* ev, gint field) | ||
689 | { | ||
690 | EdsioStringStringEvent* it = (EdsioStringStringEvent*) ev; | ||
691 | switch (field) | ||
692 | { | ||
693 | case 0: return eventdelivery_string_to_string (it->msg); | ||
694 | case 1: return eventdelivery_string_to_string (it->arg); | ||
695 | default: abort (); | ||
696 | } | ||
697 | } | ||
698 | |||
699 | const EdsioStringStringEventCode EC_EdsioInvalidIntegerString = { EC_EdsioInvalidIntegerStringValue }; | ||
700 | |||
701 | const EdsioStringStringEventCode EC_EdsioIntegerOutOfRange = { EC_EdsioIntegerOutOfRangeValue }; | ||
702 | |||
703 | const EdsioStringStringEventCode EC_EdsioInvalidIntegerSign = { EC_EdsioInvalidIntegerSignValue }; | ||
704 | |||
705 | void | ||
706 | edsio_generate_string_event_internal (EdsioStringEventCode _code, const char* _srcfile, gint _srcline, const char* name) | ||
707 | { | ||
708 | EdsioStringEvent *_e = g_new0 (EdsioStringEvent, 1); | ||
709 | _e->code = _code.code; | ||
710 | _e->srcline = _srcline; | ||
711 | _e->srcfile = _srcfile; | ||
712 | _e->name = name; | ||
713 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
714 | } | ||
715 | |||
716 | const char* | ||
717 | Edsio_String_event_field_to_string (GenericEvent* ev, gint field) | ||
718 | { | ||
719 | EdsioStringEvent* it = (EdsioStringEvent*) ev; | ||
720 | switch (field) | ||
721 | { | ||
722 | case 0: return eventdelivery_string_to_string (it->name); | ||
723 | default: abort (); | ||
724 | } | ||
725 | } | ||
726 | |||
727 | const EdsioStringEventCode EC_EdsioDuplicatePropertyTypeRegistered = { EC_EdsioDuplicatePropertyTypeRegisteredValue }; | ||
728 | |||
729 | const EdsioStringEventCode EC_EdsioDuplicateHostTypeRegistered = { EC_EdsioDuplicateHostTypeRegisteredValue }; | ||
730 | |||
731 | const EdsioStringEventCode EC_EdsioDuplicatePropertyNameRegistered = { EC_EdsioDuplicatePropertyNameRegisteredValue }; | ||
732 | |||
733 | void | ||
734 | edsio_generate_int_event_internal (EdsioIntEventCode _code, const char* _srcfile, gint _srcline, int num) | ||
735 | { | ||
736 | EdsioIntEvent *_e = g_new0 (EdsioIntEvent, 1); | ||
737 | _e->code = _code.code; | ||
738 | _e->srcline = _srcline; | ||
739 | _e->srcfile = _srcfile; | ||
740 | _e->num = num; | ||
741 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
742 | } | ||
743 | |||
744 | const char* | ||
745 | Edsio_Int_event_field_to_string (GenericEvent* ev, gint field) | ||
746 | { | ||
747 | EdsioIntEvent* it = (EdsioIntEvent*) ev; | ||
748 | switch (field) | ||
749 | { | ||
750 | case 0: return eventdelivery_int_to_string (it->num); | ||
751 | default: abort (); | ||
752 | } | ||
753 | } | ||
754 | |||
755 | const EdsioIntEventCode EC_EdsioNoSuchProperty = { EC_EdsioNoSuchPropertyValue }; | ||
756 | |||
757 | const EdsioStringEventCode EC_EdsioNoSuchPropertyType = { EC_EdsioNoSuchPropertyTypeValue }; | ||
758 | |||
759 | const EdsioStringEventCode EC_EdsioNoSuchHostType = { EC_EdsioNoSuchHostTypeValue }; | ||
760 | |||
761 | void | ||
762 | edsio_generate_stringstringstring_event_internal (EdsioStringStringStringEventCode _code, const char* _srcfile, gint _srcline, const char* name, const char* recv, const char* expect) | ||
763 | { | ||
764 | EdsioStringStringStringEvent *_e = g_new0 (EdsioStringStringStringEvent, 1); | ||
765 | _e->code = _code.code; | ||
766 | _e->srcline = _srcline; | ||
767 | _e->srcfile = _srcfile; | ||
768 | _e->name = name; | ||
769 | _e->recv = recv; | ||
770 | _e->expect = expect; | ||
771 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
772 | } | ||
773 | |||
774 | const char* | ||
775 | Edsio_StringStringString_event_field_to_string (GenericEvent* ev, gint field) | ||
776 | { | ||
777 | EdsioStringStringStringEvent* it = (EdsioStringStringStringEvent*) ev; | ||
778 | switch (field) | ||
779 | { | ||
780 | case 0: return eventdelivery_string_to_string (it->name); | ||
781 | case 1: return eventdelivery_string_to_string (it->recv); | ||
782 | case 2: return eventdelivery_string_to_string (it->expect); | ||
783 | default: abort (); | ||
784 | } | ||
785 | } | ||
786 | |||
787 | const EdsioStringStringStringEventCode EC_EdsioWrongHostType = { EC_EdsioWrongHostTypeValue }; | ||
788 | |||
789 | const EdsioStringStringStringEventCode EC_EdsioWrongDataType = { EC_EdsioWrongDataTypeValue }; | ||
790 | |||
791 | const EdsioStringEventCode EC_EdsioPropertyNotSet = { EC_EdsioPropertyNotSetValue }; | ||
792 | |||
793 | const EdsioStringStringEventCode EC_EdsioPersistenceUnavailable = { EC_EdsioPersistenceUnavailableValue }; | ||
794 | |||
795 | const EdsioVoidEventCode EC_EdsioInvalidStreamChecksum = { EC_EdsioInvalidStreamChecksumValue }; | ||
796 | |||
797 | const EdsioStringStringEventCode EC_EdsioInvalidHexDigit = { EC_EdsioInvalidHexDigitValue }; | ||
798 | |||
799 | const EdsioStringEventCode EC_EdsioMD5StringShort = { EC_EdsioMD5StringShortValue }; | ||
800 | |||
801 | const EdsioStringEventCode EC_EdsioMD5StringLong = { EC_EdsioMD5StringLongValue }; | ||
802 | |||
803 | const EdsioIntEventCode EC_EdsioUnregisteredLibrary = { EC_EdsioUnregisteredLibraryValue }; | ||
804 | |||
805 | const EdsioStringStringEventCode EC_EdsioGModuleError = { EC_EdsioGModuleErrorValue }; | ||
806 | |||
diff --git a/xdelta1/libedsio/edsio_edsio.h b/xdelta1/libedsio/edsio_edsio.h deleted file mode 100755 index 7fe4b05..0000000 --- a/xdelta1/libedsio/edsio_edsio.h +++ /dev/null | |||
@@ -1,379 +0,0 @@ | |||
1 | /* -*-Mode: C;-*- | ||
2 | * Copyright (C) 1997, 1998, 1999 Josh MacDonald | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | * | ||
18 | * Author: Josh MacDonald <jmacd@CS.Berkeley.EDU> | ||
19 | * | ||
20 | * This file was AUTOMATICALLY GENERATED using: | ||
21 | * | ||
22 | * $Id: edsio.el 1.16 Tue, 06 Apr 1999 23:40:10 -0700 jmacd $ | ||
23 | */ | ||
24 | |||
25 | #include "edsio.h" | ||
26 | |||
27 | #include "edsio.h" | ||
28 | |||
29 | #ifndef _EDSIO_EDSIO_H_ | ||
30 | #define _EDSIO_EDSIO_H_ | ||
31 | |||
32 | #ifdef __cplusplus | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | /* Initialize this library. */ | ||
37 | |||
38 | gboolean edsio_edsio_init (void); | ||
39 | |||
40 | /* Types defined here. */ | ||
41 | |||
42 | /* EdsioStringStringStringEventCode. | ||
43 | */ | ||
44 | |||
45 | typedef struct _EdsioStringStringStringEventCode EdsioStringStringStringEventCode; | ||
46 | struct _EdsioStringStringStringEventCode { gint code; }; | ||
47 | |||
48 | typedef struct _EdsioStringStringStringEvent EdsioStringStringStringEvent; | ||
49 | struct _EdsioStringStringStringEvent { gint code; const char* srcfile; guint srcline; const char* name; const char* recv; const char* expect; }; | ||
50 | |||
51 | /* EdsioIntEventCode. | ||
52 | */ | ||
53 | |||
54 | typedef struct _EdsioIntEventCode EdsioIntEventCode; | ||
55 | struct _EdsioIntEventCode { gint code; }; | ||
56 | |||
57 | typedef struct _EdsioIntEvent EdsioIntEvent; | ||
58 | struct _EdsioIntEvent { gint code; const char* srcfile; guint srcline; int num; }; | ||
59 | |||
60 | /* EdsioStringEventCode. | ||
61 | */ | ||
62 | |||
63 | typedef struct _EdsioStringEventCode EdsioStringEventCode; | ||
64 | struct _EdsioStringEventCode { gint code; }; | ||
65 | |||
66 | typedef struct _EdsioStringEvent EdsioStringEvent; | ||
67 | struct _EdsioStringEvent { gint code; const char* srcfile; guint srcline; const char* name; }; | ||
68 | |||
69 | /* EdsioStringStringEventCode. | ||
70 | */ | ||
71 | |||
72 | typedef struct _EdsioStringStringEventCode EdsioStringStringEventCode; | ||
73 | struct _EdsioStringStringEventCode { gint code; }; | ||
74 | |||
75 | typedef struct _EdsioStringStringEvent EdsioStringStringEvent; | ||
76 | struct _EdsioStringStringEvent { gint code; const char* srcfile; guint srcline; const char* msg; const char* arg; }; | ||
77 | |||
78 | /* EdsioSourceEventCode. | ||
79 | */ | ||
80 | |||
81 | typedef struct _EdsioSourceEventCode EdsioSourceEventCode; | ||
82 | struct _EdsioSourceEventCode { gint code; }; | ||
83 | |||
84 | typedef struct _EdsioSourceEvent EdsioSourceEvent; | ||
85 | struct _EdsioSourceEvent { gint code; const char* srcfile; guint srcline; SerialSource* source; }; | ||
86 | |||
87 | /* EdsioVoidEventCode. | ||
88 | */ | ||
89 | |||
90 | typedef struct _EdsioVoidEventCode EdsioVoidEventCode; | ||
91 | struct _EdsioVoidEventCode { gint code; }; | ||
92 | |||
93 | typedef struct _EdsioVoidEvent EdsioVoidEvent; | ||
94 | struct _EdsioVoidEvent { gint code; const char* srcfile; guint srcline; }; | ||
95 | |||
96 | /* EdsioIntIntEventCode. | ||
97 | */ | ||
98 | |||
99 | typedef struct _EdsioIntIntEventCode EdsioIntIntEventCode; | ||
100 | struct _EdsioIntIntEventCode { gint code; }; | ||
101 | |||
102 | typedef struct _EdsioIntIntEvent EdsioIntIntEvent; | ||
103 | struct _EdsioIntIntEvent { gint code; const char* srcfile; guint srcline; int library; int number; }; | ||
104 | |||
105 | /* EdsioErrnoEventCode. | ||
106 | */ | ||
107 | |||
108 | typedef struct _EdsioErrnoEventCode EdsioErrnoEventCode; | ||
109 | struct _EdsioErrnoEventCode { gint code; }; | ||
110 | |||
111 | typedef struct _EdsioErrnoEvent EdsioErrnoEvent; | ||
112 | struct _EdsioErrnoEvent { gint code; const char* srcfile; guint srcline; gint ev_errno; }; | ||
113 | |||
114 | typedef struct _SerialGenericTime SerialGenericTime; | ||
115 | typedef struct _SerialEdsioString SerialEdsioString; | ||
116 | typedef struct _SerialEdsioBytes SerialEdsioBytes; | ||
117 | typedef struct _SerialEdsioUint SerialEdsioUint; | ||
118 | /* Functions declared here. */ | ||
119 | |||
120 | /* Property definitions */ | ||
121 | |||
122 | /* Property get/set for PropTest/EdsioUint | ||
123 | */ | ||
124 | |||
125 | typedef struct _EdsioPropTestEdsioUintProperty EdsioPropTestEdsioUintProperty; | ||
126 | struct _EdsioPropTestEdsioUintProperty { guint32 code; }; | ||
127 | |||
128 | gboolean edsio_new_proptest_edsiouint_property (const char* name, guint32 flags, EdsioPropTestEdsioUintProperty* prop); | ||
129 | gboolean proptest_get_edsiouint (PropTest* obj, EdsioPropTestEdsioUintProperty prop, SerialEdsioUint** arg); | ||
130 | gboolean proptest_set_edsiouint (PropTest* obj, EdsioPropTestEdsioUintProperty prop, SerialEdsioUint* arg); | ||
131 | gboolean proptest_unset_edsiouint (PropTest* obj, EdsioPropTestEdsioUintProperty prop); | ||
132 | gboolean proptest_isset_edsiouint (PropTest* obj, EdsioPropTestEdsioUintProperty prop); | ||
133 | |||
134 | /* Property get/set for PropTest/string | ||
135 | */ | ||
136 | |||
137 | typedef struct _EdsioPropTestStringProperty EdsioPropTestStringProperty; | ||
138 | struct _EdsioPropTestStringProperty { guint32 code; }; | ||
139 | |||
140 | gboolean edsio_new_proptest_string_property (const char* name, guint32 flags, EdsioPropTestStringProperty* prop); | ||
141 | gboolean proptest_get_string (PropTest* obj, EdsioPropTestStringProperty prop, const gchar** arg); | ||
142 | gboolean proptest_set_string (PropTest* obj, EdsioPropTestStringProperty prop, const gchar* arg); | ||
143 | gboolean proptest_unset_string (PropTest* obj, EdsioPropTestStringProperty prop); | ||
144 | gboolean proptest_isset_string (PropTest* obj, EdsioPropTestStringProperty prop); | ||
145 | |||
146 | /* Property get/set for PropTest/bytes | ||
147 | */ | ||
148 | |||
149 | typedef struct _EdsioPropTestBytesProperty EdsioPropTestBytesProperty; | ||
150 | struct _EdsioPropTestBytesProperty { guint32 code; }; | ||
151 | |||
152 | gboolean edsio_new_proptest_bytes_property (const char* name, guint32 flags, EdsioPropTestBytesProperty* prop); | ||
153 | gboolean proptest_get_bytes (PropTest* obj, EdsioPropTestBytesProperty prop, const guint8** arg, guint32* arg_len); | ||
154 | gboolean proptest_set_bytes (PropTest* obj, EdsioPropTestBytesProperty prop, const guint8* arg, guint32 arg_len); | ||
155 | gboolean proptest_unset_bytes (PropTest* obj, EdsioPropTestBytesProperty prop); | ||
156 | gboolean proptest_isset_bytes (PropTest* obj, EdsioPropTestBytesProperty prop); | ||
157 | |||
158 | /* Property get/set for PropTest/uint | ||
159 | */ | ||
160 | |||
161 | typedef struct _EdsioPropTestUintProperty EdsioPropTestUintProperty; | ||
162 | struct _EdsioPropTestUintProperty { guint32 code; }; | ||
163 | |||
164 | gboolean edsio_new_proptest_uint_property (const char* name, guint32 flags, EdsioPropTestUintProperty* prop); | ||
165 | gboolean proptest_get_uint (PropTest* obj, EdsioPropTestUintProperty prop, guint32* arg); | ||
166 | gboolean proptest_set_uint (PropTest* obj, EdsioPropTestUintProperty prop, guint32 arg); | ||
167 | gboolean proptest_unset_uint (PropTest* obj, EdsioPropTestUintProperty prop); | ||
168 | gboolean proptest_isset_uint (PropTest* obj, EdsioPropTestUintProperty prop); | ||
169 | |||
170 | /* Serial Types */ | ||
171 | |||
172 | enum _SerialEdsioType { | ||
173 | |||
174 | ST_EdsioUint = (1<<(1+EDSIO_LIBRARY_OFFSET_BITS))+6, | ||
175 | ST_EdsioBytes = (1<<(2+EDSIO_LIBRARY_OFFSET_BITS))+6, | ||
176 | ST_EdsioString = (1<<(3+EDSIO_LIBRARY_OFFSET_BITS))+6, | ||
177 | ST_GenericTime = (1<<(4+EDSIO_LIBRARY_OFFSET_BITS))+6 | ||
178 | }; | ||
179 | |||
180 | |||
181 | |||
182 | /* EdsioUint Structure | ||
183 | */ | ||
184 | |||
185 | struct _SerialEdsioUint { | ||
186 | guint32 val; | ||
187 | }; | ||
188 | |||
189 | void serializeio_print_edsiouint_obj (SerialEdsioUint* obj, guint indent_spaces); | ||
190 | |||
191 | gboolean unserialize_edsiouint (SerialSource *source, SerialEdsioUint**); | ||
192 | gboolean unserialize_edsiouint_internal (SerialSource *source, SerialEdsioUint** ); | ||
193 | gboolean unserialize_edsiouint_internal_noalloc (SerialSource *source, SerialEdsioUint* ); | ||
194 | gboolean serialize_edsiouint (SerialSink *sink, guint32 val); | ||
195 | gboolean serialize_edsiouint_obj (SerialSink *sink, const SerialEdsioUint* obj); | ||
196 | gboolean serialize_edsiouint_internal (SerialSink *sink, guint32 val); | ||
197 | gboolean serialize_edsiouint_obj_internal (SerialSink *sink, SerialEdsioUint* obj); | ||
198 | guint serializeio_count_edsiouint (guint32 val); | ||
199 | guint serializeio_count_edsiouint_obj (SerialEdsioUint const* obj); | ||
200 | |||
201 | /* EdsioBytes Structure | ||
202 | */ | ||
203 | |||
204 | struct _SerialEdsioBytes { | ||
205 | guint32 val_len; | ||
206 | const guint8* val; | ||
207 | }; | ||
208 | |||
209 | void serializeio_print_edsiobytes_obj (SerialEdsioBytes* obj, guint indent_spaces); | ||
210 | |||
211 | gboolean unserialize_edsiobytes (SerialSource *source, SerialEdsioBytes**); | ||
212 | gboolean unserialize_edsiobytes_internal (SerialSource *source, SerialEdsioBytes** ); | ||
213 | gboolean unserialize_edsiobytes_internal_noalloc (SerialSource *source, SerialEdsioBytes* ); | ||
214 | gboolean serialize_edsiobytes (SerialSink *sink, guint32 val_len, const guint8* val); | ||
215 | gboolean serialize_edsiobytes_obj (SerialSink *sink, const SerialEdsioBytes* obj); | ||
216 | gboolean serialize_edsiobytes_internal (SerialSink *sink, guint32 val_len, const guint8* val); | ||
217 | gboolean serialize_edsiobytes_obj_internal (SerialSink *sink, SerialEdsioBytes* obj); | ||
218 | guint serializeio_count_edsiobytes (guint32 val_len, const guint8* val); | ||
219 | guint serializeio_count_edsiobytes_obj (SerialEdsioBytes const* obj); | ||
220 | |||
221 | /* EdsioString Structure | ||
222 | */ | ||
223 | |||
224 | struct _SerialEdsioString { | ||
225 | const gchar* val; | ||
226 | }; | ||
227 | |||
228 | void serializeio_print_edsiostring_obj (SerialEdsioString* obj, guint indent_spaces); | ||
229 | |||
230 | gboolean unserialize_edsiostring (SerialSource *source, SerialEdsioString**); | ||
231 | gboolean unserialize_edsiostring_internal (SerialSource *source, SerialEdsioString** ); | ||
232 | gboolean unserialize_edsiostring_internal_noalloc (SerialSource *source, SerialEdsioString* ); | ||
233 | gboolean serialize_edsiostring (SerialSink *sink, const gchar* val); | ||
234 | gboolean serialize_edsiostring_obj (SerialSink *sink, const SerialEdsioString* obj); | ||
235 | gboolean serialize_edsiostring_internal (SerialSink *sink, const gchar* val); | ||
236 | gboolean serialize_edsiostring_obj_internal (SerialSink *sink, SerialEdsioString* obj); | ||
237 | guint serializeio_count_edsiostring (const gchar* val); | ||
238 | guint serializeio_count_edsiostring_obj (SerialEdsioString const* obj); | ||
239 | |||
240 | /* GenericTime Structure | ||
241 | */ | ||
242 | |||
243 | struct _SerialGenericTime { | ||
244 | guint32 seconds; | ||
245 | guint32 nanos; | ||
246 | }; | ||
247 | |||
248 | void serializeio_print_generictime_obj (SerialGenericTime* obj, guint indent_spaces); | ||
249 | |||
250 | gboolean unserialize_generictime (SerialSource *source, SerialGenericTime**); | ||
251 | gboolean unserialize_generictime_internal (SerialSource *source, SerialGenericTime** ); | ||
252 | gboolean unserialize_generictime_internal_noalloc (SerialSource *source, SerialGenericTime* ); | ||
253 | gboolean serialize_generictime (SerialSink *sink, guint32 seconds, guint32 nanos); | ||
254 | gboolean serialize_generictime_obj (SerialSink *sink, const SerialGenericTime* obj); | ||
255 | gboolean serialize_generictime_internal (SerialSink *sink, guint32 seconds, guint32 nanos); | ||
256 | gboolean serialize_generictime_obj_internal (SerialSink *sink, SerialGenericTime* obj); | ||
257 | guint serializeio_count_generictime (guint32 seconds, guint32 nanos); | ||
258 | guint serializeio_count_generictime_obj (SerialGenericTime const* obj); | ||
259 | |||
260 | void edsio_generate_errno_event_internal (EdsioErrnoEventCode code, const char* srcfile, gint srcline); | ||
261 | #define edsio_generate_errno_event(ecode) edsio_generate_errno_event_internal((ecode),__FILE__,__LINE__) | ||
262 | |||
263 | extern const EdsioErrnoEventCode EC_EdsioGetTimeOfDayFailure; | ||
264 | #define EC_EdsioGetTimeOfDayFailureValue ((0<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
265 | |||
266 | extern const EdsioErrnoEventCode EC_EdsioTimeFailure; | ||
267 | #define EC_EdsioTimeFailureValue ((1<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
268 | |||
269 | void edsio_generate_intint_event_internal (EdsioIntIntEventCode code, const char* srcfile, gint srcline, int library, int number); | ||
270 | #define edsio_generate_intint_event(ecode, library, number) edsio_generate_intint_event_internal((ecode),__FILE__,__LINE__, (library), (number)) | ||
271 | |||
272 | extern const EdsioIntIntEventCode EC_EdsioUnregisteredType; | ||
273 | #define EC_EdsioUnregisteredTypeValue ((2<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
274 | |||
275 | extern const EdsioIntIntEventCode EC_EdsioUnexpectedLibraryType; | ||
276 | #define EC_EdsioUnexpectedLibraryTypeValue ((3<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
277 | |||
278 | void edsio_generate_void_event_internal (EdsioVoidEventCode code, const char* srcfile, gint srcline); | ||
279 | #define edsio_generate_void_event(ecode) edsio_generate_void_event_internal((ecode),__FILE__,__LINE__) | ||
280 | |||
281 | extern const EdsioVoidEventCode EC_EdsioUnexpectedType; | ||
282 | #define EC_EdsioUnexpectedTypeValue ((4<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
283 | |||
284 | extern const EdsioVoidEventCode EC_EdsioOutputBufferShort; | ||
285 | #define EC_EdsioOutputBufferShortValue ((5<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
286 | |||
287 | extern const EdsioVoidEventCode EC_EdsioInvalidBase64Encoding; | ||
288 | #define EC_EdsioInvalidBase64EncodingValue ((6<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
289 | |||
290 | extern const EdsioVoidEventCode EC_EdsioMissingChecksum; | ||
291 | #define EC_EdsioMissingChecksumValue ((7<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
292 | |||
293 | extern const EdsioVoidEventCode EC_EdsioInvalidChecksum; | ||
294 | #define EC_EdsioInvalidChecksumValue ((8<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
295 | |||
296 | void edsio_generate_source_event_internal (EdsioSourceEventCode code, const char* srcfile, gint srcline, SerialSource* source); | ||
297 | #define edsio_generate_source_event(ecode, source) edsio_generate_source_event_internal((ecode),__FILE__,__LINE__, (source)) | ||
298 | |||
299 | extern const EdsioSourceEventCode EC_EdsioSourceEof; | ||
300 | #define EC_EdsioSourceEofValue ((9<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
301 | |||
302 | extern const EdsioSourceEventCode EC_EdsioIncorrectAllocation; | ||
303 | #define EC_EdsioIncorrectAllocationValue ((10<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
304 | |||
305 | void edsio_generate_stringstring_event_internal (EdsioStringStringEventCode code, const char* srcfile, gint srcline, const char* msg, const char* arg); | ||
306 | #define edsio_generate_stringstring_event(ecode, msg, arg) edsio_generate_stringstring_event_internal((ecode),__FILE__,__LINE__, (msg), (arg)) | ||
307 | |||
308 | extern const EdsioStringStringEventCode EC_EdsioInvalidIntegerString; | ||
309 | #define EC_EdsioInvalidIntegerStringValue ((11<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
310 | |||
311 | extern const EdsioStringStringEventCode EC_EdsioIntegerOutOfRange; | ||
312 | #define EC_EdsioIntegerOutOfRangeValue ((12<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
313 | |||
314 | extern const EdsioStringStringEventCode EC_EdsioInvalidIntegerSign; | ||
315 | #define EC_EdsioInvalidIntegerSignValue ((13<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
316 | |||
317 | void edsio_generate_string_event_internal (EdsioStringEventCode code, const char* srcfile, gint srcline, const char* name); | ||
318 | #define edsio_generate_string_event(ecode, name) edsio_generate_string_event_internal((ecode),__FILE__,__LINE__, (name)) | ||
319 | |||
320 | extern const EdsioStringEventCode EC_EdsioDuplicatePropertyTypeRegistered; | ||
321 | #define EC_EdsioDuplicatePropertyTypeRegisteredValue ((14<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
322 | |||
323 | extern const EdsioStringEventCode EC_EdsioDuplicateHostTypeRegistered; | ||
324 | #define EC_EdsioDuplicateHostTypeRegisteredValue ((15<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
325 | |||
326 | extern const EdsioStringEventCode EC_EdsioDuplicatePropertyNameRegistered; | ||
327 | #define EC_EdsioDuplicatePropertyNameRegisteredValue ((16<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
328 | |||
329 | void edsio_generate_int_event_internal (EdsioIntEventCode code, const char* srcfile, gint srcline, int num); | ||
330 | #define edsio_generate_int_event(ecode, num) edsio_generate_int_event_internal((ecode),__FILE__,__LINE__, (num)) | ||
331 | |||
332 | extern const EdsioIntEventCode EC_EdsioNoSuchProperty; | ||
333 | #define EC_EdsioNoSuchPropertyValue ((17<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
334 | |||
335 | extern const EdsioStringEventCode EC_EdsioNoSuchPropertyType; | ||
336 | #define EC_EdsioNoSuchPropertyTypeValue ((18<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
337 | |||
338 | extern const EdsioStringEventCode EC_EdsioNoSuchHostType; | ||
339 | #define EC_EdsioNoSuchHostTypeValue ((19<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
340 | |||
341 | void edsio_generate_stringstringstring_event_internal (EdsioStringStringStringEventCode code, const char* srcfile, gint srcline, const char* name, const char* recv, const char* expect); | ||
342 | #define edsio_generate_stringstringstring_event(ecode, name, recv, expect) edsio_generate_stringstringstring_event_internal((ecode),__FILE__,__LINE__, (name), (recv), (expect)) | ||
343 | |||
344 | extern const EdsioStringStringStringEventCode EC_EdsioWrongHostType; | ||
345 | #define EC_EdsioWrongHostTypeValue ((20<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
346 | |||
347 | extern const EdsioStringStringStringEventCode EC_EdsioWrongDataType; | ||
348 | #define EC_EdsioWrongDataTypeValue ((21<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
349 | |||
350 | extern const EdsioStringEventCode EC_EdsioPropertyNotSet; | ||
351 | #define EC_EdsioPropertyNotSetValue ((22<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
352 | |||
353 | extern const EdsioStringStringEventCode EC_EdsioPersistenceUnavailable; | ||
354 | #define EC_EdsioPersistenceUnavailableValue ((23<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
355 | |||
356 | extern const EdsioVoidEventCode EC_EdsioInvalidStreamChecksum; | ||
357 | #define EC_EdsioInvalidStreamChecksumValue ((24<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
358 | |||
359 | extern const EdsioStringStringEventCode EC_EdsioInvalidHexDigit; | ||
360 | #define EC_EdsioInvalidHexDigitValue ((25<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
361 | |||
362 | extern const EdsioStringEventCode EC_EdsioMD5StringShort; | ||
363 | #define EC_EdsioMD5StringShortValue ((26<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
364 | |||
365 | extern const EdsioStringEventCode EC_EdsioMD5StringLong; | ||
366 | #define EC_EdsioMD5StringLongValue ((27<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
367 | |||
368 | extern const EdsioIntEventCode EC_EdsioUnregisteredLibrary; | ||
369 | #define EC_EdsioUnregisteredLibraryValue ((28<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
370 | |||
371 | extern const EdsioStringStringEventCode EC_EdsioGModuleError; | ||
372 | #define EC_EdsioGModuleErrorValue ((29<<EDSIO_LIBRARY_OFFSET_BITS)+6) | ||
373 | |||
374 | #ifdef __cplusplus | ||
375 | } | ||
376 | #endif | ||
377 | |||
378 | #endif /* _EDSIO_EDSIO_H_ */ | ||
379 | |||
diff --git a/xdelta1/libedsio/edsiotest.c b/xdelta1/libedsio/edsiotest.c index bc77f96..1d30dc0 100755 --- a/xdelta1/libedsio/edsiotest.c +++ b/xdelta1/libedsio/edsiotest.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: edsiotest.c 1.6 Sat, 03 Apr 1999 03:23:54 -0800 jmacd $ | 2 | * $Id: edsiotest.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/libedsio/fh.c b/xdelta1/libedsio/fh.c index 9135f8b..e93dd77 100755 --- a/xdelta1/libedsio/fh.c +++ b/xdelta1/libedsio/fh.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: fh.c 1.3 Wed, 31 Mar 1999 17:39:58 -0800 jmacd $ | 2 | * $Id: fh.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/libedsio/generic.c b/xdelta1/libedsio/generic.c index f5d9e6b..fb96e9a 100755 --- a/xdelta1/libedsio/generic.c +++ b/xdelta1/libedsio/generic.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: generic.c 1.3 Tue, 06 Apr 1999 23:40:10 -0700 jmacd $ | 2 | * $Id: generic.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/libedsio/library.c b/xdelta1/libedsio/library.c index 25eed14..f13193c 100755 --- a/xdelta1/libedsio/library.c +++ b/xdelta1/libedsio/library.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: library.c 1.1 Tue, 06 Apr 1999 23:40:43 -0700 jmacd $ | 2 | * $Id: library.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/libedsio/maketime.c b/xdelta1/libedsio/maketime.c index 58f0495..5feddae 100755 --- a/xdelta1/libedsio/maketime.c +++ b/xdelta1/libedsio/maketime.c | |||
@@ -59,7 +59,7 @@ | |||
59 | #include <maketime.h> | 59 | #include <maketime.h> |
60 | 60 | ||
61 | char const maketId[] = | 61 | char const maketId[] = |
62 | "$Id: maketime.c 1.1 Mon, 22 Mar 1999 04:56:01 -0800 jmacd $"; | 62 | "$Id: maketime.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $"; |
63 | 63 | ||
64 | static int isleap P ((int)); | 64 | static int isleap P ((int)); |
65 | static int month_days P ((struct tm const *)); | 65 | static int month_days P ((struct tm const *)); |
diff --git a/xdelta1/libedsio/partime.c b/xdelta1/libedsio/partime.c index ed06742..4cce654 100755 --- a/xdelta1/libedsio/partime.c +++ b/xdelta1/libedsio/partime.c | |||
@@ -68,7 +68,7 @@ | |||
68 | #include <partime.h> | 68 | #include <partime.h> |
69 | 69 | ||
70 | char const partimeId[] = | 70 | char const partimeId[] = |
71 | "$Id: partime.c 1.1 Mon, 22 Mar 1999 04:56:01 -0800 jmacd $"; | 71 | "$Id: partime.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $"; |
72 | 72 | ||
73 | 73 | ||
74 | /* Lookup tables for names of months, weekdays, time zones. */ | 74 | /* Lookup tables for names of months, weekdays, time zones. */ |
diff --git a/xdelta1/libedsio/simple.c b/xdelta1/libedsio/simple.c index 0d327f5..cda509e 100755 --- a/xdelta1/libedsio/simple.c +++ b/xdelta1/libedsio/simple.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* -*-Mode: C;-*- | 1 | /* -*-Mode: C;-*- |
2 | * $Id: simple.c 1.6 Wed, 31 Mar 1999 17:39:58 -0800 jmacd $ | 2 | * $Id: simple.c 1.1 Sun, 28 Jan 2007 10:02:26 -0800 jmacd $ |
3 | * | 3 | * |
4 | * Copyright (C) 1998, 1999, Josh MacDonald. | 4 | * Copyright (C) 1998, 1999, Josh MacDonald. |
5 | * All Rights Reserved. | 5 | * All Rights Reserved. |
diff --git a/xdelta1/xd_edsio.c b/xdelta1/xd_edsio.c deleted file mode 100755 index 9e5c9ae..0000000 --- a/xdelta1/xd_edsio.c +++ /dev/null | |||
@@ -1,1330 +0,0 @@ | |||
1 | /* -*-Mode: C;-*- | ||
2 | * Copyright (C) 1997, 1998, 1999 Josh MacDonald | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | * | ||
18 | * Author: Josh MacDonald <jmacd@CS.Berkeley.EDU> | ||
19 | * | ||
20 | * This file was AUTOMATICALLY GENERATED using: | ||
21 | * | ||
22 | * $Id: edsio.el 1.16 Tue, 06 Apr 1999 23:40:10 -0700 jmacd $ | ||
23 | */ | ||
24 | |||
25 | #include "xdelta.h" | ||
26 | |||
27 | #include <errno.h> | ||
28 | |||
29 | /* Declarations. */ | ||
30 | |||
31 | static const char* Xd_String_event_field_to_string (GenericEvent* ev, gint field); | ||
32 | static const char* Xd_HandleIntInt_event_field_to_string (GenericEvent* ev, gint field); | ||
33 | static const char* Xd_HandleStringString_event_field_to_string (GenericEvent* ev, gint field); | ||
34 | static const char* Xd_Int_event_field_to_string (GenericEvent* ev, gint field); | ||
35 | static void print_spaces (guint n) { int i; for (i = 0; i < n; i += 1) g_print (" "); } | ||
36 | |||
37 | |||
38 | /* initialize this library. */ | ||
39 | |||
40 | gboolean | ||
41 | xd_edsio_init (void) | ||
42 | { | ||
43 | static gboolean once = FALSE; | ||
44 | static gboolean result = FALSE; | ||
45 | if (once) return result; | ||
46 | once = TRUE; | ||
47 | eventdelivery_initialize_event_def (EC_XdBackwardCompatibilityModeValue, EL_Information, EF_None, "BackwardCompatibilityMode", "Reading a version ${0} delta control", & Xd_String_event_field_to_string); | ||
48 | eventdelivery_initialize_event_def (EC_XdStreamLengthFailedValue, EL_Error, EF_None, "StreamLengthFailed", "${0}: Length validation failed, expected: ${1}, received: ${2}", & Xd_HandleIntInt_event_field_to_string); | ||
49 | eventdelivery_initialize_event_def (EC_XdStreamChecksumFailedValue, EL_Error, EF_None, "StreamChecksumFailed", "${0}: Checksum validation failed, expected: ${1}, received: ${2}", & Xd_HandleStringString_event_field_to_string); | ||
50 | eventdelivery_initialize_event_def (EC_XdIncompatibleDeltaValue, EL_Error, EF_None, "IncompatibleDelta", "The delta was not produced according by the `xdelta delta' command", NULL); | ||
51 | eventdelivery_initialize_event_def (EC_XdInvalidRsyncCacheValue, EL_Error, EF_None, "InvalidRsyncCache", "The rsync checksum cache is corrupt", NULL); | ||
52 | eventdelivery_initialize_event_def (EC_XdInvalidControlValue, EL_Error, EF_None, "InvalidControl", "Delta control is corrupt", NULL); | ||
53 | eventdelivery_initialize_event_def (EC_XdOutOfRangeSourceIndexValue, EL_Error, EF_None, "OutOfRangeSourceIndex", "Instruction references out-of-range source index: ${0}", & Xd_Int_event_field_to_string); | ||
54 | eventdelivery_initialize_event_def (EC_XdTooManySourcesValue, EL_Error, EF_None, "TooManySources", "Too many input sources", NULL); | ||
55 | eventdelivery_initialize_event_def (EC_XdTooFewSourcesValue, EL_Error, EF_None, "TooFewSources", "Too few input sources", NULL); | ||
56 | serializeio_initialize_type ("ST_Version0Instruction", ST_Version0Instruction, &unserialize_version0instruction_internal, &serialize_version0instruction_obj_internal, &serializeio_count_version0instruction_obj, &serializeio_print_version0instruction_obj); | ||
57 | serializeio_initialize_type ("ST_Version0Control", ST_Version0Control, &unserialize_version0control_internal, &serialize_version0control_obj_internal, &serializeio_count_version0control_obj, &serializeio_print_version0control_obj); | ||
58 | serializeio_initialize_type ("ST_Version0SourceInfo", ST_Version0SourceInfo, &unserialize_version0sourceinfo_internal, &serialize_version0sourceinfo_obj_internal, &serializeio_count_version0sourceinfo_obj, &serializeio_print_version0sourceinfo_obj); | ||
59 | serializeio_initialize_type ("ST_RsyncIndex", ST_RsyncIndex, &unserialize_rsyncindex_internal, &serialize_rsyncindex_obj_internal, &serializeio_count_rsyncindex_obj, &serializeio_print_rsyncindex_obj); | ||
60 | serializeio_initialize_type ("ST_RsyncIndexElt", ST_RsyncIndexElt, &unserialize_rsyncindexelt_internal, &serialize_rsyncindexelt_obj_internal, &serializeio_count_rsyncindexelt_obj, &serializeio_print_rsyncindexelt_obj); | ||
61 | serializeio_initialize_type ("ST_XdeltaInstruction", ST_XdeltaInstruction, &unserialize_xdeltainstruction_internal, &serialize_xdeltainstruction_obj_internal, &serializeio_count_xdeltainstruction_obj, &serializeio_print_xdeltainstruction_obj); | ||
62 | serializeio_initialize_type ("ST_XdeltaControl", ST_XdeltaControl, &unserialize_xdeltacontrol_internal, &serialize_xdeltacontrol_obj_internal, &serializeio_count_xdeltacontrol_obj, &serializeio_print_xdeltacontrol_obj); | ||
63 | serializeio_initialize_type ("ST_XdeltaSourceInfo", ST_XdeltaSourceInfo, &unserialize_xdeltasourceinfo_internal, &serialize_xdeltasourceinfo_obj_internal, &serializeio_count_xdeltasourceinfo_obj, &serializeio_print_xdeltasourceinfo_obj); | ||
64 | serializeio_initialize_type ("ST_XdeltaIndex", ST_XdeltaIndex, &unserialize_xdeltaindex_internal, &serialize_xdeltaindex_obj_internal, &serializeio_count_xdeltaindex_obj, &serializeio_print_xdeltaindex_obj); | ||
65 | serializeio_initialize_type ("ST_XdeltaChecksum", ST_XdeltaChecksum, &unserialize_xdeltachecksum_internal, &serialize_xdeltachecksum_obj_internal, &serializeio_count_xdeltachecksum_obj, &serializeio_print_xdeltachecksum_obj); | ||
66 | edsio_library_register (3, "xd"); | ||
67 | result = TRUE; | ||
68 | return TRUE; | ||
69 | }; | ||
70 | |||
71 | /* XdeltaChecksum Print | ||
72 | */ | ||
73 | |||
74 | void | ||
75 | serializeio_print_xdeltachecksum_obj (SerialXdeltaChecksum* obj, guint indent_spaces) { | ||
76 | print_spaces (indent_spaces); | ||
77 | g_print ("[ST_XdeltaChecksum]\n"); | ||
78 | print_spaces (indent_spaces); | ||
79 | g_print ("high = "); | ||
80 | g_print ("%d\n", obj->high); | ||
81 | print_spaces (indent_spaces); | ||
82 | g_print ("low = "); | ||
83 | g_print ("%d\n", obj->low); | ||
84 | } | ||
85 | |||
86 | /* XdeltaChecksum Serialize | ||
87 | */ | ||
88 | |||
89 | gboolean | ||
90 | serialize_xdeltachecksum_internal (SerialSink *sink, guint16 high, guint16 low) | ||
91 | { | ||
92 | if (! (* sink->next_uint16) (sink, high)) goto bail; | ||
93 | if (! (* sink->next_uint16) (sink, low)) goto bail; | ||
94 | return TRUE; | ||
95 | bail: | ||
96 | return FALSE; | ||
97 | } | ||
98 | |||
99 | gboolean | ||
100 | serialize_xdeltachecksum_obj_internal (SerialSink *sink, SerialXdeltaChecksum* obj) | ||
101 | { | ||
102 | return serialize_xdeltachecksum_internal (sink, obj->high, obj->low); | ||
103 | } | ||
104 | |||
105 | gboolean | ||
106 | serialize_xdeltachecksum (SerialSink *sink, guint16 high, guint16 low) | ||
107 | { | ||
108 | if (! (* sink->sink_type) (sink, ST_XdeltaChecksum, serializeio_count_xdeltachecksum (high, low), TRUE)) goto bail; | ||
109 | if (! serialize_xdeltachecksum_internal (sink, high, low)) goto bail; | ||
110 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
111 | return TRUE; | ||
112 | bail: | ||
113 | return FALSE; | ||
114 | } | ||
115 | |||
116 | gboolean | ||
117 | serialize_xdeltachecksum_obj (SerialSink *sink, const SerialXdeltaChecksum* obj) { | ||
118 | |||
119 | return serialize_xdeltachecksum (sink, obj->high, obj->low); | ||
120 | } | ||
121 | |||
122 | /* XdeltaChecksum Unserialize | ||
123 | */ | ||
124 | |||
125 | gboolean | ||
126 | unserialize_xdeltachecksum_internal_noalloc (SerialSource *source, SerialXdeltaChecksum* result) | ||
127 | { | ||
128 | if (! (* source->next_uint16) (source, &result->high)) goto bail; | ||
129 | if (! (* source->next_uint16) (source, &result->low)) goto bail; | ||
130 | return TRUE; | ||
131 | bail: | ||
132 | return FALSE; | ||
133 | } | ||
134 | |||
135 | gboolean | ||
136 | unserialize_xdeltachecksum_internal (SerialSource *source, SerialXdeltaChecksum** result) | ||
137 | { | ||
138 | SerialXdeltaChecksum* unser; | ||
139 | (*result) = NULL; | ||
140 | unser = serializeio_source_alloc (source, sizeof (SerialXdeltaChecksum)); | ||
141 | if (! unser) goto bail; | ||
142 | if (! unserialize_xdeltachecksum_internal_noalloc (source, unser)) goto bail; | ||
143 | (*result) = unser; | ||
144 | return TRUE; | ||
145 | bail: | ||
146 | return FALSE; | ||
147 | } | ||
148 | |||
149 | gboolean | ||
150 | unserialize_xdeltachecksum (SerialSource *source, SerialXdeltaChecksum** result) | ||
151 | { | ||
152 | if ( (* source->source_type) (source, TRUE) != ST_XdeltaChecksum) goto bail; | ||
153 | if (! unserialize_xdeltachecksum_internal (source, result)) goto bail; | ||
154 | if (! serializeio_source_object_received (source)) goto bail; | ||
155 | return TRUE; | ||
156 | bail: | ||
157 | return FALSE; | ||
158 | } | ||
159 | |||
160 | /* XdeltaIndex Print | ||
161 | */ | ||
162 | |||
163 | void | ||
164 | serializeio_print_xdeltaindex_obj (SerialXdeltaIndex* obj, guint indent_spaces) { | ||
165 | print_spaces (indent_spaces); | ||
166 | g_print ("[ST_XdeltaIndex]\n"); | ||
167 | print_spaces (indent_spaces); | ||
168 | g_print ("file_len = "); | ||
169 | g_print ("%d\n", obj->file_len); | ||
170 | print_spaces (indent_spaces); | ||
171 | g_print ("file_md5 = "); | ||
172 | serializeio_print_bytes (obj->file_md5, 16); | ||
173 | print_spaces (indent_spaces); | ||
174 | g_print ("index = "); | ||
175 | g_print ("{\n"); | ||
176 | { | ||
177 | gint i; | ||
178 | for (i = 0; i < obj->index_len; i += 1) | ||
179 | { | ||
180 | print_spaces (indent_spaces); | ||
181 | g_print ("%d:\n", i); | ||
182 | print_spaces (indent_spaces); | ||
183 | serializeio_print_xdeltachecksum_obj (& (obj->index[i]), indent_spaces + 2); | ||
184 | print_spaces (indent_spaces); | ||
185 | ; | ||
186 | } | ||
187 | } | ||
188 | g_print ("}\n"); | ||
189 | } | ||
190 | |||
191 | /* XdeltaIndex Serialize | ||
192 | */ | ||
193 | |||
194 | gboolean | ||
195 | serialize_xdeltaindex_internal (SerialSink *sink, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialXdeltaChecksum const* index) | ||
196 | { | ||
197 | if (! (* sink->next_uint) (sink, file_len)) goto bail; | ||
198 | if (! (* sink->next_bytes_known) (sink, file_md5, 16)) goto bail; | ||
199 | { | ||
200 | gint i; | ||
201 | if (! (* sink->next_uint) (sink, index_len)) goto bail; | ||
202 | for (i = 0; i < index_len; i += 1) | ||
203 | { | ||
204 | if (! serialize_xdeltachecksum_internal (sink, (index[i]).high, (index[i]).low)) goto bail; | ||
205 | } | ||
206 | } | ||
207 | return TRUE; | ||
208 | bail: | ||
209 | return FALSE; | ||
210 | } | ||
211 | |||
212 | gboolean | ||
213 | serialize_xdeltaindex_obj_internal (SerialSink *sink, SerialXdeltaIndex* obj) | ||
214 | { | ||
215 | return serialize_xdeltaindex_internal (sink, obj->file_len, obj->file_md5, obj->index_len, obj->index); | ||
216 | } | ||
217 | |||
218 | gboolean | ||
219 | serialize_xdeltaindex (SerialSink *sink, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialXdeltaChecksum const* index) | ||
220 | { | ||
221 | if (! (* sink->sink_type) (sink, ST_XdeltaIndex, serializeio_count_xdeltaindex (file_len, file_md5, index_len, index), TRUE)) goto bail; | ||
222 | if (! serialize_xdeltaindex_internal (sink, file_len, file_md5, index_len, index)) goto bail; | ||
223 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
224 | return TRUE; | ||
225 | bail: | ||
226 | return FALSE; | ||
227 | } | ||
228 | |||
229 | gboolean | ||
230 | serialize_xdeltaindex_obj (SerialSink *sink, const SerialXdeltaIndex* obj) { | ||
231 | |||
232 | return serialize_xdeltaindex (sink, obj->file_len, obj->file_md5, obj->index_len, obj->index); | ||
233 | } | ||
234 | |||
235 | /* XdeltaIndex Unserialize | ||
236 | */ | ||
237 | |||
238 | gboolean | ||
239 | unserialize_xdeltaindex_internal_noalloc (SerialSource *source, SerialXdeltaIndex* result) | ||
240 | { | ||
241 | if (! (* source->next_uint) (source, &result->file_len)) goto bail; | ||
242 | if (! (* source->next_bytes_known) (source, result->file_md5, 16)) goto bail; | ||
243 | { | ||
244 | gint i; | ||
245 | if (! (* source->next_uint) (source, &result->index_len)) goto bail; | ||
246 | if (! (result->index = serializeio_source_alloc (source, sizeof (SerialXdeltaChecksum) * result->index_len))) goto bail; | ||
247 | for (i = 0; i < result->index_len; i += 1) | ||
248 | { | ||
249 | if (! unserialize_xdeltachecksum_internal_noalloc (source, &(result->index[i]))) goto bail; | ||
250 | } | ||
251 | } | ||
252 | return TRUE; | ||
253 | bail: | ||
254 | return FALSE; | ||
255 | } | ||
256 | |||
257 | gboolean | ||
258 | unserialize_xdeltaindex_internal (SerialSource *source, SerialXdeltaIndex** result) | ||
259 | { | ||
260 | SerialXdeltaIndex* unser; | ||
261 | (*result) = NULL; | ||
262 | unser = serializeio_source_alloc (source, sizeof (SerialXdeltaIndex)); | ||
263 | if (! unser) goto bail; | ||
264 | if (! unserialize_xdeltaindex_internal_noalloc (source, unser)) goto bail; | ||
265 | (*result) = unser; | ||
266 | return TRUE; | ||
267 | bail: | ||
268 | return FALSE; | ||
269 | } | ||
270 | |||
271 | gboolean | ||
272 | unserialize_xdeltaindex (SerialSource *source, SerialXdeltaIndex** result) | ||
273 | { | ||
274 | if ( (* source->source_type) (source, TRUE) != ST_XdeltaIndex) goto bail; | ||
275 | if (! unserialize_xdeltaindex_internal (source, result)) goto bail; | ||
276 | if (! serializeio_source_object_received (source)) goto bail; | ||
277 | return TRUE; | ||
278 | bail: | ||
279 | return FALSE; | ||
280 | } | ||
281 | |||
282 | /* XdeltaSourceInfo Print | ||
283 | */ | ||
284 | |||
285 | void | ||
286 | serializeio_print_xdeltasourceinfo_obj (SerialXdeltaSourceInfo* obj, guint indent_spaces) { | ||
287 | print_spaces (indent_spaces); | ||
288 | g_print ("[ST_XdeltaSourceInfo]\n"); | ||
289 | print_spaces (indent_spaces); | ||
290 | g_print ("name = "); | ||
291 | g_print ("%s\n", obj->name); | ||
292 | print_spaces (indent_spaces); | ||
293 | g_print ("md5 = "); | ||
294 | serializeio_print_bytes (obj->md5, 16); | ||
295 | print_spaces (indent_spaces); | ||
296 | g_print ("len = "); | ||
297 | g_print ("%d\n", obj->len); | ||
298 | print_spaces (indent_spaces); | ||
299 | g_print ("isdata = "); | ||
300 | g_print ("%s\n", obj->isdata ? "true" : "false"); | ||
301 | print_spaces (indent_spaces); | ||
302 | g_print ("sequential = "); | ||
303 | g_print ("%s\n", obj->sequential ? "true" : "false"); | ||
304 | } | ||
305 | |||
306 | /* XdeltaSourceInfo Serialize | ||
307 | */ | ||
308 | |||
309 | gboolean | ||
310 | serialize_xdeltasourceinfo_internal (SerialSink *sink, const gchar* name, const guint8 md5[16], guint32 len, gboolean isdata, gboolean sequential) | ||
311 | { | ||
312 | if (! (* sink->next_string) (sink, name)) goto bail; | ||
313 | if (! (* sink->next_bytes_known) (sink, md5, 16)) goto bail; | ||
314 | if (! (* sink->next_uint) (sink, len)) goto bail; | ||
315 | if (! (* sink->next_bool) (sink, isdata)) goto bail; | ||
316 | if (! (* sink->next_bool) (sink, sequential)) goto bail; | ||
317 | return TRUE; | ||
318 | bail: | ||
319 | return FALSE; | ||
320 | } | ||
321 | |||
322 | gboolean | ||
323 | serialize_xdeltasourceinfo_obj_internal (SerialSink *sink, SerialXdeltaSourceInfo* obj) | ||
324 | { | ||
325 | return serialize_xdeltasourceinfo_internal (sink, obj->name, obj->md5, obj->len, obj->isdata, obj->sequential); | ||
326 | } | ||
327 | |||
328 | gboolean | ||
329 | serialize_xdeltasourceinfo (SerialSink *sink, const gchar* name, const guint8 md5[16], guint32 len, gboolean isdata, gboolean sequential) | ||
330 | { | ||
331 | if (! (* sink->sink_type) (sink, ST_XdeltaSourceInfo, serializeio_count_xdeltasourceinfo (name, md5, len, isdata, sequential), TRUE)) goto bail; | ||
332 | if (! serialize_xdeltasourceinfo_internal (sink, name, md5, len, isdata, sequential)) goto bail; | ||
333 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
334 | return TRUE; | ||
335 | bail: | ||
336 | return FALSE; | ||
337 | } | ||
338 | |||
339 | gboolean | ||
340 | serialize_xdeltasourceinfo_obj (SerialSink *sink, const SerialXdeltaSourceInfo* obj) { | ||
341 | |||
342 | return serialize_xdeltasourceinfo (sink, obj->name, obj->md5, obj->len, obj->isdata, obj->sequential); | ||
343 | } | ||
344 | |||
345 | /* XdeltaSourceInfo Unserialize | ||
346 | */ | ||
347 | |||
348 | gboolean | ||
349 | unserialize_xdeltasourceinfo_internal_noalloc (SerialSource *source, SerialXdeltaSourceInfo* result) | ||
350 | { | ||
351 | if (! (* source->next_string) (source, &result->name)) goto bail; | ||
352 | if (! (* source->next_bytes_known) (source, result->md5, 16)) goto bail; | ||
353 | if (! (* source->next_uint) (source, &result->len)) goto bail; | ||
354 | if (! (* source->next_bool) (source, &result->isdata)) goto bail; | ||
355 | if (! (* source->next_bool) (source, &result->sequential)) goto bail; | ||
356 | return TRUE; | ||
357 | bail: | ||
358 | return FALSE; | ||
359 | } | ||
360 | |||
361 | gboolean | ||
362 | unserialize_xdeltasourceinfo_internal (SerialSource *source, SerialXdeltaSourceInfo** result) | ||
363 | { | ||
364 | SerialXdeltaSourceInfo* unser; | ||
365 | (*result) = NULL; | ||
366 | unser = serializeio_source_alloc (source, sizeof (SerialXdeltaSourceInfo)); | ||
367 | if (! unser) goto bail; | ||
368 | if (! unserialize_xdeltasourceinfo_internal_noalloc (source, unser)) goto bail; | ||
369 | (*result) = unser; | ||
370 | return TRUE; | ||
371 | bail: | ||
372 | return FALSE; | ||
373 | } | ||
374 | |||
375 | gboolean | ||
376 | unserialize_xdeltasourceinfo (SerialSource *source, SerialXdeltaSourceInfo** result) | ||
377 | { | ||
378 | if ( (* source->source_type) (source, TRUE) != ST_XdeltaSourceInfo) goto bail; | ||
379 | if (! unserialize_xdeltasourceinfo_internal (source, result)) goto bail; | ||
380 | if (! serializeio_source_object_received (source)) goto bail; | ||
381 | return TRUE; | ||
382 | bail: | ||
383 | return FALSE; | ||
384 | } | ||
385 | |||
386 | /* XdeltaControl Print | ||
387 | */ | ||
388 | |||
389 | void | ||
390 | serializeio_print_xdeltacontrol_obj (SerialXdeltaControl* obj, guint indent_spaces) { | ||
391 | print_spaces (indent_spaces); | ||
392 | g_print ("[ST_XdeltaControl]\n"); | ||
393 | print_spaces (indent_spaces); | ||
394 | g_print ("to_md5 = "); | ||
395 | serializeio_print_bytes (obj->to_md5, 16); | ||
396 | print_spaces (indent_spaces); | ||
397 | g_print ("to_len = "); | ||
398 | g_print ("%d\n", obj->to_len); | ||
399 | print_spaces (indent_spaces); | ||
400 | g_print ("has_data = "); | ||
401 | g_print ("%s\n", obj->has_data ? "true" : "false"); | ||
402 | print_spaces (indent_spaces); | ||
403 | g_print ("source_info = "); | ||
404 | g_print ("{\n"); | ||
405 | { | ||
406 | gint i; | ||
407 | for (i = 0; i < obj->source_info_len; i += 1) | ||
408 | { | ||
409 | print_spaces (indent_spaces); | ||
410 | g_print ("%d:\n", i); | ||
411 | print_spaces (indent_spaces); | ||
412 | serializeio_print_xdeltasourceinfo_obj ((obj->source_info[i]), indent_spaces + 2); | ||
413 | print_spaces (indent_spaces); | ||
414 | ; | ||
415 | } | ||
416 | } | ||
417 | g_print ("}\n"); | ||
418 | print_spaces (indent_spaces); | ||
419 | g_print ("inst = "); | ||
420 | g_print ("{\n"); | ||
421 | { | ||
422 | gint i; | ||
423 | for (i = 0; i < obj->inst_len; i += 1) | ||
424 | { | ||
425 | print_spaces (indent_spaces); | ||
426 | g_print ("%d:\n", i); | ||
427 | print_spaces (indent_spaces); | ||
428 | serializeio_print_xdeltainstruction_obj (& (obj->inst[i]), indent_spaces + 2); | ||
429 | print_spaces (indent_spaces); | ||
430 | ; | ||
431 | } | ||
432 | } | ||
433 | g_print ("}\n"); | ||
434 | } | ||
435 | |||
436 | /* XdeltaControl Serialize | ||
437 | */ | ||
438 | |||
439 | gboolean | ||
440 | serialize_xdeltacontrol_internal (SerialSink *sink, const guint8 to_md5[16], guint32 to_len, gboolean has_data, guint32 source_info_len, SerialXdeltaSourceInfo* const* source_info, guint32 inst_len, SerialXdeltaInstruction const* inst) | ||
441 | { | ||
442 | if (! (* sink->next_bytes_known) (sink, to_md5, 16)) goto bail; | ||
443 | if (! (* sink->next_uint) (sink, to_len)) goto bail; | ||
444 | if (! (* sink->next_bool) (sink, has_data)) goto bail; | ||
445 | { | ||
446 | gint i; | ||
447 | if (! (* sink->next_uint) (sink, source_info_len)) goto bail; | ||
448 | for (i = 0; i < source_info_len; i += 1) | ||
449 | { | ||
450 | if (! serialize_xdeltasourceinfo_internal (sink, (source_info[i])->name, (source_info[i])->md5, (source_info[i])->len, (source_info[i])->isdata, (source_info[i])->sequential)) goto bail; | ||
451 | } | ||
452 | } | ||
453 | { | ||
454 | gint i; | ||
455 | if (! (* sink->next_uint) (sink, inst_len)) goto bail; | ||
456 | for (i = 0; i < inst_len; i += 1) | ||
457 | { | ||
458 | if (! serialize_xdeltainstruction_internal (sink, (inst[i]).index, (inst[i]).offset, (inst[i]).length)) goto bail; | ||
459 | } | ||
460 | } | ||
461 | return TRUE; | ||
462 | bail: | ||
463 | return FALSE; | ||
464 | } | ||
465 | |||
466 | gboolean | ||
467 | serialize_xdeltacontrol_obj_internal (SerialSink *sink, SerialXdeltaControl* obj) | ||
468 | { | ||
469 | return serialize_xdeltacontrol_internal (sink, obj->to_md5, obj->to_len, obj->has_data, obj->source_info_len, obj->source_info, obj->inst_len, obj->inst); | ||
470 | } | ||
471 | |||
472 | gboolean | ||
473 | serialize_xdeltacontrol (SerialSink *sink, const guint8 to_md5[16], guint32 to_len, gboolean has_data, guint32 source_info_len, SerialXdeltaSourceInfo* const* source_info, guint32 inst_len, SerialXdeltaInstruction const* inst) | ||
474 | { | ||
475 | if (! (* sink->sink_type) (sink, ST_XdeltaControl, serializeio_count_xdeltacontrol (to_md5, to_len, has_data, source_info_len, source_info, inst_len, inst), TRUE)) goto bail; | ||
476 | if (! serialize_xdeltacontrol_internal (sink, to_md5, to_len, has_data, source_info_len, source_info, inst_len, inst)) goto bail; | ||
477 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
478 | return TRUE; | ||
479 | bail: | ||
480 | return FALSE; | ||
481 | } | ||
482 | |||
483 | gboolean | ||
484 | serialize_xdeltacontrol_obj (SerialSink *sink, const SerialXdeltaControl* obj) { | ||
485 | |||
486 | return serialize_xdeltacontrol (sink, obj->to_md5, obj->to_len, obj->has_data, obj->source_info_len, obj->source_info, obj->inst_len, obj->inst); | ||
487 | } | ||
488 | |||
489 | /* XdeltaControl Unserialize | ||
490 | */ | ||
491 | |||
492 | gboolean | ||
493 | unserialize_xdeltacontrol_internal_noalloc (SerialSource *source, SerialXdeltaControl* result) | ||
494 | { | ||
495 | if (! (* source->next_bytes_known) (source, result->to_md5, 16)) goto bail; | ||
496 | if (! (* source->next_uint) (source, &result->to_len)) goto bail; | ||
497 | if (! (* source->next_bool) (source, &result->has_data)) goto bail; | ||
498 | { | ||
499 | gint i; | ||
500 | if (! (* source->next_uint) (source, &result->source_info_len)) goto bail; | ||
501 | if (! (result->source_info = serializeio_source_alloc (source, sizeof (SerialXdeltaSourceInfo*) * result->source_info_len))) goto bail; | ||
502 | for (i = 0; i < result->source_info_len; i += 1) | ||
503 | { | ||
504 | if (! unserialize_xdeltasourceinfo_internal (source, &(result->source_info[i]))) goto bail; | ||
505 | } | ||
506 | } | ||
507 | { | ||
508 | gint i; | ||
509 | if (! (* source->next_uint) (source, &result->inst_len)) goto bail; | ||
510 | if (! (result->inst = serializeio_source_alloc (source, sizeof (SerialXdeltaInstruction) * result->inst_len))) goto bail; | ||
511 | for (i = 0; i < result->inst_len; i += 1) | ||
512 | { | ||
513 | if (! unserialize_xdeltainstruction_internal_noalloc (source, &(result->inst[i]))) goto bail; | ||
514 | } | ||
515 | } | ||
516 | return TRUE; | ||
517 | bail: | ||
518 | return FALSE; | ||
519 | } | ||
520 | |||
521 | gboolean | ||
522 | unserialize_xdeltacontrol_internal (SerialSource *source, SerialXdeltaControl** result) | ||
523 | { | ||
524 | SerialXdeltaControl* unser; | ||
525 | (*result) = NULL; | ||
526 | unser = serializeio_source_alloc (source, sizeof (SerialXdeltaControl)); | ||
527 | if (! unser) goto bail; | ||
528 | if (! unserialize_xdeltacontrol_internal_noalloc (source, unser)) goto bail; | ||
529 | (*result) = unser; | ||
530 | return TRUE; | ||
531 | bail: | ||
532 | return FALSE; | ||
533 | } | ||
534 | |||
535 | gboolean | ||
536 | unserialize_xdeltacontrol (SerialSource *source, SerialXdeltaControl** result) | ||
537 | { | ||
538 | if ( (* source->source_type) (source, TRUE) != ST_XdeltaControl) goto bail; | ||
539 | if (! unserialize_xdeltacontrol_internal (source, result)) goto bail; | ||
540 | if (! serializeio_source_object_received (source)) goto bail; | ||
541 | return TRUE; | ||
542 | bail: | ||
543 | return FALSE; | ||
544 | } | ||
545 | |||
546 | /* XdeltaInstruction Print | ||
547 | */ | ||
548 | |||
549 | void | ||
550 | serializeio_print_xdeltainstruction_obj (SerialXdeltaInstruction* obj, guint indent_spaces) { | ||
551 | print_spaces (indent_spaces); | ||
552 | g_print ("[ST_XdeltaInstruction]\n"); | ||
553 | print_spaces (indent_spaces); | ||
554 | g_print ("index = "); | ||
555 | g_print ("%d\n", obj->index); | ||
556 | print_spaces (indent_spaces); | ||
557 | g_print ("offset = "); | ||
558 | g_print ("%d\n", obj->offset); | ||
559 | print_spaces (indent_spaces); | ||
560 | g_print ("length = "); | ||
561 | g_print ("%d\n", obj->length); | ||
562 | } | ||
563 | |||
564 | /* XdeltaInstruction Serialize | ||
565 | */ | ||
566 | |||
567 | gboolean | ||
568 | serialize_xdeltainstruction_internal (SerialSink *sink, guint32 index, guint32 offset, guint32 length) | ||
569 | { | ||
570 | if (! (* sink->next_uint) (sink, index)) goto bail; | ||
571 | if (! (* sink->next_uint) (sink, offset)) goto bail; | ||
572 | if (! (* sink->next_uint) (sink, length)) goto bail; | ||
573 | return TRUE; | ||
574 | bail: | ||
575 | return FALSE; | ||
576 | } | ||
577 | |||
578 | gboolean | ||
579 | serialize_xdeltainstruction_obj_internal (SerialSink *sink, SerialXdeltaInstruction* obj) | ||
580 | { | ||
581 | return serialize_xdeltainstruction_internal (sink, obj->index, obj->offset, obj->length); | ||
582 | } | ||
583 | |||
584 | gboolean | ||
585 | serialize_xdeltainstruction (SerialSink *sink, guint32 index, guint32 offset, guint32 length) | ||
586 | { | ||
587 | if (! (* sink->sink_type) (sink, ST_XdeltaInstruction, serializeio_count_xdeltainstruction (index, offset, length), TRUE)) goto bail; | ||
588 | if (! serialize_xdeltainstruction_internal (sink, index, offset, length)) goto bail; | ||
589 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
590 | return TRUE; | ||
591 | bail: | ||
592 | return FALSE; | ||
593 | } | ||
594 | |||
595 | gboolean | ||
596 | serialize_xdeltainstruction_obj (SerialSink *sink, const SerialXdeltaInstruction* obj) { | ||
597 | |||
598 | return serialize_xdeltainstruction (sink, obj->index, obj->offset, obj->length); | ||
599 | } | ||
600 | |||
601 | /* XdeltaInstruction Unserialize | ||
602 | */ | ||
603 | |||
604 | gboolean | ||
605 | unserialize_xdeltainstruction_internal_noalloc (SerialSource *source, SerialXdeltaInstruction* result) | ||
606 | { | ||
607 | if (! (* source->next_uint) (source, &result->index)) goto bail; | ||
608 | if (! (* source->next_uint) (source, &result->offset)) goto bail; | ||
609 | if (! (* source->next_uint) (source, &result->length)) goto bail; | ||
610 | return TRUE; | ||
611 | bail: | ||
612 | return FALSE; | ||
613 | } | ||
614 | |||
615 | gboolean | ||
616 | unserialize_xdeltainstruction_internal (SerialSource *source, SerialXdeltaInstruction** result) | ||
617 | { | ||
618 | SerialXdeltaInstruction* unser; | ||
619 | (*result) = NULL; | ||
620 | unser = serializeio_source_alloc (source, sizeof (SerialXdeltaInstruction)); | ||
621 | if (! unser) goto bail; | ||
622 | if (! unserialize_xdeltainstruction_internal_noalloc (source, unser)) goto bail; | ||
623 | (*result) = unser; | ||
624 | return TRUE; | ||
625 | bail: | ||
626 | return FALSE; | ||
627 | } | ||
628 | |||
629 | gboolean | ||
630 | unserialize_xdeltainstruction (SerialSource *source, SerialXdeltaInstruction** result) | ||
631 | { | ||
632 | if ( (* source->source_type) (source, TRUE) != ST_XdeltaInstruction) goto bail; | ||
633 | if (! unserialize_xdeltainstruction_internal (source, result)) goto bail; | ||
634 | if (! serializeio_source_object_received (source)) goto bail; | ||
635 | return TRUE; | ||
636 | bail: | ||
637 | return FALSE; | ||
638 | } | ||
639 | |||
640 | /* RsyncIndexElt Print | ||
641 | */ | ||
642 | |||
643 | void | ||
644 | serializeio_print_rsyncindexelt_obj (SerialRsyncIndexElt* obj, guint indent_spaces) { | ||
645 | print_spaces (indent_spaces); | ||
646 | g_print ("[ST_RsyncIndexElt]\n"); | ||
647 | print_spaces (indent_spaces); | ||
648 | g_print ("md5 = "); | ||
649 | serializeio_print_bytes (obj->md5, 16); | ||
650 | print_spaces (indent_spaces); | ||
651 | g_print ("cksum = "); | ||
652 | g_print ("{\n"); | ||
653 | serializeio_print_xdeltachecksum_obj (& obj->cksum, indent_spaces + 2); | ||
654 | print_spaces (indent_spaces); | ||
655 | ; | ||
656 | g_print ("}\n"); | ||
657 | } | ||
658 | |||
659 | /* RsyncIndexElt Serialize | ||
660 | */ | ||
661 | |||
662 | gboolean | ||
663 | serialize_rsyncindexelt_internal (SerialSink *sink, const guint8 md5[16], SerialXdeltaChecksum const* cksum) | ||
664 | { | ||
665 | if (! (* sink->next_bytes_known) (sink, md5, 16)) goto bail; | ||
666 | if (! serialize_xdeltachecksum_internal (sink, cksum->high, cksum->low)) goto bail; | ||
667 | return TRUE; | ||
668 | bail: | ||
669 | return FALSE; | ||
670 | } | ||
671 | |||
672 | gboolean | ||
673 | serialize_rsyncindexelt_obj_internal (SerialSink *sink, SerialRsyncIndexElt* obj) | ||
674 | { | ||
675 | return serialize_rsyncindexelt_internal (sink, obj->md5, &obj->cksum); | ||
676 | } | ||
677 | |||
678 | gboolean | ||
679 | serialize_rsyncindexelt (SerialSink *sink, const guint8 md5[16], SerialXdeltaChecksum const* cksum) | ||
680 | { | ||
681 | if (! (* sink->sink_type) (sink, ST_RsyncIndexElt, serializeio_count_rsyncindexelt (md5, cksum), TRUE)) goto bail; | ||
682 | if (! serialize_rsyncindexelt_internal (sink, md5, cksum)) goto bail; | ||
683 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
684 | return TRUE; | ||
685 | bail: | ||
686 | return FALSE; | ||
687 | } | ||
688 | |||
689 | gboolean | ||
690 | serialize_rsyncindexelt_obj (SerialSink *sink, const SerialRsyncIndexElt* obj) { | ||
691 | |||
692 | return serialize_rsyncindexelt (sink, obj->md5, &obj->cksum); | ||
693 | } | ||
694 | |||
695 | /* RsyncIndexElt Unserialize | ||
696 | */ | ||
697 | |||
698 | gboolean | ||
699 | unserialize_rsyncindexelt_internal_noalloc (SerialSource *source, SerialRsyncIndexElt* result) | ||
700 | { | ||
701 | if (! (* source->next_bytes_known) (source, result->md5, 16)) goto bail; | ||
702 | if (! unserialize_xdeltachecksum_internal_noalloc (source, &result->cksum)) goto bail; | ||
703 | return TRUE; | ||
704 | bail: | ||
705 | return FALSE; | ||
706 | } | ||
707 | |||
708 | gboolean | ||
709 | unserialize_rsyncindexelt_internal (SerialSource *source, SerialRsyncIndexElt** result) | ||
710 | { | ||
711 | SerialRsyncIndexElt* unser; | ||
712 | (*result) = NULL; | ||
713 | unser = serializeio_source_alloc (source, sizeof (SerialRsyncIndexElt)); | ||
714 | if (! unser) goto bail; | ||
715 | if (! unserialize_rsyncindexelt_internal_noalloc (source, unser)) goto bail; | ||
716 | (*result) = unser; | ||
717 | return TRUE; | ||
718 | bail: | ||
719 | return FALSE; | ||
720 | } | ||
721 | |||
722 | gboolean | ||
723 | unserialize_rsyncindexelt (SerialSource *source, SerialRsyncIndexElt** result) | ||
724 | { | ||
725 | if ( (* source->source_type) (source, TRUE) != ST_RsyncIndexElt) goto bail; | ||
726 | if (! unserialize_rsyncindexelt_internal (source, result)) goto bail; | ||
727 | if (! serializeio_source_object_received (source)) goto bail; | ||
728 | return TRUE; | ||
729 | bail: | ||
730 | return FALSE; | ||
731 | } | ||
732 | |||
733 | /* RsyncIndex Print | ||
734 | */ | ||
735 | |||
736 | void | ||
737 | serializeio_print_rsyncindex_obj (SerialRsyncIndex* obj, guint indent_spaces) { | ||
738 | print_spaces (indent_spaces); | ||
739 | g_print ("[ST_RsyncIndex]\n"); | ||
740 | print_spaces (indent_spaces); | ||
741 | g_print ("seg_len = "); | ||
742 | g_print ("%d\n", obj->seg_len); | ||
743 | print_spaces (indent_spaces); | ||
744 | g_print ("file_len = "); | ||
745 | g_print ("%d\n", obj->file_len); | ||
746 | print_spaces (indent_spaces); | ||
747 | g_print ("file_md5 = "); | ||
748 | serializeio_print_bytes (obj->file_md5, 16); | ||
749 | print_spaces (indent_spaces); | ||
750 | g_print ("index = "); | ||
751 | g_print ("{\n"); | ||
752 | { | ||
753 | gint i; | ||
754 | for (i = 0; i < obj->index_len; i += 1) | ||
755 | { | ||
756 | print_spaces (indent_spaces); | ||
757 | g_print ("%d:\n", i); | ||
758 | print_spaces (indent_spaces); | ||
759 | serializeio_print_rsyncindexelt_obj (& (obj->index[i]), indent_spaces + 2); | ||
760 | print_spaces (indent_spaces); | ||
761 | ; | ||
762 | } | ||
763 | } | ||
764 | g_print ("}\n"); | ||
765 | } | ||
766 | |||
767 | /* RsyncIndex Serialize | ||
768 | */ | ||
769 | |||
770 | gboolean | ||
771 | serialize_rsyncindex_internal (SerialSink *sink, guint32 seg_len, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialRsyncIndexElt const* index) | ||
772 | { | ||
773 | if (! (* sink->next_uint) (sink, seg_len)) goto bail; | ||
774 | if (! (* sink->next_uint) (sink, file_len)) goto bail; | ||
775 | if (! (* sink->next_bytes_known) (sink, file_md5, 16)) goto bail; | ||
776 | { | ||
777 | gint i; | ||
778 | if (! (* sink->next_uint) (sink, index_len)) goto bail; | ||
779 | for (i = 0; i < index_len; i += 1) | ||
780 | { | ||
781 | if (! serialize_rsyncindexelt_internal (sink, (index[i]).md5, &(index[i]).cksum)) goto bail; | ||
782 | } | ||
783 | } | ||
784 | return TRUE; | ||
785 | bail: | ||
786 | return FALSE; | ||
787 | } | ||
788 | |||
789 | gboolean | ||
790 | serialize_rsyncindex_obj_internal (SerialSink *sink, SerialRsyncIndex* obj) | ||
791 | { | ||
792 | return serialize_rsyncindex_internal (sink, obj->seg_len, obj->file_len, obj->file_md5, obj->index_len, obj->index); | ||
793 | } | ||
794 | |||
795 | gboolean | ||
796 | serialize_rsyncindex (SerialSink *sink, guint32 seg_len, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialRsyncIndexElt const* index) | ||
797 | { | ||
798 | if (! (* sink->sink_type) (sink, ST_RsyncIndex, serializeio_count_rsyncindex (seg_len, file_len, file_md5, index_len, index), TRUE)) goto bail; | ||
799 | if (! serialize_rsyncindex_internal (sink, seg_len, file_len, file_md5, index_len, index)) goto bail; | ||
800 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
801 | return TRUE; | ||
802 | bail: | ||
803 | return FALSE; | ||
804 | } | ||
805 | |||
806 | gboolean | ||
807 | serialize_rsyncindex_obj (SerialSink *sink, const SerialRsyncIndex* obj) { | ||
808 | |||
809 | return serialize_rsyncindex (sink, obj->seg_len, obj->file_len, obj->file_md5, obj->index_len, obj->index); | ||
810 | } | ||
811 | |||
812 | /* RsyncIndex Unserialize | ||
813 | */ | ||
814 | |||
815 | gboolean | ||
816 | unserialize_rsyncindex_internal_noalloc (SerialSource *source, SerialRsyncIndex* result) | ||
817 | { | ||
818 | if (! (* source->next_uint) (source, &result->seg_len)) goto bail; | ||
819 | if (! (* source->next_uint) (source, &result->file_len)) goto bail; | ||
820 | if (! (* source->next_bytes_known) (source, result->file_md5, 16)) goto bail; | ||
821 | { | ||
822 | gint i; | ||
823 | if (! (* source->next_uint) (source, &result->index_len)) goto bail; | ||
824 | if (! (result->index = serializeio_source_alloc (source, sizeof (SerialRsyncIndexElt) * result->index_len))) goto bail; | ||
825 | for (i = 0; i < result->index_len; i += 1) | ||
826 | { | ||
827 | if (! unserialize_rsyncindexelt_internal_noalloc (source, &(result->index[i]))) goto bail; | ||
828 | } | ||
829 | } | ||
830 | return TRUE; | ||
831 | bail: | ||
832 | return FALSE; | ||
833 | } | ||
834 | |||
835 | gboolean | ||
836 | unserialize_rsyncindex_internal (SerialSource *source, SerialRsyncIndex** result) | ||
837 | { | ||
838 | SerialRsyncIndex* unser; | ||
839 | (*result) = NULL; | ||
840 | unser = serializeio_source_alloc (source, sizeof (SerialRsyncIndex)); | ||
841 | if (! unser) goto bail; | ||
842 | if (! unserialize_rsyncindex_internal_noalloc (source, unser)) goto bail; | ||
843 | (*result) = unser; | ||
844 | return TRUE; | ||
845 | bail: | ||
846 | return FALSE; | ||
847 | } | ||
848 | |||
849 | gboolean | ||
850 | unserialize_rsyncindex (SerialSource *source, SerialRsyncIndex** result) | ||
851 | { | ||
852 | if ( (* source->source_type) (source, TRUE) != ST_RsyncIndex) goto bail; | ||
853 | if (! unserialize_rsyncindex_internal (source, result)) goto bail; | ||
854 | if (! serializeio_source_object_received (source)) goto bail; | ||
855 | return TRUE; | ||
856 | bail: | ||
857 | return FALSE; | ||
858 | } | ||
859 | |||
860 | /* Version0SourceInfo Print | ||
861 | */ | ||
862 | |||
863 | void | ||
864 | serializeio_print_version0sourceinfo_obj (SerialVersion0SourceInfo* obj, guint indent_spaces) { | ||
865 | print_spaces (indent_spaces); | ||
866 | g_print ("[ST_Version0SourceInfo]\n"); | ||
867 | print_spaces (indent_spaces); | ||
868 | g_print ("md5 = "); | ||
869 | serializeio_print_bytes (obj->md5, 16); | ||
870 | print_spaces (indent_spaces); | ||
871 | g_print ("real_md5 = "); | ||
872 | serializeio_print_bytes (obj->real_md5, 16); | ||
873 | print_spaces (indent_spaces); | ||
874 | g_print ("length = "); | ||
875 | g_print ("%d\n", obj->length); | ||
876 | } | ||
877 | |||
878 | /* Version0SourceInfo Serialize | ||
879 | */ | ||
880 | |||
881 | gboolean | ||
882 | serialize_version0sourceinfo_internal (SerialSink *sink, const guint8 md5[16], const guint8 real_md5[16], guint32 length) | ||
883 | { | ||
884 | if (! (* sink->next_bytes_known) (sink, md5, 16)) goto bail; | ||
885 | if (! (* sink->next_bytes_known) (sink, real_md5, 16)) goto bail; | ||
886 | if (! (* sink->next_uint) (sink, length)) goto bail; | ||
887 | return TRUE; | ||
888 | bail: | ||
889 | return FALSE; | ||
890 | } | ||
891 | |||
892 | gboolean | ||
893 | serialize_version0sourceinfo_obj_internal (SerialSink *sink, SerialVersion0SourceInfo* obj) | ||
894 | { | ||
895 | return serialize_version0sourceinfo_internal (sink, obj->md5, obj->real_md5, obj->length); | ||
896 | } | ||
897 | |||
898 | gboolean | ||
899 | serialize_version0sourceinfo (SerialSink *sink, const guint8 md5[16], const guint8 real_md5[16], guint32 length) | ||
900 | { | ||
901 | if (! (* sink->sink_type) (sink, ST_Version0SourceInfo, serializeio_count_version0sourceinfo (md5, real_md5, length), TRUE)) goto bail; | ||
902 | if (! serialize_version0sourceinfo_internal (sink, md5, real_md5, length)) goto bail; | ||
903 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
904 | return TRUE; | ||
905 | bail: | ||
906 | return FALSE; | ||
907 | } | ||
908 | |||
909 | gboolean | ||
910 | serialize_version0sourceinfo_obj (SerialSink *sink, const SerialVersion0SourceInfo* obj) { | ||
911 | |||
912 | return serialize_version0sourceinfo (sink, obj->md5, obj->real_md5, obj->length); | ||
913 | } | ||
914 | |||
915 | /* Version0SourceInfo Unserialize | ||
916 | */ | ||
917 | |||
918 | gboolean | ||
919 | unserialize_version0sourceinfo_internal_noalloc (SerialSource *source, SerialVersion0SourceInfo* result) | ||
920 | { | ||
921 | if (! (* source->next_bytes_known) (source, result->md5, 16)) goto bail; | ||
922 | if (! (* source->next_bytes_known) (source, result->real_md5, 16)) goto bail; | ||
923 | if (! (* source->next_uint) (source, &result->length)) goto bail; | ||
924 | return TRUE; | ||
925 | bail: | ||
926 | return FALSE; | ||
927 | } | ||
928 | |||
929 | gboolean | ||
930 | unserialize_version0sourceinfo_internal (SerialSource *source, SerialVersion0SourceInfo** result) | ||
931 | { | ||
932 | SerialVersion0SourceInfo* unser; | ||
933 | (*result) = NULL; | ||
934 | unser = serializeio_source_alloc (source, sizeof (SerialVersion0SourceInfo)); | ||
935 | if (! unser) goto bail; | ||
936 | if (! unserialize_version0sourceinfo_internal_noalloc (source, unser)) goto bail; | ||
937 | (*result) = unser; | ||
938 | return TRUE; | ||
939 | bail: | ||
940 | return FALSE; | ||
941 | } | ||
942 | |||
943 | gboolean | ||
944 | unserialize_version0sourceinfo (SerialSource *source, SerialVersion0SourceInfo** result) | ||
945 | { | ||
946 | if ( (* source->source_type) (source, TRUE) != ST_Version0SourceInfo) goto bail; | ||
947 | if (! unserialize_version0sourceinfo_internal (source, result)) goto bail; | ||
948 | if (! serializeio_source_object_received (source)) goto bail; | ||
949 | return TRUE; | ||
950 | bail: | ||
951 | return FALSE; | ||
952 | } | ||
953 | |||
954 | /* Version0Control Print | ||
955 | */ | ||
956 | |||
957 | void | ||
958 | serializeio_print_version0control_obj (SerialVersion0Control* obj, guint indent_spaces) { | ||
959 | print_spaces (indent_spaces); | ||
960 | g_print ("[ST_Version0Control]\n"); | ||
961 | print_spaces (indent_spaces); | ||
962 | g_print ("normalized = "); | ||
963 | g_print ("%s\n", obj->normalized ? "true" : "false"); | ||
964 | print_spaces (indent_spaces); | ||
965 | g_print ("data_len = "); | ||
966 | g_print ("%d\n", obj->data_len); | ||
967 | print_spaces (indent_spaces); | ||
968 | g_print ("to_info = "); | ||
969 | g_print ("{\n"); | ||
970 | serializeio_print_version0sourceinfo_obj (& obj->to_info, indent_spaces + 2); | ||
971 | print_spaces (indent_spaces); | ||
972 | ; | ||
973 | g_print ("}\n"); | ||
974 | print_spaces (indent_spaces); | ||
975 | g_print ("source_info = "); | ||
976 | g_print ("{\n"); | ||
977 | { | ||
978 | gint i; | ||
979 | for (i = 0; i < obj->source_info_len; i += 1) | ||
980 | { | ||
981 | print_spaces (indent_spaces); | ||
982 | g_print ("%d:\n", i); | ||
983 | print_spaces (indent_spaces); | ||
984 | serializeio_print_version0sourceinfo_obj ((obj->source_info[i]), indent_spaces + 2); | ||
985 | print_spaces (indent_spaces); | ||
986 | ; | ||
987 | } | ||
988 | } | ||
989 | g_print ("}\n"); | ||
990 | print_spaces (indent_spaces); | ||
991 | g_print ("inst = "); | ||
992 | g_print ("{\n"); | ||
993 | { | ||
994 | gint i; | ||
995 | for (i = 0; i < obj->inst_len; i += 1) | ||
996 | { | ||
997 | print_spaces (indent_spaces); | ||
998 | g_print ("%d:\n", i); | ||
999 | print_spaces (indent_spaces); | ||
1000 | serializeio_print_version0instruction_obj (& (obj->inst[i]), indent_spaces + 2); | ||
1001 | print_spaces (indent_spaces); | ||
1002 | ; | ||
1003 | } | ||
1004 | } | ||
1005 | g_print ("}\n"); | ||
1006 | } | ||
1007 | |||
1008 | /* Version0Control Serialize | ||
1009 | */ | ||
1010 | |||
1011 | gboolean | ||
1012 | serialize_version0control_internal (SerialSink *sink, gboolean normalized, guint32 data_len, SerialVersion0SourceInfo const* to_info, guint32 source_info_len, SerialVersion0SourceInfo* const* source_info, guint32 inst_len, SerialVersion0Instruction const* inst) | ||
1013 | { | ||
1014 | if (! (* sink->next_bool) (sink, normalized)) goto bail; | ||
1015 | if (! (* sink->next_uint) (sink, data_len)) goto bail; | ||
1016 | if (! serialize_version0sourceinfo_internal (sink, to_info->md5, to_info->real_md5, to_info->length)) goto bail; | ||
1017 | { | ||
1018 | gint i; | ||
1019 | if (! (* sink->next_uint) (sink, source_info_len)) goto bail; | ||
1020 | for (i = 0; i < source_info_len; i += 1) | ||
1021 | { | ||
1022 | if (! serialize_version0sourceinfo_internal (sink, (source_info[i])->md5, (source_info[i])->real_md5, (source_info[i])->length)) goto bail; | ||
1023 | } | ||
1024 | } | ||
1025 | { | ||
1026 | gint i; | ||
1027 | if (! (* sink->next_uint) (sink, inst_len)) goto bail; | ||
1028 | for (i = 0; i < inst_len; i += 1) | ||
1029 | { | ||
1030 | if (! serialize_version0instruction_internal (sink, (inst[i]).offset, (inst[i]).length)) goto bail; | ||
1031 | } | ||
1032 | } | ||
1033 | return TRUE; | ||
1034 | bail: | ||
1035 | return FALSE; | ||
1036 | } | ||
1037 | |||
1038 | gboolean | ||
1039 | serialize_version0control_obj_internal (SerialSink *sink, SerialVersion0Control* obj) | ||
1040 | { | ||
1041 | return serialize_version0control_internal (sink, obj->normalized, obj->data_len, &obj->to_info, obj->source_info_len, obj->source_info, obj->inst_len, obj->inst); | ||
1042 | } | ||
1043 | |||
1044 | gboolean | ||
1045 | serialize_version0control (SerialSink *sink, gboolean normalized, guint32 data_len, SerialVersion0SourceInfo const* to_info, guint32 source_info_len, SerialVersion0SourceInfo* const* source_info, guint32 inst_len, SerialVersion0Instruction const* inst) | ||
1046 | { | ||
1047 | if (! (* sink->sink_type) (sink, ST_Version0Control, serializeio_count_version0control (normalized, data_len, to_info, source_info_len, source_info, inst_len, inst), TRUE)) goto bail; | ||
1048 | if (! serialize_version0control_internal (sink, normalized, data_len, to_info, source_info_len, source_info, inst_len, inst)) goto bail; | ||
1049 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
1050 | return TRUE; | ||
1051 | bail: | ||
1052 | return FALSE; | ||
1053 | } | ||
1054 | |||
1055 | gboolean | ||
1056 | serialize_version0control_obj (SerialSink *sink, const SerialVersion0Control* obj) { | ||
1057 | |||
1058 | return serialize_version0control (sink, obj->normalized, obj->data_len, &obj->to_info, obj->source_info_len, obj->source_info, obj->inst_len, obj->inst); | ||
1059 | } | ||
1060 | |||
1061 | /* Version0Control Unserialize | ||
1062 | */ | ||
1063 | |||
1064 | gboolean | ||
1065 | unserialize_version0control_internal_noalloc (SerialSource *source, SerialVersion0Control* result) | ||
1066 | { | ||
1067 | if (! (* source->next_bool) (source, &result->normalized)) goto bail; | ||
1068 | if (! (* source->next_uint) (source, &result->data_len)) goto bail; | ||
1069 | if (! unserialize_version0sourceinfo_internal_noalloc (source, &result->to_info)) goto bail; | ||
1070 | { | ||
1071 | gint i; | ||
1072 | if (! (* source->next_uint) (source, &result->source_info_len)) goto bail; | ||
1073 | if (! (result->source_info = serializeio_source_alloc (source, sizeof (SerialVersion0SourceInfo*) * result->source_info_len))) goto bail; | ||
1074 | for (i = 0; i < result->source_info_len; i += 1) | ||
1075 | { | ||
1076 | if (! unserialize_version0sourceinfo_internal (source, &(result->source_info[i]))) goto bail; | ||
1077 | } | ||
1078 | } | ||
1079 | { | ||
1080 | gint i; | ||
1081 | if (! (* source->next_uint) (source, &result->inst_len)) goto bail; | ||
1082 | if (! (result->inst = serializeio_source_alloc (source, sizeof (SerialVersion0Instruction) * result->inst_len))) goto bail; | ||
1083 | for (i = 0; i < result->inst_len; i += 1) | ||
1084 | { | ||
1085 | if (! unserialize_version0instruction_internal_noalloc (source, &(result->inst[i]))) goto bail; | ||
1086 | } | ||
1087 | } | ||
1088 | return TRUE; | ||
1089 | bail: | ||
1090 | return FALSE; | ||
1091 | } | ||
1092 | |||
1093 | gboolean | ||
1094 | unserialize_version0control_internal (SerialSource *source, SerialVersion0Control** result) | ||
1095 | { | ||
1096 | SerialVersion0Control* unser; | ||
1097 | (*result) = NULL; | ||
1098 | unser = serializeio_source_alloc (source, sizeof (SerialVersion0Control)); | ||
1099 | if (! unser) goto bail; | ||
1100 | if (! unserialize_version0control_internal_noalloc (source, unser)) goto bail; | ||
1101 | (*result) = unser; | ||
1102 | return TRUE; | ||
1103 | bail: | ||
1104 | return FALSE; | ||
1105 | } | ||
1106 | |||
1107 | gboolean | ||
1108 | unserialize_version0control (SerialSource *source, SerialVersion0Control** result) | ||
1109 | { | ||
1110 | if ( (* source->source_type) (source, TRUE) != ST_Version0Control) goto bail; | ||
1111 | if (! unserialize_version0control_internal (source, result)) goto bail; | ||
1112 | if (! serializeio_source_object_received (source)) goto bail; | ||
1113 | return TRUE; | ||
1114 | bail: | ||
1115 | return FALSE; | ||
1116 | } | ||
1117 | |||
1118 | /* Version0Instruction Print | ||
1119 | */ | ||
1120 | |||
1121 | void | ||
1122 | serializeio_print_version0instruction_obj (SerialVersion0Instruction* obj, guint indent_spaces) { | ||
1123 | print_spaces (indent_spaces); | ||
1124 | g_print ("[ST_Version0Instruction]\n"); | ||
1125 | print_spaces (indent_spaces); | ||
1126 | g_print ("offset = "); | ||
1127 | g_print ("%d\n", obj->offset); | ||
1128 | print_spaces (indent_spaces); | ||
1129 | g_print ("length = "); | ||
1130 | g_print ("%d\n", obj->length); | ||
1131 | } | ||
1132 | |||
1133 | /* Version0Instruction Serialize | ||
1134 | */ | ||
1135 | |||
1136 | gboolean | ||
1137 | serialize_version0instruction_internal (SerialSink *sink, guint32 offset, guint32 length) | ||
1138 | { | ||
1139 | if (! (* sink->next_uint) (sink, offset)) goto bail; | ||
1140 | if (! (* sink->next_uint) (sink, length)) goto bail; | ||
1141 | return TRUE; | ||
1142 | bail: | ||
1143 | return FALSE; | ||
1144 | } | ||
1145 | |||
1146 | gboolean | ||
1147 | serialize_version0instruction_obj_internal (SerialSink *sink, SerialVersion0Instruction* obj) | ||
1148 | { | ||
1149 | return serialize_version0instruction_internal (sink, obj->offset, obj->length); | ||
1150 | } | ||
1151 | |||
1152 | gboolean | ||
1153 | serialize_version0instruction (SerialSink *sink, guint32 offset, guint32 length) | ||
1154 | { | ||
1155 | if (! (* sink->sink_type) (sink, ST_Version0Instruction, serializeio_count_version0instruction (offset, length), TRUE)) goto bail; | ||
1156 | if (! serialize_version0instruction_internal (sink, offset, length)) goto bail; | ||
1157 | if (sink->sink_quantum && ! sink->sink_quantum (sink)) goto bail; | ||
1158 | return TRUE; | ||
1159 | bail: | ||
1160 | return FALSE; | ||
1161 | } | ||
1162 | |||
1163 | gboolean | ||
1164 | serialize_version0instruction_obj (SerialSink *sink, const SerialVersion0Instruction* obj) { | ||
1165 | |||
1166 | return serialize_version0instruction (sink, obj->offset, obj->length); | ||
1167 | } | ||
1168 | |||
1169 | /* Version0Instruction Unserialize | ||
1170 | */ | ||
1171 | |||
1172 | gboolean | ||
1173 | unserialize_version0instruction_internal_noalloc (SerialSource *source, SerialVersion0Instruction* result) | ||
1174 | { | ||
1175 | if (! (* source->next_uint) (source, &result->offset)) goto bail; | ||
1176 | if (! (* source->next_uint) (source, &result->length)) goto bail; | ||
1177 | return TRUE; | ||
1178 | bail: | ||
1179 | return FALSE; | ||
1180 | } | ||
1181 | |||
1182 | gboolean | ||
1183 | unserialize_version0instruction_internal (SerialSource *source, SerialVersion0Instruction** result) | ||
1184 | { | ||
1185 | SerialVersion0Instruction* unser; | ||
1186 | (*result) = NULL; | ||
1187 | unser = serializeio_source_alloc (source, sizeof (SerialVersion0Instruction)); | ||
1188 | if (! unser) goto bail; | ||
1189 | if (! unserialize_version0instruction_internal_noalloc (source, unser)) goto bail; | ||
1190 | (*result) = unser; | ||
1191 | return TRUE; | ||
1192 | bail: | ||
1193 | return FALSE; | ||
1194 | } | ||
1195 | |||
1196 | gboolean | ||
1197 | unserialize_version0instruction (SerialSource *source, SerialVersion0Instruction** result) | ||
1198 | { | ||
1199 | if ( (* source->source_type) (source, TRUE) != ST_Version0Instruction) goto bail; | ||
1200 | if (! unserialize_version0instruction_internal (source, result)) goto bail; | ||
1201 | if (! serializeio_source_object_received (source)) goto bail; | ||
1202 | return TRUE; | ||
1203 | bail: | ||
1204 | return FALSE; | ||
1205 | } | ||
1206 | |||
1207 | void | ||
1208 | xd_generate_void_event_internal (XdVoidEventCode _code, const char* _srcfile, gint _srcline) | ||
1209 | { | ||
1210 | XdVoidEvent *_e = g_new0 (XdVoidEvent, 1); | ||
1211 | _e->code = _code.code; | ||
1212 | _e->srcline = _srcline; | ||
1213 | _e->srcfile = _srcfile; | ||
1214 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
1215 | } | ||
1216 | |||
1217 | const XdVoidEventCode EC_XdTooFewSources = { EC_XdTooFewSourcesValue }; | ||
1218 | |||
1219 | const XdVoidEventCode EC_XdTooManySources = { EC_XdTooManySourcesValue }; | ||
1220 | |||
1221 | void | ||
1222 | xd_generate_int_event_internal (XdIntEventCode _code, const char* _srcfile, gint _srcline, int index) | ||
1223 | { | ||
1224 | XdIntEvent *_e = g_new0 (XdIntEvent, 1); | ||
1225 | _e->code = _code.code; | ||
1226 | _e->srcline = _srcline; | ||
1227 | _e->srcfile = _srcfile; | ||
1228 | _e->index = index; | ||
1229 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
1230 | } | ||
1231 | |||
1232 | const char* | ||
1233 | Xd_Int_event_field_to_string (GenericEvent* ev, gint field) | ||
1234 | { | ||
1235 | XdIntEvent* it = (XdIntEvent*) ev; | ||
1236 | switch (field) | ||
1237 | { | ||
1238 | case 0: return eventdelivery_int_to_string (it->index); | ||
1239 | default: abort (); | ||
1240 | } | ||
1241 | } | ||
1242 | |||
1243 | const XdIntEventCode EC_XdOutOfRangeSourceIndex = { EC_XdOutOfRangeSourceIndexValue }; | ||
1244 | |||
1245 | const XdVoidEventCode EC_XdInvalidControl = { EC_XdInvalidControlValue }; | ||
1246 | |||
1247 | const XdVoidEventCode EC_XdInvalidRsyncCache = { EC_XdInvalidRsyncCacheValue }; | ||
1248 | |||
1249 | const XdVoidEventCode EC_XdIncompatibleDelta = { EC_XdIncompatibleDeltaValue }; | ||
1250 | |||
1251 | void | ||
1252 | xd_generate_handlestringstring_event_internal (XdHandleStringStringEventCode _code, const char* _srcfile, gint _srcline, FileHandle* stream, const char* expected, const char* received) | ||
1253 | { | ||
1254 | XdHandleStringStringEvent *_e = g_new0 (XdHandleStringStringEvent, 1); | ||
1255 | _e->code = _code.code; | ||
1256 | _e->srcline = _srcline; | ||
1257 | _e->srcfile = _srcfile; | ||
1258 | _e->stream = stream; | ||
1259 | _e->expected = expected; | ||
1260 | _e->received = received; | ||
1261 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
1262 | } | ||
1263 | |||
1264 | const char* | ||
1265 | Xd_HandleStringString_event_field_to_string (GenericEvent* ev, gint field) | ||
1266 | { | ||
1267 | XdHandleStringStringEvent* it = (XdHandleStringStringEvent*) ev; | ||
1268 | switch (field) | ||
1269 | { | ||
1270 | case 0: return eventdelivery_handle_to_string (it->stream); | ||
1271 | case 1: return eventdelivery_string_to_string (it->expected); | ||
1272 | case 2: return eventdelivery_string_to_string (it->received); | ||
1273 | default: abort (); | ||
1274 | } | ||
1275 | } | ||
1276 | |||
1277 | const XdHandleStringStringEventCode EC_XdStreamChecksumFailed = { EC_XdStreamChecksumFailedValue }; | ||
1278 | |||
1279 | void | ||
1280 | xd_generate_handleintint_event_internal (XdHandleIntIntEventCode _code, const char* _srcfile, gint _srcline, FileHandle* stream, int expected, int received) | ||
1281 | { | ||
1282 | XdHandleIntIntEvent *_e = g_new0 (XdHandleIntIntEvent, 1); | ||
1283 | _e->code = _code.code; | ||
1284 | _e->srcline = _srcline; | ||
1285 | _e->srcfile = _srcfile; | ||
1286 | _e->stream = stream; | ||
1287 | _e->expected = expected; | ||
1288 | _e->received = received; | ||
1289 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
1290 | } | ||
1291 | |||
1292 | const char* | ||
1293 | Xd_HandleIntInt_event_field_to_string (GenericEvent* ev, gint field) | ||
1294 | { | ||
1295 | XdHandleIntIntEvent* it = (XdHandleIntIntEvent*) ev; | ||
1296 | switch (field) | ||
1297 | { | ||
1298 | case 0: return eventdelivery_handle_to_string (it->stream); | ||
1299 | case 1: return eventdelivery_int_to_string (it->expected); | ||
1300 | case 2: return eventdelivery_int_to_string (it->received); | ||
1301 | default: abort (); | ||
1302 | } | ||
1303 | } | ||
1304 | |||
1305 | const XdHandleIntIntEventCode EC_XdStreamLengthFailed = { EC_XdStreamLengthFailedValue }; | ||
1306 | |||
1307 | void | ||
1308 | xd_generate_string_event_internal (XdStringEventCode _code, const char* _srcfile, gint _srcline, const char* version) | ||
1309 | { | ||
1310 | XdStringEvent *_e = g_new0 (XdStringEvent, 1); | ||
1311 | _e->code = _code.code; | ||
1312 | _e->srcline = _srcline; | ||
1313 | _e->srcfile = _srcfile; | ||
1314 | _e->version = version; | ||
1315 | eventdelivery_event_deliver ((GenericEvent*) _e); | ||
1316 | } | ||
1317 | |||
1318 | const char* | ||
1319 | Xd_String_event_field_to_string (GenericEvent* ev, gint field) | ||
1320 | { | ||
1321 | XdStringEvent* it = (XdStringEvent*) ev; | ||
1322 | switch (field) | ||
1323 | { | ||
1324 | case 0: return eventdelivery_string_to_string (it->version); | ||
1325 | default: abort (); | ||
1326 | } | ||
1327 | } | ||
1328 | |||
1329 | const XdStringEventCode EC_XdBackwardCompatibilityMode = { EC_XdBackwardCompatibilityModeValue }; | ||
1330 | |||
diff --git a/xdelta1/xd_edsio.h b/xdelta1/xd_edsio.h deleted file mode 100755 index b10b7b9..0000000 --- a/xdelta1/xd_edsio.h +++ /dev/null | |||
@@ -1,401 +0,0 @@ | |||
1 | /* -*-Mode: C;-*- | ||
2 | * Copyright (C) 1997, 1998, 1999 Josh MacDonald | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | * | ||
18 | * Author: Josh MacDonald <jmacd@CS.Berkeley.EDU> | ||
19 | * | ||
20 | * This file was AUTOMATICALLY GENERATED using: | ||
21 | * | ||
22 | * $Id: edsio.el 1.16 Tue, 06 Apr 1999 23:40:10 -0700 jmacd $ | ||
23 | */ | ||
24 | |||
25 | #include "edsio.h" | ||
26 | |||
27 | #include "xdelta.h" | ||
28 | |||
29 | #ifndef _XD_EDSIO_H_ | ||
30 | #define _XD_EDSIO_H_ | ||
31 | |||
32 | #ifdef __cplusplus | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
36 | #include "edsio_edsio.h" | ||
37 | |||
38 | /* Initialize this library. */ | ||
39 | |||
40 | gboolean xd_edsio_init (void); | ||
41 | |||
42 | /* Types defined here. */ | ||
43 | |||
44 | /* XdStringEventCode. | ||
45 | */ | ||
46 | |||
47 | typedef struct _XdStringEventCode XdStringEventCode; | ||
48 | struct _XdStringEventCode { gint code; }; | ||
49 | |||
50 | typedef struct _XdStringEvent XdStringEvent; | ||
51 | struct _XdStringEvent { gint code; const char* srcfile; guint srcline; const char* version; }; | ||
52 | |||
53 | /* XdHandleIntIntEventCode. | ||
54 | */ | ||
55 | |||
56 | typedef struct _XdHandleIntIntEventCode XdHandleIntIntEventCode; | ||
57 | struct _XdHandleIntIntEventCode { gint code; }; | ||
58 | |||
59 | typedef struct _XdHandleIntIntEvent XdHandleIntIntEvent; | ||
60 | struct _XdHandleIntIntEvent { gint code; const char* srcfile; guint srcline; FileHandle* stream; int expected; int received; }; | ||
61 | |||
62 | /* XdHandleStringStringEventCode. | ||
63 | */ | ||
64 | |||
65 | typedef struct _XdHandleStringStringEventCode XdHandleStringStringEventCode; | ||
66 | struct _XdHandleStringStringEventCode { gint code; }; | ||
67 | |||
68 | typedef struct _XdHandleStringStringEvent XdHandleStringStringEvent; | ||
69 | struct _XdHandleStringStringEvent { gint code; const char* srcfile; guint srcline; FileHandle* stream; const char* expected; const char* received; }; | ||
70 | |||
71 | /* XdIntEventCode. | ||
72 | */ | ||
73 | |||
74 | typedef struct _XdIntEventCode XdIntEventCode; | ||
75 | struct _XdIntEventCode { gint code; }; | ||
76 | |||
77 | typedef struct _XdIntEvent XdIntEvent; | ||
78 | struct _XdIntEvent { gint code; const char* srcfile; guint srcline; int index; }; | ||
79 | |||
80 | /* XdVoidEventCode. | ||
81 | */ | ||
82 | |||
83 | typedef struct _XdVoidEventCode XdVoidEventCode; | ||
84 | struct _XdVoidEventCode { gint code; }; | ||
85 | |||
86 | typedef struct _XdVoidEvent XdVoidEvent; | ||
87 | struct _XdVoidEvent { gint code; const char* srcfile; guint srcline; }; | ||
88 | |||
89 | typedef struct _SerialVersion0Instruction SerialVersion0Instruction; | ||
90 | typedef struct _SerialVersion0Control SerialVersion0Control; | ||
91 | typedef struct _SerialVersion0SourceInfo SerialVersion0SourceInfo; | ||
92 | typedef struct _SerialRsyncIndex SerialRsyncIndex; | ||
93 | typedef struct _SerialRsyncIndexElt SerialRsyncIndexElt; | ||
94 | typedef struct _SerialXdeltaInstruction SerialXdeltaInstruction; | ||
95 | typedef struct _SerialXdeltaControl SerialXdeltaControl; | ||
96 | typedef struct _SerialXdeltaSourceInfo SerialXdeltaSourceInfo; | ||
97 | typedef struct _SerialXdeltaIndex SerialXdeltaIndex; | ||
98 | typedef struct _SerialXdeltaChecksum SerialXdeltaChecksum; | ||
99 | /* Functions declared here. */ | ||
100 | |||
101 | /* Serial Types */ | ||
102 | |||
103 | enum _SerialXdType { | ||
104 | |||
105 | ST_XdeltaChecksum = (1<<(1+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
106 | ST_XdeltaIndex = (1<<(2+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
107 | ST_XdeltaSourceInfo = (1<<(3+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
108 | ST_XdeltaControl = (1<<(7+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
109 | ST_XdeltaInstruction = (1<<(8+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
110 | ST_RsyncIndexElt = (1<<(9+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
111 | ST_RsyncIndex = (1<<(10+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
112 | ST_Version0SourceInfo = (1<<(4+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
113 | ST_Version0Control = (1<<(5+EDSIO_LIBRARY_OFFSET_BITS))+3, | ||
114 | ST_Version0Instruction = (1<<(6+EDSIO_LIBRARY_OFFSET_BITS))+3 | ||
115 | }; | ||
116 | |||
117 | |||
118 | |||
119 | /* XdeltaChecksum Structure | ||
120 | */ | ||
121 | |||
122 | struct _SerialXdeltaChecksum { | ||
123 | guint16 high; | ||
124 | guint16 low; | ||
125 | }; | ||
126 | |||
127 | void serializeio_print_xdeltachecksum_obj (SerialXdeltaChecksum* obj, guint indent_spaces); | ||
128 | |||
129 | gboolean unserialize_xdeltachecksum (SerialSource *source, SerialXdeltaChecksum**); | ||
130 | gboolean unserialize_xdeltachecksum_internal (SerialSource *source, SerialXdeltaChecksum** ); | ||
131 | gboolean unserialize_xdeltachecksum_internal_noalloc (SerialSource *source, SerialXdeltaChecksum* ); | ||
132 | gboolean serialize_xdeltachecksum (SerialSink *sink, guint16 high, guint16 low); | ||
133 | gboolean serialize_xdeltachecksum_obj (SerialSink *sink, const SerialXdeltaChecksum* obj); | ||
134 | gboolean serialize_xdeltachecksum_internal (SerialSink *sink, guint16 high, guint16 low); | ||
135 | gboolean serialize_xdeltachecksum_obj_internal (SerialSink *sink, SerialXdeltaChecksum* obj); | ||
136 | guint serializeio_count_xdeltachecksum (guint16 high, guint16 low); | ||
137 | guint serializeio_count_xdeltachecksum_obj (SerialXdeltaChecksum const* obj); | ||
138 | |||
139 | /* XdeltaIndex Structure | ||
140 | */ | ||
141 | |||
142 | struct _SerialXdeltaIndex { | ||
143 | guint32 file_len; | ||
144 | guint8 file_md5[16]; | ||
145 | guint32 index_len; | ||
146 | SerialXdeltaChecksum* index; | ||
147 | }; | ||
148 | |||
149 | void serializeio_print_xdeltaindex_obj (SerialXdeltaIndex* obj, guint indent_spaces); | ||
150 | |||
151 | gboolean unserialize_xdeltaindex (SerialSource *source, SerialXdeltaIndex**); | ||
152 | gboolean unserialize_xdeltaindex_internal (SerialSource *source, SerialXdeltaIndex** ); | ||
153 | gboolean unserialize_xdeltaindex_internal_noalloc (SerialSource *source, SerialXdeltaIndex* ); | ||
154 | gboolean serialize_xdeltaindex (SerialSink *sink, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialXdeltaChecksum const* index); | ||
155 | gboolean serialize_xdeltaindex_obj (SerialSink *sink, const SerialXdeltaIndex* obj); | ||
156 | gboolean serialize_xdeltaindex_internal (SerialSink *sink, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialXdeltaChecksum const* index); | ||
157 | gboolean serialize_xdeltaindex_obj_internal (SerialSink *sink, SerialXdeltaIndex* obj); | ||
158 | guint serializeio_count_xdeltaindex (guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialXdeltaChecksum const* index); | ||
159 | guint serializeio_count_xdeltaindex_obj (SerialXdeltaIndex const* obj); | ||
160 | |||
161 | /* XdeltaSourceInfo Structure | ||
162 | */ | ||
163 | |||
164 | struct _SerialXdeltaSourceInfo { | ||
165 | const gchar* name; | ||
166 | guint8 md5[16]; | ||
167 | guint32 len; | ||
168 | gboolean isdata; | ||
169 | gboolean sequential; | ||
170 | guint32 position; | ||
171 | guint32 copies; | ||
172 | guint32 copy_length; | ||
173 | FileHandle *in; | ||
174 | }; | ||
175 | |||
176 | void serializeio_print_xdeltasourceinfo_obj (SerialXdeltaSourceInfo* obj, guint indent_spaces); | ||
177 | |||
178 | gboolean unserialize_xdeltasourceinfo (SerialSource *source, SerialXdeltaSourceInfo**); | ||
179 | gboolean unserialize_xdeltasourceinfo_internal (SerialSource *source, SerialXdeltaSourceInfo** ); | ||
180 | gboolean unserialize_xdeltasourceinfo_internal_noalloc (SerialSource *source, SerialXdeltaSourceInfo* ); | ||
181 | gboolean serialize_xdeltasourceinfo (SerialSink *sink, const gchar* name, const guint8 md5[16], guint32 len, gboolean isdata, gboolean sequential); | ||
182 | gboolean serialize_xdeltasourceinfo_obj (SerialSink *sink, const SerialXdeltaSourceInfo* obj); | ||
183 | gboolean serialize_xdeltasourceinfo_internal (SerialSink *sink, const gchar* name, const guint8 md5[16], guint32 len, gboolean isdata, gboolean sequential); | ||
184 | gboolean serialize_xdeltasourceinfo_obj_internal (SerialSink *sink, SerialXdeltaSourceInfo* obj); | ||
185 | guint serializeio_count_xdeltasourceinfo (const gchar* name, const guint8 md5[16], guint32 len, gboolean isdata, gboolean sequential); | ||
186 | guint serializeio_count_xdeltasourceinfo_obj (SerialXdeltaSourceInfo const* obj); | ||
187 | |||
188 | /* XdeltaControl Structure | ||
189 | */ | ||
190 | |||
191 | struct _SerialXdeltaControl { | ||
192 | guint8 to_md5[16]; | ||
193 | guint32 to_len; | ||
194 | gboolean has_data; | ||
195 | guint32 source_info_len; | ||
196 | SerialXdeltaSourceInfo** source_info; | ||
197 | guint32 inst_len; | ||
198 | SerialXdeltaInstruction* inst; | ||
199 | GArray *inst_array; | ||
200 | GPtrArray *source_info_array; | ||
201 | }; | ||
202 | |||
203 | void serializeio_print_xdeltacontrol_obj (SerialXdeltaControl* obj, guint indent_spaces); | ||
204 | |||
205 | gboolean unserialize_xdeltacontrol (SerialSource *source, SerialXdeltaControl**); | ||
206 | gboolean unserialize_xdeltacontrol_internal (SerialSource *source, SerialXdeltaControl** ); | ||
207 | gboolean unserialize_xdeltacontrol_internal_noalloc (SerialSource *source, SerialXdeltaControl* ); | ||
208 | gboolean serialize_xdeltacontrol (SerialSink *sink, const guint8 to_md5[16], guint32 to_len, gboolean has_data, guint32 source_info_len, SerialXdeltaSourceInfo* const* source_info, guint32 inst_len, SerialXdeltaInstruction const* inst); | ||
209 | gboolean serialize_xdeltacontrol_obj (SerialSink *sink, const SerialXdeltaControl* obj); | ||
210 | gboolean serialize_xdeltacontrol_internal (SerialSink *sink, const guint8 to_md5[16], guint32 to_len, gboolean has_data, guint32 source_info_len, SerialXdeltaSourceInfo* const* source_info, guint32 inst_len, SerialXdeltaInstruction const* inst); | ||
211 | gboolean serialize_xdeltacontrol_obj_internal (SerialSink *sink, SerialXdeltaControl* obj); | ||
212 | guint serializeio_count_xdeltacontrol (const guint8 to_md5[16], guint32 to_len, gboolean has_data, guint32 source_info_len, SerialXdeltaSourceInfo* const* source_info, guint32 inst_len, SerialXdeltaInstruction const* inst); | ||
213 | guint serializeio_count_xdeltacontrol_obj (SerialXdeltaControl const* obj); | ||
214 | |||
215 | /* XdeltaInstruction Structure | ||
216 | */ | ||
217 | |||
218 | struct _SerialXdeltaInstruction { | ||
219 | guint32 index; | ||
220 | guint32 offset; | ||
221 | guint32 length; | ||
222 | guint32 output_start; | ||
223 | }; | ||
224 | |||
225 | void serializeio_print_xdeltainstruction_obj (SerialXdeltaInstruction* obj, guint indent_spaces); | ||
226 | |||
227 | gboolean unserialize_xdeltainstruction (SerialSource *source, SerialXdeltaInstruction**); | ||
228 | gboolean unserialize_xdeltainstruction_internal (SerialSource *source, SerialXdeltaInstruction** ); | ||
229 | gboolean unserialize_xdeltainstruction_internal_noalloc (SerialSource *source, SerialXdeltaInstruction* ); | ||
230 | gboolean serialize_xdeltainstruction (SerialSink *sink, guint32 index, guint32 offset, guint32 length); | ||
231 | gboolean serialize_xdeltainstruction_obj (SerialSink *sink, const SerialXdeltaInstruction* obj); | ||
232 | gboolean serialize_xdeltainstruction_internal (SerialSink *sink, guint32 index, guint32 offset, guint32 length); | ||
233 | gboolean serialize_xdeltainstruction_obj_internal (SerialSink *sink, SerialXdeltaInstruction* obj); | ||
234 | guint serializeio_count_xdeltainstruction (guint32 index, guint32 offset, guint32 length); | ||
235 | guint serializeio_count_xdeltainstruction_obj (SerialXdeltaInstruction const* obj); | ||
236 | |||
237 | /* RsyncIndexElt Structure | ||
238 | */ | ||
239 | |||
240 | struct _SerialRsyncIndexElt { | ||
241 | guint8 md5[16]; | ||
242 | SerialXdeltaChecksum cksum; | ||
243 | SerialRsyncIndexElt* next; | ||
244 | gint match_offset; | ||
245 | }; | ||
246 | |||
247 | void serializeio_print_rsyncindexelt_obj (SerialRsyncIndexElt* obj, guint indent_spaces); | ||
248 | |||
249 | gboolean unserialize_rsyncindexelt (SerialSource *source, SerialRsyncIndexElt**); | ||
250 | gboolean unserialize_rsyncindexelt_internal (SerialSource *source, SerialRsyncIndexElt** ); | ||
251 | gboolean unserialize_rsyncindexelt_internal_noalloc (SerialSource *source, SerialRsyncIndexElt* ); | ||
252 | gboolean serialize_rsyncindexelt (SerialSink *sink, const guint8 md5[16], SerialXdeltaChecksum const* cksum); | ||
253 | gboolean serialize_rsyncindexelt_obj (SerialSink *sink, const SerialRsyncIndexElt* obj); | ||
254 | gboolean serialize_rsyncindexelt_internal (SerialSink *sink, const guint8 md5[16], SerialXdeltaChecksum const* cksum); | ||
255 | gboolean serialize_rsyncindexelt_obj_internal (SerialSink *sink, SerialRsyncIndexElt* obj); | ||
256 | guint serializeio_count_rsyncindexelt (const guint8 md5[16], SerialXdeltaChecksum const* cksum); | ||
257 | guint serializeio_count_rsyncindexelt_obj (SerialRsyncIndexElt const* obj); | ||
258 | |||
259 | /* RsyncIndex Structure | ||
260 | */ | ||
261 | |||
262 | struct _SerialRsyncIndex { | ||
263 | guint32 seg_len; | ||
264 | guint32 file_len; | ||
265 | guint8 file_md5[16]; | ||
266 | guint32 index_len; | ||
267 | SerialRsyncIndexElt* index; | ||
268 | SerialRsyncIndexElt** table; | ||
269 | guint table_size; | ||
270 | }; | ||
271 | |||
272 | void serializeio_print_rsyncindex_obj (SerialRsyncIndex* obj, guint indent_spaces); | ||
273 | |||
274 | gboolean unserialize_rsyncindex (SerialSource *source, SerialRsyncIndex**); | ||
275 | gboolean unserialize_rsyncindex_internal (SerialSource *source, SerialRsyncIndex** ); | ||
276 | gboolean unserialize_rsyncindex_internal_noalloc (SerialSource *source, SerialRsyncIndex* ); | ||
277 | gboolean serialize_rsyncindex (SerialSink *sink, guint32 seg_len, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialRsyncIndexElt const* index); | ||
278 | gboolean serialize_rsyncindex_obj (SerialSink *sink, const SerialRsyncIndex* obj); | ||
279 | gboolean serialize_rsyncindex_internal (SerialSink *sink, guint32 seg_len, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialRsyncIndexElt const* index); | ||
280 | gboolean serialize_rsyncindex_obj_internal (SerialSink *sink, SerialRsyncIndex* obj); | ||
281 | guint serializeio_count_rsyncindex (guint32 seg_len, guint32 file_len, const guint8 file_md5[16], guint32 index_len, SerialRsyncIndexElt const* index); | ||
282 | guint serializeio_count_rsyncindex_obj (SerialRsyncIndex const* obj); | ||
283 | |||
284 | /* Version0SourceInfo Structure | ||
285 | */ | ||
286 | |||
287 | struct _SerialVersion0SourceInfo { | ||
288 | guint8 md5[16]; | ||
289 | guint8 real_md5[16]; | ||
290 | guint32 length; | ||
291 | }; | ||
292 | |||
293 | void serializeio_print_version0sourceinfo_obj (SerialVersion0SourceInfo* obj, guint indent_spaces); | ||
294 | |||
295 | gboolean unserialize_version0sourceinfo (SerialSource *source, SerialVersion0SourceInfo**); | ||
296 | gboolean unserialize_version0sourceinfo_internal (SerialSource *source, SerialVersion0SourceInfo** ); | ||
297 | gboolean unserialize_version0sourceinfo_internal_noalloc (SerialSource *source, SerialVersion0SourceInfo* ); | ||
298 | gboolean serialize_version0sourceinfo (SerialSink *sink, const guint8 md5[16], const guint8 real_md5[16], guint32 length); | ||
299 | gboolean serialize_version0sourceinfo_obj (SerialSink *sink, const SerialVersion0SourceInfo* obj); | ||
300 | gboolean serialize_version0sourceinfo_internal (SerialSink *sink, const guint8 md5[16], const guint8 real_md5[16], guint32 length); | ||
301 | gboolean serialize_version0sourceinfo_obj_internal (SerialSink *sink, SerialVersion0SourceInfo* obj); | ||
302 | guint serializeio_count_version0sourceinfo (const guint8 md5[16], const guint8 real_md5[16], guint32 length); | ||
303 | guint serializeio_count_version0sourceinfo_obj (SerialVersion0SourceInfo const* obj); | ||
304 | |||
305 | /* Version0Control Structure | ||
306 | */ | ||
307 | |||
308 | struct _SerialVersion0Control { | ||
309 | gboolean normalized; | ||
310 | guint32 data_len; | ||
311 | SerialVersion0SourceInfo to_info; | ||
312 | guint32 source_info_len; | ||
313 | SerialVersion0SourceInfo** source_info; | ||
314 | guint32 inst_len; | ||
315 | SerialVersion0Instruction* inst; | ||
316 | GArray *inst_array; | ||
317 | GPtrArray *source_info_array; | ||
318 | }; | ||
319 | |||
320 | void serializeio_print_version0control_obj (SerialVersion0Control* obj, guint indent_spaces); | ||
321 | |||
322 | gboolean unserialize_version0control (SerialSource *source, SerialVersion0Control**); | ||
323 | gboolean unserialize_version0control_internal (SerialSource *source, SerialVersion0Control** ); | ||
324 | gboolean unserialize_version0control_internal_noalloc (SerialSource *source, SerialVersion0Control* ); | ||
325 | gboolean serialize_version0control (SerialSink *sink, gboolean normalized, guint32 data_len, SerialVersion0SourceInfo const* to_info, guint32 source_info_len, SerialVersion0SourceInfo* const* source_info, guint32 inst_len, SerialVersion0Instruction const* inst); | ||
326 | gboolean serialize_version0control_obj (SerialSink *sink, const SerialVersion0Control* obj); | ||
327 | gboolean serialize_version0control_internal (SerialSink *sink, gboolean normalized, guint32 data_len, SerialVersion0SourceInfo const* to_info, guint32 source_info_len, SerialVersion0SourceInfo* const* source_info, guint32 inst_len, SerialVersion0Instruction const* inst); | ||
328 | gboolean serialize_version0control_obj_internal (SerialSink *sink, SerialVersion0Control* obj); | ||
329 | guint serializeio_count_version0control (gboolean normalized, guint32 data_len, SerialVersion0SourceInfo const* to_info, guint32 source_info_len, SerialVersion0SourceInfo* const* source_info, guint32 inst_len, SerialVersion0Instruction const* inst); | ||
330 | guint serializeio_count_version0control_obj (SerialVersion0Control const* obj); | ||
331 | |||
332 | /* Version0Instruction Structure | ||
333 | */ | ||
334 | |||
335 | struct _SerialVersion0Instruction { | ||
336 | guint32 offset; | ||
337 | guint32 length; | ||
338 | guint8 type; | ||
339 | guint8 index; | ||
340 | }; | ||
341 | |||
342 | void serializeio_print_version0instruction_obj (SerialVersion0Instruction* obj, guint indent_spaces); | ||
343 | |||
344 | gboolean unserialize_version0instruction (SerialSource *source, SerialVersion0Instruction**); | ||
345 | gboolean unserialize_version0instruction_internal (SerialSource *source, SerialVersion0Instruction** ); | ||
346 | gboolean unserialize_version0instruction_internal_noalloc (SerialSource *source, SerialVersion0Instruction* ); | ||
347 | gboolean serialize_version0instruction (SerialSink *sink, guint32 offset, guint32 length); | ||
348 | gboolean serialize_version0instruction_obj (SerialSink *sink, const SerialVersion0Instruction* obj); | ||
349 | gboolean serialize_version0instruction_internal (SerialSink *sink, guint32 offset, guint32 length); | ||
350 | gboolean serialize_version0instruction_obj_internal (SerialSink *sink, SerialVersion0Instruction* obj); | ||
351 | guint serializeio_count_version0instruction (guint32 offset, guint32 length); | ||
352 | guint serializeio_count_version0instruction_obj (SerialVersion0Instruction const* obj); | ||
353 | |||
354 | void xd_generate_void_event_internal (XdVoidEventCode code, const char* srcfile, gint srcline); | ||
355 | #define xd_generate_void_event(ecode) xd_generate_void_event_internal((ecode),__FILE__,__LINE__) | ||
356 | |||
357 | extern const XdVoidEventCode EC_XdTooFewSources; | ||
358 | #define EC_XdTooFewSourcesValue ((0<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
359 | |||
360 | extern const XdVoidEventCode EC_XdTooManySources; | ||
361 | #define EC_XdTooManySourcesValue ((1<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
362 | |||
363 | void xd_generate_int_event_internal (XdIntEventCode code, const char* srcfile, gint srcline, int index); | ||
364 | #define xd_generate_int_event(ecode, index) xd_generate_int_event_internal((ecode),__FILE__,__LINE__, (index)) | ||
365 | |||
366 | extern const XdIntEventCode EC_XdOutOfRangeSourceIndex; | ||
367 | #define EC_XdOutOfRangeSourceIndexValue ((2<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
368 | |||
369 | extern const XdVoidEventCode EC_XdInvalidControl; | ||
370 | #define EC_XdInvalidControlValue ((3<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
371 | |||
372 | extern const XdVoidEventCode EC_XdInvalidRsyncCache; | ||
373 | #define EC_XdInvalidRsyncCacheValue ((4<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
374 | |||
375 | extern const XdVoidEventCode EC_XdIncompatibleDelta; | ||
376 | #define EC_XdIncompatibleDeltaValue ((5<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
377 | |||
378 | void xd_generate_handlestringstring_event_internal (XdHandleStringStringEventCode code, const char* srcfile, gint srcline, FileHandle* stream, const char* expected, const char* received); | ||
379 | #define xd_generate_handlestringstring_event(ecode, stream, expected, received) xd_generate_handlestringstring_event_internal((ecode),__FILE__,__LINE__, (stream), (expected), (received)) | ||
380 | |||
381 | extern const XdHandleStringStringEventCode EC_XdStreamChecksumFailed; | ||
382 | #define EC_XdStreamChecksumFailedValue ((6<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
383 | |||
384 | void xd_generate_handleintint_event_internal (XdHandleIntIntEventCode code, const char* srcfile, gint srcline, FileHandle* stream, int expected, int received); | ||
385 | #define xd_generate_handleintint_event(ecode, stream, expected, received) xd_generate_handleintint_event_internal((ecode),__FILE__,__LINE__, (stream), (expected), (received)) | ||
386 | |||
387 | extern const XdHandleIntIntEventCode EC_XdStreamLengthFailed; | ||
388 | #define EC_XdStreamLengthFailedValue ((7<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
389 | |||
390 | void xd_generate_string_event_internal (XdStringEventCode code, const char* srcfile, gint srcline, const char* version); | ||
391 | #define xd_generate_string_event(ecode, version) xd_generate_string_event_internal((ecode),__FILE__,__LINE__, (version)) | ||
392 | |||
393 | extern const XdStringEventCode EC_XdBackwardCompatibilityMode; | ||
394 | #define EC_XdBackwardCompatibilityModeValue ((8<<EDSIO_LIBRARY_OFFSET_BITS)+3) | ||
395 | |||
396 | #ifdef __cplusplus | ||
397 | } | ||
398 | #endif | ||
399 | |||
400 | #endif /* _XD_EDSIO_H_ */ | ||
401 | |||
diff --git a/xdelta1/xdelta.prj b/xdelta1/xdelta.prj index 02d2416..ff7eee9 100755 --- a/xdelta1/xdelta.prj +++ b/xdelta1/xdelta.prj | |||
@@ -1,11 +1,11 @@ | |||
1 | ;; -*- PRCS -*- | 1 | ;; -*- PRCS -*- |
2 | (Created-By-Prcs-Version 1 3 4) | 2 | (Created-By-Prcs-Version 1 3 4) |
3 | (Project-Description "") | 3 | (Project-Description "") |
4 | (Project-Version xdelta 1.1-maint 13) | 4 | (Project-Version xdelta 1.1-maint 14) |
5 | (Parent-Version xdelta 1.1-maint 12) | 5 | (Parent-Version xdelta 1.1-maint 13) |
6 | (Version-Log "add generated files to prcs, fix build") | 6 | (Version-Log "") |
7 | (New-Version-Log "") | 7 | (New-Version-Log "") |
8 | (Checkin-Time "Sun, 28 Jan 2007 10:02:26 -0800") | 8 | (Checkin-Time "Sun, 28 Jan 2007 11:23:01 -0800") |
9 | (Checkin-Login jmacd) | 9 | (Checkin-Login jmacd) |
10 | (Populate-Ignore ("\\.o$" | 10 | (Populate-Ignore ("\\.o$" |
11 | "\\.deps" | 11 | "\\.deps" |
@@ -90,27 +90,21 @@ | |||
90 | ;; to version 1.1-maint.10(w), by jmacd: | 90 | ;; to version 1.1-maint.10(w), by jmacd: |
91 | 91 | ||
92 | (xdelta-0.13.README (xdelta/i/0_xdelta-0.1 1.1 744)) | 92 | (xdelta-0.13.README (xdelta/i/0_xdelta-0.1 1.1 744)) |
93 | (xd_edsio.h (xdelta/i/1_xd_edsio.h 1.1 644)) | ||
94 | (xd_edsio.c (xdelta/i/2_xd_edsio.c 1.2 744)) | ||
95 | (xdelta-1.1.2.tar.gz (xdelta/i/3_xdelta-1.1 1.1 744) :no-keywords) | 93 | (xdelta-1.1.2.tar.gz (xdelta/i/3_xdelta-1.1 1.1 744) :no-keywords) |
96 | (xdelta-1.1.3.tar.gz (xdelta/i/4_xdelta-1.1 1.1 744) :no-keywords) | 94 | (xdelta-1.1.3.tar.gz (xdelta/i/4_xdelta-1.1 1.1 744) :no-keywords) |
97 | (xdelta-config (xdelta/i/5_xdelta-con 1.1 744)) | 95 | (xdelta-config (xdelta/i/5_xdelta-con 1.1 744)) |
98 | (contrib/build_hpux (xdelta/i/6_build_hpux 1.1 744)) | 96 | (contrib/build_hpux (xdelta/i/6_build_hpux 1.1 744)) |
99 | 97 | ||
98 | ;; Files added by populate at Sun, 28 Jan 2007 10:01:31 -0800, | ||
99 | ;; to version 1.1-maint.12(w), by jmacd: | ||
100 | 100 | ||
101 | ;; Files added by populate at Sun, 28 Jan 2007 10:01:31 -0800, | ||
102 | ;; to version 1.1-maint.12(w), by jmacd: | ||
103 | |||
104 | (libedsio/edsiotest (xdelta/i/8_edsiotest 1.1 744)) | ||
105 | (libedsio/fh.c (xdelta/i/9_fh.c 1.1 744)) | 101 | (libedsio/fh.c (xdelta/i/9_fh.c 1.1 744)) |
106 | (libedsio/maketime.c (xdelta/i/10_maketime.c 1.1 744)) | 102 | (libedsio/maketime.c (xdelta/i/10_maketime.c 1.1 744)) |
107 | (libedsio/simple.c (xdelta/i/11_simple.c 1.1 744)) | 103 | (libedsio/simple.c (xdelta/i/11_simple.c 1.1 744)) |
108 | (libedsio/md5c.c (xdelta/i/12_md5c.c 1.1 744)) | 104 | (libedsio/md5c.c (xdelta/i/12_md5c.c 1.1 744)) |
109 | (libedsio/Makefile.am (xdelta/i/13_Makefile.a 1.1 744)) | 105 | (libedsio/Makefile.am (xdelta/i/13_Makefile.a 1.1 744)) |
110 | (libedsio/edsio_edsio.h (xdelta/i/14_edsio_edsi 1.1 744)) | ||
111 | (libedsio/base64.c (xdelta/i/15_base64.c 1.1 744)) | 106 | (libedsio/base64.c (xdelta/i/15_base64.c 1.1 744)) |
112 | (libedsio/default.c (xdelta/i/16_default.c 1.1 744)) | 107 | (libedsio/default.c (xdelta/i/16_default.c 1.1 744)) |
113 | (libedsio/edsio_edsio.c (xdelta/i/17_edsio_edsi 1.1 744)) | ||
114 | (libedsio/edsio.el (xdelta/i/18_edsio.el 1.1 744)) | 108 | (libedsio/edsio.el (xdelta/i/18_edsio.el 1.1 744)) |
115 | (libedsio/edsio-comp (xdelta/i/19_edsio-comp 1.1 744)) | 109 | (libedsio/edsio-comp (xdelta/i/19_edsio-comp 1.1 744)) |
116 | (libedsio/generic.c (xdelta/i/20_generic.c 1.1 744)) | 110 | (libedsio/generic.c (xdelta/i/20_generic.c 1.1 744)) |