diff --git a/Doxyfile b/Doxyfile index 14e8d6118..ade1d2893 100644 --- a/Doxyfile +++ b/Doxyfile @@ -35,8 +35,8 @@ TAB_SIZE = 8 GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES -ALIASES = -ENABLED_SECTIONS = +ALIASES = +ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_JAVA = NO @@ -48,7 +48,7 @@ QUIET = NO WARNINGS = NO WARN_IF_UNDOCUMENTED = NO WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- @@ -60,12 +60,12 @@ EXCLUDE = proto.h \ zlib \ popt EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = +IMAGE_PATH = +INPUT_FILTER = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing @@ -79,16 +79,16 @@ REFERENCES_RELATION = YES #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 3 -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO GENERATE_CHI = NO @@ -107,8 +107,8 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = +EXTRA_PACKAGES = +LATEX_HEADER = PDF_HYPERLINKS = YES USE_PDFLATEX = YES LATEX_BATCHMODE = YES @@ -119,8 +119,8 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- @@ -137,27 +137,27 @@ GENERATE_XML = NO #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = NO MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::addtions related to external references +# Configuration::addtions related to external references #--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = +TAGFILES = +GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES HAVE_DOT = YES @@ -169,19 +169,19 @@ INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES GRAPHICAL_HIERARCHY = YES DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = +DOT_PATH = +DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine +# Configuration::addtions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO CGI_NAME = search.cgi -CGI_URL = -DOC_URL = -DOC_ABSPATH = +CGI_URL = +DOC_URL = +DOC_ABSPATH = BIN_ABSPATH = /usr/local/bin/ -EXT_DOC_PATHS = +EXT_DOC_PATHS = diff --git a/NEWS.md b/NEWS.md index da09538b4..4454af720 100644 --- a/NEWS.md +++ b/NEWS.md @@ -374,7 +374,7 @@ to develop and test fixes. - CVE-2024-12084 - Heap Buffer Overflow in Checksum Parsing. - CVE-2024-12085 - Info Leak via uninitialized Stack contents defeats ASLR. - + - CVE-2024-12086 - Server leaks arbitrary client files. - CVE-2024-12087 - Server can make client write files outside of destination directory using symbolic links. diff --git a/TODO b/TODO index 9279d745d..0bc830d96 100644 --- a/TODO +++ b/TODO @@ -112,7 +112,7 @@ Handling IPv6 on old machines Other IPv6 stuff - + Implement suggestions from http://www.kame.net/newsletter/19980604/ and ftp://ftp.iij.ad.jp/pub/RFC/rfc2553.txt @@ -290,7 +290,7 @@ Log child death on signal verbose output David Stein 2001/12/20 - + At end of transfer, show how many files were or were not transferred correctly. @@ -333,7 +333,7 @@ Use generic zlib 2002/02/25 Perhaps don't use our own zlib. Advantages: - + - will automatically be up to date with bugfixes in zlib - can leave it out for small rsync on e.g. recovery disks diff --git a/csprotocol.txt b/csprotocol.txt index 7ba09ab02..2a4d90b67 100644 --- a/csprotocol.txt +++ b/csprotocol.txt @@ -103,7 +103,7 @@ Protocol version changes The use of a "." number was added to @RSYNCD: . -25 (2001-08-20, 2.4.7pre2) +25 (2001-08-20, 2.4.7pre2) Send an explicit "@RSYNC EXIT" command at the end of the module listing. We never intentionally end the transmission diff --git a/install-sh b/install-sh index 8c409fbb9..9e493c5b2 100755 --- a/install-sh +++ b/install-sh @@ -103,7 +103,7 @@ fi if [ x"$dir_arg" != x ]; then dst=$src src="" - + if [ -d $dst ]; then instcmd=: else @@ -112,7 +112,7 @@ if [ x"$dir_arg" != x ]; then else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad +# might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src ] || [ -d $src ] @@ -122,7 +122,7 @@ else echo "install: $src does not exist" exit 1 fi - + if [ x"$dst" = x ] then echo "install: no destination specified" @@ -150,7 +150,7 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then -defaultIFS=' +defaultIFS=' ' IFS="${IFS-${defaultIFS}}" @@ -189,17 +189,17 @@ else # If we're going to rename the final executable, determine the name now. - if [ x"$transformarg" = x ] + if [ x"$transformarg" = x ] then dstfile=`basename $dst` else - dstfile=`basename $dst $transformbasename | + dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename - if [ x"$dstfile" = x ] + if [ x"$dstfile" = x ] then dstfile=`basename $dst` else @@ -230,7 +230,7 @@ else # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + $doit $mvcmd $dsttmp $dstdir/$dstfile fi && diff --git a/lib/mdfour.c b/lib/mdfour.c index 7df180618..f660deaa4 100644 --- a/lib/mdfour.c +++ b/lib/mdfour.c @@ -1,28 +1,28 @@ -/* +/* * Unix SMB/Netbios implementation. * Version 1.9. * An implementation of MD4 designed for use in the SMB authentication protocol. * * Copyright (C) 1997-1998 Andrew Tridgell * Copyright (C) 2005-2020 Wayne Davison - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, visit the http://fsf.org website. */ #include "rsync.h" -/* NOTE: This code makes no attempt to be fast! +/* NOTE: This code makes no attempt to be fast! * * It assumes that a int is at least 32 bits long. */ @@ -45,40 +45,40 @@ static void mdfour64(uint32 *M) uint32 AA, BB, CC, DD; uint32 A,B,C,D; - A = m->A; B = m->B; C = m->C; D = m->D; + A = m->A; B = m->B; C = m->C; D = m->D; AA = A; BB = B; CC = C; DD = D; - ROUND1(A,B,C,D, 0, 3); ROUND1(D,A,B,C, 1, 7); + ROUND1(A,B,C,D, 0, 3); ROUND1(D,A,B,C, 1, 7); ROUND1(C,D,A,B, 2, 11); ROUND1(B,C,D,A, 3, 19); - ROUND1(A,B,C,D, 4, 3); ROUND1(D,A,B,C, 5, 7); + ROUND1(A,B,C,D, 4, 3); ROUND1(D,A,B,C, 5, 7); ROUND1(C,D,A,B, 6, 11); ROUND1(B,C,D,A, 7, 19); - ROUND1(A,B,C,D, 8, 3); ROUND1(D,A,B,C, 9, 7); + ROUND1(A,B,C,D, 8, 3); ROUND1(D,A,B,C, 9, 7); ROUND1(C,D,A,B, 10, 11); ROUND1(B,C,D,A, 11, 19); - ROUND1(A,B,C,D, 12, 3); ROUND1(D,A,B,C, 13, 7); - ROUND1(C,D,A,B, 14, 11); ROUND1(B,C,D,A, 15, 19); + ROUND1(A,B,C,D, 12, 3); ROUND1(D,A,B,C, 13, 7); + ROUND1(C,D,A,B, 14, 11); ROUND1(B,C,D,A, 15, 19); - ROUND2(A,B,C,D, 0, 3); ROUND2(D,A,B,C, 4, 5); + ROUND2(A,B,C,D, 0, 3); ROUND2(D,A,B,C, 4, 5); ROUND2(C,D,A,B, 8, 9); ROUND2(B,C,D,A, 12, 13); - ROUND2(A,B,C,D, 1, 3); ROUND2(D,A,B,C, 5, 5); + ROUND2(A,B,C,D, 1, 3); ROUND2(D,A,B,C, 5, 5); ROUND2(C,D,A,B, 9, 9); ROUND2(B,C,D,A, 13, 13); - ROUND2(A,B,C,D, 2, 3); ROUND2(D,A,B,C, 6, 5); + ROUND2(A,B,C,D, 2, 3); ROUND2(D,A,B,C, 6, 5); ROUND2(C,D,A,B, 10, 9); ROUND2(B,C,D,A, 14, 13); - ROUND2(A,B,C,D, 3, 3); ROUND2(D,A,B,C, 7, 5); + ROUND2(A,B,C,D, 3, 3); ROUND2(D,A,B,C, 7, 5); ROUND2(C,D,A,B, 11, 9); ROUND2(B,C,D,A, 15, 13); - ROUND3(A,B,C,D, 0, 3); ROUND3(D,A,B,C, 8, 9); + ROUND3(A,B,C,D, 0, 3); ROUND3(D,A,B,C, 8, 9); ROUND3(C,D,A,B, 4, 11); ROUND3(B,C,D,A, 12, 15); - ROUND3(A,B,C,D, 2, 3); ROUND3(D,A,B,C, 10, 9); + ROUND3(A,B,C,D, 2, 3); ROUND3(D,A,B,C, 10, 9); ROUND3(C,D,A,B, 6, 11); ROUND3(B,C,D,A, 14, 15); - ROUND3(A,B,C,D, 1, 3); ROUND3(D,A,B,C, 9, 9); + ROUND3(A,B,C,D, 1, 3); ROUND3(D,A,B,C, 9, 9); ROUND3(C,D,A,B, 5, 11); ROUND3(B,C,D,A, 13, 15); - ROUND3(A,B,C,D, 3, 3); ROUND3(D,A,B,C, 11, 9); + ROUND3(A,B,C,D, 3, 3); ROUND3(D,A,B,C, 11, 9); ROUND3(C,D,A,B, 7, 11); ROUND3(B,C,D,A, 15, 15); - A += AA; B += BB; + A += AA; B += BB; C += CC; D += DD; - - A &= MASK32; B &= MASK32; + + A &= MASK32; B &= MASK32; C &= MASK32; D &= MASK32; m->A = A; m->B = B; m->C = C; m->D = D; @@ -144,7 +144,7 @@ static void mdfour_tail(const uchar *in, uint32 length) copy64(M, buf); mdfour64(M); } else { - copy4(buf+120, m->totalN); + copy4(buf+120, m->totalN); /* * Prior to protocol version 27 only the number of bits * modulo 2^32 was included. MD4 requires the number @@ -152,7 +152,7 @@ static void mdfour_tail(const uchar *in, uint32 length) * protocol version 27. */ if (protocol_version >= 27) - copy4(buf+124, m->totalN2); + copy4(buf+124, m->totalN2); copy64(M, buf); mdfour64(M); copy64(M, buf+64); @@ -210,13 +210,13 @@ static void file_checksum1(char *fname) int fd, i, was_multiple_of_64 = 1; md_context md; uchar buf[64*1024], sum[MD4_DIGEST_LEN]; - + fd = open(fname,O_RDONLY); if (fd == -1) { perror("fname"); exit(1); } - + mdfour_begin(&md); while (1) { diff --git a/lib/pool_alloc.3 b/lib/pool_alloc.3 index 128c1f7f3..f0e316ab9 100644 --- a/lib/pool_alloc.3 +++ b/lib/pool_alloc.3 @@ -83,7 +83,7 @@ all at the same time without interfering with how pools work. Creates an allocation pool for subsequent calls to the pool allocation functions. When an extent is created for allocations it will be -.I size +.I size bytes. Allocations from the pool have their sizes rounded up to a multiple of @@ -202,7 +202,7 @@ and on the same pool! .P .B pool_boundary() -asks for a boundary value that can be sent to +asks for a boundary value that can be sent to .B pool_free_old() at a later time to free up all memory allocated prior to a particular moment in time. diff --git a/lib/snprintf.c b/lib/snprintf.c index 15c0529dc..b6481774b 100644 --- a/lib/snprintf.c +++ b/lib/snprintf.c @@ -39,9 +39,9 @@ * original. Also, there is now a builtin-test, just compile with: * gcc -I.. -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. - * + * * Thomas Roessler 01/27/98 for mutt 0.89i - * The PGP code was using unsigned hexadecimal formats. + * The PGP code was using unsigned hexadecimal formats. * Unfortunately, unsigned formats simply didn't work. * * Michael Elkins 03/05/98 for mutt 0.90.8 @@ -59,20 +59,20 @@ * * date: 2002/12/19 19:56:31; author: herb; state: Exp; lines: +2 -0 * actually print args for %g and %e - * + * * date: 2002/06/03 13:37:52; author: jmcd; state: Exp; lines: +8 -0 * Since includes.h isn't included here, VA_COPY has to be defined here. I don't * see any include file that is guaranteed to be here, so I'm defining it * locally. Fixes AIX and Solaris builds. - * + * * date: 2002/06/03 03:07:24; author: tridge; state: Exp; lines: +5 -13 * put the ifdef for HAVE_VA_COPY in one place rather than in lots of * functions - * + * * date: 2002/05/17 14:51:22; author: jmcd; state: Exp; lines: +21 -4 * Fix usage of va_list passed as an arg. Use __va_copy before using it * when it exists. - * + * * date: 2002/04/16 22:38:04; author: idra; state: Exp; lines: +20 -14 * Fix incorrect zpadlen handling in fmtfp. * Thanks to Ollie Oldham for spotting it. @@ -97,8 +97,8 @@ * From OpenSSH. Also added test for same. * * Simo Sorce (idra@samba.org) Jan 2006 - * - * Add support for position independent parameters + * + * Add support for position independent parameters * fix fmtstr now it conforms to sprintf wrt min.max * **************************************************************/ @@ -138,7 +138,7 @@ #include /* make the compiler happy with an empty file */ void dummy_snprintf(void); - void dummy_snprintf(void) {} + void dummy_snprintf(void) {} #endif /* HAVE_SNPRINTF, etc */ #ifdef STDC_HEADERS @@ -227,7 +227,7 @@ struct pr_chunk { int type; /* chunk type */ int num; /* parameter number */ - int min; + int min; int max; int flags; int cflags; @@ -247,7 +247,7 @@ struct pr_chunk_x { int num; }; -static int dopr(char *buffer, size_t maxlen, const char *format, +static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in); static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max); @@ -286,15 +286,15 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in max_pos = 0; base = format; ch = *format++; - + /* retrieve the string structure as chunks */ while (state != DP_S_DONE) { - if (ch == '\0') + if (ch == '\0') state = DP_S_DONE; switch(state) { case DP_S_DEFAULT: - + if (cnk) { cnk->next = new_chunk(); cnk = cnk->next; @@ -303,7 +303,7 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in } if (!cnk) goto done; if (!chunks) chunks = cnk; - + if (ch == '%') { state = DP_S_FLAGS; ch = *format++; @@ -399,7 +399,7 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in if (ch == '.') { state = DP_S_MAX; ch = *format++; - } else { + } else { state = DP_S_MOD; } break; @@ -486,7 +486,7 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in max_pos = add_cnk_list_entry(&clist, max_pos, cnk); if (max_pos == 0) /* out of memory :-( */ goto done; - + switch (ch) { case 'd': case 'i': @@ -579,7 +579,7 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in cnk = clist[pnum].chunks[0]; switch (cnk->type) { case CNK_INT: - if (cnk->cflags == DP_C_SHORT) + if (cnk->cflags == DP_C_SHORT) cnk->value = va_arg (args, int); else if (cnk->cflags == DP_C_LONG) cnk->value = va_arg (args, long int); @@ -697,7 +697,7 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in memcpy(&(buffer[currlen]), &(base[cnk->start]), len); } currlen += cnk->len; - + break; case CNK_INT: @@ -758,9 +758,9 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in cnk = cnk->next; } if (maxlen != 0) { - if (currlen < maxlen - 1) + if (currlen < maxlen - 1) buffer[currlen] = '\0'; - else if (maxlen > 0) + else if (maxlen > 0) buffer[maxlen - 1] = '\0'; } ret = currlen; @@ -797,11 +797,11 @@ static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, for (strln = 0; strln < max && value[strln]; ++strln); /* strlen */ padlen = min - strln; - if (padlen < 0) + if (padlen < 0) padlen = 0; - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ - + while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; @@ -828,12 +828,12 @@ static void fmtint(char *buffer, size_t *currlen, size_t maxlen, int spadlen = 0; /* amount to space pad */ int zpadlen = 0; /* amount to zero pad */ int caps = 0; - + if (max < 0) max = 0; - + uvalue = value; - + if(!(flags & DP_F_UNSIGNED)) { if( value < 0 ) { signvalue = '-'; @@ -845,7 +845,7 @@ static void fmtint(char *buffer, size_t *currlen, size_t maxlen, signvalue = ' '; } } - + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ do { @@ -865,7 +865,7 @@ static void fmtint(char *buffer, size_t *currlen, size_t maxlen, zpadlen = MAX(zpadlen, spadlen); spadlen = 0; } - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF @@ -880,7 +880,7 @@ static void fmtint(char *buffer, size_t *currlen, size_t maxlen, } /* Sign */ - if (signvalue) + if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); /* Zeros */ @@ -892,9 +892,9 @@ static void fmtint(char *buffer, size_t *currlen, size_t maxlen, } /* Digits */ - while (place > 0) + while (place > 0) dopr_outch (buffer, currlen, maxlen, convert[--place]); - + /* Left Justified spaces */ while (spadlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); @@ -908,19 +908,19 @@ static LDOUBLE abs_val(LDOUBLE value) if (value < 0) result = -value; - + return result; } static LDOUBLE POW10(int exp) { LDOUBLE result = 1; - + while (exp) { result *= 10; exp--; } - + return result; } @@ -931,7 +931,7 @@ static LLONG ROUND(LDOUBLE value) intpart = (LLONG)value; value = value - intpart; if (value >= 0.5) intpart++; - + return intpart; } @@ -964,7 +964,7 @@ static double my_modf(double x0, double *iptr) ret = my_modf(x0-l*f, &i2); (*iptr) = l*f + i2; return ret; - } + } (*iptr) = l; return x - (*iptr); @@ -981,14 +981,14 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, int iplace = 0; int fplace = 0; int padlen = 0; /* amount to pad */ - int zpadlen = 0; + int zpadlen = 0; int caps = 0; int idx; double intpart; double fracpart; double temp; - - /* + + /* * AIX manpage says the default is 0, but Solaris says the default * is 6, and sprintf on AIX defaults to 6 */ @@ -1016,8 +1016,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, if (max == 0) ufvalue += 0.5; /* if max = 0 we must round */ #endif - /* - * Sorry, we only support 9 digits past the decimal because of our + /* + * Sorry, we only support 9 digits past the decimal because of our * conversion method */ if (max > 9) @@ -1031,7 +1031,7 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, my_modf(temp, &intpart); fracpart = ROUND((POW10(max)) * (ufvalue - intpart)); - + if (fracpart >= POW10(max)) { intpart++; fracpart -= POW10(max); @@ -1066,16 +1066,16 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, if (fplace == 311) fplace--; } fconvert[fplace] = 0; - + /* -1 for decimal point, another -1 if we are printing a sign */ - padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); + padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); zpadlen = max - fplace; if (zpadlen < 0) zpadlen = 0; - if (padlen < 0) + if (padlen < 0) padlen = 0; - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justifty */ - + if ((flags & DP_F_ZERO) && (padlen > 0)) { if (signvalue) { dopr_outch (buffer, currlen, maxlen, signvalue); @@ -1091,10 +1091,10 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, dopr_outch (buffer, currlen, maxlen, ' '); --padlen; } - if (signvalue) + if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); - - while (iplace > 0) + + while (iplace > 0) dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); #ifdef DEBUG_SNPRINTF @@ -1107,13 +1107,13 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, */ if (max > 0) { dopr_outch (buffer, currlen, maxlen, '.'); - + while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } - while (fplace > 0) + while (fplace > 0) dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } @@ -1166,7 +1166,7 @@ static int add_cnk_list_entry(struct pr_chunk_x **list, if (chunk->num > max_num) { max = chunk->num; - + if (*list == NULL) { l = (struct pr_chunk_x *)malloc(sizeof(struct pr_chunk_x) * max); pos = 0; @@ -1192,7 +1192,7 @@ static int add_cnk_list_entry(struct pr_chunk_x **list, i = chunk->num - 1; cnum = l[i].num + 1; if (l[i].chunks == NULL) { - c = (struct pr_chunk **)malloc(sizeof(struct pr_chunk *) * cnum); + c = (struct pr_chunk **)malloc(sizeof(struct pr_chunk *) * cnum); } else { c = (struct pr_chunk **)realloc(l[i].chunks, sizeof(struct pr_chunk *) * cnum); } @@ -1228,7 +1228,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) { size_t ret; va_list ap; - + va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap); @@ -1265,7 +1265,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) { va_list ap; int ret; - + *ptr = NULL; va_start(ap, format); ret = vasprintf(ptr, format, ap); @@ -1304,7 +1304,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) "%-9.9f", NULL }; - double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 203.9, 0.96, 0.996, + double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 203.9, 0.96, 0.996, 0.9996, 1.996, 4.136, 5.030201, 0.00205, /* END LIST */ 0}; char *int_fmt[] = { @@ -1364,7 +1364,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) l2 = sprintf (buf2, fp_fmt[x], fp_nums[y]); buf1[1023] = buf2[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", + printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", fp_fmt[x], l1, buf1, l2, buf2); fail++; } @@ -1379,7 +1379,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) l2 = sprintf (buf2, int_fmt[x], int_nums[y]); buf1[1023] = buf2[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", + printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", int_fmt[x], l1, buf1, l2, buf2); fail++; } @@ -1394,7 +1394,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) l2 = sprintf (buf2, str_fmt[x], str_vals[y]); buf1[1023] = buf2[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", + printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", str_fmt[x], l1, buf1, l2, buf2); fail++; } @@ -1410,7 +1410,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) l2 = sprintf (buf2, ll_fmt[x], ll_nums[y]); buf1[1023] = buf2[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", + printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", ll_fmt[x], l1, buf1, l2, buf2); fail++; } @@ -1462,7 +1462,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) l2 = sprintf (buf2, ss_fmt[x], ss_nums[y]); buf1[1023] = buf2[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", + printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", ss_fmt[x], l1, buf1, l2, buf2); fail++; } @@ -1496,7 +1496,7 @@ int rsync_snprintf(char *str,size_t count,const char *fmt,...) { double v0 = 0.12345678901234567890123456789012345678901; for (x=0; x<100; x++) { - double p = pow(10, x); + double p = pow(10, x); double r = v0*p; snprintf(buf1, sizeof(buf1), "%1.1f", r); sprintf(buf2, "%1.1f", r); diff --git a/lib/sysxattrs.c b/lib/sysxattrs.c index 5a6aeaad9..be95a9b6d 100644 --- a/lib/sysxattrs.c +++ b/lib/sysxattrs.c @@ -130,9 +130,9 @@ ssize_t sys_llistxattr(const char *path, char *list, size_t size) return len; if ((size_t)len >= size) { - /* FreeBSD extattr_list_xx() returns 'size' as 'len' in case there are - more data available, truncating the output, we solve this by signalling - ERANGE in case len == size so that the code in xattrs.c will retry with + /* FreeBSD extattr_list_xx() returns 'size' as 'len' in case there are + more data available, truncating the output, we solve this by signalling + ERANGE in case len == size so that the code in xattrs.c will retry with a bigger buffer */ errno = ERANGE; return -1; diff --git a/packaging/cull-options b/packaging/cull-options index e71818cdb..9c4304331 100755 --- a/packaging/cull-options +++ b/packaging/cull-options @@ -97,7 +97,7 @@ def main(): txt += '# These are all possible short options that we will accept (when not disabled above):\n' txt += str_assign('short_no_arg', ''.join(sorted(short_no_arg)), 'DO NOT REMOVE ANY') txt += str_assign('short_with_num', ''.join(sorted(short_with_num)), 'DO NOT REMOVE ANY') - + txt += """ # To disable a long-named option, change its value to a -1. The values mean: # 0 = the option has no arg; 1 = the arg doesn't need any checking; 2 = only diff --git a/packaging/smart-make b/packaging/smart-make index 3826432ec..9da044262 100755 --- a/packaging/smart-make +++ b/packaging/smart-make @@ -1,5 +1,5 @@ #!/bin/sh - + set -e export LANG=C diff --git a/popt/README b/popt/README index 0b5205bfd..57a6acde5 100644 --- a/popt/README +++ b/popt/README @@ -2,14 +2,14 @@ This is the popt command line option parsing library. While it is similiar to getopt(3), it contains a number of enhancements, including: 1) popt is fully reentrant - 2) popt can parse arbitrary argv[] style arrays while + 2) popt can parse arbitrary argv[] style arrays while getopt(2) makes this quite difficult 3) popt allows users to alias command line arguments 4) popt provides convience functions for parsing strings into argv[] style arrays popt is used by rpm, the Red Hat install program, and many other Red Hat -utilities, all of which provide excellent examples of how to use popt. +utilities, all of which provide excellent examples of how to use popt. Complete documentation on popt is available in popt.ps (included in this tarball), which is excerpted with permission from the book "Linux Application Development" by Michael K. Johnson and Erik Troan (availble diff --git a/popt/lookup3.c b/popt/lookup3.c index e974cad87..7e01d7b56 100644 --- a/popt/lookup3.c +++ b/popt/lookup3.c @@ -1,20 +1,20 @@ /* -------------------------------------------------------------------- */ /* * lookup3.c, by Bob Jenkins, May 2006, Public Domain. - * + * * These are functions for producing 32-bit hashes for hash table lookup. - * jlu32w(), jlu32l(), jlu32lpair(), jlu32b(), _JLU3_MIX(), and _JLU3_FINAL() - * are externally useful functions. Routines to test the hash are included + * jlu32w(), jlu32l(), jlu32lpair(), jlu32b(), _JLU3_MIX(), and _JLU3_FINAL() + * are externally useful functions. Routines to test the hash are included * if SELF_TEST is defined. You can use this free for any purpose. It's in * the public domain. It has no warranty. - * + * * You probably want to use jlu32l(). jlu32l() and jlu32b() * hash byte arrays. jlu32l() is is faster than jlu32b() on * little-endian machines. Intel and AMD are little-endian machines. * On second thought, you probably want jlu32lpair(), which is identical to - * jlu32l() except it returns two 32-bit hashes for the price of one. + * jlu32l() except it returns two 32-bit hashes for the price of one. * You could implement jlu32bpair() if you wanted but I haven't bothered here. - * + * * If you want to find a hash of, say, exactly 7 integers, do * a = i1; b = i2; c = i3; * _JLU3_MIX(a,b,c); @@ -25,9 +25,9 @@ * then use c as the hash value. If you have a variable size array of * 4-byte integers to hash, use jlu32w(). If you have a byte array (like * a character string), use jlu32l(). If you have several byte arrays, or - * a mix of things, see the comments above jlu32l(). - * - * Why is this so big? I read 12 bytes at a time into 3 4-byte integers, + * a mix of things, see the comments above jlu32l(). + * + * Why is this so big? I read 12 bytes at a time into 3 4-byte integers, * then mix those integers. This is fast (you can do a lot more thorough * mixing with 12*3 instructions on 3 integers than you can with 3 instructions * on 1 byte), but shoehorning those bytes into integers efficiently is messy. @@ -60,10 +60,10 @@ static const union _dbswap { /* -------------------------------------------------------------------- */ /* * _JLU3_MIX -- mix 3 32-bit values reversibly. - * + * * This is reversible, so any information in (a,b,c) before _JLU3_MIX() is * still in (a,b,c) after _JLU3_MIX(). - * + * * If four pairs of (a,b,c) inputs are run through _JLU3_MIX(), or through * _JLU3_MIX() in reverse, there are at least 32 bits of the output that * are sometimes the same for one pair and different for another pair. @@ -75,9 +75,9 @@ static const union _dbswap { * the output delta to a Gray code (a^(a>>1)) so a string of 1's (as * is commonly produced by subtraction) look like a single 1-bit * difference. - * * the base values were pseudorandom, all zero but one bit set, or + * * the base values were pseudorandom, all zero but one bit set, or * all zero plus a counter that starts at zero. - * + * * Some k values for my "a-=c; a^=ROTL32(c,k); c+=b;" arrangement that * satisfy this are * 4 6 8 16 19 4 @@ -85,14 +85,14 @@ static const union _dbswap { * 14 9 3 7 17 3 * Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing * for "differ" defined as + with a one-bit base and a two-bit delta. I - * used http://burtleburtle.net/bob/hash/avalanche.html to choose + * used http://burtleburtle.net/bob/hash/avalanche.html to choose * the operations, constants, and arrangements of the variables. - * + * * This does not achieve avalanche. There are input bits of (a,b,c) * that fail to affect some output bits of (a,b,c), especially of a. The * most thoroughly mixed value is c, but it doesn't really even achieve * avalanche in c. - * + * * This allows some parallelism. Read-after-writes are good at doubling * the number of bits affected, so the goal of mixing pulls in the opposite * direction as the goal of parallelism. I did what I could. Rotates @@ -114,7 +114,7 @@ static const union _dbswap { /* -------------------------------------------------------------------- */ /** * _JLU3_FINAL -- final mixing of 3 32-bit values (a,b,c) into c - * + * * Pairs of (a,b,c) values differing in only a few bits will usually * produce values of c that look totally different. This was tested for * * pairs that differed by one bit, by two bits, in any combination @@ -124,9 +124,9 @@ static const union _dbswap { * the output delta to a Gray code (a^(a>>1)) so a string of 1's (as * is commonly produced by subtraction) look like a single 1-bit * difference. - * * the base values were pseudorandom, all zero but one bit set, or + * * the base values were pseudorandom, all zero but one bit set, or * all zero plus a counter that starts at zero. - * + * * These constants passed: * 14 11 25 16 4 14 24 * 12 14 25 16 4 14 24 @@ -154,7 +154,7 @@ uint32_t jlu32w(uint32_t h, const uint32_t *k, size_t size); * This works on all machines. To be useful, it requires * -- that the key be an array of uint32_t's, and * -- that the size be the number of uint32_t's in the key - * + * * The function jlu32w() is identical to jlu32l() on little-endian * machines, and identical to jlu32b() on big-endian machines, * except that the size has to be measured in uint32_ts rather than in @@ -213,19 +213,19 @@ uint32_t jlu32l(uint32_t h, const void *key, size_t size); * Returns a 32-bit value. Every bit of the key affects every bit of * the return value. Two keys differing by one or two bits will have * totally different hash values. - * + * * The best hash table sizes are powers of 2. There is no need to do * mod a prime (mod is sooo slow!). If you need less than 32 bits, * use a bitmask. For example, if you need only 10 bits, do * h = (h & hashmask(10)); * In which case, the hash table should have hashsize(10) elements. - * + * * If you are hashing n strings (uint8_t **)k, do it like this: * for (i=0, h=0; ios->currAlias = con->aliases + i; { const char ** av; int ac = con->os->currAlias->argc; - /* Append --foo=bar arg to alias argv array (if present). */ + /* Append --foo=bar arg to alias argv array (if present). */ if (longName && nextArg != NULL && *nextArg != '\0') { av = malloc((ac + 1 + 1) * sizeof(*av)); if (av != NULL) { /* XXX won't happen. */ @@ -906,7 +906,7 @@ int poptSaveString(const char *** argvp, if (*argvp != NULL) while ((*argvp)[argc] != NULL) argc++; - + if ((*argvp = xrealloc(*argvp, (argc + 1 + 1) * sizeof(**argvp))) != NULL) { (*argvp)[argc++] = xstrdup(val); (*argvp)[argc ] = NULL; @@ -1405,7 +1405,7 @@ int poptGetNextOpt(poptContext con) { poptStripArg(con, con->os->next); } - + if (con->os->argv != NULL) { /* XXX can't happen */ if (F_ISSET(opt, OPTIONAL) && con->os->argv[con->os->next][0] == '-') { @@ -1546,7 +1546,7 @@ poptContext poptFreeContext(poptContext con) con->otherHelp = _free(con->otherHelp); con->execPath = _free(con->execPath); con->arg_strip = PBM_FREE(con->arg_strip); - + con = _free(con); return con; } @@ -1696,19 +1696,19 @@ int poptStrippedArgv(poptContext con, int argc, char ** argv) int numargs = argc; int j = 1; int i; - + if (con->arg_strip) for (i = 1; i < argc; i++) { if (PBM_ISSET(i, con->arg_strip)) numargs--; } - + for (i = 1; i < argc; i++) { if (con->arg_strip && PBM_ISSET(i, con->arg_strip)) continue; argv[j] = (j < numargs) ? argv[i] : NULL; j++; } - + return numargs; } diff --git a/popt/popt.h b/popt/popt.h index bd1606110..338010df2 100644 --- a/popt/popt.h +++ b/popt/popt.h @@ -2,7 +2,7 @@ */ /* (C) 1998-2000 Red Hat, Inc. -- Licensing details are in the COPYING - file accompanying popt source distributions, available from + file accompanying popt source distributions, available from ftp://ftp.rpm.org/pub/rpm/dist. */ #ifndef H_POPT @@ -21,8 +21,8 @@ #define POPT_ARG_LONG 3U /*!< arg ==> long */ #define POPT_ARG_INCLUDE_TABLE 4U /*!< arg points to table */ #define POPT_ARG_CALLBACK 5U /*!< table-wide callback... must be - set first in table; arg points - to callback, descrip points to + set first in table; arg points + to callback, descrip points to callback data to pass */ #define POPT_ARG_INTL_DOMAIN 6U /*!< set the translation domain for this table and any @@ -173,7 +173,7 @@ typedef struct poptOption * poptOption; /** */ enum poptCallbackReason { - POPT_CALLBACK_REASON_PRE = 0, + POPT_CALLBACK_REASON_PRE = 0, POPT_CALLBACK_REASON_POST = 1, POPT_CALLBACK_REASON_OPTION = 2 }; @@ -190,7 +190,7 @@ extern "C" { * @param arg @todo Document. * @param data @todo Document. */ -typedef void (*poptCallbackType) (poptContext con, +typedef void (*poptCallbackType) (poptContext con, enum poptCallbackReason reason, const struct poptOption * opt, const char * arg, @@ -391,7 +391,7 @@ int poptParseArgvString(const char * s, int * argcPtr, const char *** argvPtr); /** - * Parses an input configuration file and returns an string that is a + * Parses an input configuration file and returns an string that is a * command line. For use with popt. You must free the return value when done. * * Given the file: @@ -400,14 +400,14 @@ int poptParseArgvString(const char * s, # this one too aaa bbb - ccc + ccc bla=bla this_is = fdsafdas - bad_line= + bad_line= really bad line really bad line = again -5555= 55555 +5555= 55555 test = with lots of spaces \endverbatim * @@ -419,12 +419,12 @@ this_is = fdsafdas * Passing this to poptParseArgvString() yields an argv of: \verbatim '--aaa' -'--bbb' -'--ccc' -'--bla=bla' -'--this_is=fdsafdas' -'--5555=55555' -'--test=with lots of spaces' +'--bbb' +'--ccc' +'--bla=bla' +'--this_is=fdsafdas' +'--5555=55555' +'--test=with lots of spaces' \endverbatim * * @bug NULL is returned if file line is too long. diff --git a/popt/poptconfig.c b/popt/poptconfig.c index bf201e26f..1c81f622a 100644 --- a/popt/poptconfig.c +++ b/popt/poptconfig.c @@ -3,7 +3,7 @@ */ /* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING - file accompanying popt source distributions, available from + file accompanying popt source distributions, available from ftp://ftp.rpm.org/pub/rpm/dist. */ #include "system.h" @@ -234,7 +234,7 @@ static int poptConfigLine(poptContext con, char * line) if (con->appName == NULL) goto exit; - + memset(item, 0, sizeof(*item)); appName = se; @@ -327,7 +327,7 @@ static int poptConfigLine(poptContext con, char * line) item->argv[j] = NULL; item->argc = j; } - + if (!strcmp(entryType, "alias")) rc = poptAddItem(con, item, 0); else if (!strcmp(entryType, "exec")) @@ -500,7 +500,7 @@ poptInit(int argc, const char ** argv, if ((argv0 = strrchr(argv[0], '/')) != NULL) argv0++; else argv0 = argv[0]; - + con = poptGetContext(argv0, argc, (const char **)argv, options, 0); if (con != NULL&& poptReadConfigFiles(con, configPaths)) con = poptFini(con); diff --git a/popt/popthelp.c b/popt/popthelp.c index 6738f6add..32eb21878 100644 --- a/popt/popthelp.c +++ b/popt/popthelp.c @@ -5,7 +5,7 @@ */ /* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING - file accompanying popt source distributions, available from + file accompanying popt source distributions, available from ftp://ftp.rpm.org/pub/rpm/dist. */ #include "system.h" @@ -32,7 +32,7 @@ NORETURN static void displayArgs(poptContext con, UNUSED(enum poptCallbackReason foo), - struct poptOption * key, + struct poptOption * key, UNUSED(const char * arg), UNUSED(void * data)) { @@ -88,13 +88,13 @@ typedef struct columns_s { size_t max; } * columns_t; -/** +/** * Return no. of columns in output window. * @param fp FILE - * @return no. of columns - */ + * @return no. of columns + */ static size_t maxColumnWidth(FILE *fp) -{ +{ size_t maxcols = _POPTHELP_MAXLINE; #if defined(TIOCGWINSZ) struct winsize ws; @@ -108,7 +108,7 @@ static size_t maxColumnWidth(FILE *fp) } #endif return maxcols; -} +} /** * Determine number of display characters in a string. @@ -491,7 +491,7 @@ static size_t maxArgWidth(const struct poptOption * opt, size_t max = 0; size_t len = 0; const char * argDescrip; - + if (opt != NULL) while (opt->longName || opt->shortName || opt->arg) { if (poptArgType(opt) == POPT_ARG_INCLUDE_TABLE) { @@ -527,7 +527,7 @@ static size_t maxArgWidth(const struct poptOption * opt, } opt++; } - + return max; } @@ -595,7 +595,7 @@ static void singleTableHelp(poptContext con, FILE * fp, sub_transdom = getTableTranslationDomain(arg); if (sub_transdom == NULL) sub_transdom = translation_domain; - + /* If no popt aliases/execs, skip poptAliasOption processing. */ if (arg == poptAliasOptions && !(con->numAliases || con->numExecs)) continue; @@ -688,7 +688,7 @@ static size_t singleOptionUsage(FILE * fp, columns_t columns, if ((columns->cur + len) > columns->max) { fprintf(fp, "\n "); columns->cur = (size_t)7; - } + } fprintf(fp, " ["); if (prtshort) @@ -834,7 +834,7 @@ static size_t showShortOptions(const struct poptOption * opt, FILE * fp, if (arg) /* XXX program error */ len = showShortOptions(arg, fp, s); } - } + } /* On return to top level, print the short options, return print length. */ if (s != str && *s != '\0') { diff --git a/popt/poptint.c b/popt/poptint.c index b8dc90f42..0ce155959 100644 --- a/popt/poptint.c +++ b/popt/poptint.c @@ -48,7 +48,7 @@ POPT_dgettext(const char * dom, const char * str) char * codeset = NULL; char * retval = NULL; - if (!dom) + if (!dom) dom = textdomain(NULL); codeset = bind_textdomain_codeset(dom, NULL); bind_textdomain_codeset(dom, "UTF-8"); diff --git a/popt/poptint.h b/popt/poptint.h index 001c5c35d..6595e2526 100644 --- a/popt/poptint.h +++ b/popt/poptint.h @@ -3,7 +3,7 @@ */ /* (C) 1998-2000 Red Hat, Inc. -- Licensing details are in the COPYING - file accompanying popt source distributions, available from + file accompanying popt source distributions, available from ftp://ftp.rpm.org/pub/rpm/dist. */ #ifndef H_POPTINT diff --git a/popt/poptparse.c b/popt/poptparse.c index 5afc6c551..fa2b7f4ec 100644 --- a/popt/poptparse.c +++ b/popt/poptparse.c @@ -3,7 +3,7 @@ */ /* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING - file accompanying popt source distributions, available from + file accompanying popt source distributions, available from ftp://ftp.rpm.org/pub/rpm/dist. */ #include "system.h" @@ -25,7 +25,7 @@ int poptDupArgv(int argc, const char **argv, return POPT_ERROR_NOARG; nb += strlen(argv[i]) + 1; } - + dst = malloc(nb); if (dst == NULL) /* XXX can't happen */ return POPT_ERROR_MALLOC; @@ -202,7 +202,7 @@ int poptConfigFileToString(FILE *fp, char ** argstrp, } if (*q != '=') continue; /* XXX for now, silently ignore bogus line */ - + /* *q is an equal sign. */ *q++ = '\0'; diff --git a/popt/system.h b/popt/system.h index f731d206d..9b2495bee 100644 --- a/popt/system.h +++ b/popt/system.h @@ -61,7 +61,7 @@ static inline char * stpcpy (char *dest, const char * src) { #endif #if !defined(__GNUC__) && !defined(__attribute__) -#define __attribute__(x) +#define __attribute__(x) #endif #define UNUSED(x) x __attribute__((__unused__)) #define FORMAT(a, b, c) __attribute__((__format__ (a, b, c))) diff --git a/rsync-web/FAQ.html b/rsync-web/FAQ.html index 7368a8a87..6db02b0f7 100644 --- a/rsync-web/FAQ.html +++ b/rsync-web/FAQ.html @@ -171,7 +171,7 @@

rsync: Command not found

    -
  1. install rsync in a "standard" location that is in your remote path. +
  2. install rsync in a "standard" location that is in your remote path.
  3. modify your .cshrc, .bashrc etc on the remote system to include the path that rsync is in @@ -194,7 +194,7 @@

    spaces in filenames

    Short answer: Yes, rsync can handle filenames with spaces. -

    Long answer: +

    Long answer:

    Rsync handles spaces just like any other unix command line application. Within the code spaces are treated just like any other character so a @@ -203,7 +203,7 @@

    spaces in filenames

    The problem of spaces is in the argv processing done to interpret the command line. As with any other unix application you have to escape spaces -in some way on the command line or they will be used to separate arguments. +in some way on the command line or they will be used to separate arguments.

    It is slightly trickier in rsync (and other remote-copy programs like scp) because rsync sends a command line to the remote system to launch the @@ -237,7 +237,7 @@

    spaces in filenames

    rsync -av host:a?long?filename /tmp/

    As long as you know that the remote filenames on the command line -are interpreted by the remote shell then it all works fine. +are interpreted by the remote shell then it all works fine.


    ignore "vanished files" warning

    diff --git a/rsync-web/backup.txt b/rsync-web/backup.txt index c09fb57d1..788a81be2 100644 --- a/rsync-web/backup.txt +++ b/rsync-web/backup.txt @@ -22,7 +22,7 @@ export RSYNC_PASSWORD=XXXXXX ######################################################################## BACKUPDIR=`date +%A` -OPTS="--force --ignore-errors --delete-excluded --exclude-from=$EXCLUDES +OPTS="--force --ignore-errors --delete-excluded --exclude-from=$EXCLUDES --delete --backup --backup-dir=/$BACKUPDIR -a" export PATH=$PATH:/bin:/usr/bin:/usr/local/bin diff --git a/rsync-web/daylight-savings.html b/rsync-web/daylight-savings.html index 8c74b6412..925cb2dd3 100644 --- a/rsync-web/daylight-savings.html +++ b/rsync-web/daylight-savings.html @@ -18,7 +18,7 @@

    How the DST Change can adversely affect FAT filesystems

    a problem in how the file's date is handled. This problem lies in the way FAT filesystems stores timestamps and how Windows converts between local time and -UTC. +UTC.

    Background

    diff --git a/rsync-web/examples.html b/rsync-web/examples.html index adaeab7cb..1561d2132 100644 --- a/rsync-web/examples.html +++ b/rsync-web/examples.html @@ -8,7 +8,7 @@

    rsync examples

    If you have an interesting example of how you use rsync then please -submit it to the +submit it to the rsync-bugs@samba.org for inclusion on this page. diff --git a/rsync-web/horus.txt b/rsync-web/horus.txt index d861dc843..27a7010ab 100644 --- a/rsync-web/horus.txt +++ b/rsync-web/horus.txt @@ -16,11 +16,11 @@ the backup. This is the script I use on one of those machines. done DAY=`date "+%A"` - + rsync -a --delete /usr/local/apache /data2/backups/$DAY rsync -a --delete /data/solid /data2/backups/$DAY - + The first part does the backup on the spare disk. The second part backs up the critical parts to daily directories. I also backup the diff --git a/rsync-web/how-rsync-works.html b/rsync-web/how-rsync-works.html index 2a3fba9ee..8b1e1d09e 100644 --- a/rsync-web/how-rsync-works.html +++ b/rsync-web/how-rsync-works.html @@ -198,7 +198,7 @@

    The Generator

    modification time or size differs. If --checksum was specified a file-level checksum will be created and compared. Directories, device nodes and symlinks are not -skipped. Missing directories will be created. +skipped. Missing directories will be created.

    If a file is not to be skipped, any existing version on the receiving side becomes the "basis file" for the transfer, and is @@ -237,7 +237,7 @@

    The Sender

    the matching block.

    Matching blocks can be identified in this way even if -the blocks are reordered or at different offsets. +the blocks are reordered or at different offsets. This process is the very heart of the rsync algorithm.

    In this way, the sender will give the receiver instructions for diff --git a/rsync-web/issues.html b/rsync-web/issues.html index dac9dd221..7a89a5b85 100644 --- a/rsync-web/issues.html +++ b/rsync-web/issues.html @@ -57,7 +57,7 @@

    current issues and debugging

    See the "rsync-debug" script below for an example of how to grab strace information from the remote rsync process(es). If you need help, send email to -the mailing list. +the mailing list.

  4. Q: diff --git a/rsync-web/lists.html b/rsync-web/lists.html index 852494e3f..66efbf5a6 100644 --- a/rsync-web/lists.html +++ b/rsync-web/lists.html @@ -33,7 +33,7 @@

    rsync mailing lists

    subscriptions]
  5. - +
  6. rsync-announce carries only messages from the maintainer annoucing new releases, which happen at most a few @@ -44,7 +44,7 @@

    rsync mailing lists

    subscriptions]
  7. - +
  8. rsync-cvs carries messages are automatically generated whenever a developer changes the source code, which can happen diff --git a/rsync-web/resources.html b/rsync-web/resources.html index 6b6d11ada..9dc34d70d 100644 --- a/rsync-web/resources.html +++ b/rsync-web/resources.html @@ -10,7 +10,7 @@

    rsync resources

    Please let us know if you have any rsync-related documents to add to this list: -
      +
      • Be sure to search for the latest rsync info to get up-to-the-minute results. You can use the search box at the top of the page for either diff --git a/rsync-web/rsync-and-debian/rsync-and-debian.sgml b/rsync-web/rsync-and-debian/rsync-and-debian.sgml index ab9faaf4d..81f2b9e9f 100644 --- a/rsync-web/rsync-and-debian/rsync-and-debian.sgml +++ b/rsync-web/rsync-and-debian/rsync-and-debian.sgml @@ -8,9 +8,9 @@ $Date: 2002/05/14 03:10:09 $ - + - + Introduction @@ -34,7 +34,7 @@ hours into rsync I suppose I am quite fond of it and may be a little biased, but I think I also know its strengths and problems more than most. - +

        If there are issues ommitted by this document, or if you think the answers are incomplete, unbalanced, or incorrect, then @@ -47,7 +47,7 @@ Background - + The rsync algorithm @@ -56,7 +56,7 @@ - +

        The rsync algorithm is described in detail in the ANU Technical Report included with the distribution and on the @@ -100,7 +100,7 @@ - + - +

        rsync may also be used locally, which is a degenerate case with client and server connected across a unix-domain or @@ -173,7 +173,7 @@ - + rproxy is packaged in Debian and is moderately useful for @@ -271,7 +271,7 @@ does not work on this. Personally I think that developing rsync itself, and then librsync/rdiff, is likely to be more useful; I suspect other people interested in working in this - area might have similar thoughts. + area might have similar thoughts.

        I don't think there are any problems in the code or project @@ -282,7 +282,7 @@ in the future. - + Introduction to Debian @@ -330,11 +330,11 @@ - apt-proxy + apt-proxy

        Because rsync is less efficient than HTTP for transferring @@ -352,9 +352,9 @@ The current maintainer is Chris Halls.

        -
        + + - Open Issues @@ -449,7 +449,7 @@ - + There is some cruft in the command line syntax, but throwing it out would also break everybody's scripts, mental maps, @@ -503,7 +503,7 @@ - + @@ -541,7 +541,7 @@ - + This scheme has the great advantage that the server is entirely passive, and only needs to support standard HTTP. @@ -823,10 +823,10 @@ distribution it might be simpler to just distribute the new packages directly as is currently done. - + rsync should be used by - +

        Even if there are few gains from compressing - + Revision history - +

        $Log: rsync-and-debian.sgml,v $ Revision 1.10 2002/05/14 03:10:09 mbp @@ -862,7 +862,7 @@ Fix revision history SGML stuff. Revision 1.5 2002/04/12 00:24:50 mbp Fix mailing list name. Add revision history. - +

        diff --git a/rsync-web/tech_report/images.aux b/rsync-web/tech_report/images.aux index f23e54680..f5d5fef42 100644 --- a/rsync-web/tech_report/images.aux +++ b/rsync-web/tech_report/images.aux @@ -1 +1 @@ -\relax +\relax diff --git a/rsync-web/tech_report/images.log b/rsync-web/tech_report/images.log index 4344b35fc..f8d45960d 100644 --- a/rsync-web/tech_report/images.log +++ b/rsync-web/tech_report/images.log @@ -93,7 +93,7 @@ l2hSize :displaymath172:14.5pt::0.0pt::349.0pt. [7 -] (images.aux) ) +] (images.aux) ) Here is how much of TeX's memory you used: 518 strings out of 10906 6196 string characters out of 72186 diff --git a/rsync-web/tech_report/images.pl b/rsync-web/tech_report/images.pl index 6fb022fb0..c69566971 100644 --- a/rsync-web/tech_report/images.pl +++ b/rsync-web/tech_report/images.pl @@ -6,43 +6,43 @@ $cached_env_img{$key} = q|$\alpha$|; + ALT="$\alpha$">|; $key = q/{displaymath}a(k+1,l+1)=(a(k,l)-X_k+X_l+1)bmodM{displaymath}MSF=1.6;AAT;/; $cached_env_img{$key} = q|\begin{displaymath}a(k+1,l+1) = (a(k,l) - X_k + X_{l+1}) \bmod M \end{displaymath}|; + ALT="\begin{displaymath}a(k+1,l+1) = (a(k,l) - X_k + X_{l+1}) \bmod M \end{displaymath}">|; $key = q/{displaymath}a(k,l)=(sum_i=k^lX_i)bmodM{displaymath}MSF=1.6;AAT;/; $cached_env_img{$key} = q|\begin{displaymath}a(k,l) = (\sum_{i=k}^l X_i) \bmod M \end{displaymath}|; + ALT="\begin{displaymath}a(k,l) = (\sum_{i=k}^l X_i) \bmod M \end{displaymath}">|; $key = q/{displaymath}b(k,l)=(sum_i=k^l(l-i+1)X_i)bmodM{displaymath}MSF=1.6;AAT;/; $cached_env_img{$key} = q|\begin{displaymath}b(k,l) = (\sum_{i=k}^l (l-i+1)X_i) \bmod M \end{displaymath}|; + ALT="\begin{displaymath}b(k,l) = (\sum_{i=k}^l (l-i+1)X_i) \bmod M \end{displaymath}">|; $key = q/{inline}X_kldotsX_l{inline}MSF=1.6;AAT;/; $cached_env_img{$key} = q|$X_k \ldots X_l$|; + ALT="$X_k \ldots X_l$">|; $key = q/{displaymath}b(k+1,l+1)=(b(k,l)-(l-k+1)X_k+a(k+1,l+1))bmodM{displaymath}MSF=1.6;AAT;/; $cached_env_img{$key} = q|\begin{displaymath}b(k+1,l+1) = (b(k,l) - (l-k+1) X_k + a(k+1,l+1)) \bmod M \end{displaymath}|; + ALT="\begin{displaymath}b(k+1,l+1) = (b(k,l) - (l-k+1) X_k + a(k+1,l+1)) \bmod M \end{displaymath}">|; $key = q/{inline}beta{inline}MSF=1.6;AAT;/; $cached_env_img{$key} = q|$\beta$|; + ALT="$\beta$">|; 1; diff --git a/rsync-web/tech_report/images.tex b/rsync-web/tech_report/images.tex index 61a3d9e5e..17a382a3e 100644 --- a/rsync-web/tech_report/images.tex +++ b/rsync-web/tech_report/images.tex @@ -6,7 +6,7 @@ \makeatletter -\count@=\the\catcode`\_ \catcode`\_=8 +\count@=\the\catcode`\_ \catcode`\_=8 \newenvironment{tex2html_wrap}{}{} \catcode`\_=\count@ \makeatother \let\mathon=$ @@ -63,12 +63,12 @@ \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}} \def\centerinlinemath{%\dimen1=\ht\sizebox \dimen1=\ifdim\ht\sizebox<\dp\sizebox \dp\sizebox\else\ht\sizebox\fi - \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1 + \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1 \dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax} \def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize\expandafter\vfill \else\expandafter\vss\fi}% -\makeatletter \tracingstats = 1 +\makeatletter \tracingstats = 1 \begin{document} diff --git a/rsync-web/tech_report/index.html b/rsync-web/tech_report/index.html index 77bf9fc2c..d0d37cb7e 100644 --- a/rsync-web/tech_report/index.html +++ b/rsync-web/tech_report/index.html @@ -20,11 +20,11 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: The problem diff --git a/rsync-web/tech_report/node1.html b/rsync-web/tech_report/node1.html index 83c726a43..94e6bdc90 100644 --- a/rsync-web/tech_report/node1.html +++ b/rsync-web/tech_report/node1.html @@ -23,15 +23,15 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: The rsync algorithm @@ -94,15 +94,15 @@

        next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: The rsync algorithm diff --git a/rsync-web/tech_report/node2.html b/rsync-web/tech_report/node2.html index c1f299d42..20a383a90 100644 --- a/rsync-web/tech_report/node2.html +++ b/rsync-web/tech_report/node2.html @@ -23,15 +23,15 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Rolling checksum @@ -110,7 +110,7 @@

        WIDTH="15" HEIGHT="13" ALIGN="BOTTOM" BORDER="0" SRC="img1.gif" ALT="$\alpha$">. - +
        4.
        weak and strong checksum as one of the blocks of B. This can be done in a single pass very quickly using a special property of the rolling checksum described below. - +
        5.
        next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Rolling checksum diff --git a/rsync-web/tech_report/node3.html b/rsync-web/tech_report/node3.html index 2d36abdd2..c9e84cd7c 100644 --- a/rsync-web/tech_report/node3.html +++ b/rsync-web/tech_report/node3.html @@ -23,15 +23,15 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Checksum searching @@ -50,9 +50,9 @@

        The weak rolling checksum used in the rsync algorithm needs to have the property that it is very cheap to calculate the checksum of a -buffer +buffer -X2 .. Xn+1 given the checksum of buffer +X2 .. Xn+1 given the checksum of buffer X1 .. Xn and the values of the bytes X1 and Xn+1. @@ -100,15 +100,15 @@


        -where s(k,l) is the rolling checksum of the bytes +where s(k,l) is the rolling checksum of the bytes $X_k \ldots X_l$. -For simplicity and speed, we use +For simplicity and speed, we use -M = 216. +M = 216.

        The important property of this checksum is that successive values can @@ -162,15 +162,15 @@

        next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Checksum searching diff --git a/rsync-web/tech_report/node4.html b/rsync-web/tech_report/node4.html index de8a27239..8706d7e15 100644 --- a/rsync-web/tech_report/node4.html +++ b/rsync-web/tech_report/node4.html @@ -23,15 +23,15 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Pipelining @@ -120,15 +120,15 @@

        next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Pipelining diff --git a/rsync-web/tech_report/node5.html b/rsync-web/tech_report/node5.html index 5392a93a2..63c3a65be 100644 --- a/rsync-web/tech_report/node5.html +++ b/rsync-web/tech_report/node5.html @@ -23,15 +23,15 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Results @@ -68,12 +68,12 @@

        SRC="img1.gif" ALT="$\alpha$"> and -reconstructs the files. +reconstructs the files.

        If the communications link is buffered then these two processes can proceed independently and the link should be kept fully utilised in -both directions for most of the time. +both directions for most of the time.



        diff --git a/rsync-web/tech_report/node6.html b/rsync-web/tech_report/node6.html index baae473ee..09155ec4c 100644 --- a/rsync-web/tech_report/node6.html +++ b/rsync-web/tech_report/node6.html @@ -23,15 +23,15 @@
        next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Availability @@ -184,7 +184,7 @@

        The number of false alarms was less than 1/1000 of the number of true matches, indicating that the 32 bit rolling checksum is quite -good at screening out false matches. +good at screening out false matches.

        The number of tag hits indicates that the second level of the @@ -274,15 +274,15 @@

        next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: Availability diff --git a/rsync-web/tech_report/node7.html b/rsync-web/tech_report/node7.html index 1f44ad468..6f8a35d56 100644 --- a/rsync-web/tech_report/node7.html +++ b/rsync-web/tech_report/node7.html @@ -23,15 +23,15 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: About this document ... diff --git a/rsync-web/tech_report/node8.html b/rsync-web/tech_report/node8.html index 0bf88a51f..bb8a97137 100644 --- a/rsync-web/tech_report/node8.html +++ b/rsync-web/tech_report/node8.html @@ -19,15 +19,15 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Up: The rsync algorithm @@ -39,13 +39,13 @@

        About this document ... -

        +

        The rsync algorithm

        This document was generated using the LaTeX2HTML translator Version 98.1p1 release (March 2nd, 1998)

        Copyright © 1993, 1994, 1995, 1996, 1997, -Nikos Drakos, +Nikos Drakos, Computer Based Learning Unit, University of Leeds.

        The command line arguments were:
        diff --git a/rsync-web/tech_report/tech_report.html b/rsync-web/tech_report/tech_report.html index 77bf9fc2c..d0d37cb7e 100644 --- a/rsync-web/tech_report/tech_report.html +++ b/rsync-web/tech_report/tech_report.html @@ -20,11 +20,11 @@ next + SRC="next.gif"> up + SRC="up.gif"> previous + SRC="previous.gif">
        Next: The problem diff --git a/rsync-web/win95.txt b/rsync-web/win95.txt index d856682f6..f19f1621e 100644 --- a/rsync-web/win95.txt +++ b/rsync-web/win95.txt @@ -1,7 +1,7 @@ Compiling rsync for MS Windows 95 ================================= -Caveat: +Caveat: There are no doubt other ways to do this, but I have not tried them. This will produce an rsync binary which runs under win95/NT which can _send_ @@ -17,13 +17,13 @@ Step 1. Get the Cygnus development kit -------------------------------------- If you do not already know about this wonderful project undertaken by cygnus, -grab the latest copy of the gnu-win32 runtime system from +grab the latest copy of the gnu-win32 runtime system from http://www.cygnus.com/misc/gnu-win32/ You will want the CDK-B19.EXE self-installing binary (be warned - it's 12M in size) which contains gcc+binutils+DLLs required by the system. Read the -instructions about this and install it. You will then have something which +instructions about this and install it. You will then have something which looks _very_ close to a UNIX box as far as any UNIX software ic concerned. Also grab the updated version (B19.1) of the DLL as this fixes some problems @@ -67,7 +67,7 @@ will probably run into these things also... 1. rsync will not _receive_ data onto a windows box. It seems to do everything ok, but then hangs at the last step and no files actually appear. When - transferring via my modem, I can see data being received, but it never + transferring via my modem, I can see data being received, but it never appears in my directory. NOTE: This now appears to be fixed. @@ -103,7 +103,7 @@ NOTE: This now appears to be fixed. which is then run by bash and calls the ssh binary (wherever you have installed it). - I suspect that there is a better way, but I have not yet had time to + I suspect that there is a better way, but I have not yet had time to look for it. diff --git a/rsync.1.md b/rsync.1.md index 4aa7d6520..7f6968cf5 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -2832,12 +2832,12 @@ expand it. 0. `--compress-threads=NUM`, `--zt=NUM` - Set the number of threads to spawn when compressing data. Setting this - option to 1 or more will instruct the compression library to spawn 1 or - more threads for compression. Ideally, increasing the number of threads + Set the number of threads to spawn when compressing data. Setting this + option to 1 or more will instruct the compression library to spawn 1 or + more threads for compression. Ideally, increasing the number of threads will increase transfer speed if the transfer is CPU bound on the sender. - - This option does not affect decompression. + + This option does not affect decompression. Compression algorithms that allow threading: diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md index 8cd810f60..b0679010d 100644 --- a/rsyncd.conf.5.md +++ b/rsyncd.conf.5.md @@ -1084,12 +1084,12 @@ in the values of parameters. See that section for details. Specifies a directory that rsync should use for temporary files created during the transfer of updated files. If that directory is on a different - partition, after transfer file is being copied instead of unlinked. + partition, after transfer file is being copied instead of unlinked. This parameter equals with `--temp-dir` option, so please consult rsync - manpage for further information. + manpage for further information. + - ## CONFIG DIRECTIVES There are currently two config directives available that allow a config file to diff --git a/shconfig.in b/shconfig.in index 5d1fdc568..ad9fe039e 100755 --- a/shconfig.in +++ b/shconfig.in @@ -1,6 +1,6 @@ #! /bin/sh -# config.sh.in +# config.sh.in # This file is processed by config.status to produce config.status, # containing autoconf-determined values needed by the test scripts. diff --git a/simd-checksum-avx2.S b/simd-checksum-avx2.S index 549cc3ef9..e0e587e6c 100644 --- a/simd-checksum-avx2.S +++ b/simd-checksum-avx2.S @@ -37,8 +37,8 @@ get_checksum1_avx2_asm: add rdi, rdx vmovdqu ymm2, [rdi] # preload the first 64 bytes. vmovdqu ymm3, [rdi+32] - and esi, ~63 # only needed during final reduction, - # done here to avoid a longer nop for + and esi, ~63 # only needed during final reduction, + # done here to avoid a longer nop for # alignment below. add edx, esi shr rsi, 6 # longer opcode for alignment @@ -49,8 +49,8 @@ get_checksum1_avx2_asm: .p2align 4 # should fit into the LSD allocation queue. .loop: vpmaddubsw ymm0, ymm15, ymm2 # s1 partial sums - vpmaddubsw ymm5, ymm15, ymm3 - vmovdqu ymm8, [rdi] # preload the next + vpmaddubsw ymm5, ymm15, ymm3 + vmovdqu ymm8, [rdi] # preload the next vmovdqu ymm9, [rdi+32] # 64 bytes. add rdi, 64 vpaddd ymm4, ymm4, ymm6 @@ -70,7 +70,7 @@ get_checksum1_avx2_asm: vpaddd ymm6, ymm10, ymm6 # 32*CHAR_OFFSET vpaddd ymm1, ymm13, ymm1 # 528*CHAR_OFFSET #endif - vmovdqa ymm2, ymm8 # move the next 64 bytes + vmovdqa ymm2, ymm8 # move the next 64 bytes vmovdqa ymm3, ymm9 # into the right registers sub esi, 1 jnz .loop @@ -78,11 +78,11 @@ get_checksum1_avx2_asm: # now we reduce the partial sums. vpslld ymm3, ymm4, 6 vpsrldq ymm2, ymm6, 4 - + vpaddd ymm0, ymm3, ymm1 vpaddd ymm6, ymm2, ymm6 vpsrlq ymm3, ymm0, 32 - + vpsrldq ymm2, ymm6, 8 vpaddd ymm0, ymm3, ymm0 vpsrldq ymm3, ymm0, 8 @@ -106,9 +106,9 @@ get_checksum1_avx2_asm: .align 6 #else .section .rodata - .p2align 6 + .p2align 6 #endif -.mul_T2: +.mul_T2: .byte 64 .byte 63 .byte 62 diff --git a/support/rrsync b/support/rrsync index d69c17cfc..8ff56c32f 100755 --- a/support/rrsync +++ b/support/rrsync @@ -264,7 +264,7 @@ def main(): if args.munge: rsync_opts.append('--munge-links') - + if args.no_overwrite: rsync_opts.append('--ignore-existing') diff --git a/support/rsyncstats b/support/rsyncstats index 99fd54576..cf3d76792 100755 --- a/support/rsyncstats +++ b/support/rsyncstats @@ -17,7 +17,7 @@ $usage_file = "/var/log/rsyncd.log"; # Edit the following lines for default report settings. # Entries defined here will be over-ridden by the command line. -$hourly_report = 0; +$hourly_report = 0; $domain_report = 0; $total_report = 0; $depth_limit = 9999; @@ -77,7 +77,7 @@ my $rsyncd_prefix = '\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d '; } $daytime = $day; - $hour = substr($time,0,2); + $hour = substr($time,0,2); $file = $module . "/" . $file; @@ -107,7 +107,7 @@ my $rsyncd_prefix = '\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d '; } -# printf("c=%d day=%s bytes=%d file=%s path=%s\n", +# printf("c=%d day=%s bytes=%d file=%s path=%s\n", # $#line, $daytime, $bytes, $file, $pathkey); $xferfiles++; # total files sent @@ -135,7 +135,7 @@ if ($xferfiles == 0) {die "There was no data to process.\n";} print "TOTALS FOR SUMMARY PERIOD ", $dates[0], " TO ", $dates[$#dates], "\n\n"; printf("Files Transmitted During Summary Period %12.0f\n", $xferfiles); -printf("Bytes Transmitted During Summary Period %12.0f\n", $xferbytes); +printf("Bytes Transmitted During Summary Period %12.0f\n", $xferbytes); #printf("Systems Using Archives %12.0f\n\n", $#syslist+1); printf("Average Files Transmitted Daily %12.0f\n", @@ -153,7 +153,7 @@ Daily Transmission Statistics . format line1 = -@<<<<<<<<<<<<<< @>>>>>>>>> @>>>>>>>>>> @>>>>>>> @>>>>>>> +@<<<<<<<<<<<<<< @>>>>>>>>> @>>>>>>>>>> @>>>>>>> @>>>>>>> $date, $nfiles, $nbytes/(1024*1024), $pctfiles, $pctbytes . @@ -214,7 +214,7 @@ Domain Name Files Sent MB Sent Files Sent Bytes Sent . format line3 = -@<<<<<<<<<< @>>>>>>>>> @>>>>>>>>>>> @>>>>>>> @>>>>>>> +@<<<<<<<<<< @>>>>>>>>> @>>>>>>>>>>> @>>>>>>> @>>>>>>> $domain, $files, $bytes/(1024*1024), $pctfiles, $pctbytes . @@ -248,7 +248,7 @@ Hourly Transmission Statistics . format line8 = -@<<<<<<<<<<<<<< @>>>>>>>>> @>>>>>>>>>> @>>>>>>> @>>>>>>> +@<<<<<<<<<<<<<< @>>>>>>>>> @>>>>>>>>>> @>>>>>>> @>>>>>>> $hour, $nfiles, $nbytes/(1024*1024), $pctfiles, $pctbytes . diff --git a/syscall.c b/syscall.c index 243f7f243..55bd32b03 100644 --- a/syscall.c +++ b/syscall.c @@ -1965,7 +1965,7 @@ int secure_relative_open(const char *basedir, const char *relpath, int flags, mo if (dirfd != AT_FDCWD) close(dirfd); return -1; } - + for (const char *part = strtok(path_copy, "/"); part != NULL; part = strtok(NULL, "/")) diff --git a/tech_report.tex b/tech_report.tex index 414499020..eb29a606b 100644 --- a/tech_report.tex +++ b/tech_report.tex @@ -82,13 +82,13 @@ \section{The rsync algorithm} 128-bit MD4 checksum. \item $\beta$ sends these checksums to $\alpha$. - + \item $\alpha$ searches through $A$ to find all blocks of length $S$ bytes (at any offset, not just multiples of $S$) that have the same weak and strong checksum as one of the blocks of $B$. This can be done in a single pass very quickly using a special property of the rolling checksum described below. - + \item $\alpha$ sends $\beta$ a sequence of instructions for constructing a copy of $A$. Each instruction is either a reference to a block of $B$, or literal data. Literal data is sent only for @@ -120,7 +120,7 @@ \section{Rolling checksum} $$ s(k,l) = a(k,l) + 2^{16} b(k,l) $$ where $s(k,l)$ is the rolling checksum of the bytes $X_k \ldots X_l$. -For simplicity and speed, we use $M = 2^{16}$. +For simplicity and speed, we use $M = 2^{16}$. The important property of this checksum is that successive values can be computed very efficiently using the recurrence relations @@ -198,11 +198,11 @@ \section{Pipelining} This involves $\beta$ initiating two independent processes. One of the processes generates and sends the checksums to $\alpha$ while the other receives the difference information from $\alpha$ and -reconstructs the files. +reconstructs the files. If the communications link is buffered then these two processes can proceed independently and the link should be kept fully utilised in -both directions for most of the time. +both directions for most of the time. \section{Results} @@ -270,7 +270,7 @@ \section{Results} The number of false alarms was less than $1/1000$ of the number of true matches, indicating that the 32-bit rolling checksum is quite -good at screening out false matches. +good at screening out false matches. The number of tag hits indicates that the second level of the checksum search algorithm was invoked about once every 50 diff --git a/token.c b/token.c index f910f74b3..a022a2ff7 100644 --- a/token.c +++ b/token.c @@ -785,7 +785,7 @@ static void send_zstd_token(int f, int32 token, struct map_struct *buf, OFF_T of zstd_in_buff.src = map_ptr(buf, offset, nb); zstd_in_buff.size = nb; zstd_in_buff.pos = 0; - + int finished; do { zstd_out_buff.size = MAX_DATA_COUNT;