diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/eet/src/bin/Makefile.am | 21 | ||||
-rw-r--r-- | libraries/eet/src/bin/Makefile.in | 605 | ||||
-rw-r--r-- | libraries/eet/src/bin/eet_main.c | 413 |
3 files changed, 1039 insertions, 0 deletions
diff --git a/libraries/eet/src/bin/Makefile.am b/libraries/eet/src/bin/Makefile.am new file mode 100644 index 0000000..ba7d67e --- /dev/null +++ b/libraries/eet/src/bin/Makefile.am | |||
@@ -0,0 +1,21 @@ | |||
1 | |||
2 | MAINTAINERCLEANFILES = Makefile.in | ||
3 | |||
4 | AM_CPPFLAGS = \ | ||
5 | -I$(top_srcdir) \ | ||
6 | -I$(top_srcdir)/bin \ | ||
7 | -I$(top_srcdir)/src/lib \ | ||
8 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | ||
9 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | ||
10 | -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ | ||
11 | @EET_CPPFLAGS@ \ | ||
12 | @EINA_CFLAGS@ \ | ||
13 | @EVIL_CFLAGS@ | ||
14 | |||
15 | bin_PROGRAMS = @EET_PRG@ | ||
16 | EXTRA_PROGRAMS = eet | ||
17 | |||
18 | eet_SOURCES = eet_main.c | ||
19 | eet_CFLAGS = @EET_CFLAGS@ | ||
20 | eet_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ @EVIL_LIBS@ | ||
21 | eet_LDFLAGS = @lt_enable_auto_import@ | ||
diff --git a/libraries/eet/src/bin/Makefile.in b/libraries/eet/src/bin/Makefile.in new file mode 100644 index 0000000..9273fac --- /dev/null +++ b/libraries/eet/src/bin/Makefile.in | |||
@@ -0,0 +1,605 @@ | |||
1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | ||
6 | # Inc. | ||
7 | # This Makefile.in is free software; the Free Software Foundation | ||
8 | # gives unlimited permission to copy and/or distribute it, | ||
9 | # with or without modifications, as long as this notice is preserved. | ||
10 | |||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
14 | # PARTICULAR PURPOSE. | ||
15 | |||
16 | @SET_MAKE@ | ||
17 | |||
18 | VPATH = @srcdir@ | ||
19 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | pkglibdir = $(libdir)/@PACKAGE@ | ||
22 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
24 | install_sh_DATA = $(install_sh) -c -m 644 | ||
25 | install_sh_PROGRAM = $(install_sh) -c | ||
26 | install_sh_SCRIPT = $(install_sh) -c | ||
27 | INSTALL_HEADER = $(INSTALL_DATA) | ||
28 | transform = $(program_transform_name) | ||
29 | NORMAL_INSTALL = : | ||
30 | PRE_INSTALL = : | ||
31 | POST_INSTALL = : | ||
32 | NORMAL_UNINSTALL = : | ||
33 | PRE_UNINSTALL = : | ||
34 | POST_UNINSTALL = : | ||
35 | build_triplet = @build@ | ||
36 | host_triplet = @host@ | ||
37 | EXTRA_PROGRAMS = eet$(EXEEXT) | ||
38 | subdir = src/bin | ||
39 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
40 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
41 | am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | ||
42 | $(top_srcdir)/m4/ac_path_generic.m4 \ | ||
43 | $(top_srcdir)/m4/efl_binary.m4 \ | ||
44 | $(top_srcdir)/m4/efl_compiler_flag.m4 \ | ||
45 | $(top_srcdir)/m4/efl_coverage.m4 \ | ||
46 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
47 | $(top_srcdir)/m4/efl_fnmatch.m4 \ | ||
48 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | ||
49 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ | ||
50 | $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ | ||
51 | $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac | ||
52 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
53 | $(ACLOCAL_M4) | ||
54 | mkinstalldirs = $(install_sh) -d | ||
55 | CONFIG_HEADER = $(top_builddir)/config.h | ||
56 | CONFIG_CLEAN_FILES = | ||
57 | CONFIG_CLEAN_VPATH_FILES = | ||
58 | am__installdirs = "$(DESTDIR)$(bindir)" | ||
59 | PROGRAMS = $(bin_PROGRAMS) | ||
60 | am_eet_OBJECTS = eet-eet_main.$(OBJEXT) | ||
61 | eet_OBJECTS = $(am_eet_OBJECTS) | ||
62 | eet_DEPENDENCIES = $(top_builddir)/src/lib/libeet.la | ||
63 | AM_V_lt = $(am__v_lt_$(V)) | ||
64 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
65 | am__v_lt_0 = --silent | ||
66 | eet_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
67 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(eet_CFLAGS) $(CFLAGS) \ | ||
68 | $(eet_LDFLAGS) $(LDFLAGS) -o $@ | ||
69 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
70 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
71 | am__depfiles_maybe = depfiles | ||
72 | am__mv = mv -f | ||
73 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
74 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
75 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
76 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
77 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
78 | $(AM_CFLAGS) $(CFLAGS) | ||
79 | AM_V_CC = $(am__v_CC_$(V)) | ||
80 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
81 | am__v_CC_0 = @echo " CC " $@; | ||
82 | AM_V_at = $(am__v_at_$(V)) | ||
83 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
84 | am__v_at_0 = @ | ||
85 | CCLD = $(CC) | ||
86 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
87 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
88 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
89 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
90 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
91 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
92 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
93 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
94 | am__v_GEN_0 = @echo " GEN " $@; | ||
95 | SOURCES = $(eet_SOURCES) | ||
96 | DIST_SOURCES = $(eet_SOURCES) | ||
97 | ETAGS = etags | ||
98 | CTAGS = ctags | ||
99 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
100 | ACLOCAL = @ACLOCAL@ | ||
101 | ALLOCA = @ALLOCA@ | ||
102 | AMTAR = @AMTAR@ | ||
103 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
104 | AR = @AR@ | ||
105 | AS = @AS@ | ||
106 | AUTOCONF = @AUTOCONF@ | ||
107 | AUTOHEADER = @AUTOHEADER@ | ||
108 | AUTOMAKE = @AUTOMAKE@ | ||
109 | AWK = @AWK@ | ||
110 | CC = @CC@ | ||
111 | CCDEPMODE = @CCDEPMODE@ | ||
112 | CFLAGS = @CFLAGS@ | ||
113 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
114 | CHECK_LIBS = @CHECK_LIBS@ | ||
115 | CPP = @CPP@ | ||
116 | CPPFLAGS = @CPPFLAGS@ | ||
117 | CYGPATH_W = @CYGPATH_W@ | ||
118 | DEBUG_CFLAGS = @DEBUG_CFLAGS@ | ||
119 | DEFS = @DEFS@ | ||
120 | DEPDIR = @DEPDIR@ | ||
121 | DLLTOOL = @DLLTOOL@ | ||
122 | DSYMUTIL = @DSYMUTIL@ | ||
123 | DUMPBIN = @DUMPBIN@ | ||
124 | ECHO_C = @ECHO_C@ | ||
125 | ECHO_N = @ECHO_N@ | ||
126 | ECHO_T = @ECHO_T@ | ||
127 | EET_CFLAGS = @EET_CFLAGS@ | ||
128 | EET_CPPFLAGS = @EET_CPPFLAGS@ | ||
129 | EET_LIBS = @EET_LIBS@ | ||
130 | EET_PRG = @EET_PRG@ | ||
131 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
132 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
133 | EFL_EET_BUILD = @EFL_EET_BUILD@ | ||
134 | EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ | ||
135 | EGREP = @EGREP@ | ||
136 | EINA_CFLAGS = @EINA_CFLAGS@ | ||
137 | EINA_LIBS = @EINA_LIBS@ | ||
138 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
139 | EVIL_LIBS = @EVIL_LIBS@ | ||
140 | EXEEXT = @EXEEXT@ | ||
141 | FGREP = @FGREP@ | ||
142 | GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ | ||
143 | GNUTLS_LIBS = @GNUTLS_LIBS@ | ||
144 | GREP = @GREP@ | ||
145 | INSTALL = @INSTALL@ | ||
146 | INSTALL_DATA = @INSTALL_DATA@ | ||
147 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
148 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
149 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
150 | LD = @LD@ | ||
151 | LDFLAGS = @LDFLAGS@ | ||
152 | LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ | ||
153 | LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ | ||
154 | LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ | ||
155 | LIBOBJS = @LIBOBJS@ | ||
156 | LIBS = @LIBS@ | ||
157 | LIBTOOL = @LIBTOOL@ | ||
158 | LIPO = @LIPO@ | ||
159 | LN_S = @LN_S@ | ||
160 | LTLIBOBJS = @LTLIBOBJS@ | ||
161 | MAKEINFO = @MAKEINFO@ | ||
162 | MKDIR_P = @MKDIR_P@ | ||
163 | NM = @NM@ | ||
164 | NMEDIT = @NMEDIT@ | ||
165 | OBJDUMP = @OBJDUMP@ | ||
166 | OBJEXT = @OBJEXT@ | ||
167 | OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ | ||
168 | OPENSSL_LIBS = @OPENSSL_LIBS@ | ||
169 | OTOOL = @OTOOL@ | ||
170 | OTOOL64 = @OTOOL64@ | ||
171 | PACKAGE = @PACKAGE@ | ||
172 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
173 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
174 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
175 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
176 | PACKAGE_URL = @PACKAGE_URL@ | ||
177 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
178 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
179 | PKG_CONFIG = @PKG_CONFIG@ | ||
180 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
181 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
182 | RANLIB = @RANLIB@ | ||
183 | SED = @SED@ | ||
184 | SET_MAKE = @SET_MAKE@ | ||
185 | SHELL = @SHELL@ | ||
186 | STRIP = @STRIP@ | ||
187 | VERSION = @VERSION@ | ||
188 | VMAJ = @VMAJ@ | ||
189 | abs_builddir = @abs_builddir@ | ||
190 | abs_srcdir = @abs_srcdir@ | ||
191 | abs_top_builddir = @abs_top_builddir@ | ||
192 | abs_top_srcdir = @abs_top_srcdir@ | ||
193 | ac_ct_CC = @ac_ct_CC@ | ||
194 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
195 | am__include = @am__include@ | ||
196 | am__leading_dot = @am__leading_dot@ | ||
197 | am__quote = @am__quote@ | ||
198 | am__tar = @am__tar@ | ||
199 | am__untar = @am__untar@ | ||
200 | bindir = @bindir@ | ||
201 | build = @build@ | ||
202 | build_alias = @build_alias@ | ||
203 | build_cpu = @build_cpu@ | ||
204 | build_os = @build_os@ | ||
205 | build_vendor = @build_vendor@ | ||
206 | builddir = @builddir@ | ||
207 | datadir = @datadir@ | ||
208 | datarootdir = @datarootdir@ | ||
209 | docdir = @docdir@ | ||
210 | dvidir = @dvidir@ | ||
211 | efl_doxygen = @efl_doxygen@ | ||
212 | efl_have_doxygen = @efl_have_doxygen@ | ||
213 | exec_prefix = @exec_prefix@ | ||
214 | have_lcov = @have_lcov@ | ||
215 | host = @host@ | ||
216 | host_alias = @host_alias@ | ||
217 | host_cpu = @host_cpu@ | ||
218 | host_os = @host_os@ | ||
219 | host_vendor = @host_vendor@ | ||
220 | htmldir = @htmldir@ | ||
221 | includedir = @includedir@ | ||
222 | infodir = @infodir@ | ||
223 | install_sh = @install_sh@ | ||
224 | libdir = @libdir@ | ||
225 | libexecdir = @libexecdir@ | ||
226 | localedir = @localedir@ | ||
227 | localstatedir = @localstatedir@ | ||
228 | lt_ECHO = @lt_ECHO@ | ||
229 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
230 | mandir = @mandir@ | ||
231 | mkdir_p = @mkdir_p@ | ||
232 | oldincludedir = @oldincludedir@ | ||
233 | pdfdir = @pdfdir@ | ||
234 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
235 | prefix = @prefix@ | ||
236 | program_transform_name = @program_transform_name@ | ||
237 | psdir = @psdir@ | ||
238 | release_info = @release_info@ | ||
239 | requirement_eet = @requirement_eet@ | ||
240 | sbindir = @sbindir@ | ||
241 | sharedstatedir = @sharedstatedir@ | ||
242 | srcdir = @srcdir@ | ||
243 | sysconfdir = @sysconfdir@ | ||
244 | target_alias = @target_alias@ | ||
245 | top_build_prefix = @top_build_prefix@ | ||
246 | top_builddir = @top_builddir@ | ||
247 | top_srcdir = @top_srcdir@ | ||
248 | version_info = @version_info@ | ||
249 | MAINTAINERCLEANFILES = Makefile.in | ||
250 | AM_CPPFLAGS = \ | ||
251 | -I$(top_srcdir) \ | ||
252 | -I$(top_srcdir)/bin \ | ||
253 | -I$(top_srcdir)/src/lib \ | ||
254 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | ||
255 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | ||
256 | -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ | ||
257 | @EET_CPPFLAGS@ \ | ||
258 | @EINA_CFLAGS@ \ | ||
259 | @EVIL_CFLAGS@ | ||
260 | |||
261 | bin_PROGRAMS = @EET_PRG@ | ||
262 | eet_SOURCES = eet_main.c | ||
263 | eet_CFLAGS = @EET_CFLAGS@ | ||
264 | eet_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ @EVIL_LIBS@ | ||
265 | eet_LDFLAGS = @lt_enable_auto_import@ | ||
266 | all: all-am | ||
267 | |||
268 | .SUFFIXES: | ||
269 | .SUFFIXES: .c .lo .o .obj | ||
270 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
271 | @for dep in $?; do \ | ||
272 | case '$(am__configure_deps)' in \ | ||
273 | *$$dep*) \ | ||
274 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
275 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
276 | exit 1;; \ | ||
277 | esac; \ | ||
278 | done; \ | ||
279 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/Makefile'; \ | ||
280 | $(am__cd) $(top_srcdir) && \ | ||
281 | $(AUTOMAKE) --gnu src/bin/Makefile | ||
282 | .PRECIOUS: Makefile | ||
283 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
284 | @case '$?' in \ | ||
285 | *config.status*) \ | ||
286 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
287 | *) \ | ||
288 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
289 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
290 | esac; | ||
291 | |||
292 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
293 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
294 | |||
295 | $(top_srcdir)/configure: $(am__configure_deps) | ||
296 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
297 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
298 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
299 | $(am__aclocal_m4_deps): | ||
300 | install-binPROGRAMS: $(bin_PROGRAMS) | ||
301 | @$(NORMAL_INSTALL) | ||
302 | test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" | ||
303 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ | ||
304 | for p in $$list; do echo "$$p $$p"; done | \ | ||
305 | sed 's/$(EXEEXT)$$//' | \ | ||
306 | while read p p1; do if test -f $$p || test -f $$p1; \ | ||
307 | then echo "$$p"; echo "$$p"; else :; fi; \ | ||
308 | done | \ | ||
309 | sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ | ||
310 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ | ||
311 | sed 'N;N;N;s,\n, ,g' | \ | ||
312 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ | ||
313 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ | ||
314 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ | ||
315 | else { print "f", $$3 "/" $$4, $$1; } } \ | ||
316 | END { for (d in files) print "f", d, files[d] }' | \ | ||
317 | while read type dir files; do \ | ||
318 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ | ||
319 | test -z "$$files" || { \ | ||
320 | echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ | ||
321 | $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ | ||
322 | } \ | ||
323 | ; done | ||
324 | |||
325 | uninstall-binPROGRAMS: | ||
326 | @$(NORMAL_UNINSTALL) | ||
327 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ | ||
328 | files=`for p in $$list; do echo "$$p"; done | \ | ||
329 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ | ||
330 | -e 's/$$/$(EXEEXT)/' `; \ | ||
331 | test -n "$$list" || exit 0; \ | ||
332 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ | ||
333 | cd "$(DESTDIR)$(bindir)" && rm -f $$files | ||
334 | |||
335 | clean-binPROGRAMS: | ||
336 | @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ | ||
337 | echo " rm -f" $$list; \ | ||
338 | rm -f $$list || exit $$?; \ | ||
339 | test -n "$(EXEEXT)" || exit 0; \ | ||
340 | list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ | ||
341 | echo " rm -f" $$list; \ | ||
342 | rm -f $$list | ||
343 | eet$(EXEEXT): $(eet_OBJECTS) $(eet_DEPENDENCIES) | ||
344 | @rm -f eet$(EXEEXT) | ||
345 | $(AM_V_CCLD)$(eet_LINK) $(eet_OBJECTS) $(eet_LDADD) $(LIBS) | ||
346 | |||
347 | mostlyclean-compile: | ||
348 | -rm -f *.$(OBJEXT) | ||
349 | |||
350 | distclean-compile: | ||
351 | -rm -f *.tab.c | ||
352 | |||
353 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-eet_main.Po@am__quote@ | ||
354 | |||
355 | .c.o: | ||
356 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
357 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
358 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
359 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
360 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
361 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
362 | |||
363 | .c.obj: | ||
364 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
365 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
366 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
367 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
368 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
369 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
370 | |||
371 | .c.lo: | ||
372 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
373 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
374 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
375 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
376 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
377 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
378 | |||
379 | eet-eet_main.o: eet_main.c | ||
380 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eet_CFLAGS) $(CFLAGS) -MT eet-eet_main.o -MD -MP -MF $(DEPDIR)/eet-eet_main.Tpo -c -o eet-eet_main.o `test -f 'eet_main.c' || echo '$(srcdir)/'`eet_main.c | ||
381 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eet-eet_main.Tpo $(DEPDIR)/eet-eet_main.Po | ||
382 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
383 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_main.c' object='eet-eet_main.o' libtool=no @AMDEPBACKSLASH@ | ||
384 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
385 | @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eet_CFLAGS) $(CFLAGS) -c -o eet-eet_main.o `test -f 'eet_main.c' || echo '$(srcdir)/'`eet_main.c | ||
386 | |||
387 | eet-eet_main.obj: eet_main.c | ||
388 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eet_CFLAGS) $(CFLAGS) -MT eet-eet_main.obj -MD -MP -MF $(DEPDIR)/eet-eet_main.Tpo -c -o eet-eet_main.obj `if test -f 'eet_main.c'; then $(CYGPATH_W) 'eet_main.c'; else $(CYGPATH_W) '$(srcdir)/eet_main.c'; fi` | ||
389 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eet-eet_main.Tpo $(DEPDIR)/eet-eet_main.Po | ||
390 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
391 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_main.c' object='eet-eet_main.obj' libtool=no @AMDEPBACKSLASH@ | ||
392 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
393 | @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eet_CFLAGS) $(CFLAGS) -c -o eet-eet_main.obj `if test -f 'eet_main.c'; then $(CYGPATH_W) 'eet_main.c'; else $(CYGPATH_W) '$(srcdir)/eet_main.c'; fi` | ||
394 | |||
395 | mostlyclean-libtool: | ||
396 | -rm -f *.lo | ||
397 | |||
398 | clean-libtool: | ||
399 | -rm -rf .libs _libs | ||
400 | |||
401 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
402 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
403 | unique=`for i in $$list; do \ | ||
404 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
405 | done | \ | ||
406 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
407 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
408 | mkid -fID $$unique | ||
409 | tags: TAGS | ||
410 | |||
411 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
412 | $(TAGS_FILES) $(LISP) | ||
413 | set x; \ | ||
414 | here=`pwd`; \ | ||
415 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
416 | unique=`for i in $$list; do \ | ||
417 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
418 | done | \ | ||
419 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
420 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
421 | shift; \ | ||
422 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
423 | test -n "$$unique" || unique=$$empty_fix; \ | ||
424 | if test $$# -gt 0; then \ | ||
425 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
426 | "$$@" $$unique; \ | ||
427 | else \ | ||
428 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
429 | $$unique; \ | ||
430 | fi; \ | ||
431 | fi | ||
432 | ctags: CTAGS | ||
433 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
434 | $(TAGS_FILES) $(LISP) | ||
435 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
436 | unique=`for i in $$list; do \ | ||
437 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
438 | done | \ | ||
439 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
440 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
441 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
442 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
443 | $$unique | ||
444 | |||
445 | GTAGS: | ||
446 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
447 | && $(am__cd) $(top_srcdir) \ | ||
448 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
449 | |||
450 | distclean-tags: | ||
451 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
452 | |||
453 | distdir: $(DISTFILES) | ||
454 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
455 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
456 | list='$(DISTFILES)'; \ | ||
457 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
458 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
459 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
460 | case $$dist_files in \ | ||
461 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
462 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
463 | sort -u` ;; \ | ||
464 | esac; \ | ||
465 | for file in $$dist_files; do \ | ||
466 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
467 | if test -d $$d/$$file; then \ | ||
468 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
469 | if test -d "$(distdir)/$$file"; then \ | ||
470 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
471 | fi; \ | ||
472 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
473 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
474 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
475 | fi; \ | ||
476 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
477 | else \ | ||
478 | test -f "$(distdir)/$$file" \ | ||
479 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
480 | || exit 1; \ | ||
481 | fi; \ | ||
482 | done | ||
483 | check-am: all-am | ||
484 | check: check-am | ||
485 | all-am: Makefile $(PROGRAMS) | ||
486 | installdirs: | ||
487 | for dir in "$(DESTDIR)$(bindir)"; do \ | ||
488 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
489 | done | ||
490 | install: install-am | ||
491 | install-exec: install-exec-am | ||
492 | install-data: install-data-am | ||
493 | uninstall: uninstall-am | ||
494 | |||
495 | install-am: all-am | ||
496 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
497 | |||
498 | installcheck: installcheck-am | ||
499 | install-strip: | ||
500 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
501 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
502 | `test -z '$(STRIP)' || \ | ||
503 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
504 | mostlyclean-generic: | ||
505 | |||
506 | clean-generic: | ||
507 | |||
508 | distclean-generic: | ||
509 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
510 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
511 | |||
512 | maintainer-clean-generic: | ||
513 | @echo "This command is intended for maintainers to use" | ||
514 | @echo "it deletes files that may require special tools to rebuild." | ||
515 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
516 | clean: clean-am | ||
517 | |||
518 | clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am | ||
519 | |||
520 | distclean: distclean-am | ||
521 | -rm -rf ./$(DEPDIR) | ||
522 | -rm -f Makefile | ||
523 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
524 | distclean-tags | ||
525 | |||
526 | dvi: dvi-am | ||
527 | |||
528 | dvi-am: | ||
529 | |||
530 | html: html-am | ||
531 | |||
532 | html-am: | ||
533 | |||
534 | info: info-am | ||
535 | |||
536 | info-am: | ||
537 | |||
538 | install-data-am: | ||
539 | |||
540 | install-dvi: install-dvi-am | ||
541 | |||
542 | install-dvi-am: | ||
543 | |||
544 | install-exec-am: install-binPROGRAMS | ||
545 | |||
546 | install-html: install-html-am | ||
547 | |||
548 | install-html-am: | ||
549 | |||
550 | install-info: install-info-am | ||
551 | |||
552 | install-info-am: | ||
553 | |||
554 | install-man: | ||
555 | |||
556 | install-pdf: install-pdf-am | ||
557 | |||
558 | install-pdf-am: | ||
559 | |||
560 | install-ps: install-ps-am | ||
561 | |||
562 | install-ps-am: | ||
563 | |||
564 | installcheck-am: | ||
565 | |||
566 | maintainer-clean: maintainer-clean-am | ||
567 | -rm -rf ./$(DEPDIR) | ||
568 | -rm -f Makefile | ||
569 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
570 | |||
571 | mostlyclean: mostlyclean-am | ||
572 | |||
573 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
574 | mostlyclean-libtool | ||
575 | |||
576 | pdf: pdf-am | ||
577 | |||
578 | pdf-am: | ||
579 | |||
580 | ps: ps-am | ||
581 | |||
582 | ps-am: | ||
583 | |||
584 | uninstall-am: uninstall-binPROGRAMS | ||
585 | |||
586 | .MAKE: install-am install-strip | ||
587 | |||
588 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ | ||
589 | clean-generic clean-libtool ctags distclean distclean-compile \ | ||
590 | distclean-generic distclean-libtool distclean-tags distdir dvi \ | ||
591 | dvi-am html html-am info info-am install install-am \ | ||
592 | install-binPROGRAMS install-data install-data-am install-dvi \ | ||
593 | install-dvi-am install-exec install-exec-am install-html \ | ||
594 | install-html-am install-info install-info-am install-man \ | ||
595 | install-pdf install-pdf-am install-ps install-ps-am \ | ||
596 | install-strip installcheck installcheck-am installdirs \ | ||
597 | maintainer-clean maintainer-clean-generic mostlyclean \ | ||
598 | mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ | ||
599 | pdf pdf-am ps ps-am tags uninstall uninstall-am \ | ||
600 | uninstall-binPROGRAMS | ||
601 | |||
602 | |||
603 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
604 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
605 | .NOEXPORT: | ||
diff --git a/libraries/eet/src/bin/eet_main.c b/libraries/eet/src/bin/eet_main.c new file mode 100644 index 0000000..7ab5555 --- /dev/null +++ b/libraries/eet/src/bin/eet_main.c | |||
@@ -0,0 +1,413 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif /* ifdef HAVE_CONFIG_H */ | ||
4 | |||
5 | #include <stdio.h> | ||
6 | #include <stdlib.h> | ||
7 | #include <string.h> | ||
8 | |||
9 | #ifdef HAVE_UNISTD_H | ||
10 | # include <unistd.h> | ||
11 | #endif /* ifdef HAVE_UNISTD_H */ | ||
12 | |||
13 | #ifdef HAVE_EVIL | ||
14 | # include <Evil.h> | ||
15 | #endif /* ifdef HAVE_EVIL */ | ||
16 | |||
17 | #include <Eet.h> | ||
18 | |||
19 | static int _eet_main_log_dom = -1; | ||
20 | |||
21 | #ifdef EET_DEFAULT_LOG_COLOR | ||
22 | #undef EET_DEFAULT_LOG_COLOR | ||
23 | #endif /* ifdef EET_DEFAULT_LOG_COLOR */ | ||
24 | #define EET_DEFAULT_LOG_COLOR EINA_COLOR_CYAN | ||
25 | #ifdef ERR | ||
26 | #undef ERR | ||
27 | #endif /* ifdef ERR */ | ||
28 | #define ERR(...) EINA_LOG_DOM_ERR(_eet_main_log_dom, __VA_ARGS__) | ||
29 | #ifdef DBG | ||
30 | #undef DBG | ||
31 | #endif /* ifdef DBG */ | ||
32 | #define DBG(...) EINA_LOG_DOM_DBG(_eet_main_log_dom, __VA_ARGS__) | ||
33 | #ifdef INF | ||
34 | #undef INF | ||
35 | #endif /* ifdef INF */ | ||
36 | #define INF(...) EINA_LOG_DOM_INFO(_eet_main_log_dom, __VA_ARGS__) | ||
37 | #ifdef WRN | ||
38 | #undef WRN | ||
39 | #endif /* ifdef WRN */ | ||
40 | #define WRN(...) EINA_LOG_DOM_WARN(_eet_main_log_dom, __VA_ARGS__) | ||
41 | #ifdef CRIT | ||
42 | #undef CRIT | ||
43 | #endif /* ifdef CRIT */ | ||
44 | #define CRIT(...) EINA_LOG_DOM_CRIT(_eet_main_log_dom, __VA_ARGS__) | ||
45 | |||
46 | static void | ||
47 | do_eet_list(const char *file) | ||
48 | { | ||
49 | int i, num; | ||
50 | char **list; | ||
51 | Eet_File *ef; | ||
52 | |||
53 | ef = eet_open(file, EET_FILE_MODE_READ); | ||
54 | if (!ef) | ||
55 | { | ||
56 | ERR("cannot open for reading: %s", file); | ||
57 | exit(-1); | ||
58 | } | ||
59 | |||
60 | list = eet_list(ef, "*", &num); | ||
61 | if (list) | ||
62 | { | ||
63 | for (i = 0; i < num; i++) | ||
64 | printf("%s\n", list[i]); | ||
65 | free(list); | ||
66 | } | ||
67 | |||
68 | eet_close(ef); | ||
69 | } /* do_eet_list */ | ||
70 | |||
71 | static void | ||
72 | do_eet_extract(const char *file, | ||
73 | const char *key, | ||
74 | const char *out, | ||
75 | const char *crypto_key) | ||
76 | { | ||
77 | Eet_File *ef; | ||
78 | void *data; | ||
79 | int size = 0; | ||
80 | FILE *f; | ||
81 | |||
82 | ef = eet_open(file, EET_FILE_MODE_READ); | ||
83 | if (!ef) | ||
84 | { | ||
85 | ERR("cannot open for reading: %s", file); | ||
86 | exit(-1); | ||
87 | } | ||
88 | |||
89 | data = eet_read_cipher(ef, key, &size, crypto_key); | ||
90 | if (!data) | ||
91 | { | ||
92 | ERR("cannot read key %s", key); | ||
93 | exit(-1); | ||
94 | } | ||
95 | |||
96 | f = fopen(out, "wb"); | ||
97 | if (!f) | ||
98 | { | ||
99 | ERR("cannot open %s", out); | ||
100 | exit(-1); | ||
101 | } | ||
102 | |||
103 | if (fwrite(data, size, 1, f) != 1) | ||
104 | { | ||
105 | ERR("cannot write to %s", out); | ||
106 | exit(-1); | ||
107 | } | ||
108 | |||
109 | fclose(f); | ||
110 | free(data); | ||
111 | eet_close(ef); | ||
112 | } /* do_eet_extract */ | ||
113 | |||
114 | static void | ||
115 | do_eet_decode_dump(void *data, | ||
116 | const char *str) | ||
117 | { | ||
118 | fputs(str, (FILE *)data); | ||
119 | } /* do_eet_decode_dump */ | ||
120 | |||
121 | static void | ||
122 | do_eet_decode(const char *file, | ||
123 | const char *key, | ||
124 | const char *out, | ||
125 | const char *crypto_key) | ||
126 | { | ||
127 | Eet_File *ef; | ||
128 | FILE *f; | ||
129 | |||
130 | ef = eet_open(file, EET_FILE_MODE_READ); | ||
131 | if (!ef) | ||
132 | { | ||
133 | ERR("cannot open for reading: %s", file); | ||
134 | exit(-1); | ||
135 | } | ||
136 | |||
137 | f = fopen(out, "wb"); | ||
138 | if (!f) | ||
139 | { | ||
140 | ERR("cannot open %s", out); | ||
141 | exit(-1); | ||
142 | } | ||
143 | |||
144 | if (!eet_data_dump_cipher(ef, key, crypto_key, do_eet_decode_dump, f)) | ||
145 | { | ||
146 | ERR("cannot write to %s", out); | ||
147 | exit(-1); | ||
148 | } | ||
149 | |||
150 | fclose(f); | ||
151 | eet_close(ef); | ||
152 | } /* do_eet_decode */ | ||
153 | |||
154 | static void | ||
155 | do_eet_insert(const char *file, | ||
156 | const char *key, | ||
157 | const char *out, | ||
158 | int compress, | ||
159 | const char *crypto_key) | ||
160 | { | ||
161 | Eet_File *ef; | ||
162 | void *data; | ||
163 | int size = 0; | ||
164 | FILE *f; | ||
165 | |||
166 | ef = eet_open(file, EET_FILE_MODE_READ_WRITE); | ||
167 | if (!ef) | ||
168 | ef = eet_open(file, EET_FILE_MODE_WRITE); | ||
169 | |||
170 | if (!ef) | ||
171 | { | ||
172 | ERR("cannot open for read+write: %s", file); | ||
173 | exit(-1); | ||
174 | } | ||
175 | |||
176 | f = fopen(out, "rb"); | ||
177 | if (!f) | ||
178 | { | ||
179 | ERR("cannot open %s", out); | ||
180 | exit(-1); | ||
181 | } | ||
182 | |||
183 | fseek(f, 0, SEEK_END); | ||
184 | size = ftell(f); | ||
185 | rewind(f); | ||
186 | data = malloc(size); | ||
187 | if (!data) | ||
188 | { | ||
189 | ERR("cannot allocate %i bytes", size); | ||
190 | exit(-1); | ||
191 | } | ||
192 | |||
193 | if (fread(data, size, 1, f) != 1) | ||
194 | { | ||
195 | ERR("cannot read file %s", out); | ||
196 | exit(-1); | ||
197 | } | ||
198 | |||
199 | fclose(f); | ||
200 | eet_write_cipher(ef, key, data, size, compress, crypto_key); | ||
201 | free(data); | ||
202 | eet_close(ef); | ||
203 | } /* do_eet_insert */ | ||
204 | |||
205 | static void | ||
206 | do_eet_encode(const char *file, | ||
207 | const char *key, | ||
208 | const char *out, | ||
209 | int compress, | ||
210 | const char *crypto_key) | ||
211 | { | ||
212 | Eet_File *ef; | ||
213 | char *text; | ||
214 | int textlen = 0; | ||
215 | int size = 0; | ||
216 | FILE *f; | ||
217 | |||
218 | ef = eet_open(file, EET_FILE_MODE_READ_WRITE); | ||
219 | if (!ef) | ||
220 | ef = eet_open(file, EET_FILE_MODE_WRITE); | ||
221 | |||
222 | if (!ef) | ||
223 | { | ||
224 | ERR("cannot open for read+write: %s", file); | ||
225 | exit(-1); | ||
226 | } | ||
227 | |||
228 | f = fopen(out, "rb"); | ||
229 | if (!f) | ||
230 | { | ||
231 | ERR("cannot open %s", out); | ||
232 | exit(-1); | ||
233 | } | ||
234 | |||
235 | fseek(f, 0, SEEK_END); | ||
236 | textlen = ftell(f); | ||
237 | rewind(f); | ||
238 | text = malloc(textlen); | ||
239 | if (!text) | ||
240 | { | ||
241 | ERR("cannot allocate %i bytes", size); | ||
242 | exit(-1); | ||
243 | } | ||
244 | |||
245 | if (fread(text, textlen, 1, f) != 1) | ||
246 | { | ||
247 | ERR("cannot read file %s", out); | ||
248 | exit(-1); | ||
249 | } | ||
250 | |||
251 | fclose(f); | ||
252 | if (!eet_data_undump_cipher(ef, key, crypto_key, text, textlen, compress)) | ||
253 | { | ||
254 | ERR("cannot parse %s", out); | ||
255 | exit(-1); | ||
256 | } | ||
257 | |||
258 | free(text); | ||
259 | eet_close(ef); | ||
260 | } /* do_eet_encode */ | ||
261 | |||
262 | static void | ||
263 | do_eet_remove(const char *file, | ||
264 | const char *key) | ||
265 | { | ||
266 | Eet_File *ef; | ||
267 | |||
268 | ef = eet_open(file, EET_FILE_MODE_READ_WRITE); | ||
269 | if (!ef) | ||
270 | { | ||
271 | ERR("cannot open for read+write: %s", file); | ||
272 | exit(-1); | ||
273 | } | ||
274 | |||
275 | eet_delete(ef, key); | ||
276 | eet_close(ef); | ||
277 | } /* do_eet_remove */ | ||
278 | |||
279 | static void | ||
280 | do_eet_check(const char *file) | ||
281 | { | ||
282 | Eet_File *ef; | ||
283 | const void *der; | ||
284 | int der_length; | ||
285 | int sign_length; | ||
286 | |||
287 | ef = eet_open(file, EET_FILE_MODE_READ); | ||
288 | if (!ef) | ||
289 | { | ||
290 | ERR("checking signature of `%s` failed", file); | ||
291 | exit(-1); | ||
292 | } | ||
293 | |||
294 | der = eet_identity_x509(ef, &der_length); | ||
295 | |||
296 | fprintf(stdout, "Certificate length %i.\n", der_length); | ||
297 | eet_identity_certificate_print(der, der_length, stdout); | ||
298 | |||
299 | eet_identity_signature(ef, &sign_length); | ||
300 | fprintf(stdout, "Signature length %i.\n", sign_length); | ||
301 | |||
302 | eet_close(ef); | ||
303 | } /* do_eet_check */ | ||
304 | |||
305 | static void | ||
306 | do_eet_sign(const char *file, | ||
307 | const char *private_key, | ||
308 | const char *public_key) | ||
309 | { | ||
310 | Eet_File *ef; | ||
311 | Eet_Key *key; | ||
312 | |||
313 | ef = eet_open(file, EET_FILE_MODE_READ_WRITE); | ||
314 | if (!ef) | ||
315 | { | ||
316 | ERR("cannot open for read+write: %s.", file); | ||
317 | exit(-1); | ||
318 | } | ||
319 | |||
320 | key = eet_identity_open(public_key, private_key, NULL); | ||
321 | if (!key) | ||
322 | { | ||
323 | ERR("cannot open key '%s:%s'.", public_key, private_key); | ||
324 | exit(-1); | ||
325 | } | ||
326 | |||
327 | fprintf(stdout, "Using the following key to sign `%s`.\n", file); | ||
328 | eet_identity_print(key, stdout); | ||
329 | |||
330 | eet_identity_set(ef, key); | ||
331 | |||
332 | eet_close(ef); | ||
333 | } /* do_eet_sign */ | ||
334 | |||
335 | int | ||
336 | main(int argc, | ||
337 | char **argv) | ||
338 | { | ||
339 | if (!eet_init()) | ||
340 | return -1; | ||
341 | |||
342 | _eet_main_log_dom = eina_log_domain_register("eet_main", EINA_COLOR_CYAN); | ||
343 | if(_eet_main_log_dom < -1) | ||
344 | { | ||
345 | EINA_LOG_ERR("Impossible to create a log domain for eet_main."); | ||
346 | eet_shutdown(); | ||
347 | return -1; | ||
348 | } | ||
349 | |||
350 | if (argc < 2) | ||
351 | { | ||
352 | help: | ||
353 | printf( | ||
354 | "Usage:\n" | ||
355 | " eet -l FILE.EET list all keys in FILE.EET\n" | ||
356 | " eet -x FILE.EET KEY OUT-FILE [CRYPTO_KEY] extract data stored in KEY in FILE.EET and write to OUT-FILE\n" | ||
357 | " eet -d FILE.EET KEY OUT-FILE [CRYPTO_KEY] extract and decode data stored in KEY in FILE.EET and write to OUT-FILE\n" | ||
358 | " eet -i FILE.EET KEY IN-FILE COMPRESS [CRYPTO_KEY] insert data to KEY in FILE.EET from IN-FILE and if COMPRESS is 1, compress it\n" | ||
359 | " eet -e FILE.EET KEY IN-FILE COMPRESS [CRYPTO_KEY] insert and encode to KEY in FILE.EET from IN-FILE and if COMPRESS is 1, compress it\n" | ||
360 | " eet -r FILE.EET KEY remove KEY in FILE.EET\n" | ||
361 | " eet -c FILE.EET report and check the signature information of an eet file\n" | ||
362 | " eet -s FILE.EET PRIVATE_KEY PUBLIC_KEY sign FILE.EET with PRIVATE_KEY and attach PUBLIC_KEY as it's certificate\n" | ||
363 | ); | ||
364 | eet_shutdown(); | ||
365 | return -1; | ||
366 | } | ||
367 | |||
368 | if ((!strncmp(argv[1], "-h", 2))) | ||
369 | goto help; | ||
370 | else if ((!strcmp(argv[1], "-l")) && (argc > 2)) | ||
371 | do_eet_list(argv[2]); | ||
372 | else if ((!strcmp(argv[1], "-x")) && (argc > 4)) | ||
373 | { | ||
374 | if (argc > 5) | ||
375 | do_eet_extract(argv[2], argv[3], argv[4], argv[5]); | ||
376 | else | ||
377 | do_eet_extract(argv[2], argv[3], argv[4], NULL); | ||
378 | } | ||
379 | else if ((!strcmp(argv[1], "-d")) && (argc > 4)) | ||
380 | { | ||
381 | if (argc > 5) | ||
382 | do_eet_decode(argv[2], argv[3], argv[4], argv[5]); | ||
383 | else | ||
384 | do_eet_decode(argv[2], argv[3], argv[4], NULL); | ||
385 | } | ||
386 | else if ((!strcmp(argv[1], "-i")) && (argc > 5)) | ||
387 | { | ||
388 | if (argc > 6) | ||
389 | do_eet_insert(argv[2], argv[3], argv[4], atoi(argv[5]), argv[6]); | ||
390 | else | ||
391 | do_eet_insert(argv[2], argv[3], argv[4], atoi(argv[5]), NULL); | ||
392 | } | ||
393 | else if ((!strcmp(argv[1], "-e")) && (argc > 5)) | ||
394 | { | ||
395 | if (argc > 6) | ||
396 | do_eet_encode(argv[2], argv[3], argv[4], atoi(argv[5]), argv[6]); | ||
397 | else | ||
398 | do_eet_encode(argv[2], argv[3], argv[4], atoi(argv[5]), NULL); | ||
399 | } | ||
400 | else if ((!strcmp(argv[1], "-r")) && (argc > 3)) | ||
401 | do_eet_remove(argv[2], argv[3]); | ||
402 | else if ((!strcmp(argv[1], "-c")) && (argc > 2)) | ||
403 | do_eet_check(argv[2]); | ||
404 | else if ((!strcmp(argv[1], "-s")) && (argc > 4)) | ||
405 | do_eet_sign(argv[2], argv[3], argv[4]); | ||
406 | else | ||
407 | goto help; | ||
408 | |||
409 | eina_log_domain_unregister(_eet_main_log_dom); | ||
410 | eet_shutdown(); | ||
411 | return 0; | ||
412 | } /* main */ | ||
413 | |||