#include <string.h>
#include <unistd.h>
#include <signal.h>
#include "gwlib/gwlib.h"
#include "gwlib/mime.h"
Go to the source code of this file.
|
static void | help (void) |
|
int | main (int argc, char **argv) |
|
◆ help()
static void help |
( |
void |
| ) |
|
|
static |
Definition at line 70 of file test_mime_multipart.c.
References info().
Referenced by main().
72 info(0,
"Usage: test_mime_multipart [options] mime-encoded-file ...");
73 info(0,
"where options are:");
75 info(0,
" set log level for stderr logging");
77 info(0,
" perform opertion n times");
void info(int err, const char *fmt,...)
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 80 of file test_mime_multipart.c.
References error(), filename, getopt(), gwlib_init(), gwlib_shutdown(), help(), info(), log_set_output_level(), mime_entity_destroy(), mime_entity_dump(), mime_entity_to_octstr(), mime_octstr_to_entity(), octstr_compare(), octstr_create, octstr_destroy(), octstr_dump, octstr_get_cstr, octstr_read_file(), optarg, optind, and panic.
83 unsigned long num = 1, j;
90 while ((opt =
getopt(argc, argv,
"hv:n:")) != EOF) {
100 error(0,
"Invalid option %c", opt);
102 panic(0,
"Stopping.");
114 for (j = 1; j <= num; j++) {
125 info(0,
"MIME Octstr after reconstruction:");
129 error(0,
"MIME content from file `%s' and reconstruction differs!",
132 info(0,
"MIME Octstr compare result has been successfull.");
void error(int err, const char *fmt,...)
void info(int err, const char *fmt,...)
#define octstr_get_cstr(ostr)
int getopt(int argc, char **argv, char *opts)
void log_set_output_level(enum output_level level)
Octstr * mime_entity_to_octstr(MIMEEntity *m)
void mime_entity_destroy(MIMEEntity *e)
#define octstr_dump(ostr, level,...)
void octstr_destroy(Octstr *ostr)
char filename[FILENAME_MAX+1]
#define octstr_create(cstr)
void mime_entity_dump(MIMEEntity *m)
Octstr * octstr_read_file(const char *filename)
void gwlib_shutdown(void)
MIMEEntity * mime_octstr_to_entity(Octstr *mime)
int octstr_compare(const Octstr *ostr1, const Octstr *ostr2)