1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
#ifndef _RDUP_TR_H
#define _RDUP_TR_H
#include <glib.h>
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <pwd.h>
#include <grp.h>
#include <time.h>
#include <glob.h>
#include <fcntl.h>
#include <signal.h>
#include <dirent.h>
#include <libgen.h>
#include <syslog.h>
#include <errno.h>
#include <utime.h>
#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h>
#endif /* HAVE_SYS_SYSMACROS_H */
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/mman.h>
#ifdef HAVE_LIBARCHIVE
#include <archive.h>
#include <archive_entry.h>
#endif /* HAVE_LIBARCHIVE */
#ifdef HAVE_SELECT_H
#include <select.h>
#endif /* HAVE_SELECT_H */
#ifdef HAVE_GETTEXT
#include <libintl.h>
#include <locale.h>
#define _(String) gettext (String)
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)
#else /* HAVE_GETTEXT */
#define _(String) String
#endif /* HAVE_GETTEXT */
#include "entry.h"
#include "common.h"
#define VERSION "@PACKAGE_VERSION@"
#define O_NONE 0
#define O_TAR 1
#define O_CPIO 2
#define O_PAX 3
#define O_RDUP 4
#define I_LIST 1 /* the input is a list of files names */
#define I_RDUP 2 /* the input is the standard rdup output */
/* signal.c */
void signal_abort(int);
/* msg.c */
void msg(const char *, ...);
void msgd(const char *, int, const char *, ...);
/* getdelim.c */
ssize_t rdup_getdelim(char **, size_t *, int, FILE *);
/* usage-tr.c */
void usage_tr(FILE *);
/* entry.c */
struct rdup * parse_entry(char *, size_t);
gint rdup_write_header(struct rdup *);
gint rdup_write_data(struct rdup *, char *, size_t);
struct stat * stat_from_rdup(struct rdup *);
gint rdup_write_table(struct rdup *, FILE *);
/* link.c */
gchar *slink(struct rdup *);
/* crypt.c */
struct aes_ctx * crypt_init(gchar *, gboolean);
gchar * crypt_path_ele(struct aes_ctx *, gchar *, GHashTable *);
gchar * decrypt_path_ele(struct aes_ctx *, gchar *, GHashTable *);
gchar * crypt_path(struct aes_ctx *, gchar *, GHashTable *);
gchar * decrypt_path(struct aes_ctx *, gchar *, GHashTable *);
char * crypt_key(gchar *);
#endif /* _RDUP_TR_H */
|