librsync  2.0.2
Macros | Enumerations | Functions | Variables
rdiff.c File Reference

– Command-line network-delta tool. More...

Go to the source code of this file.

Macros

#define PROGRAM   "rdiff"
 

Enumerations

enum  { OPT_GZIP = 1069, OPT_BZIP2 }
 

Functions

static void rdiff_usage (const char *error)
 
static void rdiff_no_more_args (poptContext opcon)
 
static void bad_option (poptContext opcon, int error)
 
static void help (void)
 
static void rdiff_show_version (void)
 
static void rdiff_options (poptContext opcon)
 
static rs_result rdiff_sig (poptContext opcon)
 Generate signature from remaining command line arguments. More...
 
static rs_result rdiff_delta (poptContext opcon)
 
static rs_result rdiff_patch (poptContext opcon)
 
static rs_result rdiff_action (poptContext opcon)
 
int main (const int argc, const char *argv[])
 

Variables

static size_t block_len = RS_DEFAULT_BLOCK_LEN
 
static size_t strong_len = 0
 
static int show_stats = 0
 
static int bzip2_level = 0
 
static int gzip_level = 0
 
static int file_force = 0
 
int rs_roll_paranoia
 
char * rs_hash_name
 
struct poptOption opts []
 

Detailed Description

– Command-line network-delta tool.

Todo:
Add a -z option to gzip/gunzip patches. This would be somewhat useful, but more importantly a good test of the streaming API. Also add -I for bzip2.
Todo:
If built with debug support and we have mcheck, then turn it on. (Optionally?)
Todo:
popt doesn't handle single dashes very well at the moment: we'd like to use them as arguments to indicate stdin/stdout, but it turns them into options. I sent a patch to the popt maintainers; hopefully it will be fixed in the future.
Todo:
Add an option for delta to check whether the files are identical.

Definition in file rdiff.c.

Function Documentation

static rs_result rdiff_sig ( poptContext  opcon)
static

Generate signature from remaining command line arguments.

Definition at line 223 of file rdiff.c.

Variable Documentation

struct poptOption opts[]
Initial value:
= {
{"verbose", 'v', POPT_ARG_NONE, 0, 'v'},
{"version", 'V', POPT_ARG_NONE, 0, 'V'},
{"input-size", 'I', POPT_ARG_INT, &rs_inbuflen},
{"output-size", 'O', POPT_ARG_INT, &rs_outbuflen},
{"hash", 'H', POPT_ARG_STRING, &rs_hash_name},
{"help", '?', POPT_ARG_NONE, 0, 'h'},
{0, 'h', POPT_ARG_NONE, 0, 'h'},
{"block-size", 'b', POPT_ARG_INT, &block_len},
{"sum-size", 'S', POPT_ARG_INT, &strong_len},
{"statistics", 's', POPT_ARG_NONE, &show_stats},
{"stats", 0, POPT_ARG_NONE, &show_stats},
{"gzip", 'z', POPT_ARG_NONE, 0, OPT_GZIP},
{"bzip2", 'i', POPT_ARG_NONE, 0, OPT_BZIP2},
{"force", 'f', POPT_ARG_NONE, &file_force},
{"paranoia", 0, POPT_ARG_NONE, &rs_roll_paranoia},
{0}
}
int rs_inbuflen
Buffer sizes for file IO.
Definition: whole.c:52

Definition at line 86 of file rdiff.c.