File: rdup-tr.h.in

package info (click to toggle)
rdup 1.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,996 kB
  • ctags: 185
  • sloc: ansic: 3,326; sh: 3,221; exp: 166; makefile: 64
file content (99 lines) | stat: -rw-r--r-- 2,466 bytes parent folder | download
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
98
99
#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>

#ifdef HAVE_ARCHIVE_H
#include <archive.h>
#include <archive_entry.h>
#endif /* HAVE_ARCHIVE_H */

#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 MAX_CHILD_OPT  7

#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 signal);

/* rdup-tr.c */
void msg(const char *fmt, ...);

/* getdelim.c */
ssize_t rdup_getdelim(char **lineptr, size_t *n, int delim, FILE *stream);

/* usage-tr.c */
void usage_tr(FILE *);

/* child.c */
void close_pipes(GSList *p, int no1, int no2);
int wait_pids(GSList *pids, int flags);
GSList *create_childeren(GSList *child, GSList **pipes, int f);

/* entry.c */
struct r_entry * parse_entry(char *buf, size_t l, struct stat *s, gint fmt);
gint rdup_write_header(struct r_entry *e);
gint rdup_write_data(struct r_entry *e, char *buf, size_t len);

/* link.c */
struct r_entry *sym_link(struct r_entry *e, char *h_lnk);

/* crypt.c */
struct aes_ctx * crypt_init(gchar *key, guint length, gboolean crypt);
gchar * crypt_path_ele(struct aes_ctx *ctx, gchar *elem, guint len, GHashTable *tr);
gchar * decrypt_path_ele(struct aes_ctx *ctx, gchar *elem, guint len, GHashTable *tr);
gchar * crypt_path(struct aes_ctx *ctx, gchar *p, GHashTable *tr);
gchar * decrypt_path(struct aes_ctx *ctx, gchar *p, GHashTable *tr);
gchar * crypt_key(gchar *file);
#endif  /* _RDUP_TR_H */