2001-12-29 12:03:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef UTIL_H
|
|
|
|
#define UTIL_H
|
|
|
|
|
2002-01-08 13:56:50 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include <config.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_GETOPT_H
|
|
|
|
#include <getopt.h>
|
|
|
|
#endif
|
2001-12-29 12:03:18 +00:00
|
|
|
#include <stdio.h>
|
2002-01-08 13:56:50 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <errno.h>
|
2001-12-29 12:03:18 +00:00
|
|
|
#include <opensc.h>
|
|
|
|
|
2002-01-08 13:56:50 +00:00
|
|
|
extern const struct option options[];
|
|
|
|
extern const char *option_help[];
|
|
|
|
|
2001-12-29 12:03:18 +00:00
|
|
|
void print_binary(FILE *f, const u8 *buf, int count);
|
|
|
|
void hex_dump(FILE *f, const u8 *in, int len);
|
2002-01-09 01:03:10 +00:00
|
|
|
void hex_dump_asc(FILE *f, const u8 *in, size_t count, int addr);
|
2002-01-08 13:56:50 +00:00
|
|
|
void print_usage_and_die(const char *pgmname);
|
2002-01-09 01:03:10 +00:00
|
|
|
const char * acl_to_str(unsigned int acl);
|
2001-12-29 12:03:18 +00:00
|
|
|
|
|
|
|
#endif
|