#include <string.h>
#include <unistd.h>
#include <signal.h>
#include "gwlib/gwlib.h"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 69 of file test_octstr_dump.c.
References debug(), filename, get_and_set_debugs(), gwlib_init(), gwlib_shutdown(), octstr_create, octstr_destroy(), octstr_dump, octstr_duplicate, octstr_get_cstr, octstr_hex_to_binary(), octstr_is_all_hex(), octstr_print(), octstr_read_file(), octstr_strip_crlfs(), and panic.
78 panic(0,
"Syntax: %s <file>\n", argv[0]);
84 panic(0,
"Cannot read file.");
95 debug(
"",0,
"Trying to converting from hex to binary.");
97 FILE *f = fopen(argv[2],
"w");
98 debug(
"",0,
"Convertion was successfull. Writing binary content to file `%s'",
105 debug(
"",0,
"Failed to convert from hex?!");
int octstr_print(FILE *f, Octstr *ostr)
#define octstr_get_cstr(ostr)
#define octstr_duplicate(ostr)
#define octstr_dump(ostr, level,...)
void octstr_destroy(Octstr *ostr)
char filename[FILENAME_MAX+1]
#define octstr_create(cstr)
int octstr_is_all_hex(Octstr *os)
Octstr * octstr_read_file(const char *filename)
void octstr_strip_crlfs(Octstr *text)
void debug(const char *place, int err, const char *fmt,...)
int octstr_hex_to_binary(Octstr *ostr)
void gwlib_shutdown(void)
int get_and_set_debugs(int argc, char **argv, int(*find_own)(int index, int argc, char **argv))