[svn-upgrade] Integrating new upstream version, mimetic (0.9.2)
gregor herrmann
17 years ago
0 | x.x.x, 0.9.2 | |
0 | 21.01.2007, 0.9.2 | |
1 | 1 | - Solaris compatibility fixes (thanks to Shan Will) |
2 | - itparser.h fixes (thanks to Phil Endecott and Joshua Chang) | |
3 | - DateTime set fix | |
2 | 4 | |
3 | 5 | 10.04.2006, 0.9.1 |
4 | 6 | - utils.h: gcc 4.1 compatibility fix |
0 | Content-MD5 ? | |
1 | ||
2 | test: multiple field w/ the same name must be preserved (Received:) | |
3 | ||
4 | codecs bench/optimization | |
5 | ||
6 | MimeEntity cpyctor & op= | |
7 | ||
8 | b64 & qp examples converted to File::iterator | |
9 | ||
10 | BUG: istring::find e istring::compare NON sono case insensitive | |
11 | ||
12 | override MimeEntity::write for binary entities (application/* etc.) so | |
13 | we don't need to store files in memory but we can just print them out | |
14 | when needed | |
15 | ||
16 | usare size_t(in config.h) invece di unsigned int | |
17 | ||
18 | opt: create boundaries using char that are not allowed for | |
19 | base64 encoded stuff | |
20 | ||
21 | docs docs docs... | |
22 | ||
23 | coding style check | |
24 | ||
25 | MMFile and StdFile tests | |
26 | ||
27 | MMFile and StdFile must be handled by configure | |
28 | ||
29 | inline keyword where needed | |
30 | ||
31 | omimeentity_iterator: | |
32 | copy(beg,end,omimeentity_itarator<char>(entity)) | |
33 | imimeentity_iterator: | |
34 | imimeentity_itarator beg(entity), end; | |
35 | copy(beg,end, outputit) | |
36 | ||
37 | char_type clean | |
38 | error handling/codes | |
39 | ||
40 | message/external-body | |
41 | ||
42 | - message-id part-id | |
43 | - multipart/related | |
44 | ||
45 | rfc822 update: | |
46 | - rfc 1123 | |
47 | - rfc 2822 (822bis) | |
48 | ||
49 | todo: | |
50 | -? usenet msg format test | |
51 | rfc822: | |
52 | - DateTie > < >= <= == != | |
53 | - DateTime() ctor == Now() | |
54 | - tutte le classi devono ritornare la stringa di inizializzazione se | |
55 | sono state costruite tramite stringa di input in modo da minimizzare | |
56 | la differenza tra contenuti parsed e quelli reali | |
57 | - field "\"" quoting support | |
58 | ||
59 | -? field << Charset(IS08859-1) << base64str << | |
60 | Charset(ISO8859-4) << 34 << 55; | |
61 | field.append(Charset(), base64str); | |
62 | ||
63 | :::: | |
64 | - uuencode binhex | |
65 | - RFC2231 | |
66 | - check rfc2047 | |
67 | ||
68 | S/MIME | |
69 | PGP/MIME |
0 | 0 | #! /bin/sh |
1 | # From configure.in Revision: 1.32 . | |
1 | # From configure.in Revision: 1.35 . | |
2 | 2 | # Guess values for system-dependent variables and create Makefiles. |
3 | 3 | # Generated by GNU Autoconf 2.59. |
4 | 4 | # |
1777 | 1777 | |
1778 | 1778 | PACKAGE=mimetic |
1779 | 1779 | |
1780 | VERSION=0.9.1 | |
1780 | VERSION=0.9.2 | |
1781 | 1781 | |
1782 | 1782 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
1783 | 1783 | { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 |
20530 | 20530 | LDFLAGS="$LDFLAGS ${stlp_ldflags}" |
20531 | 20531 | fi |
20532 | 20532 | |
20533 | CXXFLAGS="$CXXFLAGS -DHAVE_MIMETIC_CONFIG" | |
20534 | CFLAGS="$CXXFLAGS" | |
20535 | ||
20533 | 20536 | echo "$as_me:$LINENO: checking STL required features" >&5 |
20534 | 20537 | echo $ECHO_N "checking STL required features... $ECHO_C" >&6 |
20535 | 20538 | cat >conftest.$ac_ext <<_ACEOF |
21123 | 21126 | fi |
21124 | 21127 | |
21125 | 21128 | fi |
21129 | ||
21130 | ||
21131 | for ac_header in sys/stat.h | |
21132 | do | |
21133 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
21134 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
21135 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
21136 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
21137 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
21138 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
21139 | fi | |
21140 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
21141 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
21142 | else | |
21143 | # Is the header compilable? | |
21144 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
21145 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
21146 | cat >conftest.$ac_ext <<_ACEOF | |
21147 | /* confdefs.h. */ | |
21148 | _ACEOF | |
21149 | cat confdefs.h >>conftest.$ac_ext | |
21150 | cat >>conftest.$ac_ext <<_ACEOF | |
21151 | /* end confdefs.h. */ | |
21152 | $ac_includes_default | |
21153 | #include <$ac_header> | |
21154 | _ACEOF | |
21155 | rm -f conftest.$ac_objext | |
21156 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
21157 | (eval $ac_compile) 2>conftest.er1 | |
21158 | ac_status=$? | |
21159 | grep -v '^ *+' conftest.er1 >conftest.err | |
21160 | rm -f conftest.er1 | |
21161 | cat conftest.err >&5 | |
21162 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
21163 | (exit $ac_status); } && | |
21164 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | |
21165 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
21166 | (eval $ac_try) 2>&5 | |
21167 | ac_status=$? | |
21168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
21169 | (exit $ac_status); }; } && | |
21170 | { ac_try='test -s conftest.$ac_objext' | |
21171 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
21172 | (eval $ac_try) 2>&5 | |
21173 | ac_status=$? | |
21174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
21175 | (exit $ac_status); }; }; then | |
21176 | ac_header_compiler=yes | |
21177 | else | |
21178 | echo "$as_me: failed program was:" >&5 | |
21179 | sed 's/^/| /' conftest.$ac_ext >&5 | |
21180 | ||
21181 | ac_header_compiler=no | |
21182 | fi | |
21183 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
21184 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
21185 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
21186 | ||
21187 | # Is the header present? | |
21188 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
21189 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
21190 | cat >conftest.$ac_ext <<_ACEOF | |
21191 | /* confdefs.h. */ | |
21192 | _ACEOF | |
21193 | cat confdefs.h >>conftest.$ac_ext | |
21194 | cat >>conftest.$ac_ext <<_ACEOF | |
21195 | /* end confdefs.h. */ | |
21196 | #include <$ac_header> | |
21197 | _ACEOF | |
21198 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
21199 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
21200 | ac_status=$? | |
21201 | grep -v '^ *+' conftest.er1 >conftest.err | |
21202 | rm -f conftest.er1 | |
21203 | cat conftest.err >&5 | |
21204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
21205 | (exit $ac_status); } >/dev/null; then | |
21206 | if test -s conftest.err; then | |
21207 | ac_cpp_err=$ac_cxx_preproc_warn_flag | |
21208 | ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag | |
21209 | else | |
21210 | ac_cpp_err= | |
21211 | fi | |
21212 | else | |
21213 | ac_cpp_err=yes | |
21214 | fi | |
21215 | if test -z "$ac_cpp_err"; then | |
21216 | ac_header_preproc=yes | |
21217 | else | |
21218 | echo "$as_me: failed program was:" >&5 | |
21219 | sed 's/^/| /' conftest.$ac_ext >&5 | |
21220 | ||
21221 | ac_header_preproc=no | |
21222 | fi | |
21223 | rm -f conftest.err conftest.$ac_ext | |
21224 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
21225 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
21226 | ||
21227 | # So? What about this header? | |
21228 | case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in | |
21229 | yes:no: ) | |
21230 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
21231 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
21232 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
21233 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
21234 | ac_header_preproc=yes | |
21235 | ;; | |
21236 | no:yes:* ) | |
21237 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
21238 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
21239 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
21240 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
21241 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
21242 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
21243 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
21244 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
21245 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
21246 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
21247 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
21248 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
21249 | ( | |
21250 | cat <<\_ASBOX | |
21251 | ## ------------------------------------------ ## | |
21252 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
21253 | ## ------------------------------------------ ## | |
21254 | _ASBOX | |
21255 | ) | | |
21256 | sed "s/^/$as_me: WARNING: /" >&2 | |
21257 | ;; | |
21258 | esac | |
21259 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
21260 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
21261 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
21262 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
21263 | else | |
21264 | eval "$as_ac_Header=\$ac_header_preproc" | |
21265 | fi | |
21266 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
21267 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
21268 | ||
21269 | fi | |
21270 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
21271 | cat >>confdefs.h <<_ACEOF | |
21272 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
21273 | _ACEOF | |
21274 | ||
21275 | fi | |
21276 | ||
21277 | done | |
21278 | ||
21279 | ||
21280 | for ac_header in sys/types.h | |
21281 | do | |
21282 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
21283 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
21284 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
21285 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
21286 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
21287 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
21288 | fi | |
21289 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
21290 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
21291 | else | |
21292 | # Is the header compilable? | |
21293 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
21294 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
21295 | cat >conftest.$ac_ext <<_ACEOF | |
21296 | /* confdefs.h. */ | |
21297 | _ACEOF | |
21298 | cat confdefs.h >>conftest.$ac_ext | |
21299 | cat >>conftest.$ac_ext <<_ACEOF | |
21300 | /* end confdefs.h. */ | |
21301 | $ac_includes_default | |
21302 | #include <$ac_header> | |
21303 | _ACEOF | |
21304 | rm -f conftest.$ac_objext | |
21305 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
21306 | (eval $ac_compile) 2>conftest.er1 | |
21307 | ac_status=$? | |
21308 | grep -v '^ *+' conftest.er1 >conftest.err | |
21309 | rm -f conftest.er1 | |
21310 | cat conftest.err >&5 | |
21311 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
21312 | (exit $ac_status); } && | |
21313 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | |
21314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
21315 | (eval $ac_try) 2>&5 | |
21316 | ac_status=$? | |
21317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
21318 | (exit $ac_status); }; } && | |
21319 | { ac_try='test -s conftest.$ac_objext' | |
21320 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
21321 | (eval $ac_try) 2>&5 | |
21322 | ac_status=$? | |
21323 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
21324 | (exit $ac_status); }; }; then | |
21325 | ac_header_compiler=yes | |
21326 | else | |
21327 | echo "$as_me: failed program was:" >&5 | |
21328 | sed 's/^/| /' conftest.$ac_ext >&5 | |
21329 | ||
21330 | ac_header_compiler=no | |
21331 | fi | |
21332 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
21333 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
21334 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
21335 | ||
21336 | # Is the header present? | |
21337 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
21338 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
21339 | cat >conftest.$ac_ext <<_ACEOF | |
21340 | /* confdefs.h. */ | |
21341 | _ACEOF | |
21342 | cat confdefs.h >>conftest.$ac_ext | |
21343 | cat >>conftest.$ac_ext <<_ACEOF | |
21344 | /* end confdefs.h. */ | |
21345 | #include <$ac_header> | |
21346 | _ACEOF | |
21347 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
21348 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
21349 | ac_status=$? | |
21350 | grep -v '^ *+' conftest.er1 >conftest.err | |
21351 | rm -f conftest.er1 | |
21352 | cat conftest.err >&5 | |
21353 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
21354 | (exit $ac_status); } >/dev/null; then | |
21355 | if test -s conftest.err; then | |
21356 | ac_cpp_err=$ac_cxx_preproc_warn_flag | |
21357 | ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag | |
21358 | else | |
21359 | ac_cpp_err= | |
21360 | fi | |
21361 | else | |
21362 | ac_cpp_err=yes | |
21363 | fi | |
21364 | if test -z "$ac_cpp_err"; then | |
21365 | ac_header_preproc=yes | |
21366 | else | |
21367 | echo "$as_me: failed program was:" >&5 | |
21368 | sed 's/^/| /' conftest.$ac_ext >&5 | |
21369 | ||
21370 | ac_header_preproc=no | |
21371 | fi | |
21372 | rm -f conftest.err conftest.$ac_ext | |
21373 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
21374 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
21375 | ||
21376 | # So? What about this header? | |
21377 | case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in | |
21378 | yes:no: ) | |
21379 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
21380 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
21381 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
21382 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
21383 | ac_header_preproc=yes | |
21384 | ;; | |
21385 | no:yes:* ) | |
21386 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
21387 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
21388 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
21389 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
21390 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
21391 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
21392 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
21393 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
21394 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
21395 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
21396 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
21397 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
21398 | ( | |
21399 | cat <<\_ASBOX | |
21400 | ## ------------------------------------------ ## | |
21401 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
21402 | ## ------------------------------------------ ## | |
21403 | _ASBOX | |
21404 | ) | | |
21405 | sed "s/^/$as_me: WARNING: /" >&2 | |
21406 | ;; | |
21407 | esac | |
21408 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
21409 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
21410 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
21411 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
21412 | else | |
21413 | eval "$as_ac_Header=\$ac_header_preproc" | |
21414 | fi | |
21415 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
21416 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
21417 | ||
21418 | fi | |
21419 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
21420 | cat >>confdefs.h <<_ACEOF | |
21421 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
21422 | _ACEOF | |
21423 | ||
21424 | fi | |
21425 | ||
21426 | done | |
21126 | 21427 | |
21127 | 21428 | |
21128 | 21429 | for ac_header in sys/time.h |
0 | 0 | dnl Process this file with autoconf to produce a configure script. |
1 | AC_REVISION($Revision: 1.32 $) | |
1 | AC_REVISION($Revision: 1.35 $) | |
2 | 2 | AC_INIT(mimetic/mimetic.h) |
3 | 3 | AC_CANONICAL_SYSTEM |
4 | 4 | |
5 | AM_INIT_AUTOMAKE(mimetic,0.9.1) | |
5 | AM_INIT_AUTOMAKE(mimetic,0.9.2) | |
6 | 6 | AM_CONFIG_HEADER(mimetic/config.h) |
7 | 7 | |
8 | 8 | dnl Checks for programs. |
149 | 149 | LDFLAGS="$LDFLAGS ${stlp_ldflags}" |
150 | 150 | fi |
151 | 151 | |
152 | CXXFLAGS="$CXXFLAGS -DHAVE_MIMETIC_CONFIG" | |
153 | CFLAGS="$CXXFLAGS" | |
154 | ||
152 | 155 | dnl ** check for STL required features |
153 | 156 | AC_MSG_CHECKING([STL required features]) |
154 | 157 | AC_TRY_COMPILE([#include <string>], |
170 | 173 | AC_TYPE_UID_T |
171 | 174 | |
172 | 175 | AC_HEADER_DIRENT |
176 | AC_CHECK_HEADERS(sys/stat.h) | |
177 | AC_CHECK_HEADERS(sys/types.h) | |
173 | 178 | AC_CHECK_HEADERS(sys/time.h) |
174 | 179 | AC_CHECK_HEADERS(stdint.h) |
175 | 180 |
0 | 0 | EXTRA_DIST=test.msg |
1 | 1 | INCLUDES=-I$(top_srcdir) |
2 | 2 | LDADD=../mimetic/libmimetic.la |
3 | EXAMPLES=b64 qp exbin structure catpart buildidx search mbox mm | |
3 | EXAMPLES=b64 qp exbin structure catpart buildidx search mbox mm \ | |
4 | smime2xml smimestruct | |
4 | 5 | |
5 | 6 | clean-local: |
6 | rm -f b64 qp exbin structure catpart buildidx search mbox mm | |
7 | rm -f b64 qp exbin structure catpart buildidx search mbox mm \ | |
8 | smime2xml smimestruct | |
7 | 9 | |
8 | 10 | examples: $(EXAMPLES) |
9 | 11 | |
26 | 28 | mbox_SOURCES=mbox.cxx |
27 | 29 | |
28 | 30 | mm_SOURCES=mm.cxx mm.h engine.h engine.cxx cmdline.cxx cmdline.h |
31 | ||
32 | smimestruct_SOURCES=smimestruct.cxx | |
33 | smimestruct_LDADD=-lcrypto -lssl ../mimetic/libmimetic.la | |
34 | ||
35 | smime2xml_SOURCES=smime2xml.cxx | |
36 | smime2xml_LDADD=-lcrypto -lssl ../mimetic/libmimetic.la | |
37 |
92 | 92 | EXTRA_DIST = test.msg |
93 | 93 | INCLUDES = -I$(top_srcdir) |
94 | 94 | LDADD = ../mimetic/libmimetic.la |
95 | EXAMPLES = b64 qp exbin structure catpart buildidx search mbox mm | |
95 | EXAMPLES = b64 qp exbin structure catpart buildidx search mbox mm smime2xml smimestruct | |
96 | ||
96 | 97 | |
97 | 98 | EXTRA_PROGRAMS = $(EXAMPLES) |
98 | 99 | |
113 | 114 | mbox_SOURCES = mbox.cxx |
114 | 115 | |
115 | 116 | mm_SOURCES = mm.cxx mm.h engine.h engine.cxx cmdline.cxx cmdline.h |
117 | ||
118 | smimestruct_SOURCES = smimestruct.cxx | |
119 | smimestruct_LDADD = -lcrypto -lssl ../mimetic/libmimetic.la | |
120 | ||
121 | smime2xml_SOURCES = smime2xml.cxx | |
122 | smime2xml_LDADD = -lcrypto -lssl ../mimetic/libmimetic.la | |
116 | 123 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |
117 | 124 | CONFIG_HEADER = ../mimetic/config.h |
118 | 125 | CONFIG_CLEAN_FILES = |
157 | 164 | mm_LDADD = $(LDADD) |
158 | 165 | mm_DEPENDENCIES = ../mimetic/libmimetic.la |
159 | 166 | mm_LDFLAGS = |
167 | smime2xml_OBJECTS = smime2xml.$(OBJEXT) | |
168 | smime2xml_DEPENDENCIES = ../mimetic/libmimetic.la | |
169 | smime2xml_LDFLAGS = | |
170 | smimestruct_OBJECTS = smimestruct.$(OBJEXT) | |
171 | smimestruct_DEPENDENCIES = ../mimetic/libmimetic.la | |
172 | smimestruct_LDFLAGS = | |
160 | 173 | CXXFLAGS = @CXXFLAGS@ |
161 | 174 | CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) |
162 | 175 | LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) |
174 | 187 | |
175 | 188 | TAR = tar |
176 | 189 | GZIP_ENV = --best |
177 | SOURCES = $(b64_SOURCES) $(qp_SOURCES) $(exbin_SOURCES) $(structure_SOURCES) $(catpart_SOURCES) $(buildidx_SOURCES) $(search_SOURCES) $(mbox_SOURCES) $(mm_SOURCES) | |
178 | OBJECTS = $(b64_OBJECTS) $(qp_OBJECTS) $(exbin_OBJECTS) $(structure_OBJECTS) $(catpart_OBJECTS) $(buildidx_OBJECTS) $(search_OBJECTS) $(mbox_OBJECTS) $(mm_OBJECTS) | |
190 | SOURCES = $(b64_SOURCES) $(qp_SOURCES) $(exbin_SOURCES) $(structure_SOURCES) $(catpart_SOURCES) $(buildidx_SOURCES) $(search_SOURCES) $(mbox_SOURCES) $(mm_SOURCES) $(smime2xml_SOURCES) $(smimestruct_SOURCES) | |
191 | OBJECTS = $(b64_OBJECTS) $(qp_OBJECTS) $(exbin_OBJECTS) $(structure_OBJECTS) $(catpart_OBJECTS) $(buildidx_OBJECTS) $(search_OBJECTS) $(mbox_OBJECTS) $(mm_OBJECTS) $(smime2xml_OBJECTS) $(smimestruct_OBJECTS) | |
179 | 192 | |
180 | 193 | all: all-redirect |
181 | 194 | .SUFFIXES: |
267 | 280 | mm$(EXEEXT): $(mm_OBJECTS) $(mm_DEPENDENCIES) |
268 | 281 | @rm -f mm$(EXEEXT) |
269 | 282 | $(CXXLINK) $(mm_LDFLAGS) $(mm_OBJECTS) $(mm_LDADD) $(LIBS) |
283 | ||
284 | smime2xml$(EXEEXT): $(smime2xml_OBJECTS) $(smime2xml_DEPENDENCIES) | |
285 | @rm -f smime2xml$(EXEEXT) | |
286 | $(CXXLINK) $(smime2xml_LDFLAGS) $(smime2xml_OBJECTS) $(smime2xml_LDADD) $(LIBS) | |
287 | ||
288 | smimestruct$(EXEEXT): $(smimestruct_OBJECTS) $(smimestruct_DEPENDENCIES) | |
289 | @rm -f smimestruct$(EXEEXT) | |
290 | $(CXXLINK) $(smimestruct_LDFLAGS) $(smimestruct_OBJECTS) $(smimestruct_LDADD) $(LIBS) | |
270 | 291 | .cxx.o: |
271 | 292 | $(CXXCOMPILE) -c $< |
272 | 293 | .cxx.obj: |
318 | 339 | || cp -p $$d/$$file $(distdir)/$$file || :; \ |
319 | 340 | fi; \ |
320 | 341 | done |
342 | smimestruct.o: smimestruct.cxx ../mimetic/mimetic.h \ | |
343 | ../mimetic/libconfig.h ../mimetic/config.h ../mimetic/version.h \ | |
344 | ../mimetic/body.h ../mimetic/rfc822/body.h \ | |
345 | ../mimetic/codec/code.h ../mimetic/codec/codec_base.h \ | |
346 | ../mimetic/codec/codec_chain.h ../mimetic/codec/other_codecs.h \ | |
347 | ../mimetic/utils.h ../mimetic/strutils.h \ | |
348 | ../mimetic/mimeentitylist.h ../mimetic/os/file.h \ | |
349 | ../mimetic/os/stdfile.h ../mimetic/os/fileop.h \ | |
350 | ../mimetic/os/file_iterator.h ../mimetic/os/mmfile.h \ | |
351 | ../mimetic/circular_buffer.h ../mimetic/contentdescription.h \ | |
352 | ../mimetic/rfc822/fieldvalue.h ../mimetic/contentdisposition.h \ | |
353 | ../mimetic/fieldparam.h ../mimetic/contenttransferencoding.h \ | |
354 | ../mimetic/contenttype.h ../mimetic/header.h \ | |
355 | ../mimetic/rfc822/header.h ../mimetic/rfc822/field.h \ | |
356 | ../mimetic/rfc822/mailbox.h ../mimetic/rfc822/messageid.h \ | |
357 | ../mimetic/os/utils.h ../mimetic/rfc822/mailboxlist.h \ | |
358 | ../mimetic/rfc822/addresslist.h ../mimetic/rfc822/address.h \ | |
359 | ../mimetic/rfc822/group.h ../mimetic/mimeversion.h \ | |
360 | ../mimetic/contentid.h ../mimetic/message.h \ | |
361 | ../mimetic/mimeentity.h ../mimetic/codec/codec.h \ | |
362 | ../mimetic/codec/base64.h ../mimetic/codec/qp.h \ | |
363 | ../mimetic/parser/itparserdecl.h ../mimetic/streambufs.h \ | |
364 | ../mimetic/tokenizer.h ../mimetic/os/os.h \ | |
365 | ../mimetic/parser/itparser.h ../mimetic/tree.h | |
321 | 366 | |
322 | 367 | info-am: |
323 | 368 | info: info-am |
390 | 435 | |
391 | 436 | |
392 | 437 | clean-local: |
393 | rm -f b64 qp exbin structure catpart buildidx search mbox mm | |
438 | rm -f b64 qp exbin structure catpart buildidx search mbox mm \ | |
439 | smime2xml smimestruct | |
394 | 440 | |
395 | 441 | examples: $(EXAMPLES) |
396 | 442 |
0 | #include <iostream> | |
1 | #include <fstream> | |
2 | #include <sstream> | |
3 | #include <iterator> | |
4 | #include <streambuf> | |
5 | #include <mimetic/mimetic.h> | |
6 | #include <mimetic/utils.h> | |
7 | #include <openssl/bio.h> | |
8 | #include <openssl/pkcs7.h> | |
9 | #include <openssl/x509.h> | |
10 | #include <openssl/err.h> | |
11 | #include <openssl/ssl.h> | |
12 | ||
13 | using namespace std; | |
14 | using namespace mimetic; | |
15 | ||
16 | void printMimeStructure(MimeEntity* pMe, int tabcount = 0); | |
17 | ||
18 | int g_verbose; // verbose mode on/off | |
19 | int g_quiet; // quiet mode | |
20 | ||
21 | void printTabs(int c) | |
22 | { | |
23 | while(c--) | |
24 | cout << " "; | |
25 | } | |
26 | ||
27 | int bca_pkcs7_verify(PKCS7 *p7) | |
28 | { | |
29 | return ~0; | |
30 | } | |
31 | ||
32 | int pkcs7MimeHandle(MimeEntity* pMe, int tabcount) | |
33 | { | |
34 | BIO *in = NULL, *content = NULL; | |
35 | PKCS7 *p7 = NULL; | |
36 | long sz; | |
37 | char *pdata = NULL; | |
38 | int rc = ~0, vfy, iMask = imPreamble | imEpilogue; | |
39 | string me_str; | |
40 | Header& h = pMe->header(); | |
41 | ContentType ct = h.contentType(); | |
42 | ||
43 | { | |
44 | stringstream ss; | |
45 | ss << *pMe; | |
46 | me_str = ss.str(); | |
47 | } | |
48 | ||
49 | in = BIO_new_mem_buf((void*)me_str.c_str(), me_str.length()); | |
50 | if(in == NULL) | |
51 | goto err; | |
52 | BIO_set_mem_eof_return(in, 0); | |
53 | ||
54 | p7 = SMIME_read_PKCS7(in, &content); | |
55 | if(p7 == NULL) | |
56 | goto err; | |
57 | ||
58 | vfy = bca_pkcs7_verify(p7); | |
59 | ||
60 | if(content == NULL) | |
61 | { | |
62 | content = PKCS7_dataInit(p7, NULL); | |
63 | if(content == NULL) | |
64 | goto err; | |
65 | } else { | |
66 | ; /* multipart/signed, content is the cleartext message part */ | |
67 | goto err; | |
68 | } | |
69 | ||
70 | sz = BIO_get_mem_data(content, &pdata); | |
71 | if(sz > 0 && pdata) | |
72 | { | |
73 | MimeEntity me(pdata, pdata + sz, iMask); | |
74 | printMimeStructure(&me, 1 + tabcount); | |
75 | } | |
76 | ||
77 | /* success */ | |
78 | rc = 0; | |
79 | err: | |
80 | if(in) | |
81 | BIO_free(in); | |
82 | if(content) | |
83 | BIO_free(content); | |
84 | if(p7) | |
85 | PKCS7_free(p7); | |
86 | if(rc) | |
87 | ERR_print_errors_fp(stderr); | |
88 | return rc; | |
89 | } | |
90 | ||
91 | void printMimeStructure(MimeEntity* pMe, int tabcount) | |
92 | { | |
93 | Header& h = pMe->header(); | |
94 | ContentType ct = h.contentType(); | |
95 | ContentId ci = h.contentId(); | |
96 | ContentDisposition cd = h.contentDisposition(); | |
97 | ContentDescription cds = h.contentDescription(); | |
98 | ||
99 | cout << "<mime-content>" << endl; | |
100 | cout << "<mime-info>" << endl; | |
101 | cout << "<content-type>" << | |
102 | ct.type() << "/" << ct.subtype() << | |
103 | "</content-type>" << endl; | |
104 | if(ci.str().length()) | |
105 | ;//cout << "<content-id>" << ci.str() << "</content-id>" << endl; | |
106 | if(h.hasField("subject")) | |
107 | cout << "<subject>" << h.field("subject").value() << "</subject>" << | |
108 | endl; | |
109 | if(cd.param("filename").length()) | |
110 | cout << "<filename>" << cd.param("filename") << "</filename>" << | |
111 | endl; | |
112 | if(cds.str().length()) | |
113 | cout << "<description>" << cds.str() << "</description>" << endl; | |
114 | ||
115 | cout << "</mime-info>" << endl; | |
116 | ||
117 | if(ct.isMultipart() || | |
118 | (ct.type() == "message" && ct.subtype() == "rfc822")) | |
119 | { | |
120 | if(ct.subtype() == "signed") | |
121 | { | |
122 | cerr << "S/MIME multipart/signed not yet supported!" << endl; | |
123 | exit(1); | |
124 | } else { | |
125 | //printTabs(tabcount); | |
126 | //cout << ct.type() << "/" << ct.subtype() << endl; | |
127 | ||
128 | MimeEntityList::iterator mbit = pMe->body().parts().begin(), | |
129 | meit = pMe->body().parts().end(); | |
130 | cout << "<structured-data>" << endl; | |
131 | for(; mbit != meit; ++mbit) | |
132 | { | |
133 | printMimeStructure(*mbit, 1 + tabcount); | |
134 | } | |
135 | cout << "</structured-data>" << endl; | |
136 | } | |
137 | } else { | |
138 | if(ct.type() == "application" && | |
139 | (ct.subtype() == "x-pkcs7-mime" || ct.subtype() == "pkcs7-mime")) | |
140 | { | |
141 | cout << "<structured-data>" << endl; | |
142 | pkcs7MimeHandle(pMe, tabcount); | |
143 | cout << "</structured-data>" << endl; | |
144 | } else { | |
145 | ;//printTabs(tabcount); | |
146 | ;//cout << ct.type() << "/" << ct.subtype() << endl; | |
147 | } | |
148 | } | |
149 | cout << "</mime-content>" << endl; | |
150 | } | |
151 | ||
152 | void usage() | |
153 | { | |
154 | cout << "smime2xml in_file" << endl; | |
155 | cout << " -v Verbose mode" << endl; | |
156 | cout << " -q totaly quiet; exit code = num of entities" << endl; | |
157 | cout << endl; | |
158 | exit(1); | |
159 | } | |
160 | ||
161 | int main(int argc, char** argv) | |
162 | { | |
163 | std::ios_base::sync_with_stdio(false); | |
164 | int fidx = 1; | |
165 | int iMask = imPreamble | imEpilogue; | |
166 | ||
167 | /* Initialize the OpenSSL engine. */ | |
168 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | |
169 | OpenSSL_add_all_algorithms(); | |
170 | ERR_load_crypto_strings(); | |
171 | ||
172 | if(argc > 1) | |
173 | { | |
174 | g_verbose = 0; | |
175 | string first = argv[1]; | |
176 | if(first == "-h") | |
177 | usage(); | |
178 | else if(first == "-v") | |
179 | g_verbose = 1; | |
180 | else if(first == "-q") | |
181 | g_quiet = 1; | |
182 | fidx = (g_verbose || g_quiet ? 2 : 1); // first filename idx | |
183 | } | |
184 | if(argc == fidx) | |
185 | { | |
186 | istreambuf_iterator<char> bit(std::cin), eit; | |
187 | MimeEntity me(bit,eit, iMask); | |
188 | printMimeStructure(&me); | |
189 | } else { | |
190 | for(int fc = fidx; fc < argc; ++fc) | |
191 | { | |
192 | File in(argv[fc]); | |
193 | if(!in) | |
194 | { | |
195 | cerr << "ERR: unable to open file " | |
196 | << argv[fc] | |
197 | << endl; | |
198 | continue; | |
199 | } | |
200 | MimeEntity me(in.begin(), in.end(),iMask); | |
201 | if(!me.header().hasField("content-type")) | |
202 | { /* no content-type found, consider it a CMS */ | |
203 | me.header().contentType().set("application/x-pkcs7-mime"); | |
204 | } | |
205 | printMimeStructure(&me); | |
206 | } | |
207 | } | |
208 | return 0; | |
209 | } | |
210 |
0 | #include <iostream> | |
1 | #include <fstream> | |
2 | #include <sstream> | |
3 | #include <iterator> | |
4 | #include <streambuf> | |
5 | #include <mimetic/mimetic.h> | |
6 | #include <mimetic/utils.h> | |
7 | #include <openssl/bio.h> | |
8 | #include <openssl/pkcs7.h> | |
9 | #include <openssl/x509.h> | |
10 | #include <openssl/err.h> | |
11 | #include <openssl/ssl.h> | |
12 | ||
13 | using namespace std; | |
14 | using namespace mimetic; | |
15 | ||
16 | void printMimeStructure(MimeEntity* pMe, int tabcount = 0); | |
17 | ||
18 | int g_verbose; // verbose mode on/off | |
19 | int g_quiet; // quiet mode | |
20 | int g_entityCount; // num of entities found | |
21 | ||
22 | void printTabs(int c) | |
23 | { | |
24 | while(c--) | |
25 | cout << " "; | |
26 | } | |
27 | ||
28 | int bca_pkcs7_verify(PKCS7 *p7) | |
29 | { | |
30 | return ~0; | |
31 | } | |
32 | ||
33 | int pkcs7MimeHandle(MimeEntity* pMe, int tabcount) | |
34 | { | |
35 | BIO *in = NULL, *content = NULL; | |
36 | PKCS7 *p7 = NULL; | |
37 | long sz; | |
38 | char *pdata = NULL; | |
39 | int rc = ~0, vfy, iMask = imPreamble | imEpilogue; | |
40 | string me_str; | |
41 | Header& h = pMe->header(); | |
42 | ContentType ct = h.contentType(); | |
43 | ||
44 | { | |
45 | stringstream ss; | |
46 | ss << *pMe; | |
47 | me_str = ss.str(); | |
48 | } | |
49 | ||
50 | in = BIO_new_mem_buf((void*)me_str.c_str(), me_str.length()); | |
51 | if(in == NULL) | |
52 | goto err; | |
53 | BIO_set_mem_eof_return(in, 0); | |
54 | ||
55 | p7 = SMIME_read_PKCS7(in, &content); | |
56 | if(p7 == NULL) | |
57 | goto err; | |
58 | ||
59 | vfy = bca_pkcs7_verify(p7); | |
60 | ||
61 | printTabs(tabcount); | |
62 | cout << ct.type() << "/" << ct.subtype() | |
63 | << " (verify " << (vfy == 0 ? "ok" : "failed") << ")" | |
64 | << endl; | |
65 | ||
66 | if(content == NULL) | |
67 | { | |
68 | content = PKCS7_dataInit(p7, NULL); | |
69 | if(content == NULL) | |
70 | goto err; | |
71 | } else { | |
72 | ; /* multipart/signed, content is the cleartext message part */ | |
73 | goto err; | |
74 | } | |
75 | ||
76 | sz = BIO_get_mem_data(content, &pdata); | |
77 | if(sz > 0 && pdata) | |
78 | { | |
79 | MimeEntity me(pdata, pdata + sz, iMask); | |
80 | printMimeStructure(&me, 1 + tabcount); | |
81 | } | |
82 | ||
83 | /* success */ | |
84 | rc = 0; | |
85 | err: | |
86 | if(in) | |
87 | BIO_free(in); | |
88 | if(content) | |
89 | BIO_free(content); | |
90 | if(p7) | |
91 | PKCS7_free(p7); | |
92 | if(rc) | |
93 | ERR_print_errors_fp(stderr); | |
94 | return rc; | |
95 | } | |
96 | ||
97 | ||
98 | void printMimeStructure(MimeEntity* pMe, int tabcount) | |
99 | { | |
100 | Header& h = pMe->header(); | |
101 | ContentType ct = h.contentType(); | |
102 | ContentId ci = h.contentId(); | |
103 | ||
104 | ++g_entityCount; | |
105 | ||
106 | if(ct.isMultipart() || | |
107 | (ct.type() == "message" && ct.subtype() == "rfc822")) | |
108 | { | |
109 | if(ct.subtype() == "signed") | |
110 | { | |
111 | cerr << "S/MIME multipart/signed not yet supported!" << endl; | |
112 | exit(1); | |
113 | #if 0 | |
114 | if(pMe->body().parts().size() != 2) | |
115 | cerr << "bad message!" << endl; | |
116 | if(smimeVerify(pMe)) | |
117 | cerr << "S/MIME verification failed" << endl; | |
118 | #endif | |
119 | } else { | |
120 | printTabs(tabcount); | |
121 | cout << ct.type() << "/" << ct.subtype() << endl; | |
122 | ||
123 | MimeEntityList::iterator mbit = pMe->body().parts().begin(), | |
124 | meit = pMe->body().parts().end(); | |
125 | for(; mbit != meit; ++mbit) | |
126 | printMimeStructure(*mbit, 1 + tabcount); | |
127 | } | |
128 | } else { | |
129 | if(ct.type() == "application" && | |
130 | (ct.subtype() == "x-pkcs7-mime" || ct.subtype() == "pkcs7-mime")) | |
131 | { | |
132 | pkcs7MimeHandle(pMe, tabcount); | |
133 | } else { | |
134 | printTabs(tabcount); | |
135 | cout << ct.type() << "/" << ct.subtype() << endl; | |
136 | } | |
137 | } | |
138 | } | |
139 | ||
140 | ||
141 | ||
142 | void usage() | |
143 | { | |
144 | cout << "structure [-v] [in_file]..." << endl; | |
145 | cout << " -v Verbose mode" << endl; | |
146 | cout << " -q totaly quiet; exit code = num of entities" << endl; | |
147 | cout << endl; | |
148 | exit(1); | |
149 | } | |
150 | ||
151 | ||
152 | int main(int argc, char** argv) | |
153 | { | |
154 | std::ios_base::sync_with_stdio(false); | |
155 | int fidx = 1; | |
156 | //int iMask = imBody | imPreamble | imEpilogue; | |
157 | int iMask = imPreamble | imEpilogue; | |
158 | ||
159 | /* Initialize the OpenSSL engine. */ | |
160 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | |
161 | OpenSSL_add_all_algorithms(); | |
162 | ERR_load_crypto_strings(); | |
163 | ||
164 | if(argc > 1) | |
165 | { | |
166 | g_verbose = 0; | |
167 | string first = argv[1]; | |
168 | if(first == "-h") | |
169 | usage(); | |
170 | else if(first == "-v") | |
171 | g_verbose = 1; | |
172 | else if(first == "-q") | |
173 | g_quiet = 1; | |
174 | fidx = (g_verbose || g_quiet ? 2 : 1); // first filename idx | |
175 | } | |
176 | if(argc == fidx) | |
177 | { | |
178 | istreambuf_iterator<char> bit(std::cin), eit; | |
179 | MimeEntity me(bit,eit, iMask); | |
180 | printMimeStructure(&me); | |
181 | } else { | |
182 | for(int fc = fidx; fc < argc; ++fc) | |
183 | { | |
184 | File in(argv[fc]); | |
185 | if(!in) | |
186 | { | |
187 | cerr << "ERR: unable to open file " | |
188 | << argv[fc] | |
189 | << endl; | |
190 | continue; | |
191 | } | |
192 | MimeEntity me(in.begin(), in.end(),iMask); | |
193 | printMimeStructure(&me); | |
194 | } | |
195 | } | |
196 | return g_entityCount; | |
197 | } | |
198 |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: structure.cxx,v 1.2 2005/02/23 10:26:14 tat Exp $ | |
4 | $Id: structure.cxx,v 1.5 2007/01/21 14:55:33 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
18 | 18 | * Reads in_file (or standard input) and writes its MIME structure to out_file |
19 | 19 | * (or standard output) |
20 | 20 | */ |
21 | #ifdef HAVE_CONFIG_H | |
22 | #include <config.h> | |
23 | #endif | |
24 | 21 | |
25 | 22 | #include <iostream> |
26 | 23 | #include <fstream> |
50 | 47 | { |
51 | 48 | Header& h = pMe->header(); |
52 | 49 | ContentType ct = h.contentType(); |
50 | cout << g_entityCount << " "; | |
53 | 51 | printTabs(tabcount); |
54 | 52 | cout << ct.type() << "/" << ct.subtype() << endl; |
55 | 53 | if(g_verbose) |
131 | 129 | exit(1); |
132 | 130 | } |
133 | 131 | |
134 | ||
135 | 132 | int main(int argc, char** argv) |
136 | 133 | { |
137 | 134 | std::ios_base::sync_with_stdio(false); |
138 | 135 | int fidx = 1; |
139 | 136 | int iMask = imBody | imPreamble | imEpilogue; |
137 | ||
140 | 138 | if(argc > 1) |
141 | 139 | { |
142 | 140 | g_verbose = 0; |
8 | 8 | include_HEADERS= \ |
9 | 9 | body.h contenttransferencoding.h mimeentity.h tokenizer.h \ |
10 | 10 | circular_buffer.h contenttype.h mimeentitylist.h tree.h \ |
11 | fieldparam.h mimetic.h utils.h config.h \ | |
11 | fieldparam.h mimetic.h utils.h \ | |
12 | 12 | contentdescription.h header.h mimeversion.h version.h \ |
13 | 13 | contentdisposition.h libconfig.h streambufs.h \ |
14 | 14 | contentid.h message.h strutils.h |
96 | 96 | #CPPFLAGS=-Winline |
97 | 97 | includedir = @INCLUDEDIR@ |
98 | 98 | |
99 | include_HEADERS = body.h contenttransferencoding.h mimeentity.h tokenizer.h circular_buffer.h contenttype.h mimeentitylist.h tree.h fieldparam.h mimetic.h utils.h config.h contentdescription.h header.h mimeversion.h version.h contentdisposition.h libconfig.h streambufs.h contentid.h message.h strutils.h | |
99 | include_HEADERS = body.h contenttransferencoding.h mimeentity.h tokenizer.h circular_buffer.h contenttype.h mimeentitylist.h tree.h fieldparam.h mimetic.h utils.h contentdescription.h header.h mimeversion.h version.h contentdisposition.h libconfig.h streambufs.h contentid.h message.h strutils.h | |
100 | 100 | |
101 | 101 | |
102 | 102 | libmimetic_la_SOURCES = body.cxx contenttransferencoding.cxx message.cxx utils.cxx contentdescription.cxx contenttype.cxx mimeentity.cxx version.cxx contentdisposition.cxx fieldparam.cxx mimeversion.cxx contentid.cxx header.cxx strutils.cxx |
393 | 393 | codec/code.h codec/other_codecs.h os/file.h os/stdfile.h \ |
394 | 394 | os/fileop.h os/file_iterator.h os/mmfile.h header.h \ |
395 | 395 | rfc822/header.h rfc822/field.h rfc822/mailbox.h \ |
396 | rfc822/messageid.h config.h os/utils.h rfc822/mailboxlist.h \ | |
396 | rfc822/messageid.h os/utils.h rfc822/mailboxlist.h \ | |
397 | 397 | rfc822/addresslist.h rfc822/address.h rfc822/group.h \ |
398 | 398 | contentid.h contentdescription.h body.h rfc822/body.h \ |
399 | 399 | parser/itparserdecl.h streambufs.h |
414 | 414 | utils.h libconfig.h config.h |
415 | 415 | header.lo header.o : header.cxx header.h rfc822/header.h strutils.h \ |
416 | 416 | utils.h libconfig.h config.h rfc822/field.h rfc822/fieldvalue.h \ |
417 | rfc822/mailbox.h rfc822/messageid.h config.h os/utils.h \ | |
417 | rfc822/mailbox.h rfc822/messageid.h os/utils.h \ | |
418 | 418 | rfc822/mailboxlist.h rfc822/addresslist.h rfc822/address.h \ |
419 | 419 | rfc822/group.h mimeversion.h version.h contenttype.h \ |
420 | 420 | fieldparam.h contentid.h contenttransferencoding.h \ |
427 | 427 | codec/base64.h circular_buffer.h codec/qp.h codec/code.h \ |
428 | 428 | codec/other_codecs.h os/file.h os/stdfile.h os/fileop.h \ |
429 | 429 | os/file_iterator.h os/mmfile.h header.h rfc822/header.h \ |
430 | rfc822/field.h rfc822/mailbox.h rfc822/messageid.h config.h \ | |
431 | os/utils.h rfc822/mailboxlist.h rfc822/addresslist.h \ | |
432 | rfc822/address.h rfc822/group.h contentid.h \ | |
433 | contentdescription.h body.h rfc822/body.h parser/itparserdecl.h \ | |
434 | streambufs.h | |
430 | rfc822/field.h rfc822/mailbox.h rfc822/messageid.h os/utils.h \ | |
431 | rfc822/mailboxlist.h rfc822/addresslist.h rfc822/address.h \ | |
432 | rfc822/group.h contentid.h contentdescription.h body.h \ | |
433 | rfc822/body.h parser/itparserdecl.h streambufs.h | |
435 | 434 | mimeentity.lo mimeentity.o : mimeentity.cxx mimeentity.h strutils.h \ |
436 | 435 | utils.h libconfig.h config.h contenttype.h rfc822/fieldvalue.h \ |
437 | 436 | fieldparam.h contenttransferencoding.h contentdisposition.h \ |
440 | 439 | circular_buffer.h codec/qp.h codec/code.h codec/other_codecs.h \ |
441 | 440 | os/file.h os/stdfile.h os/fileop.h os/file_iterator.h \ |
442 | 441 | os/mmfile.h header.h rfc822/header.h rfc822/field.h \ |
443 | rfc822/mailbox.h rfc822/messageid.h config.h os/utils.h \ | |
442 | rfc822/mailbox.h rfc822/messageid.h os/utils.h \ | |
444 | 443 | rfc822/mailboxlist.h rfc822/addresslist.h rfc822/address.h \ |
445 | 444 | rfc822/group.h contentid.h contentdescription.h body.h \ |
446 | 445 | rfc822/body.h parser/itparserdecl.h streambufs.h tokenizer.h \ |
450 | 449 | config.h |
451 | 450 | strutils.lo strutils.o : strutils.cxx strutils.h |
452 | 451 | utils.lo utils.o : utils.cxx utils.h libconfig.h config.h strutils.h |
453 | version.lo version.o : version.cxx version.h utils.h libconfig.h \ | |
454 | config.h strutils.h tokenizer.h | |
452 | version.lo version.o : version.cxx config.h version.h utils.h \ | |
453 | libconfig.h strutils.h tokenizer.h | |
455 | 454 | |
456 | 455 | info-am: |
457 | 456 | info: info-recursive |
0 | /* mimetic/config.h. Generated by configure. */ | |
1 | /* mimetic/config.h.in. Generated from configure.in by autoheader. */ | |
2 | ||
3 | /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. | |
4 | */ | |
5 | #define HAVE_DIRENT_H 1 | |
6 | ||
7 | /* Define to 1 if you have the <dlfcn.h> header file. */ | |
8 | #define HAVE_DLFCN_H 1 | |
9 | ||
10 | /* Define to 1 if you have the `getpagesize' function. */ | |
11 | #define HAVE_GETPAGESIZE 1 | |
12 | ||
13 | /* Define to 1 if you have the <inttypes.h> header file. */ | |
14 | #define HAVE_INTTYPES_H 1 | |
15 | ||
16 | /* Define to 1 if you have the `madvise' function. */ | |
17 | #define HAVE_MADVISE 1 | |
18 | ||
19 | /* Define to 1 if you have the <memory.h> header file. */ | |
20 | #define HAVE_MEMORY_H 1 | |
21 | ||
22 | /* Define to 1 if you have a working `mmap' system call. */ | |
23 | #define HAVE_MMAP 1 | |
24 | ||
25 | /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ | |
26 | /* #undef HAVE_NDIR_H */ | |
27 | ||
28 | /* Define to 1 if you have the <stdint.h> header file. */ | |
29 | #define HAVE_STDINT_H 1 | |
30 | ||
31 | /* Define to 1 if you have the <stdlib.h> header file. */ | |
32 | #define HAVE_STDLIB_H 1 | |
33 | ||
34 | /* Define to 1 if you have the <strings.h> header file. */ | |
35 | #define HAVE_STRINGS_H 1 | |
36 | ||
37 | /* Define to 1 if you have the <string.h> header file. */ | |
38 | #define HAVE_STRING_H 1 | |
39 | ||
40 | /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. | |
41 | */ | |
42 | /* #undef HAVE_SYS_DIR_H */ | |
43 | ||
44 | /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. | |
45 | */ | |
46 | /* #undef HAVE_SYS_NDIR_H */ | |
47 | ||
48 | /* Define to 1 if you have the <sys/stat.h> header file. */ | |
49 | #define HAVE_SYS_STAT_H 1 | |
50 | ||
51 | /* Define to 1 if you have the <sys/time.h> header file. */ | |
52 | #define HAVE_SYS_TIME_H 1 | |
53 | ||
54 | /* Define to 1 if you have the <sys/types.h> header file. */ | |
55 | #define HAVE_SYS_TYPES_H 1 | |
56 | ||
57 | /* Define to 1 if you have the <unistd.h> header file. */ | |
58 | #define HAVE_UNISTD_H 1 | |
59 | ||
60 | /* Name of package */ | |
61 | #define PACKAGE "mimetic" | |
62 | ||
63 | /* Define to the address where bug reports for this package should be sent. */ | |
64 | #define PACKAGE_BUGREPORT "" | |
65 | ||
66 | /* Define to the full name of this package. */ | |
67 | #define PACKAGE_NAME "" | |
68 | ||
69 | /* Define to the full name and version of this package. */ | |
70 | #define PACKAGE_STRING "" | |
71 | ||
72 | /* Define to the one symbol short name of this package. */ | |
73 | #define PACKAGE_TARNAME "" | |
74 | ||
75 | /* Define to the version of this package. */ | |
76 | #define PACKAGE_VERSION "" | |
77 | ||
78 | /* Define to 1 if you have the ANSI C header files. */ | |
79 | #define STDC_HEADERS 1 | |
80 | ||
81 | /* Version number of package */ | |
82 | #define VERSION "0.9.1" | |
83 | ||
84 | /* Define to `int' if <sys/types.h> doesn't define. */ | |
85 | /* #undef gid_t */ | |
86 | ||
87 | /* Define to `long' if <sys/types.h> does not define. */ | |
88 | /* #undef off_t */ | |
89 | ||
90 | /* Define to `unsigned' if <sys/types.h> does not define. */ | |
91 | /* #undef size_t */ | |
92 | ||
93 | /* Define to `int' if <sys/types.h> doesn't define. */ | |
94 | /* #undef uid_t */ |
14 | 14 | #define HAVE_SYS_TYPES_H 1 |
15 | 15 | |
16 | 16 | #define PACKAGE "mimetic" |
17 | #define VERSION "0.8.7" | |
17 | #define VERSION "0.9.2" |
1 | 1 | copyright : (C) by 2002-2004 Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: libconfig.h,v 1.7 2005/02/23 10:26:14 tat Exp $ | |
4 | $Id: libconfig.h,v 1.8 2006/04/18 14:10:52 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
15 | 15 | #ifndef _MIMETIC_LIB_CONFIG_H_ |
16 | 16 | #define _MIMETIC_LIB_CONFIG_H_ |
17 | 17 | #if defined(__unix__) || defined(__linux__) || defined(__unix) || defined(_AIX) |
18 | #ifdef HAVE_MIMETIC_CONFIG | |
18 | 19 | #include "config.h" |
20 | #endif | |
19 | 21 | #define CONFIG_UNIX |
20 | 22 | #endif |
21 | 23 | |
22 | 24 | /* Mac OS X */ |
23 | 25 | #if defined(__APPLE__) && defined(__MACH__) |
26 | #ifdef HAVE_MIMETIC_CONFIG | |
24 | 27 | #include "config.h" |
28 | #endif | |
25 | 29 | #define CONFIG_UNIX |
26 | 30 | #endif |
27 | 31 |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: message.cxx,v 1.2 2005/02/23 10:26:14 tat Exp $ | |
4 | $Id: message.cxx,v 1.3 2006/10/09 13:38:30 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
24 | 24 | using namespace std; |
25 | 25 | Attachment::Attachment(const std::string& fqn) |
26 | 26 | { |
27 | set(fqn, ContentType("application","octect-stream"),Base64::Encoder()); | |
27 | set(fqn, ContentType("application","octet-stream"),Base64::Encoder()); | |
28 | 28 | } |
29 | 29 | |
30 | 30 | Attachment::Attachment(const std::string& fqn, const ContentType& ct) |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: message.h,v 1.11 2005/03/07 15:35:08 tat Exp $ | |
4 | $Id: message.h,v 1.12 2006/10/09 13:38:30 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
107 | 107 | }; |
108 | 108 | |
109 | 109 | |
110 | /// application/octect-stream entity class | |
110 | /// application/octet-stream entity class | |
111 | 111 | struct ApplicationOctStream: public MimeEntity |
112 | 112 | { |
113 | 113 | ApplicationOctStream(); |
128 | 128 | struct Attachment: public MimeEntity |
129 | 129 | { |
130 | 130 | /** |
131 | * defaults to application/octect-stream | |
131 | * defaults to application/octet-stream | |
132 | 132 | */ |
133 | 133 | Attachment(const std::string&); |
134 | 134 | Attachment(const std::string&, const ContentType&); |
188 | 188 | |
189 | 189 | |
190 | 190 | /** |
191 | * defaults to application/octect-stream | |
191 | * defaults to application/octet-stream | |
192 | 192 | */ |
193 | 193 | template<typename Codec> |
194 | 194 | Attachment::Attachment(const std::string& fqn, const Codec& codec) |
195 | 195 | { |
196 | set(fqn, ContentType("application","octect-stream"), codec); | |
196 | set(fqn, ContentType("application","octet-stream"), codec); | |
197 | 197 | } |
198 | 198 | |
199 | 199 | template<typename Codec> |
1 | 1 | #define _MIMETIC_OS_DIRECTORY_H_ |
2 | 2 | #include <string> |
3 | 3 | #include <iterator> |
4 | #include <mimetic/config.h> | |
4 | #include <mimetic/libconfig.h> | |
5 | 5 | #ifdef HAVE_DIRENT_H |
6 | 6 | #include <dirent.h> |
7 | 7 | #endif |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: fileop.cxx,v 1.2 2005/02/23 10:26:15 tat Exp $ | |
4 | $Id: fileop.cxx,v 1.4 2007/01/21 14:08:57 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
17 | 17 | #ifdef HAVE_UNISTD_H |
18 | 18 | #include <unistd.h> |
19 | 19 | #endif |
20 | #ifdef HAVE_SYS_TYPES_H | |
21 | #include <sys/types.h> | |
22 | #endif | |
20 | 23 | #ifdef HAVE_SYS_STAT_H |
21 | 24 | #include <sys/stat.h> |
22 | 25 | #endif |
23 | 26 | |
24 | 27 | using namespace std; |
25 | ||
26 | 28 | |
27 | 29 | namespace mimetic |
28 | 30 | { |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: mmfile.cxx,v 1.4 2006/04/11 10:04:58 tat Exp $ | |
4 | $Id: mmfile.cxx,v 1.5 2006/07/13 13:36:25 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
44 | 44 | |
45 | 45 | bool MMFile::open(const std::string& fqn, int mode /*= O_RDONLY*/) |
46 | 46 | { |
47 | m_fqn = fqn; | |
47 | 48 | if(!stat() || !S_ISREG(m_st.st_mode)) |
48 | 49 | return false; |
49 | m_fqn = fqn; | |
50 | 50 | return open(mode); |
51 | 51 | } |
52 | 52 |
443 | 443 | // std::string because I want to be as fast as possible here |
444 | 444 | virtual void copy_until_boundary(ParsingElem pe) |
445 | 445 | { |
446 | size_t pos, lines, eomsz; | |
446 | size_t pos, lines, eomsz = 0; | |
447 | 447 | register char c; |
448 | 448 | enum { nlsz = 1 }; |
449 | char nl[2] = { NL, 0 }; | |
450 | 449 | const char *eom = 0; |
451 | 450 | |
452 | 451 | enum { blksz = 4096 }; |
500 | 499 | { |
501 | 500 | // not an empty row, is this a boundary? |
502 | 501 | block[blkpos] = 0; |
503 | if(block[sl_off] == '-' && | |
504 | sl_off < blkpos && | |
502 | if(block[sl_off] == '-' && sl_off < blkpos && | |
505 | 503 | block[sl_off+1] == '-') |
506 | 504 | { |
507 | 505 | std::string Line(block+sl_off, blkpos-sl_off); |
508 | 506 | if(isBoundary(Line)) |
509 | 507 | { |
510 | 508 | // trim last newline |
511 | int i = sl_off; | |
512 | char a = block[--i]; | |
513 | char b = block[--i]; | |
514 | if(isnl(a,b)) | |
515 | sl_off -= 2; | |
516 | else if(isnl(a)) | |
509 | if (sl_off>=2) | |
510 | { | |
511 | int i = sl_off; | |
512 | char a = block[--i]; | |
513 | char b = block[--i]; | |
514 | ||
515 | if(isnl(a,b)) | |
516 | sl_off -= 2; | |
517 | else if(isnl(a)) | |
518 | sl_off--; | |
519 | ||
520 | } else if (sl_off==1 && isnl(block[0])) { | |
517 | 521 | sl_off--; |
518 | onBlock(block, sl_off, | |
519 | pe); | |
522 | } | |
523 | onBlock(block, sl_off, pe); | |
520 | 524 | return; |
521 | 525 | } |
522 | 526 | } |
674 | 678 | m_lastBoundary = ClosingBoundary; |
675 | 679 | m_bit = off + 2; |
676 | 680 | } |
677 | if(m_bit < m_eit && isnl(*m_bit)) | |
681 | if(m_bit < m_eit-1 && isnl(*m_bit)) | |
678 | 682 | { |
679 | 683 | char c = *m_bit++; |
680 | 684 | char next = *m_bit; |
281 | 281 | header.lo header.o : header.cxx header.h ../../mimetic/strutils.h \ |
282 | 282 | ../../mimetic/utils.h ../../mimetic/libconfig.h \ |
283 | 283 | ../../mimetic/config.h field.h fieldvalue.h mailbox.h \ |
284 | messageid.h ../../mimetic/config.h ../../mimetic/os/utils.h \ | |
285 | mailboxlist.h addresslist.h address.h group.h | |
284 | messageid.h ../../mimetic/os/utils.h mailboxlist.h \ | |
285 | addresslist.h address.h group.h | |
286 | 286 | mailbox.lo mailbox.o : mailbox.cxx mailbox.h fieldvalue.h \ |
287 | 287 | ../../mimetic/strutils.h |
288 | 288 | mailboxlist.lo mailboxlist.o : mailboxlist.cxx mailboxlist.h \ |
292 | 292 | message.lo message.o : message.cxx message.h header.h \ |
293 | 293 | ../../mimetic/strutils.h ../../mimetic/utils.h \ |
294 | 294 | ../../mimetic/libconfig.h ../../mimetic/config.h field.h \ |
295 | fieldvalue.h mailbox.h messageid.h ../../mimetic/config.h \ | |
296 | ../../mimetic/os/utils.h mailboxlist.h addresslist.h address.h \ | |
297 | group.h body.h | |
295 | fieldvalue.h mailbox.h messageid.h ../../mimetic/os/utils.h \ | |
296 | mailboxlist.h addresslist.h address.h group.h body.h | |
298 | 297 | messageid.lo messageid.o : messageid.cxx messageid.h \ |
299 | ../../mimetic/config.h ../../mimetic/utils.h \ | |
300 | 298 | ../../mimetic/libconfig.h ../../mimetic/config.h \ |
301 | ../../mimetic/strutils.h ../../mimetic/os/utils.h fieldvalue.h | |
299 | ../../mimetic/utils.h ../../mimetic/strutils.h \ | |
300 | ../../mimetic/os/utils.h fieldvalue.h | |
302 | 301 | |
303 | 302 | info-am: |
304 | 303 | info: info-am |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: datetime.cxx,v 1.2 2005/02/23 10:26:15 tat Exp $ | |
4 | $Id: datetime.cxx,v 1.3 2007/01/21 14:55:34 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
283 | 283 | } |
284 | 284 | |
285 | 285 | // gg mon aa[aa] |
286 | for(; i < 3; ++i) | |
286 | while(i < 3) | |
287 | 287 | { |
288 | 288 | if(!stok.next(tok)) return; |
289 | if(tok.empty()) | |
290 | continue; /* there's a ' ' after ',' ("Wed, 23 Nov...") */ | |
289 | 291 | switch(i) |
290 | 292 | { |
291 | 293 | case 0: m_iDay = utils::str2int(tok); break; |
292 | 294 | case 1: m_iMonth = Month(tok).ordinal(); break; |
293 | 295 | case 2: m_iYear = utils::str2int(tok); break; |
294 | 296 | } |
295 | } | |
297 | ++i; | |
298 | } | |
299 | ||
296 | 300 | stok.setDelimList(" :"); |
297 | for(int i = 0; i < 3; ++i) | |
301 | for(i = 0; i < 3; ++i) | |
298 | 302 | { |
299 | 303 | if(!stok.next(tok)) return; |
300 | 304 | switch(i) |
393 | 397 | ostream& operator<<(ostream& os, const DateTime& dt) |
394 | 398 | { |
395 | 399 | int width = os.width(), fill = os.fill(); |
400 | ||
396 | 401 | os << dt.dayOfWeek().name() << ", " |
397 | 402 | << setw(2) << setfill('0') << dt.day() << " " |
398 | 403 | << dt.month().name() << " " |
401 | 406 | << setw(2) << setfill('0') << dt.minute() << ":" |
402 | 407 | << setw(2) << setfill('0') << dt.second() << " " |
403 | 408 | << dt.zone().name(); |
409 | ||
404 | 410 | os.width(width); |
405 | 411 | os.fill(fill); |
406 | 412 | return os; |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: datetime.h,v 1.11 2005/02/23 10:26:15 tat Exp $ | |
4 | $Id: datetime.h,v 1.12 2007/01/21 14:55:34 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
105 | 105 | short second() const; |
106 | 106 | Zone zone() const; |
107 | 107 | std::string str() const; |
108 | //friend std::ostream& operator<<(std::ostream&, const DateTime&); | |
108 | friend std::ostream& operator<<(std::ostream&, const DateTime&); | |
109 | 109 | protected: |
110 | 110 | FieldValue* clone() const; |
111 | 111 | private: |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: messageid.h,v 1.13 2006/04/11 10:04:58 tat Exp $ | |
4 | $Id: messageid.h,v 1.14 2006/04/18 14:10:52 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
18 | 18 | #include <stdint.h> |
19 | 19 | #endif |
20 | 20 | #include <string> |
21 | #include <mimetic/config.h> | |
21 | #include <mimetic/libconfig.h> | |
22 | 22 | #ifdef HAVE_INTTYPES_H |
23 | 23 | #include <inttypes.h> |
24 | 24 | #endif |
1 | 1 | copyright : (C) 2002-2005 by Stefano Barbato |
2 | 2 | email : stefano@codesink.org |
3 | 3 | |
4 | $Id: version.cxx,v 1.2 2005/02/23 10:26:14 tat Exp $ | |
4 | $Id: version.cxx,v 1.3 2007/01/21 11:39:04 tat Exp $ | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
7 | 7 | /*************************************************************************** |
13 | 13 | * * |
14 | 14 | ***************************************************************************/ |
15 | 15 | #include <iostream> |
16 | #include <mimetic/config.h> | |
16 | 17 | #include <mimetic/version.h> |
17 | 18 | #include <mimetic/utils.h> |
18 | 19 | #include <mimetic/tokenizer.h> |
323 | 323 | ../mimetic/strutils.h ../mimetic/rfc822/fieldvalue.h \ |
324 | 324 | ../mimetic/fieldparam.h t.contenttype.h cutee.h |
325 | 325 | t.directory.cutee.o: t.directory.cutee.cxx cutee.h t.directory.h \ |
326 | ../mimetic/os/directory.h ../mimetic/config.h \ | |
327 | ../mimetic/os/fileop.h ../mimetic/utils.h \ | |
328 | ../mimetic/libconfig.h ../mimetic/config.h \ | |
326 | ../mimetic/os/directory.h ../mimetic/libconfig.h \ | |
327 | ../mimetic/config.h ../mimetic/os/fileop.h ../mimetic/utils.h \ | |
329 | 328 | ../mimetic/strutils.h |
330 | 329 | t.fieldparam.cutee.o: t.fieldparam.cutee.cxx cutee.h t.fieldparam.h \ |
331 | 330 | ../mimetic/fieldparam.h ../mimetic/strutils.h |
356 | 355 | ../mimetic/contenttype.h ../mimetic/header.h \ |
357 | 356 | ../mimetic/rfc822/header.h ../mimetic/rfc822/field.h \ |
358 | 357 | ../mimetic/rfc822/mailbox.h ../mimetic/rfc822/messageid.h \ |
359 | ../mimetic/config.h ../mimetic/os/utils.h \ | |
360 | ../mimetic/rfc822/mailboxlist.h ../mimetic/rfc822/addresslist.h \ | |
361 | ../mimetic/rfc822/address.h ../mimetic/rfc822/group.h \ | |
362 | ../mimetic/mimeversion.h ../mimetic/contentid.h \ | |
363 | ../mimetic/message.h ../mimetic/mimeentity.h \ | |
364 | ../mimetic/codec/codec.h ../mimetic/codec/base64.h \ | |
365 | ../mimetic/codec/qp.h ../mimetic/parser/itparserdecl.h \ | |
366 | ../mimetic/streambufs.h ../mimetic/tokenizer.h \ | |
367 | ../mimetic/os/os.h ../mimetic/parser/itparser.h \ | |
368 | ../mimetic/tree.h | |
358 | ../mimetic/os/utils.h ../mimetic/rfc822/mailboxlist.h \ | |
359 | ../mimetic/rfc822/addresslist.h ../mimetic/rfc822/address.h \ | |
360 | ../mimetic/rfc822/group.h ../mimetic/mimeversion.h \ | |
361 | ../mimetic/contentid.h ../mimetic/message.h \ | |
362 | ../mimetic/mimeentity.h ../mimetic/codec/codec.h \ | |
363 | ../mimetic/codec/base64.h ../mimetic/codec/qp.h \ | |
364 | ../mimetic/parser/itparserdecl.h ../mimetic/streambufs.h \ | |
365 | ../mimetic/tokenizer.h ../mimetic/os/os.h \ | |
366 | ../mimetic/parser/itparser.h ../mimetic/tree.h | |
369 | 367 | t.parser.cutee.o: t.parser.cutee.cxx cutee.h t.parser.h \ |
370 | 368 | ../mimetic/mimeentity.h ../mimetic/strutils.h \ |
371 | 369 | ../mimetic/utils.h ../mimetic/libconfig.h ../mimetic/config.h \ |
382 | 380 | ../mimetic/os/mmfile.h ../mimetic/header.h \ |
383 | 381 | ../mimetic/rfc822/header.h ../mimetic/rfc822/field.h \ |
384 | 382 | ../mimetic/rfc822/mailbox.h ../mimetic/rfc822/messageid.h \ |
385 | ../mimetic/config.h ../mimetic/os/utils.h \ | |
386 | ../mimetic/rfc822/mailboxlist.h ../mimetic/rfc822/addresslist.h \ | |
387 | ../mimetic/rfc822/address.h ../mimetic/rfc822/group.h \ | |
388 | ../mimetic/contentid.h ../mimetic/contentdescription.h \ | |
389 | ../mimetic/body.h ../mimetic/rfc822/body.h \ | |
390 | ../mimetic/parser/itparserdecl.h ../mimetic/streambufs.h \ | |
391 | ../mimetic/parser/itparser.h ../mimetic/tree.h | |
383 | ../mimetic/os/utils.h ../mimetic/rfc822/mailboxlist.h \ | |
384 | ../mimetic/rfc822/addresslist.h ../mimetic/rfc822/address.h \ | |
385 | ../mimetic/rfc822/group.h ../mimetic/contentid.h \ | |
386 | ../mimetic/contentdescription.h ../mimetic/body.h \ | |
387 | ../mimetic/rfc822/body.h ../mimetic/parser/itparserdecl.h \ | |
388 | ../mimetic/streambufs.h ../mimetic/parser/itparser.h \ | |
389 | ../mimetic/tree.h | |
392 | 390 | t.qp.cutee.o: t.qp.cutee.cxx cutee.h t.qp.h ../mimetic/codec/codec.h \ |
393 | 391 | ../mimetic/codec/codec_base.h ../mimetic/codec/codec_chain.h \ |
394 | 392 | ../mimetic/codec/base64.h ../mimetic/circular_buffer.h \ |
407 | 405 | ../mimetic/strutils.h ../mimetic/rfc822/group.h \ |
408 | 406 | ../mimetic/rfc822/addresslist.h ../mimetic/rfc822/body.h \ |
409 | 407 | ../mimetic/rfc822/datetime.h ../mimetic/rfc822/messageid.h \ |
410 | ../mimetic/config.h ../mimetic/utils.h ../mimetic/libconfig.h \ | |
411 | ../mimetic/config.h ../mimetic/os/utils.h \ | |
412 | ../mimetic/rfc822/field.h ../mimetic/rfc822/header.h \ | |
413 | ../mimetic/rfc822/mailboxlist.h ../mimetic/rfc822/message.h | |
408 | ../mimetic/libconfig.h ../mimetic/config.h ../mimetic/utils.h \ | |
409 | ../mimetic/os/utils.h ../mimetic/rfc822/field.h \ | |
410 | ../mimetic/rfc822/header.h ../mimetic/rfc822/mailboxlist.h \ | |
411 | ../mimetic/rfc822/message.h | |
414 | 412 | t.rfc822.o: t.rfc822.cxx t.rfc822.h ../mimetic/rfc822/rfc822.h \ |
415 | 413 | ../mimetic/rfc822/address.h ../mimetic/rfc822/mailbox.h \ |
416 | 414 | ../mimetic/rfc822/fieldvalue.h ../mimetic/strutils.h \ |
417 | 415 | ../mimetic/rfc822/group.h ../mimetic/rfc822/addresslist.h \ |
418 | 416 | ../mimetic/rfc822/body.h ../mimetic/rfc822/datetime.h \ |
419 | ../mimetic/rfc822/messageid.h ../mimetic/config.h \ | |
420 | ../mimetic/utils.h ../mimetic/libconfig.h ../mimetic/config.h \ | |
421 | ../mimetic/os/utils.h ../mimetic/rfc822/field.h \ | |
422 | ../mimetic/rfc822/header.h ../mimetic/rfc822/mailboxlist.h \ | |
423 | ../mimetic/rfc822/message.h cutee.h | |
417 | ../mimetic/rfc822/messageid.h ../mimetic/libconfig.h \ | |
418 | ../mimetic/config.h ../mimetic/utils.h ../mimetic/os/utils.h \ | |
419 | ../mimetic/rfc822/field.h ../mimetic/rfc822/header.h \ | |
420 | ../mimetic/rfc822/mailboxlist.h ../mimetic/rfc822/message.h \ | |
421 | cutee.h | |
424 | 422 | t.strutils.cutee.o: t.strutils.cutee.cxx cutee.h t.strutils.h \ |
425 | 423 | ../mimetic/strutils.h |
426 | 424 | t.tokenizer.cutee.o: t.tokenizer.cutee.cxx cutee.h t.tokenizer.h \ |