From 8de01f002841fb605bba2c21c418ae054d0e0a58 Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 11:01:50 +0200 Subject: [PATCH 01/13] qual: fix trailing whitespace --- Doxyfile | 64 ++++----- NEWS.md | 2 +- TODO | 6 +- csprotocol.txt | 2 +- install-sh | 16 +-- lib/mdfour.c | 52 +++---- lib/pool_alloc.3 | 4 +- lib/snprintf.c | 128 +++++++++--------- lib/sysxattrs.c | 6 +- packaging/cull-options | 2 +- packaging/smart-make | 2 +- popt/README | 4 +- popt/lookup3.c | 60 ++++---- popt/popt.c | 14 +- popt/popt.h | 30 ++-- popt/poptconfig.c | 8 +- popt/popthelp.c | 24 ++-- popt/poptint.c | 2 +- popt/poptint.h | 2 +- popt/poptparse.c | 6 +- popt/system.h | 2 +- rsync-web/FAQ.html | 8 +- rsync-web/backup.txt | 2 +- rsync-web/daylight-savings.html | 2 +- rsync-web/examples.html | 2 +- rsync-web/horus.txt | 4 +- rsync-web/how-rsync-works.html | 4 +- rsync-web/issues.html | 2 +- rsync-web/lists.html | 4 +- rsync-web/resources.html | 2 +- .../rsync-and-debian/rsync-and-debian.sgml | 50 +++---- rsync-web/tech_report/images.aux | 2 +- rsync-web/tech_report/images.log | 2 +- rsync-web/tech_report/images.pl | 14 +- rsync-web/tech_report/images.tex | 6 +- rsync-web/tech_report/index.html | 6 +- rsync-web/tech_report/node1.html | 12 +- rsync-web/tech_report/node2.html | 16 +-- rsync-web/tech_report/node3.html | 22 +-- rsync-web/tech_report/node4.html | 12 +- rsync-web/tech_report/node5.html | 10 +- rsync-web/tech_report/node6.html | 14 +- rsync-web/tech_report/node7.html | 6 +- rsync-web/tech_report/node8.html | 10 +- rsync-web/tech_report/tech_report.html | 6 +- rsync-web/win95.txt | 10 +- rsync.1.md | 10 +- rsyncd.conf.5.md | 6 +- shconfig.in | 2 +- simd-checksum-avx2.S | 18 +-- support/rrsync | 2 +- support/rsyncstats | 14 +- syscall.c | 2 +- tech_report.tex | 12 +- token.c | 2 +- 55 files changed, 366 insertions(+), 366 deletions(-) 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 6203658d5..3c4208df5 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; From 2d738744801dc8f668d639250ba7aeba47671e87 Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 16:04:29 +0200 Subject: [PATCH 02/13] qual: Add pre-commit flow --- .github/workflows/pre-commit.yml | 116 +++++ .pre-commit-config.yaml | 126 +++++ uncrustify.cfg | 853 +++++++++++++++++++++++++++++++ 3 files changed, 1095 insertions(+) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml create mode 100644 uncrustify.cfg diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 000000000..134b053d6 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,116 @@ +--- +name: pre-commit +on: + pull_request: + push: +jobs: + pre-commit: + runs-on: ubuntu-latest + env: + RAW_LOG: pre-commit.log + CS_XML: pre-commit.xml + CPPCHECK_VERSION: 2.21.0 + steps: + # In case we are satisfied with cppcheck in ubuntu-latest + # - run: sudo apt-get update && sudo apt-get install cppcheck uncrustify + # In case we build cppcheck + - run: sudo apt-get update && sudo apt-get install -y build-essential git uncrustify + + # + # Setup cppcheck + # + - name: Restore cppcheck from cache + id: cache-cppcheck + uses: actions/cache/restore@v5 + with: + path: ~/cppcheck-install + key: cppcheck-${{ env.CPPCHECK_VERSION }}-${{ runner.os }}-${{ hashFiles('~/cppcheck-install/cppcheck-build-stamp') }} + + - name: Build and install cppcheck + if: steps.cache-cppcheck.outputs.cache-hit != 'true' + run: | + git clone --depth 1 --branch ${{ env.CPPCHECK_VERSION }} https://github.com/danmar/cppcheck.git + cd cppcheck + make -j$(nproc) FILESDIR=/usr/local/share/cppcheck + mkdir -p ~/cppcheck-install + make DESTDIR=~/cppcheck-install install FILESDIR=/usr/local/share/cppcheck + echo "$(date +%s)-$(uname -a)" > ~/cppcheck-install/usr/local/share/cppcheck/cppcheck-build-stamp + - name: Install cppcheck from cache or build + run: | + sudo mkdir -p /usr/local/share/cppcheck + sudo cp ~/cppcheck-install/usr/bin/cppcheck /usr/local/bin/ + sudo cp -r ~/cppcheck-install/usr/local/share/cppcheck/* /usr/local/share/cppcheck/ + + - name: Save cppcheck to cache + if: steps.cache-cppcheck.outputs.cache-hit != 'true' + uses: actions/cache/save@v5 + with: + path: ~/cppcheck-install + key: cppcheck-${{ env.CPPCHECK_VERSION }}-${{ runner.os }}-${{ hashFiles('~/cppcheck-install/cppcheck-build-stamp') }} + + # Project specific + - uses: actions/checkout@v6 + + # + # Remove existing cache files (before restoring, after checkout) + # + - run: | + find .cache -type f ! -name .gitkeep -delete + find .cache -type d -empty -delete + + - run: python -m pip install pre-commit + - uses: actions/cache/restore@v5 + if: github.event_name == 'pull_request' + with: + path: .cache/cppcheck + key: cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}- + cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.base_ref }}- + cppcheck-${{ env.CPPCHECK_VERSION }}-cache- + - uses: actions/cache/restore@v5 + if: github.event_name != 'pull_request' + with: + path: .cache/cppcheck + key: cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}- + cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.base_ref }}- + cppcheck-${{ env.CPPCHECK_VERSION }}-cache- + - uses: actions/cache/restore@v5 + with: + path: ~/.cache/pre-commit/ + key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} + - name: Run pre-commit hooks + env: + SKIP: no-commit-to-branch + run: | + set -o pipefail + mkdir -p .cache/cppcheck + pre-commit gc + pre-commit run --hook-stage manual --show-diff-on-failure --color=always --all-files | tee ${RAW_LOG} + - uses: actions/cache/save@v5 + if: ${{ ! cancelled() }} + with: + path: .cache/cppcheck + key: cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}-${{ github.sha }} + - name: Convert Raw Log to Checkstyle format (launch action) + uses: mdeweerd/logToCheckStyle@v2025.1.1 + if: ${{ failure() }} + with: + in: ${{ env.RAW_LOG }} + # out: ${{ env.CS_XML }} + - uses: actions/cache/save@v5 + if: ${{ ! cancelled() }} + with: + path: ~/.cache/pre-commit/ + key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} + - name: Provide log as artifact + uses: actions/upload-artifact@v7 + if: ${{ ! cancelled() }} + with: + name: precommit-logs + path: | + ${{ env.RAW_LOG }} + ${{ env.CS_XML }} + retention-days: 2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..c74aaad61 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,126 @@ +--- +exclude: + (?x)^( + old_versions| + __NONE__)$ +repos: + - repo: https://github.com/executablebooks/mdformat + # Do this before other tools "fixing" the line endings + rev: 1.0.0 + hooks: + - id: mdformat + name: Format Markdown + stages: [manual] + entry: mdformat # Executable to run, with fixed options + language: python + types: [markdown] + args: [--wrap, '80', --number] + additional_dependencies: + - mdformat-toc + - mdformat-gfm + - mdformat-beautysh + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + # - id: no-commit-to-branch + # args: [--branch, main] + - id: debug-statements + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-json + - id: mixed-line-ending + - id: check-builtin-literals + - id: check-ast + - id: check-merge-conflict + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: check-docstring-first + - id: fix-byte-order-marker + - id: check-case-conflict + - id: check-toml + - repo: https://github.com/lovesegfault/beautysh.git + rev: v6.4.3 + hooks: + - id: beautysh + exclude: ^(config.guess|config.sub)$ + args: [--indent-size=2] + additional_dependencies: + - setuptools + - repo: https://github.com/codespell-project/codespell + rev: v2.4.2 + hooks: + - id: codespell + # scripts/updateCodespellIgnoreFile.sh updates the ignore file. + exclude: ^(configure.ac|config.sub|deapon-parm.awk|wildtest.txt)$ + args: + - --builtin=clear,informal,names + - --ignore-words-list=te,uptodate,siz,mis,ake,chang,ue,cna,devine,seein,noo,servent,tim,parms,unx,blong,sorce + # - -xscripts/codespell-lines-ignore.txt + # - --toml + # - pyproject.toml + additional_dependencies: + - tomli + - repo: https://github.com/pocc/pre-commit-hooks + rev: v1.3.5 + # Install dependencies on windows: + # choco install llvm uncrustify cppcheck + hooks: + - id: uncrustify + stages: [manual] + args: [--replace, --no-backup, -c, uncrustify.cfg, -l, C] + - id: cppcheck + stages: [manual] + exclude: ^(case_N.h)$ + args: + - --quiet + - --force + - --platform=unix32 + - --language=c + - --cppcheck-build-dir=.cache/cppcheck/ + - -Uisblank + - -DSIZEOF_CHARP=8 + - -DZLIB_CONST + - -DNORETURN= + - -DPOPT_fprintf=fprintf + #- -DVARN="value" # For static analysis + - -I. + - '--template={file}({line}): {severity} ({id}): {message}' + - --inline-suppr + - --check-level=exhaustive + - --suppress=unmatchedSuppression + - --suppress=checkersReport + - --suppress=internalError + # - --suppress=constParameterPointer + - --suppress=variableScope + - --suppress=constParameterPointer + - --suppress=constParameterCallback + - --suppress=unusedFunction + - --suppress=missingIncludeSystem + - --suppress=missingInclude:rsync.h + - --suppress=shiftTooManyBits:byteorder.h + - --suppress=unusedStructMember:popt/poptint.h + - --suppress=unusedStructMember:rsync.h + - --suppress=unusedStructMember:zlib/inflate.h + - --suppress=unusedStructMember:zlib/inftrees.h + - --suppress=unusedStructMember:zlib/gzguts.h + - --suppress=unusedStructMember:zlib/deflate.h + - --suppress=unusedStructMember:zlib/zlib.h + - --suppress=unusedStructMember:lib/pool_alloc.c + - --suppress=unusedStructMember:lib/sysacls.h + - --suppress=missingInclude:lib/sysacls.h + + - repo: https://github.com/cpplint/cpplint + rev: "2.0.2" + hooks: + - id: cpplint + stages: [manual] + args: ["--filter=-legal/copyright,-build/header_guard,-build/include_dir,-build/include_subdir,-readability/braces,-readability/casting,-readability/multiline_comment,-whitespace/blank_line,-whitespace/braces,-whitespace/comma,-whitespace/indent,-whitespace/line_length,-whitespace/newline,-whitespace/operators,-whitespace/parens,-whitespace/semicolon,-whitespace/tab"] + additional_dependencies: + - cpplint>=1.6.1 + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.11.0.1 + hooks: + - id: shellcheck + exclude: ^(config\.guess|config\.sub)$ + # exclude: (?x)^(__NONE__)$ + # args: [-x,-e1007,-e1009,-e1072,-e1073] diff --git a/uncrustify.cfg b/uncrustify.cfg new file mode 100644 index 000000000..b67b5c65d --- /dev/null +++ b/uncrustify.cfg @@ -0,0 +1,853 @@ +# Uncrustify-0.78.1_f +newlines = auto +input_tab_size = 8 +output_tab_size = 8 +string_escape_char = 92 +string_escape_char2 = 0 +string_replace_tab_chars = false +tok_split_gte = false +disable_processing_nl_cont = false +disable_processing_cmt = " *INDENT-OFF*" +enable_processing_cmt = " *INDENT-ON*" +enable_digraphs = false +processing_cmt_as_regex = false +utf8_bom = ignore +utf8_byte = false +utf8_force = false +sp_arith = ignore +sp_arith_additive = ignore +sp_assign = ignore +sp_cpp_lambda_assign = ignore +sp_cpp_lambda_square_paren = ignore +sp_cpp_lambda_square_brace = ignore +sp_cpp_lambda_argument_list_empty = ignore +sp_cpp_lambda_argument_list = ignore +sp_cpp_lambda_paren_brace = ignore +sp_cpp_lambda_fparen = ignore +sp_assign_default = ignore +sp_before_assign = force +sp_after_assign = force +sp_enum_brace = add +sp_enum_paren = ignore +sp_enum_assign = ignore +sp_enum_before_assign = ignore +sp_enum_after_assign = ignore +sp_enum_colon = ignore +sp_pp_concat = add +sp_pp_stringify = ignore +sp_before_pp_stringify = ignore +sp_bool = force +sp_compare = force +sp_inside_paren = remove +sp_paren_paren = remove +sp_cparen_oparen = ignore +sp_balance_nested_parens = false +sp_paren_brace = force +sp_brace_brace = ignore +sp_before_ptr_star = force +sp_before_unnamed_ptr_star = force +sp_before_qualifier_ptr_star = ignore +sp_before_operator_ptr_star = ignore +sp_before_scope_ptr_star = ignore +sp_before_global_scope_ptr_star = ignore +sp_qualifier_unnamed_ptr_star = ignore +sp_between_ptr_star = ignore +sp_between_ptr_ref = ignore +sp_after_ptr_star = remove +sp_after_ptr_block_caret = ignore +sp_after_ptr_star_qualifier = ignore +sp_after_ptr_star_func = ignore +sp_after_ptr_star_trailing = ignore +sp_ptr_star_func_var = ignore +sp_ptr_star_func_type = ignore +sp_ptr_star_paren = ignore +sp_before_ptr_star_func = ignore +sp_qualifier_ptr_star_func = ignore +sp_before_ptr_star_trailing = ignore +sp_qualifier_ptr_star_trailing = ignore +sp_before_byref = ignore +sp_before_unnamed_byref = ignore +sp_after_byref = ignore +sp_after_byref_func = ignore +sp_before_byref_func = ignore +sp_byref_paren = ignore +sp_after_type = force +sp_after_decltype = ignore +sp_before_template_paren = ignore +sp_template_angle = ignore +sp_before_angle = ignore +sp_inside_angle = ignore +sp_inside_angle_empty = ignore +sp_angle_colon = ignore +sp_after_angle = ignore +sp_angle_paren = ignore +sp_angle_paren_empty = ignore +sp_angle_word = ignore +sp_angle_shift = add +sp_permit_cpp11_shift = false +sp_before_sparen = ignore +sp_inside_sparen = ignore +sp_inside_sparen_open = ignore +sp_inside_sparen_close = ignore +sp_inside_for = ignore +sp_inside_for_open = ignore +sp_inside_for_close = ignore +sp_sparen_paren = ignore +sp_after_sparen = ignore +sp_sparen_brace = ignore +sp_do_brace_open = ignore +sp_brace_close_while = ignore +sp_while_paren_open = ignore +sp_invariant_paren = ignore +sp_after_invariant_paren = ignore +sp_special_semi = ignore +sp_before_semi = remove +sp_before_semi_for = ignore +sp_before_semi_for_empty = ignore +sp_between_semi_for_empty = ignore +sp_after_semi = add +sp_after_semi_for = force +sp_after_semi_for_empty = ignore +sp_before_square = remove +sp_before_vardef_square = remove +sp_before_square_asm_block = ignore +sp_before_squares = remove +sp_cpp_before_struct_binding = ignore +sp_inside_square = remove +sp_inside_square_empty = ignore +sp_inside_square_oc_array = ignore +sp_after_comma = force +sp_before_comma = remove +sp_after_mdatype_commas = ignore +sp_before_mdatype_commas = ignore +sp_between_mdatype_commas = ignore +sp_paren_comma = force +sp_type_colon = ignore +sp_after_ellipsis = ignore +sp_before_ellipsis = ignore +sp_type_ellipsis = ignore +sp_ptr_type_ellipsis = ignore +sp_paren_ellipsis = ignore +sp_byref_ellipsis = ignore +sp_paren_qualifier = ignore +sp_paren_noexcept = ignore +sp_after_class_colon = ignore +sp_before_class_colon = ignore +sp_after_constr_colon = add +sp_before_constr_colon = add +sp_before_case_colon = remove +sp_after_operator = ignore +sp_after_operator_sym = ignore +sp_after_operator_sym_empty = ignore +sp_after_cast = ignore +sp_inside_paren_cast = ignore +sp_cpp_cast_paren = ignore +sp_sizeof_paren = ignore +sp_sizeof_ellipsis = ignore +sp_sizeof_ellipsis_paren = ignore +sp_ellipsis_parameter_pack = ignore +sp_parameter_pack_ellipsis = ignore +sp_decltype_paren = ignore +sp_after_tag = ignore +sp_inside_braces_enum = ignore +sp_inside_braces_struct = ignore +sp_inside_braces_oc_dict = ignore +sp_after_type_brace_init_lst_open = ignore +sp_before_type_brace_init_lst_close = ignore +sp_inside_type_brace_init_lst = ignore +sp_inside_braces = ignore +sp_inside_braces_empty = remove +sp_trailing_return = ignore +sp_type_func = ignore +sp_type_brace_init_lst = ignore +sp_func_proto_paren = ignore +sp_func_proto_paren_empty = ignore +sp_func_type_paren = ignore +sp_func_def_paren = ignore +sp_func_def_paren_empty = ignore +sp_inside_fparens = ignore +sp_inside_fparen = ignore +sp_func_call_user_inside_rparen = ignore +sp_inside_rparens = ignore +sp_inside_rparen = ignore +sp_inside_tparen = ignore +sp_after_tparen_close = ignore +sp_square_fparen = ignore +sp_fparen_brace = ignore +sp_fparen_brace_initializer = ignore +sp_fparen_dbrace = ignore +sp_func_call_paren = ignore +sp_func_call_paren_empty = ignore +sp_func_call_user_paren = ignore +sp_func_call_user_inside_fparen = ignore +sp_func_call_user_paren_paren = ignore +sp_func_class_paren = ignore +sp_func_class_paren_empty = ignore +sp_return = force +sp_return_paren = ignore +sp_return_brace = ignore +sp_attribute_paren = ignore +sp_defined_paren = ignore +sp_throw_paren = ignore +sp_after_throw = ignore +sp_catch_paren = ignore +sp_oc_catch_paren = ignore +sp_before_oc_proto_list = ignore +sp_oc_classname_paren = ignore +sp_version_paren = ignore +sp_scope_paren = ignore +sp_super_paren = remove +sp_this_paren = remove +sp_macro = ignore +sp_macro_func = ignore +sp_else_brace = ignore +sp_brace_else = ignore +sp_brace_typedef = ignore +sp_catch_brace = ignore +sp_oc_catch_brace = ignore +sp_brace_catch = ignore +sp_oc_brace_catch = ignore +sp_finally_brace = ignore +sp_brace_finally = ignore +sp_try_brace = ignore +sp_getset_brace = ignore +sp_word_brace_init_lst = ignore +sp_word_brace_ns = add +sp_before_dc = ignore +sp_after_dc = ignore +sp_d_array_colon = ignore +sp_not = remove +sp_not_not = ignore +sp_inv = remove +sp_addr = remove +sp_member = remove +sp_deref = remove +sp_sign = remove +sp_incdec = remove +sp_before_nl_cont = add +sp_after_oc_scope = ignore +sp_after_oc_colon = ignore +sp_before_oc_colon = ignore +sp_after_oc_dict_colon = ignore +sp_before_oc_dict_colon = ignore +sp_after_send_oc_colon = ignore +sp_before_send_oc_colon = ignore +sp_after_oc_type = ignore +sp_after_oc_return_type = ignore +sp_after_oc_at_sel = ignore +sp_after_oc_at_sel_parens = ignore +sp_inside_oc_at_sel_parens = ignore +sp_before_oc_block_caret = ignore +sp_after_oc_block_caret = ignore +sp_after_oc_msg_receiver = ignore +sp_after_oc_property = ignore +sp_after_oc_synchronized = ignore +sp_cond_colon = ignore +sp_cond_colon_before = ignore +sp_cond_colon_after = ignore +sp_cond_question = ignore +sp_cond_question_before = ignore +sp_cond_question_after = ignore +sp_cond_ternary_short = ignore +sp_case_label = ignore +sp_range = ignore +sp_after_for_colon = ignore +sp_before_for_colon = ignore +sp_extern_paren = ignore +sp_cmt_cpp_start = ignore +sp_cmt_cpp_pvs = false +sp_cmt_cpp_lint = false +sp_cmt_cpp_region = ignore +sp_cmt_cpp_doxygen = false +sp_cmt_cpp_qttr = false +sp_endif_cmt = ignore +sp_after_new = ignore +sp_between_new_paren = ignore +sp_after_newop_paren = ignore +sp_inside_newop_paren = ignore +sp_inside_newop_paren_open = ignore +sp_inside_newop_paren_close = ignore +sp_before_tr_cmt = ignore +sp_num_before_tr_cmt = 0 +sp_before_emb_cmt = force +sp_num_before_emb_cmt = 1 +sp_after_emb_cmt = force +sp_num_after_emb_cmt = 1 +sp_annotation_paren = ignore +sp_skip_vbrace_tokens = false +sp_after_noexcept = ignore +sp_vala_after_translation = ignore +sp_before_bit_colon = ignore +sp_after_bit_colon = ignore +force_tab_after_define = false +indent_columns = 8 +indent_ignore_first_continue = false +indent_continue = 0 +indent_continue_class_head = 0 +indent_single_newlines = false +indent_param = 0 +indent_with_tabs = 1 +indent_cmt_with_tabs = false +indent_align_string = false +indent_xml_string = 0 +indent_brace = 0 +indent_braces = false +indent_braces_no_func = false +indent_braces_no_class = false +indent_braces_no_struct = false +indent_brace_parent = false +indent_paren_open_brace = false +indent_cs_delegate_brace = false +indent_cs_delegate_body = false +indent_namespace = false +indent_namespace_single_indent = false +indent_namespace_level = 0 +indent_namespace_limit = 0 +indent_namespace_inner_only = false +indent_extern = false +indent_class = false +indent_ignore_before_class_colon = false +indent_before_class_colon = 0 +indent_class_colon = false +indent_class_on_colon = false +indent_ignore_before_constr_colon = false +indent_constr_colon = false +indent_ctor_init_leading = 2 +indent_ctor_init_following = 2 +indent_ctor_init = 0 +indent_else_if = false +indent_var_def_blk = 0 +indent_var_def_cont = false +indent_shift = 0 +indent_func_def_force_col1 = false +indent_func_call_param = false +indent_func_def_param = false +indent_func_def_param_paren_pos_threshold = 0 +indent_func_proto_param = false +indent_func_class_param = false +indent_func_ctor_var_param = false +indent_template_param = false +indent_func_param_double = false +indent_func_const = 0 +indent_func_throw = 0 +indent_macro_brace = true +indent_member = 0 +indent_member_single = false +indent_single_line_comments_before = 0 +indent_single_line_comments_after = 0 +indent_sparen_extra = 0 +indent_relative_single_line_comments = false +indent_switch_case = 0 +indent_switch_body = 0 +indent_ignore_case_brace = false +indent_case_brace = 0 +indent_switch_break_with_case = false +indent_switch_pp = true +indent_case_shift = 0 +indent_case_comment = true +indent_comment = true +indent_col1_comment = false +indent_col1_multi_string_literal = false +indent_comment_align_thresh = 3 +indent_ignore_label = false +indent_label = 1 +indent_access_spec = 1 +indent_access_spec_body = false +indent_paren_nl = false +indent_paren_close = 0 +indent_paren_after_func_def = false +indent_paren_after_func_decl = false +indent_paren_after_func_call = false +indent_comma_brace = 0 +indent_comma_paren = 0 +indent_bool_paren = 0 +indent_ignore_bool = false +indent_ignore_arith = false +indent_semicolon_for_paren = false +indent_ignore_semicolon = false +indent_first_bool_expr = false +indent_first_for_expr = false +indent_square_nl = false +indent_preserve_sql = false +indent_ignore_assign = false +indent_align_assign = true +indent_off_after_assign = false +indent_align_paren = true +indent_oc_inside_msg_sel = false +indent_oc_block = false +indent_oc_block_msg = 0 +indent_oc_msg_colon = 0 +indent_oc_msg_prioritize_first_colon = true +indent_oc_block_msg_xcode_style = false +indent_oc_block_msg_from_keyword = false +indent_oc_block_msg_from_colon = false +indent_oc_block_msg_from_caret = false +indent_oc_block_msg_from_brace = false +indent_min_vbrace_open = 0 +indent_vbrace_open_on_tabstop = false +indent_token_after_brace = true +indent_cpp_lambda_body = false +indent_compound_literal_return = true +indent_using_block = true +indent_ternary_operator = 0 +indent_inside_ternary_operator = false +indent_off_after_return = false +indent_off_after_return_new = false +indent_single_after_return = false +indent_ignore_asm_block = false +donot_indent_func_def_close_paren = false +nl_collapse_empty_body = false +nl_collapse_empty_body_functions = false +nl_assign_leave_one_liners = false +nl_class_leave_one_liners = false +nl_enum_leave_one_liners = false +nl_getset_leave_one_liners = false +nl_cs_property_leave_one_liners = false +nl_func_leave_one_liners = false +nl_cpp_lambda_leave_one_liners = false +nl_if_leave_one_liners = false +nl_while_leave_one_liners = false +nl_do_leave_one_liners = false +nl_for_leave_one_liners = false +nl_oc_msg_leave_one_liner = false +nl_oc_mdef_brace = ignore +nl_oc_block_brace = ignore +nl_oc_before_interface = ignore +nl_oc_before_implementation = ignore +nl_oc_before_end = ignore +nl_oc_interface_brace = ignore +nl_oc_implementation_brace = ignore +nl_start_of_file = ignore +nl_start_of_file_min = 0 +nl_end_of_file = ignore +nl_end_of_file_min = 0 +nl_assign_brace = ignore +nl_assign_square = ignore +nl_tsquare_brace = ignore +nl_after_square_assign = ignore +nl_fcall_brace = ignore +nl_enum_brace = ignore +nl_enum_class = ignore +nl_enum_class_identifier = ignore +nl_enum_identifier_colon = ignore +nl_enum_colon_type = ignore +nl_struct_brace = ignore +nl_union_brace = ignore +nl_if_brace = ignore +nl_brace_else = ignore +nl_elseif_brace = ignore +nl_else_brace = ignore +nl_else_if = ignore +nl_before_opening_brace_func_class_def = ignore +nl_before_if_closing_paren = ignore +nl_brace_finally = ignore +nl_finally_brace = ignore +nl_try_brace = ignore +nl_getset_brace = ignore +nl_for_brace = ignore +nl_catch_brace = ignore +nl_oc_catch_brace = ignore +nl_brace_catch = ignore +nl_oc_brace_catch = ignore +nl_brace_square = ignore +nl_brace_fparen = ignore +nl_while_brace = ignore +nl_scope_brace = ignore +nl_unittest_brace = ignore +nl_version_brace = ignore +nl_using_brace = ignore +nl_brace_brace = ignore +nl_do_brace = ignore +nl_brace_while = ignore +nl_switch_brace = ignore +nl_synchronized_brace = ignore +nl_multi_line_cond = false +nl_multi_line_sparen_open = ignore +nl_multi_line_sparen_close = ignore +nl_multi_line_define = false +nl_before_case = false +nl_after_case = false +nl_case_colon_brace = ignore +nl_before_throw = ignore +nl_namespace_brace = ignore +nl_template_class = ignore +nl_template_class_decl = ignore +nl_template_class_decl_special = ignore +nl_template_class_def = ignore +nl_template_class_def_special = ignore +nl_template_func = ignore +nl_template_func_decl = ignore +nl_template_func_decl_special = ignore +nl_template_func_def = ignore +nl_template_func_def_special = ignore +nl_template_var = ignore +nl_template_using = ignore +nl_class_brace = ignore +nl_class_init_args = ignore +nl_constr_init_args = ignore +nl_enum_own_lines = ignore +nl_func_type_name = ignore +nl_func_type_name_class = ignore +nl_func_class_scope = ignore +nl_func_scope_name = ignore +nl_func_proto_type_name = ignore +nl_func_paren = ignore +nl_func_paren_empty = ignore +nl_func_def_paren = ignore +nl_func_def_paren_empty = ignore +nl_func_call_paren = ignore +nl_func_call_paren_empty = ignore +nl_func_decl_start = ignore +nl_func_def_start = ignore +nl_func_decl_start_single = ignore +nl_func_def_start_single = ignore +nl_func_decl_start_multi_line = false +nl_func_def_start_multi_line = false +nl_func_decl_args = ignore +nl_func_def_args = ignore +nl_func_call_args = ignore +nl_func_decl_args_multi_line = false +nl_func_def_args_multi_line = false +nl_func_decl_end = ignore +nl_func_def_end = ignore +nl_func_decl_end_single = ignore +nl_func_def_end_single = ignore +nl_func_decl_end_multi_line = false +nl_func_def_end_multi_line = false +nl_func_decl_empty = ignore +nl_func_def_empty = ignore +nl_func_call_empty = ignore +nl_func_call_start = ignore +nl_func_call_end = ignore +nl_func_call_start_multi_line = false +nl_func_call_args_multi_line = false +nl_func_call_end_multi_line = false +nl_func_call_args_multi_line_ignore_closures = false +nl_template_start = false +nl_template_args = false +nl_template_end = false +nl_oc_msg_args = false +nl_oc_msg_args_min_params = 0 +nl_oc_msg_args_max_code_width = 0 +nl_fdef_brace = ignore +nl_fdef_brace_cond = ignore +nl_cpp_ldef_brace = ignore +nl_return_expr = ignore +nl_throw_expr = ignore +nl_after_semicolon = false +nl_paren_dbrace_open = ignore +nl_type_brace_init_lst = ignore +nl_type_brace_init_lst_open = ignore +nl_type_brace_init_lst_close = ignore +nl_before_brace_open = false +nl_after_brace_open = false +nl_after_brace_open_cmt = false +nl_after_vbrace_open = false +nl_after_vbrace_open_empty = false +nl_after_brace_close = false +nl_after_vbrace_close = false +nl_brace_struct_var = ignore +nl_define_macro = false +nl_squeeze_paren_close = false +nl_squeeze_ifdef = false +nl_squeeze_ifdef_top_level = false +nl_before_if = ignore +nl_after_if = ignore +nl_before_for = ignore +nl_after_for = ignore +nl_before_while = ignore +nl_after_while = ignore +nl_before_switch = ignore +nl_after_switch = ignore +nl_before_synchronized = ignore +nl_after_synchronized = ignore +nl_before_do = ignore +nl_after_do = ignore +nl_before_ignore_after_case = false +nl_before_return = false +nl_after_return = false +nl_before_member = ignore +nl_after_member = ignore +nl_ds_struct_enum_cmt = false +nl_ds_struct_enum_close_brace = false +nl_class_colon = ignore +nl_constr_colon = ignore +nl_namespace_two_to_one_liner = false +nl_create_if_one_liner = false +nl_create_for_one_liner = false +nl_create_while_one_liner = false +nl_create_func_def_one_liner = false +nl_create_list_one_liner = false +nl_split_if_one_liner = false +nl_split_for_one_liner = false +nl_split_while_one_liner = false +donot_add_nl_before_cpp_comment = false +nl_max = 0 +nl_max_blank_in_func = 0 +nl_inside_empty_func = 0 +nl_before_func_body_proto = 0 +nl_before_func_body_def = 0 +nl_before_func_class_proto = 0 +nl_before_func_class_def = 0 +nl_after_func_proto = 0 +nl_after_func_proto_group = 0 +nl_after_func_class_proto = 0 +nl_after_func_class_proto_group = 0 +nl_class_leave_one_liner_groups = false +nl_after_func_body = 0 +nl_min_after_func_body = 0 +nl_max_after_func_body = 0 +nl_after_func_body_class = 0 +nl_after_func_body_one_liner = 0 +nl_typedef_blk_start = 0 +nl_typedef_blk_end = 0 +nl_typedef_blk_in = 0 +nl_var_def_blk_end_func_top = 0 +nl_var_def_blk_start = 0 +nl_var_def_blk_end = 0 +nl_var_def_blk_in = 0 +nl_before_block_comment = 0 +nl_before_c_comment = 0 +nl_before_cpp_comment = 0 +nl_after_multiline_comment = false +nl_after_label_colon = false +nl_before_struct = 0 +nl_after_struct = 0 +nl_before_class = 0 +nl_after_class = 0 +nl_before_namespace = 0 +nl_inside_namespace = 0 +nl_after_namespace = 0 +nl_before_access_spec = 0 +nl_after_access_spec = 0 +nl_comment_func_def = 0 +nl_after_try_catch_finally = 0 +nl_around_cs_property = 0 +nl_between_get_set = 0 +nl_property_brace = ignore +eat_blanks_after_open_brace = false +eat_blanks_before_close_brace = false +nl_remove_extra_newlines = 0 +nl_after_annotation = ignore +nl_between_annotation = ignore +nl_before_whole_file_ifdef = 0 +nl_after_whole_file_ifdef = 0 +nl_before_whole_file_endif = 0 +nl_after_whole_file_endif = 0 +pos_arith = ignore +pos_assign = ignore +pos_bool = ignore +pos_compare = ignore +pos_conditional = ignore +pos_comma = ignore +pos_enum_comma = ignore +pos_class_comma = ignore +pos_constr_comma = ignore +pos_class_colon = ignore +pos_constr_colon = ignore +pos_shift = ignore +code_width = 0 +ls_for_split_full = false +ls_func_split_full = false +ls_code_width = false +align_keep_tabs = false +align_with_tabs = false +align_on_tabstop = false +align_number_right = false +align_keep_extra_space = false +align_func_params = false +align_func_params_span = 0 +align_func_params_thresh = 0 +align_func_params_gap = 0 +align_constr_value_span = 0 +align_constr_value_thresh = 0 +align_constr_value_gap = 0 +align_same_func_call_params = false +align_same_func_call_params_span = 0 +align_same_func_call_params_thresh = 0 +align_var_def_span = 0 +align_var_def_star_style = 0 +align_var_def_amp_style = 0 +align_var_def_thresh = 0 +align_var_def_gap = 0 +align_var_def_colon = false +align_var_def_colon_gap = 0 +align_var_def_attribute = false +align_var_def_inline = false +align_assign_span = 0 +align_assign_func_proto_span = 0 +align_assign_thresh = 0 +align_assign_on_multi_var_defs = false +align_braced_init_list_span = 0 +align_braced_init_list_thresh = 0 +align_assign_decl_func = 0 +align_enum_equ_span = 0 +align_enum_equ_thresh = 0 +align_var_class_span = 0 +align_var_class_thresh = 0 +align_var_class_gap = 0 +align_var_struct_span = 0 +align_var_struct_thresh = 0 +align_var_struct_gap = 0 +align_struct_init_span = 0 +align_typedef_span = 0 +align_typedef_gap = 0 +align_typedef_func = 0 +align_typedef_star_style = 0 +align_typedef_amp_style = 0 +align_right_cmt_span = 0 +align_right_cmt_gap = 0 +align_right_cmt_mix = false +align_right_cmt_same_level = false +align_right_cmt_at_col = 0 +align_func_proto_span = 0 +align_func_proto_span_ignore_cont_lines = false +align_func_proto_star_style = 0 +align_func_proto_amp_style = 0 +align_func_proto_thresh = 0 +align_func_proto_gap = 0 +align_on_operator = false +align_mix_var_proto = false +align_single_line_func = false +align_single_line_brace = false +align_single_line_brace_gap = 0 +align_oc_msg_spec_span = 0 +align_nl_cont = 0 +align_nl_cont_spaces = 1 +align_pp_define_together = false +align_pp_define_span = 0 +align_pp_define_gap = 0 +align_left_shift = true +align_eigen_comma_init = false +align_asm_colon = false +align_oc_msg_colon_span = 0 +align_oc_msg_colon_first = false +align_oc_decl_colon = false +align_oc_msg_colon_xcode_like = false +cmt_width = 0 +cmt_reflow_mode = 0 +cmt_reflow_fold_regex_file = "" +cmt_reflow_indent_to_paragraph_start = false +cmt_convert_tab_to_spaces = false +cmt_indent_multi = true +cmt_align_doxygen_javadoc_tags = false +cmt_sp_before_doxygen_javadoc_tags = 1 +cmt_trailing_single_line_c_to_cpp = false +cmt_c_group = false +cmt_c_nl_start = false +cmt_c_nl_end = false +cmt_cpp_to_c = false +cmt_cpp_group = false +cmt_cpp_nl_start = false +cmt_cpp_nl_end = false +cmt_star_cont = false +cmt_sp_before_star_cont = 0 +cmt_sp_after_star_cont = 0 +cmt_multi_check_last = true +cmt_multi_first_len_minimum = 4 +cmt_insert_file_header = "" +cmt_insert_file_footer = "" +cmt_insert_func_header = "" +cmt_insert_class_header = "" +cmt_insert_oc_msg_header = "" +cmt_insert_before_preproc = false +cmt_insert_before_inlines = true +cmt_insert_before_ctor_dtor = false +mod_full_brace_do = ignore +mod_full_brace_for = ignore +mod_full_brace_function = ignore +mod_full_brace_if = ignore +mod_full_brace_if_chain = 0 +mod_full_brace_if_chain_only = false +mod_full_brace_while = ignore +mod_full_brace_using = ignore +mod_full_brace_nl = 0 +mod_full_brace_nl_block_rem_mlcond = false +mod_paren_on_return = ignore +mod_paren_on_throw = ignore +mod_pawn_semicolon = false +mod_full_paren_if_bool = false +mod_full_paren_assign_bool = false +mod_full_paren_return_bool = false +mod_remove_extra_semicolon = false +mod_remove_duplicate_include = false +mod_add_force_c_closebrace_comment = false +mod_add_long_function_closebrace_comment = 0 +mod_add_long_namespace_closebrace_comment = 0 +mod_add_long_class_closebrace_comment = 0 +mod_add_long_switch_closebrace_comment = 0 +mod_add_long_ifdef_endif_comment = 0 +mod_add_long_ifdef_else_comment = 0 +mod_sort_case_sensitive = false +mod_sort_import = false +mod_sort_using = false +mod_sort_include = false +mod_sort_incl_import_prioritize_filename = false +mod_sort_incl_import_prioritize_extensionless = false +mod_sort_incl_import_prioritize_angle_over_quotes = false +mod_sort_incl_import_ignore_extension = false +mod_sort_incl_import_grouping_enabled = false +mod_move_case_break = false +mod_move_case_return = false +mod_case_brace = ignore +mod_remove_empty_return = false +mod_enum_last_comma = ignore +mod_infinite_loop = 0 +mod_int_short = ignore +mod_short_int = ignore +mod_int_long = ignore +mod_long_int = ignore +mod_int_signed = ignore +mod_signed_int = ignore +mod_int_unsigned = ignore +mod_unsigned_int = ignore +mod_int_prefer_int_on_left = false +mod_sort_oc_properties = false +mod_sort_oc_property_class_weight = 0 +mod_sort_oc_property_thread_safe_weight = 0 +mod_sort_oc_property_readwrite_weight = 0 +mod_sort_oc_property_reference_weight = 0 +mod_sort_oc_property_getter_weight = 0 +mod_sort_oc_property_setter_weight = 0 +mod_sort_oc_property_nullability_weight = 0 +pp_indent_with_tabs = -1 +pp_indent = ignore +pp_indent_at_level = false +pp_indent_at_level0 = false +pp_indent_count = 1 +pp_space_after = ignore +pp_space_count = 0 +pp_indent_region = 0 +pp_region_indent_code = false +pp_indent_if = 0 +pp_if_indent_code = false +pp_indent_in_guard = false +pp_define_at_level = false +pp_include_at_level = false +pp_ignore_define_body = false +pp_multiline_define_body_indent = 8 +pp_indent_case = true +pp_indent_func_def = true +pp_indent_extern = true +pp_indent_brace = 1 +pp_warn_unbalanced_if = false +include_category_0 = "" +include_category_1 = "" +include_category_2 = "" +use_indent_func_call_param = true +use_indent_continue_only_once = false +indent_cpp_lambda_only_once = false +use_sp_after_angle_always = false +use_options_overriding_for_qt_macros = true +use_form_feed_no_more_as_whitespace_character = false +warn_level_tabs_found_in_verbatim_string_literals = 2 +debug_max_number_of_loops = 0 +debug_line_number_to_protocol = 0 +debug_timeout = 0 +debug_truncate = 0 +debug_sort_the_tracks = true +debug_decode_the_flags = false +debug_use_the_exit_function_pop = true +set_numbering_for_html_output = false +# option(s) with 'not default' value: 15 +# From 35682d1054f5e1d44fb41656fcdc9a5c6be07313 Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sat, 6 Jun 2026 11:21:13 +0200 Subject: [PATCH 03/13] :sparkles: Add pre-commit workflow for code quality checks - Add pre-commit workflow for code quality checks - Add pre-commit configuration file - Add cache directory for cppcheck - Add pre-commit hooks for code formatting, linting, and static analysis --- .cache/cppcheck/.gitkeep | 0 .gitignore | 1 + SECURITY.md | 1 - TODO | 1 - cmd-or-msg | 4 +- configure | 22 +- install-sh | 284 +++++++++--------- maybe-make-man | 44 +-- mkgitver | 24 +- old_versions/build_static.sh | 62 ++-- packaging/prep-auto-dir | 50 +-- packaging/smart-make | 32 +- packaging/solaris/build_pkg.sh | 1 - params.c | 1 - popt/poptint.h | 1 - prepare-source | 76 ++--- rsync-ssl | 282 ++++++++--------- rsync-web/bin/upload | 6 +- rsync-web/horus.txt | 1 - rsync-web/nt.txt | 1 - .../rsync-and-debian/rsync-and-debian.sgml | 2 +- rsync-web/susan.txt | 3 - rsync-web/tech_report/images.pl | 1 - rsync-web/tech_report/labels.pl | 1 - support/deny-rsync | 6 +- support/instant-rsyncd | 80 ++--- support/lsh.sh | 24 +- support/rsync-no-vanished | 10 +- support/rsync-slash-strip | 18 +- zlib/README.rsync | 1 - zlib/trees.h | 1 - 31 files changed, 514 insertions(+), 527 deletions(-) create mode 100644 .cache/cppcheck/.gitkeep diff --git a/.cache/cppcheck/.gitkeep b/.cache/cppcheck/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/.gitignore b/.gitignore index 59a6d09eb..ad55fa58d 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ aclocal.m4 .deps /*.exe *.dSYM/ +/.cache diff --git a/SECURITY.md b/SECURITY.md index f390ff9f0..125d3e59d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -10,4 +10,3 @@ help backporting fixes into an older release, feel free to ask. Email your vulnerability information to rsync's maintainer: Rsync Project - diff --git a/TODO b/TODO index 0bc830d96..71f75c24d 100644 --- a/TODO +++ b/TODO @@ -514,4 +514,3 @@ reverse rsync over HTTP Range http://zsync.moria.org.uk/ -- -- - diff --git a/cmd-or-msg b/cmd-or-msg index ccf9527f9..d4ebaad41 100755 --- a/cmd-or-msg +++ b/cmd-or-msg @@ -6,6 +6,6 @@ shift echo "$*" if ! "${@}"; then - echo "If you can't fix the issue, re-run $srcdir/configure with --$opt." - exit 1 + echo "If you can't fix the issue, re-run $srcdir/configure with --$opt." + exit 1 fi diff --git a/configure b/configure index 51c3fee58..d6cdc0950 100755 --- a/configure +++ b/configure @@ -5,23 +5,23 @@ dir=`dirname $0` if test x"$dir" = x; then - dir=. + dir=. fi if test "$dir" = '.'; then - branch=`packaging/prep-auto-dir` || exit 1 - if test x"$branch" != x; then - cd build || exit 1 - dir=.. - fi + branch=`packaging/prep-auto-dir` || exit 1 + if test x"$branch" != x; then + cd build || exit 1 + dir=.. + fi fi if test ! -f configure.sh; then - if ! "$dir/prepare-source" build; then - echo 'Failed to build configure.sh and/or config.h.in -- giving up.' >&2 - rm -f configure.sh - exit 1 - fi + if ! "$dir/prepare-source" build; then + echo 'Failed to build configure.sh and/or config.h.in -- giving up.' >&2 + rm -f configure.sh + exit 1 + fi fi exec ./configure.sh --srcdir="$dir" "${@}" diff --git a/install-sh b/install-sh index 9e493c5b2..3587aeac4 100755 --- a/install-sh +++ b/install-sh @@ -43,103 +43,103 @@ dst="" dir_arg="" while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac + case $1 in + -c) instcmd="$cpprog" + shift + continue ;; + + -d) dir_arg=true + shift + continue ;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue ;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue ;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue ;; + + -s) stripcmd="$stripprog" + shift + continue ;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue ;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue ;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue ;; + esac done if [ x"$src" = x ] then - echo "install: no input file specified" - exit 1 + echo "install: no input file specified" + exit 1 else - true + true fi if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi else -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src ] || [ -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + + if [ -f $src ] || [ -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + + # If destination is a directory, append the input filename; if your system + # does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi fi ## this sed command emulates the dirname command @@ -150,87 +150,87 @@ 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}}" + IFS="${IFS-${defaultIFS}}" -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" + oIFS="${IFS}" + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS="${oIFS}" -pathcomp='' + pathcomp='' -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift + while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi - pathcomp="${pathcomp}/" -done + pathcomp="${pathcomp}/" + done fi if [ x"$dir_arg" != x ] then - $doit $instcmd $dst && + $doit $instcmd $dst && - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else -# If we're going to rename the final executable, determine the name now. + # If we're going to rename the final executable, determine the name now. - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi -# don't allow the sed command to completely eliminate the filename + # don't allow the sed command to completely eliminate the filename - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi -# Make a temp file name in the proper directory. + # Make a temp file name in the proper directory. - dsttmp=$dstdir/_inst.$$_ + dsttmp=$dstdir/_inst.$$_ -# Move or copy the file name to the temp name + # Move or copy the file name to the temp name - $doit $instcmd $src $dsttmp && + $doit $instcmd $src $dsttmp && - trap "rm -f ${dsttmp}" 0 && + trap "rm -f ${dsttmp}" 0 && -# and set any options; do chmod last to preserve setuid bits + # and set any options; do chmod last to preserve setuid bits -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $instcmd $src $dsttmp" command. - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && -# Now rename the file to the real destination. + # Now rename the file to the real destination. - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile fi && diff --git a/maybe-make-man b/maybe-make-man index b751ebc53..f0fafca27 100755 --- a/maybe-make-man +++ b/maybe-make-man @@ -1,8 +1,8 @@ #!/bin/sh if [ $# != 1 ]; then - echo "Usage: $0 NAME.NUM.md" 1>&2 - exit 1 + echo "Usage: $0 NAME.NUM.md" 1>&2 + exit 1 fi inname="$1" @@ -11,32 +11,32 @@ flagfile="$srcdir/.md2man-works" force_flagfile="$srcdir/.md2man-force" if [ ! -f "$flagfile" ]; then - # We test our smallest manpage just to see if the python setup works. - if "$srcdir/md-convert" --test "$srcdir/rsync-ssl.1.md" >/dev/null 2>&1; then - touch $flagfile + # We test our smallest manpage just to see if the python setup works. + if "$srcdir/md-convert" --test "$srcdir/rsync-ssl.1.md" >/dev/null 2>&1; then + touch $flagfile + else + outname=`basename "$inname" .md` + if [ -f "$outname" ]; then + exit 0 + elif [ -f "$srcdir/$outname" ]; then + echo "Copying $srcdir/$outname" + cp -p "$srcdir/$outname" . + exit 0 else - outname=`basename "$inname" .md` - if [ -f "$outname" ]; then - exit 0 - elif [ -f "$srcdir/$outname" ]; then - echo "Copying $srcdir/$outname" - cp -p "$srcdir/$outname" . - exit 0 - else - echo "ERROR: $outname cannot be created." - if [ -f "$HOME/build_farm/build_test.fns" ]; then - exit 0 # No exit errorno to avoid a build failure in the samba build farm - else - exit 1 - fi - fi + echo "ERROR: $outname cannot be created." + if [ -f "$HOME/build_farm/build_test.fns" ]; then + exit 0 # No exit errorno to avoid a build failure in the samba build farm + else + exit 1 + fi fi + fi fi if [ -f "$force_flagfile" ]; then - opt='--force-link-text' + opt='--force-link-text' else - opt='' + opt='' fi "$srcdir/md-convert" $opt "$srcdir/$inname" diff --git a/mkgitver b/mkgitver index 0102b0894..9a938704f 100755 --- a/mkgitver +++ b/mkgitver @@ -3,20 +3,20 @@ srcdir=`dirname $0` if [ ! -f git-version.h ]; then - touch git-version.h + touch git-version.h fi if test -d "$srcdir/.git" || test -f "$srcdir/.git"; then - gitver=`git describe --abbrev=8 2>/dev/null` - # NOTE: I'm avoiding "|" in sed since I'm not sure if sed -r is portable and "\|" fails on some OSes. - verchk=`echo "$gitver-" | sed -n '/^v3\.[0-9][0-9]*\.[0-9][0-9]*\(pre[0-9]*\)*-/p'` - if [ -n "$verchk" ]; then - echo "#define RSYNC_GITVER \"$gitver\"" >git-version.h.new - if ! diff git-version.h.new git-version.h >/dev/null; then - echo "Updating git-version.h" - mv git-version.h.new git-version.h - else - rm git-version.h.new - fi + gitver=`git describe --abbrev=8 2>/dev/null` + # NOTE: I'm avoiding "|" in sed since I'm not sure if sed -r is portable and "\|" fails on some OSes. + verchk=`echo "$gitver-" | sed -n '/^v3\.[0-9][0-9]*\.[0-9][0-9]*\(pre[0-9]*\)*-/p'` + if [ -n "$verchk" ]; then + echo "#define RSYNC_GITVER \"$gitver\"" >git-version.h.new + if ! diff git-version.h.new git-version.h >/dev/null; then + echo "Updating git-version.h" + mv git-version.h.new git-version.h + else + rm git-version.h.new fi + fi fi diff --git a/old_versions/build_static.sh b/old_versions/build_static.sh index 7cabcc0cf..ffa401464 100755 --- a/old_versions/build_static.sh +++ b/old_versions/build_static.sh @@ -35,9 +35,9 @@ CFLAGS_OLD="-I. -I./zlib -O2 -g -std=gnu11 -fcommon -DHAVE_CONFIG_H -Wno-error \ -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-int-conversion" cleanup() { - cd "$REPO" - git worktree remove --force "$WORKTREE" 2>/dev/null || true - git worktree prune 2>/dev/null || true + cd "$REPO" + git worktree remove --force "$WORKTREE" 2>/dev/null || true + git worktree prune 2>/dev/null || true } trap cleanup EXIT @@ -45,15 +45,15 @@ echo ">>> checking out $TAG into $WORKTREE" # prefer an exact tag to avoid ambiguity with similarly-named branches REF="$TAG" if git -C "$REPO" rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then - REF="refs/tags/$TAG" + REF="refs/tags/$TAG" fi git -C "$REPO" worktree add --detach "$WORKTREE" "$REF" cd "$WORKTREE" # --- workaround 1: K&R lseek64 redeclaration clashes with glibc's prototype --- if grep -q 'off64_t lseek64();' syscall.c 2>/dev/null; then - echo ">>> patching syscall.c lseek64 redeclaration" - perl -0pi -e 's/#ifdef HAVE_LSEEK64\n#if !SIZEOF_OFF64_T\n\tOFF_T lseek64\(\);\n#else\n\toff64_t lseek64\(\);\n#endif\n\treturn lseek64/#ifdef HAVE_LSEEK64\n\treturn lseek64/' syscall.c + echo ">>> patching syscall.c lseek64 redeclaration" + perl -0pi -e 's/#ifdef HAVE_LSEEK64\n#if !SIZEOF_OFF64_T\n\tOFF_T lseek64\(\);\n#else\n\toff64_t lseek64\(\);\n#endif\n\treturn lseek64/#ifdef HAVE_LSEEK64\n\treturn lseek64/' syscall.c fi # --- workaround 0: pre-3.0 tags ship configure.in, not a generated configure. @@ -63,12 +63,12 @@ fi # so neutralize the AC_LIBOBJ replacements before regenerating. OLD_TREE=0 if [ ! -f ./configure ] && { [ -f configure.in ] || [ -f configure.ac ]; }; then - OLD_TREE=1 - acsrc=configure.ac; [ -f configure.in ] && acsrc=configure.in - echo ">>> generating configure for an old tag (autoheader/autoconf)" - sed -i 's#AC_LIBOBJ(lib/[a-zA-Z_]*)#:#g' "$acsrc" - autoheader 2>/dev/null || true - autoconf 2>/dev/null || { echo "autoconf failed"; exit 1; } + OLD_TREE=1 + acsrc=configure.ac; [ -f configure.in ] && acsrc=configure.in + echo ">>> generating configure for an old tag (autoheader/autoconf)" + sed -i 's#AC_LIBOBJ(lib/[a-zA-Z_]*)#:#g' "$acsrc" + autoheader 2>/dev/null || true + autoconf 2>/dev/null || { echo "autoconf failed"; exit 1; } fi CONF_ARGS=(--disable-md2man --with-included-zlib=yes --with-included-popt=yes) @@ -76,49 +76,49 @@ CONF_ARGS=(--disable-md2man --with-included-zlib=yes --with-included-popt=yes) # linking libcrypto.a statically drags in jitterentropy + zlib's uncompress, # which aren't resolvable here. Drop it when the flag exists. if ./configure --help 2>/dev/null | grep -q -- '--disable-openssl'; then - echo ">>> disabling openssl for self-contained static link" - CONF_ARGS+=(--disable-openssl) + echo ">>> disabling openssl for self-contained static link" + CONF_ARGS+=(--disable-openssl) fi echo ">>> configure (bundled zlib + popt, static-friendly)" ./configure "${CONF_ARGS[@]}" \ - >"$WORKTREE/conf.log" 2>&1 || { tail -20 "$WORKTREE/conf.log"; exit 1; } + >"$WORKTREE/conf.log" 2>&1 || { tail -20 "$WORKTREE/conf.log"; exit 1; } # --- workaround 2: modern glibc only has the 2-arg gettimeofday --------------- if grep -q '/\* #undef HAVE_GETTIMEOFDAY_TZ \*/' config.h; then - echo ">>> forcing HAVE_GETTIMEOFDAY_TZ (configure misdetects it)" - sed -i 's|/\* #undef HAVE_GETTIMEOFDAY_TZ \*/|#define HAVE_GETTIMEOFDAY_TZ 1|' config.h + echo ">>> forcing HAVE_GETTIMEOFDAY_TZ (configure misdetects it)" + sed -i 's|/\* #undef HAVE_GETTIMEOFDAY_TZ \*/|#define HAVE_GETTIMEOFDAY_TZ 1|' config.h fi # --- workaround 4 (old trees only): generate proto.h if the tree has no make # rule for it, and stub a vendored lib/addrinfo.h that the git tag dropped # (modern glibc supplies struct addrinfo / sockaddr_storage, so empty is right). if [ "$OLD_TREE" = 1 ]; then - if [ ! -f proto.h ] && [ -f mkproto.awk ]; then - echo ">>> generating proto.h" - cat ./*.c ./lib/compat.c 2>/dev/null | awk -f ./mkproto.awk > proto.h - fi - if grep -q 'include "lib/addrinfo.h"' rsync.h 2>/dev/null && [ ! -f lib/addrinfo.h ]; then - echo ">>> stubbing lib/addrinfo.h" - echo '/* emptied: modern glibc provides struct addrinfo */' > lib/addrinfo.h - fi + if [ ! -f proto.h ] && [ -f mkproto.awk ]; then + echo ">>> generating proto.h" + cat ./*.c ./lib/compat.c 2>/dev/null | awk -f ./mkproto.awk > proto.h + fi + if grep -q 'include "lib/addrinfo.h"' rsync.h 2>/dev/null && [ ! -f lib/addrinfo.h ]; then + echo ">>> stubbing lib/addrinfo.h" + echo '/* emptied: modern glibc provides struct addrinfo */' > lib/addrinfo.h + fi fi echo ">>> building (static)" make -j"$(nproc)" CFLAGS="$CFLAGS_OLD" LDFLAGS="-static" \ - >"$WORKTREE/make.log" 2>&1 || { grep -E 'error:|\*\*\*' "$WORKTREE/make.log" | head; exit 1; } + >"$WORKTREE/make.log" 2>&1 || { grep -E 'error:|\*\*\*' "$WORKTREE/make.log" | head; exit 1; } # verify it's actually static before we keep it if ldd ./rsync 2>&1 | grep -qv 'not a dynamic executable'; then - echo "ERROR: binary is not statically linked:" >&2 - ldd ./rsync >&2 - exit 1 + echo "ERROR: binary is not statically linked:" >&2 + ldd ./rsync >&2 + exit 1 fi GOT="$(./rsync --version | head -1 | awk '{print $3}')" if [ "$GOT" != "$VERSION" ]; then - echo "ERROR: built version '$GOT' != requested '$VERSION'" >&2 - exit 1 + echo "ERROR: built version '$GOT' != requested '$VERSION'" >&2 + exit 1 fi cp ./rsync "$OUT" diff --git a/packaging/prep-auto-dir b/packaging/prep-auto-dir index b67f390ab..04c98f882 100755 --- a/packaging/prep-auto-dir +++ b/packaging/prep-auto-dir @@ -14,30 +14,30 @@ auto_top='auto-build-save' if test -d $auto_top && test -d .git; then - desired_branch=`git rev-parse --abbrev-ref HEAD | tr / %` - if test "$desired_branch" = HEAD; then - echo "ERROR: switch to the right build dir manually when in detached HEAD mode." 1>&2 - exit 1 + desired_branch=`git rev-parse --abbrev-ref HEAD | tr / %` + if test "$desired_branch" = HEAD; then + echo "ERROR: switch to the right build dir manually when in detached HEAD mode." 1>&2 + exit 1 + fi + auto_dir="$auto_top/$desired_branch" + if test -d build; then + cur_branch=`readlink build/.branch` + else + cur_branch='/' + fi + if test "$desired_branch" != "$cur_branch"; then + if test "$cur_branch" != /; then + rm -f "$auto_top/$cur_branch" + mv build "$auto_top/$cur_branch" fi - auto_dir="$auto_top/$desired_branch" - if test -d build; then - cur_branch=`readlink build/.branch` - else - cur_branch='/' - fi - if test "$desired_branch" != "$cur_branch"; then - if test "$cur_branch" != /; then - rm -f "$auto_top/$cur_branch" - mv build "$auto_top/$cur_branch" - fi - test -d "$auto_dir" || mkdir "$auto_dir" - test -h "$auto_dir/.branch" || ln -s "$desired_branch" "$auto_dir/.branch" - mv "$auto_dir" build - ln -s ../build "$auto_dir" - fi - if test ! -h Makefile; then - rm -f Makefile - ln -s packaging/auto-Makefile Makefile - fi - echo $desired_branch + test -d "$auto_dir" || mkdir "$auto_dir" + test -h "$auto_dir/.branch" || ln -s "$desired_branch" "$auto_dir/.branch" + mv "$auto_dir" build + ln -s ../build "$auto_dir" + fi + if test ! -h Makefile; then + rm -f Makefile + ln -s packaging/auto-Makefile Makefile + fi + echo $desired_branch fi diff --git a/packaging/smart-make b/packaging/smart-make index 9da044262..7674156f9 100755 --- a/packaging/smart-make +++ b/packaging/smart-make @@ -6,34 +6,34 @@ export LANG=C branch=`packaging/prep-auto-dir` if test x"$branch" = x; then - srcdir=. + srcdir=. else - cd build - srcdir=.. + cd build + srcdir=.. fi if test -f configure.sh; then - cp -p configure.sh configure.sh.old + cp -p configure.sh configure.sh.old else - touch configure.sh.old + touch configure.sh.old fi if test -f .fetch; then - $srcdir/prepare-source fetch + $srcdir/prepare-source fetch else - $srcdir/prepare-source + $srcdir/prepare-source fi if diff configure.sh configure.sh.old >/dev/null 2>&1; then - echo "configure.sh is unchanged." - rm configure.sh.old + echo "configure.sh is unchanged." + rm configure.sh.old else - echo "configure.sh has CHANGED." - if test -f config.status; then - ./config.status --recheck - else - $srcdir/configure - fi + echo "configure.sh has CHANGED." + if test -f config.status; then + ./config.status --recheck + else + $srcdir/configure + fi fi ./config.status @@ -41,5 +41,5 @@ fi make all if test x"$1" = x"check"; then - make check + make check fi diff --git a/packaging/solaris/build_pkg.sh b/packaging/solaris/build_pkg.sh index 29c035a09..d93712b18 100644 --- a/packaging/solaris/build_pkg.sh +++ b/packaging/solaris/build_pkg.sh @@ -91,4 +91,3 @@ cd .. # Comment this out if you want to see, which file structure has been created rm -rf $FAKE_ROOT - diff --git a/params.c b/params.c index da8a8f88a..21a4c6839 100644 --- a/params.c +++ b/params.c @@ -642,4 +642,3 @@ int pm_process( char *FileName, } /* pm_process */ /* -------------------------------------------------------------------------- */ - diff --git a/popt/poptint.h b/popt/poptint.h index 6595e2526..d813f67cc 100644 --- a/popt/poptint.h +++ b/popt/poptint.h @@ -155,4 +155,3 @@ const char *POPT_next_char (const char *str); #endif #define N_(foo) foo - diff --git a/prepare-source b/prepare-source index a4e78e61e..6f9d53b85 100755 --- a/prepare-source +++ b/prepare-source @@ -13,60 +13,60 @@ dir=`dirname $0` if test x"$dir" = x; then - dir=. + dir=. fi if test "$dir" = '.'; then - branch=`packaging/prep-auto-dir` || exit 1 - if test x"$branch" != x; then - cd build || exit 1 - dir=.. - fi + branch=`packaging/prep-auto-dir` || exit 1 + if test x"$branch" != x; then + cd build || exit 1 + dir=.. + fi fi if test "$dir" != '.'; then - for lnk in configure.ac m4; do - if test ! -h $lnk; then - rm -f $lnk # Just in case - ln -s "$dir/$lnk" $lnk - fi - done - for fn in configure.sh config.h.in aclocal.m4; do - test ! -f $fn && test -f "$dir/$fn" && cp -p "$dir/$fn" $fn - done + for lnk in configure.ac m4; do + if test ! -h $lnk; then + rm -f $lnk # Just in case + ln -s "$dir/$lnk" $lnk + fi + done + for fn in configure.sh config.h.in aclocal.m4; do + test ! -f $fn && test -f "$dir/$fn" && cp -p "$dir/$fn" $fn + done fi if test $# = 0; then - set -- build + set -- build fi for action in "${@}"; do - case "$action" in + case "$action" in build|make) - make -f "$dir/prepare-source.mak" - ;; + make -f "$dir/prepare-source.mak" + ;; fetch|fetchgen) - if test "$action" = fetchgen; then - match='*' - else - match='[ca]*' - fi - $dir/rsync-ssl -iipc --no-motd "rsync://download.samba.org/rsyncftp/generated-files/$match" ./ - test $? != 0 && continue - sleep 1 # The following files need to be newer than aclocal.m4 - touch configure.sh config.h.in - ;; + if test "$action" = fetchgen; then + match='*' + else + match='[ca]*' + fi + $dir/rsync-ssl -iipc --no-motd "rsync://download.samba.org/rsyncftp/generated-files/$match" ./ + test $? != 0 && continue + sleep 1 # The following files need to be newer than aclocal.m4 + touch configure.sh config.h.in + ;; fetchSRC) - ./rsync-ssl -iipr --no-motd --exclude=/.git/ rsync://download.samba.org/ftp/pub/unpacked/rsync/ . - ;; + ./rsync-ssl -iipr --no-motd --exclude=/.git/ rsync://download.samba.org/ftp/pub/unpacked/rsync/ . + ;; *) - echo "Unknown action: $action" - exit 1 - ;; - esac - if test $? = 0; then - exit - fi + echo "Unknown action: $action" + exit 1 + ;; + esac + if test $? = 0; then + exit + fi done exit 1 diff --git a/rsync-ssl b/rsync-ssl index 56ee7dfe0..64379b954 100755 --- a/rsync-ssl +++ b/rsync-ssl @@ -17,132 +17,132 @@ # Note that an stunnel connection requires at least version 4.x of stunnel. function rsync_ssl_run { - case "$*" in + case "$*" in *rsync://*) ;; *::*) ;; *) - echo "You must use rsync-ssl with a daemon-style hostname." 1>&2 - exit 1 - ;; - esac + echo "You must use rsync-ssl with a daemon-style hostname." 1>&2 + exit 1 + ;; + esac - exec rsync --rsh="$0 --HELPER" "${@}" + exec rsync --rsh="$0 --HELPER" "${@}" } function rsync_ssl_helper { - if [[ -z "$RSYNC_SSL_TYPE" ]]; then - found=`path_search openssl stunnel4 stunnel` || exit 1 - if [[ "$found" == */openssl ]]; then - RSYNC_SSL_TYPE=openssl - RSYNC_SSL_OPENSSL="$found" - elif [[ "$found" == */gnutls-cli ]]; then - RSYNC_SSL_TYPE=gnutls - RSYNC_SSL_GNUTLS="$found" - else - RSYNC_SSL_TYPE=stunnel - RSYNC_SSL_STUNNEL="$found" - fi - fi - - case "$RSYNC_SSL_TYPE" in - openssl) - if [[ -z "$RSYNC_SSL_OPENSSL" ]]; then - RSYNC_SSL_OPENSSL=`path_search openssl` || exit 1 - fi - optsep=' ' - ;; - gnutls) - if [[ -z "$RSYNC_SSL_GNUTLS" ]]; then - RSYNC_SSL_GNUTLS=`path_search gnutls-cli` || exit 1 - fi - optsep=' ' - ;; - stunnel) - if [[ -z "$RSYNC_SSL_STUNNEL" ]]; then - RSYNC_SSL_STUNNEL=`path_search stunnel4 stunnel` || exit 1 - fi - optsep=' = ' - ;; - *) - echo "The RSYNC_SSL_TYPE specifies an unknown type: $RSYNC_SSL_TYPE" 1>&2 - exit 1 - ;; - esac - - if [[ -z "$RSYNC_SSL_CERT" ]]; then - certopt="" - gnutls_cert_opt="" - else - certopt="-cert$optsep$RSYNC_SSL_CERT" - gnutls_cert_opt="--x509certfile=$RSYNC_SSL_CERT" - fi - - if [[ -z "$RSYNC_SSL_KEY" ]]; then - keyopt="" - gnutls_key_opt="" + if [[ -z "$RSYNC_SSL_TYPE" ]]; then + found=`path_search openssl stunnel4 stunnel` || exit 1 + if [[ "$found" == */openssl ]]; then + RSYNC_SSL_TYPE=openssl + RSYNC_SSL_OPENSSL="$found" + elif [[ "$found" == */gnutls-cli ]]; then + RSYNC_SSL_TYPE=gnutls + RSYNC_SSL_GNUTLS="$found" else - keyopt="-key$optsep$RSYNC_SSL_KEY" - gnutls_key_opt="--x509keyfile=$RSYNC_SSL_KEY" + RSYNC_SSL_TYPE=stunnel + RSYNC_SSL_STUNNEL="$found" fi - - if [[ -z ${RSYNC_SSL_CA_CERT+x} ]]; then - # RSYNC_SSL_CA_CERT unset - default CA set AND verify: - # openssl: - caopt="-verify_return_error -verify 4" - # gnutls: - gnutls_opts="" - # stunnel: - # Since there is no way of using the default CA certificate collection, - # we cannot do any verification. Thus, stunnel should really only be - # used if nothing else is available. - cafile="" - verify="" - elif [[ "$RSYNC_SSL_CA_CERT" == "" ]]; then - # RSYNC_SSL_CA_CERT set but empty -do NO verifications: - # openssl: - caopt="-verify 1" - # gnutls: - gnutls_opts="--insecure" - # stunnel: - cafile="" - verify="verifyChain = no" - else - # RSYNC_SSL_CA_CERT set - use CA AND verify: - # openssl: - caopt="-CAfile $RSYNC_SSL_CA_CERT -verify_return_error -verify 4" - # gnutls: - gnutls_opts="--x509cafile=$RSYNC_SSL_CA_CERT" - # stunnel: - cafile="CAfile = $RSYNC_SSL_CA_CERT" - verify="verifyChain = yes" - fi - - port="${RSYNC_PORT:-0}" - if [[ "$port" == 0 ]]; then - port="${RSYNC_SSL_PORT:-874}" - fi - - # If the user specified USER@HOSTNAME::module, then rsync passes us - # the -l USER option too, so we must be prepared to ignore it. - if [[ "$1" == "-l" ]]; then - shift 2 - fi - - hostname="$1" - shift - - if [[ -z "$hostname" || "$1" != rsync || "$2" != --server || "$3" != --daemon ]]; then - echo "Usage: rsync-ssl --HELPER HOSTNAME rsync --server --daemon ." 1>&2 - exit 1 - fi - - if [[ $RSYNC_SSL_TYPE == openssl ]]; then - exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt $keyopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port - elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then - exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_key_opt $gnutls_opts $hostname:$port - else - # devzero@web.de came up with this no-tmpfile calling syntax: - exec $RSYNC_SSL_STUNNEL -fd 10 11<&0 <&2 + exit 1 + ;; + esac + + if [[ -z "$RSYNC_SSL_CERT" ]]; then + certopt="" + gnutls_cert_opt="" + else + certopt="-cert$optsep$RSYNC_SSL_CERT" + gnutls_cert_opt="--x509certfile=$RSYNC_SSL_CERT" + fi + + if [[ -z "$RSYNC_SSL_KEY" ]]; then + keyopt="" + gnutls_key_opt="" + else + keyopt="-key$optsep$RSYNC_SSL_KEY" + gnutls_key_opt="--x509keyfile=$RSYNC_SSL_KEY" + fi + + if [[ -z ${RSYNC_SSL_CA_CERT+x} ]]; then + # RSYNC_SSL_CA_CERT unset - default CA set AND verify: + # openssl: + caopt="-verify_return_error -verify 4" + # gnutls: + gnutls_opts="" + # stunnel: + # Since there is no way of using the default CA certificate collection, + # we cannot do any verification. Thus, stunnel should really only be + # used if nothing else is available. + cafile="" + verify="" + elif [[ "$RSYNC_SSL_CA_CERT" == "" ]]; then + # RSYNC_SSL_CA_CERT set but empty -do NO verifications: + # openssl: + caopt="-verify 1" + # gnutls: + gnutls_opts="--insecure" + # stunnel: + cafile="" + verify="verifyChain = no" + else + # RSYNC_SSL_CA_CERT set - use CA AND verify: + # openssl: + caopt="-CAfile $RSYNC_SSL_CA_CERT -verify_return_error -verify 4" + # gnutls: + gnutls_opts="--x509cafile=$RSYNC_SSL_CA_CERT" + # stunnel: + cafile="CAfile = $RSYNC_SSL_CA_CERT" + verify="verifyChain = yes" + fi + + port="${RSYNC_PORT:-0}" + if [[ "$port" == 0 ]]; then + port="${RSYNC_SSL_PORT:-874}" + fi + + # If the user specified USER@HOSTNAME::module, then rsync passes us + # the -l USER option too, so we must be prepared to ignore it. + if [[ "$1" == "-l" ]]; then + shift 2 + fi + + hostname="$1" + shift + + if [[ -z "$hostname" || "$1" != rsync || "$2" != --server || "$3" != --daemon ]]; then + echo "Usage: rsync-ssl --HELPER HOSTNAME rsync --server --daemon ." 1>&2 + exit 1 + fi + + if [[ $RSYNC_SSL_TYPE == openssl ]]; then + exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt $keyopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port + elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then + exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_key_opt $gnutls_opts $hostname:$port + else + # devzero@web.de came up with this no-tmpfile calling syntax: + exec $RSYNC_SSL_STUNNEL -fd 10 11<&0 <&2 - echo "See the rsync-ssl manpage for configuration assistance." 1>&2 - return 1 + IFS="$IFS_SAVE" + echo "Failed to find on your path: $*" 1>&2 + echo "See the rsync-ssl manpage for configuration assistance." 1>&2 + return 1 } if [[ "$#" == 0 ]]; then - echo "Usage: rsync-ssl [--type=SSL_TYPE] RSYNC_ARG [...]" 1>&2 - echo "The SSL_TYPE can be openssl or stunnel" - exit 1 + echo "Usage: rsync-ssl [--type=SSL_TYPE] RSYNC_ARG [...]" 1>&2 + echo "The SSL_TYPE can be openssl or stunnel" + exit 1 fi if [[ "$1" = --help || "$1" = -h ]]; then - exec rsync --help + exec rsync --help fi if [[ "$1" == --HELPER ]]; then - shift - rsync_ssl_helper "${@}" + shift + rsync_ssl_helper "${@}" fi if [[ "$1" == --type=* ]]; then - export RSYNC_SSL_TYPE="${1/--type=/}" - shift + export RSYNC_SSL_TYPE="${1/--type=/}" + shift fi rsync_ssl_run "${@}" diff --git a/rsync-web/bin/upload b/rsync-web/bin/upload index 39bae3e50..c1ec7ce74 100755 --- a/rsync-web/bin/upload +++ b/rsync-web/bin/upload @@ -1,7 +1,7 @@ #!/bin/sh if [ -d rsync-and-debian ]; then - rsync -aviOHFFc --del -f._filt . $SAMBA_HOST:/home/httpd/html/rsync/ "${@}" + rsync -aviOHFFc --del -f._filt . $SAMBA_HOST:/home/httpd/html/rsync/ "${@}" else - echo "Run this from the root of the html hierarchy." - exit 1 + echo "Run this from the root of the html hierarchy." + exit 1 fi diff --git a/rsync-web/horus.txt b/rsync-web/horus.txt index 27a7010ab..77dd64828 100644 --- a/rsync-web/horus.txt +++ b/rsync-web/horus.txt @@ -25,4 +25,3 @@ the backup. This is the script I use on one of those machines. 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 critical parts using a rsync over ssh to a remote machine. - diff --git a/rsync-web/nt.txt b/rsync-web/nt.txt index a2a4311eb..9fc1003ea 100644 --- a/rsync-web/nt.txt +++ b/rsync-web/nt.txt @@ -71,4 +71,3 @@ to hear them at mmchen@minn.net. Mike McHenry Systems Administrator MinnNet Communications, Inc. - diff --git a/rsync-web/rsync-and-debian/rsync-and-debian.sgml b/rsync-web/rsync-and-debian/rsync-and-debian.sgml index 81f2b9e9f..58f0c5e1c 100644 --- a/rsync-web/rsync-and-debian/rsync-and-debian.sgml +++ b/rsync-web/rsync-and-debian/rsync-and-debian.sgml @@ -866,4 +866,4 @@ Add revision history.

        - \ No newline at end of file + diff --git a/rsync-web/susan.txt b/rsync-web/susan.txt index 2d8a67e3e..cf366fb52 100644 --- a/rsync-web/susan.txt +++ b/rsync-web/susan.txt @@ -26,6 +26,3 @@ she can retrieve any version from the last week. The last line does the rsync of her directory across the modem link to the host samba. Note that I am using the -C option which allows me to add entries to .cvsignore for stuff that doesn't need to be backed up. - - - diff --git a/rsync-web/tech_report/images.pl b/rsync-web/tech_report/images.pl index c69566971..0581d848d 100644 --- a/rsync-web/tech_report/images.pl +++ b/rsync-web/tech_report/images.pl @@ -45,4 +45,3 @@ ALT="$\beta$">|; 1; - diff --git a/rsync-web/tech_report/labels.pl b/rsync-web/tech_report/labels.pl index eded2434b..b672c6c47 100644 --- a/rsync-web/tech_report/labels.pl +++ b/rsync-web/tech_report/labels.pl @@ -3,4 +3,3 @@ 1; - diff --git a/support/deny-rsync b/support/deny-rsync index bd4da9e73..e93ca3091 100755 --- a/support/deny-rsync +++ b/support/deny-rsync @@ -8,13 +8,13 @@ exit_code=4 # same as a daemon that refuses an option # e.g. byte_escape 29 => \035 function byte_escape { - echo -ne "\\0$(printf "%o" $1)" + echo -ne "\\0$(printf "%o" $1)" } msg="$1" if [ "${#msg}" -gt 254 ]; then - # truncate a message that is too long for this naive script to handle - msg="${msg:0:251}..." + # truncate a message that is too long for this naive script to handle + msg="${msg:0:251}..." fi msglen=$(( ${#msg} + 1 )) # add 1 for the newline we append below diff --git a/support/instant-rsyncd b/support/instant-rsyncd index 8bcfd0018..5f262865f 100755 --- a/support/instant-rsyncd +++ b/support/instant-rsyncd @@ -20,31 +20,31 @@ echo echo "This will setup an rsync daemon in $dir" if [ $# = 0 ]; then - IFS='' read -p 'Module name to create (or return to exit): ' module - [ ! "$module" ] && exit + IFS='' read -p 'Module name to create (or return to exit): ' module + [ ! "$module" ] && exit else - module="$1" - shift + module="$1" + shift fi if [ $# = 0 ]; then - IFS='' read -p 'Port number the daemon should listen on [873]: ' port + IFS='' read -p 'Port number the daemon should listen on [873]: ' port else - port="$1" - shift + port="$1" + shift fi [ "$port" ] || port=873 if [ $# = 0 ]; then - IFS='' read -p 'User name for authentication (empty for none): ' user + IFS='' read -p 'User name for authentication (empty for none): ' user else - user="$1" - shift + user="$1" + shift fi if [ "$user" ]; then - IFS='' read -s -p 'Desired password: ' password - echo + IFS='' read -s -p 'Desired password: ' password + echo fi rsync="$1" @@ -66,14 +66,14 @@ use chroot = no EOF if [ "$user" ]; then - cat >>rsyncd.conf <<-EOF + cat >>rsyncd.conf <<-EOF auth users = $user secrets file = $module.secrets EOF - touch "$module".secrets - chmod go-rwx "$module".secrets - echo "$user:$password" >"$module".secrets - user="$user@" + touch "$module".secrets + chmod go-rwx "$module".secrets + echo "$user:$password" >"$module".secrets + user="$user@" fi cat >start <&2; exit 1 ;; - esac + esac done if [ "$user" ]; then - prefix='' - if [ $do_cd = y ]; then - home=`perl -e "print((getpwnam('$user'))[7])"` - prefix="cd '$home' &&" - fi - sudo -H -u "$user" sh -c "$prefix $*" + prefix='' + if [ $do_cd = y ]; then + home=`perl -e "print((getpwnam('$user'))[7])"` + prefix="cd '$home' &&" + fi + sudo -H -u "$user" sh -c "$prefix $*" else - if [ $do_cd = y ]; then - cd || exit 1 - fi - eval "${@}" + if [ $do_cd = y ]; then + cd || exit 1 + fi + eval "${@}" fi diff --git a/support/rsync-no-vanished b/support/rsync-no-vanished index 892c90baa..25ee7467a 100755 --- a/support/rsync-no-vanished +++ b/support/rsync-no-vanished @@ -6,10 +6,10 @@ IGNOREOUT='^((file|directory) has vanished: |rsync warning: some files vanished # If someone installs this as "rsync", make sure we don't affect a server run. for arg in "${@}"; do - if [[ "$arg" == --server ]]; then - exec $REAL_RSYNC "${@}" - exit $? # Not reached - fi + if [[ "$arg" == --server ]]; then + exec $REAL_RSYNC "${@}" + exit $? # Not reached + fi done set -o pipefail @@ -18,7 +18,7 @@ set -o pipefail { $REAL_RSYNC "${@}" 2>&1 1>&3 3>&- | grep -E -v "$IGNOREOUT"; ret=${PIPESTATUS[0]}; } 3>&1 1>&2 if [[ $ret == $IGNOREEXIT ]]; then - ret=0 + ret=0 fi exit $ret diff --git a/support/rsync-slash-strip b/support/rsync-slash-strip index b57e61c53..bdb8bd6cc 100755 --- a/support/rsync-slash-strip +++ b/support/rsync-slash-strip @@ -11,14 +11,14 @@ REAL_RSYNC=/usr/bin/rsync args=() for arg in "${@}"; do - if [[ "$arg" == --server ]]; then - exec $REAL_RSYNC "${@}" - exit $? # Not reached - fi - if [[ "$arg" == / ]]; then - args=("${args[@]}" /) - else - args=("${args[@]}" "${arg%/}") - fi + if [[ "$arg" == --server ]]; then + exec $REAL_RSYNC "${@}" + exit $? # Not reached + fi + if [[ "$arg" == / ]]; then + args=("${args[@]}" /) + else + args=("${args[@]}" "${arg%/}") + fi done exec $REAL_RSYNC "${args[@]}" diff --git a/zlib/README.rsync b/zlib/README.rsync index 5440bfde0..40a190edc 100644 --- a/zlib/README.rsync +++ b/zlib/README.rsync @@ -28,4 +28,3 @@ The rsync maintainers hope to fix this problem in the future by either merging our changes into the upstream version, or backing them out of rsync in a way that preserves wire compatibility. But in the meantime this version must be maintained in parallel. - diff --git a/zlib/trees.h b/zlib/trees.h index d35639d82..45a749f0c 100644 --- a/zlib/trees.h +++ b/zlib/trees.h @@ -125,4 +125,3 @@ local const int base_dist[D_CODES] = { 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 }; - From 75661bc2efed275c38db9d59b77c9ac6634ad05b Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sat, 6 Jun 2026 21:25:26 +0200 Subject: [PATCH 04/13] :white_check_mark: Make all files with shebang executable --- config.guess | 0 config.sub | 0 mkproto.awk | 0 packaging/solaris/build_pkg.sh | 0 rsync-web/backup.txt | 0 rsync-web/convert-gpl | 0 rsync-web/rsync-debug | 0 testsuite/00-hello_test.py | 0 testsuite/acls-default_test.py | 0 testsuite/acls-depth_test.py | 0 testsuite/acls_test.py | 0 testsuite/alt-dest-deep_test.py | 0 testsuite/alt-dest-symlink-race_test.py | 0 testsuite/alt-dest_test.py | 0 testsuite/append-shortsum_test.py | 0 testsuite/append_test.py | 0 testsuite/atimes_test.py | 0 testsuite/backup-deep_test.py | 0 testsuite/backup_test.py | 0 testsuite/bare-do-open-symlink-race_test.py | 0 testsuite/batch-mode_test.py | 0 testsuite/chdir-symlink-race_test.py | 0 testsuite/chgrp_test.py | 0 testsuite/chmod-option_test.py | 0 testsuite/chmod-symlink-race_test.py | 0 testsuite/chmod-temp-dir_test.py | 0 testsuite/chmod_test.py | 0 testsuite/chown_test.py | 0 testsuite/clean-fname-underflow_test.py | 0 testsuite/compare_test.py | 0 testsuite/compress-options_test.py | 0 testsuite/compress-zlib-insert_test.py | 0 testsuite/copy-dest-source-symlink_test.py | 0 testsuite/crtimes_test.py | 0 testsuite/cvs-exclude_test.py | 0 testsuite/daemon-access-ip_test.py | 0 testsuite/daemon-access_test.py | 0 testsuite/daemon-auth_test.py | 0 testsuite/daemon-chroot-acl_test.py | 0 testsuite/daemon-config_test.py | 0 testsuite/daemon-delete-stats_test.py | 0 testsuite/daemon-exec_test.py | 0 testsuite/daemon-filter_test.py | 0 testsuite/daemon-groupmap-wild_test.py | 0 testsuite/daemon-gzip-download_test.py | 0 testsuite/daemon-gzip-upload_test.py | 0 testsuite/daemon-munge_test.py | 0 testsuite/daemon-path-root-read_test.py | 0 testsuite/daemon-refuse-compress_test.py | 0 testsuite/daemon-refuse_test.py | 0 testsuite/daemon_test.py | 0 testsuite/delay-updates-deep_test.py | 0 testsuite/delay-updates_test.py | 0 testsuite/delete-deep_test.py | 0 testsuite/delete-missing-args-files-from_test.py | 0 testsuite/delete_test.py | 0 testsuite/devices_test.py | 0 testsuite/dir-sgid_test.py | 0 testsuite/dirs_test.py | 0 testsuite/duplicates_test.py | 0 testsuite/exclude_test.py | 0 testsuite/executability_test.py | 0 testsuite/file-to-file-mkpath-dry-run_test.py | 0 testsuite/files-from-depth_test.py | 0 testsuite/files-from_test.py | 0 testsuite/filter-depth_test.py | 0 testsuite/fuzzy-basis_test.py | 0 testsuite/fuzzy_test.py | 0 testsuite/hands_test.py | 0 testsuite/hardlinks-deep_test.py | 0 testsuite/hardlinks_test.py | 0 testsuite/inplace_test.py | 0 testsuite/itemize_test.py | 0 testsuite/link-dest-module-escape_test.py | 0 testsuite/link-dest-pathroot_test.py | 0 testsuite/link-dest-relative-basis_test.py | 0 testsuite/links_test.py | 0 testsuite/longdir_test.py | 0 testsuite/merge_test.py | 0 testsuite/metadata-depth_test.py | 0 testsuite/missing_test.py | 0 testsuite/mkpath_test.py | 0 testsuite/omit-times_test.py | 0 testsuite/open-noatime_test.py | 0 testsuite/output-options_test.py | 0 testsuite/ownership-depth_test.py | 0 testsuite/partial_nowrite_test.py | 0 testsuite/partial_test.py | 0 testsuite/preallocate_test.py | 0 testsuite/protected-regular_test.py | 0 testsuite/proxy-response-line-too-long_test.py | 0 testsuite/prune-empty-dirs_test.py | 0 testsuite/relative-implied_test.py | 0 testsuite/relative_test.py | 0 testsuite/reverse-daemon-delta_test.py | 0 testsuite/safe-links-absolute-intree_test.py | 0 testsuite/safe-links_test.py | 0 testsuite/secure-relpath-validation_test.py | 0 testsuite/sender-flist-symlink-leak_test.py | 0 testsuite/simd-checksum_test.py | 0 testsuite/size-filter_test.py | 0 testsuite/sparse_test.py | 0 testsuite/ssh-basic_test.py | 0 testsuite/stop-time_test.py | 0 testsuite/symlink-dirlink-basis_test.py | 0 testsuite/symlink-ignore_test.py | 0 testsuite/temp-dir_test.py | 0 testsuite/trimslash_test.py | 0 testsuite/unsafe-byname_test.py | 0 testsuite/unsafe-links_test.py | 0 testsuite/update_test.py | 0 testsuite/wildmatch_test.py | 0 testsuite/xattrs-depth_test.py | 0 testsuite/xattrs_test.py | 0 114 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 config.guess mode change 100644 => 100755 config.sub mode change 100644 => 100755 mkproto.awk mode change 100644 => 100755 packaging/solaris/build_pkg.sh mode change 100644 => 100755 rsync-web/backup.txt mode change 100644 => 100755 rsync-web/convert-gpl mode change 100644 => 100755 rsync-web/rsync-debug mode change 100644 => 100755 testsuite/00-hello_test.py mode change 100644 => 100755 testsuite/acls-default_test.py mode change 100644 => 100755 testsuite/acls-depth_test.py mode change 100644 => 100755 testsuite/acls_test.py mode change 100644 => 100755 testsuite/alt-dest-deep_test.py mode change 100644 => 100755 testsuite/alt-dest-symlink-race_test.py mode change 100644 => 100755 testsuite/alt-dest_test.py mode change 100644 => 100755 testsuite/append-shortsum_test.py mode change 100644 => 100755 testsuite/append_test.py mode change 100644 => 100755 testsuite/atimes_test.py mode change 100644 => 100755 testsuite/backup-deep_test.py mode change 100644 => 100755 testsuite/backup_test.py mode change 100644 => 100755 testsuite/bare-do-open-symlink-race_test.py mode change 100644 => 100755 testsuite/batch-mode_test.py mode change 100644 => 100755 testsuite/chdir-symlink-race_test.py mode change 100644 => 100755 testsuite/chgrp_test.py mode change 100644 => 100755 testsuite/chmod-option_test.py mode change 100644 => 100755 testsuite/chmod-symlink-race_test.py mode change 100644 => 100755 testsuite/chmod-temp-dir_test.py mode change 100644 => 100755 testsuite/chmod_test.py mode change 100644 => 100755 testsuite/chown_test.py mode change 100644 => 100755 testsuite/clean-fname-underflow_test.py mode change 100644 => 100755 testsuite/compare_test.py mode change 100644 => 100755 testsuite/compress-options_test.py mode change 100644 => 100755 testsuite/compress-zlib-insert_test.py mode change 100644 => 100755 testsuite/copy-dest-source-symlink_test.py mode change 100644 => 100755 testsuite/crtimes_test.py mode change 100644 => 100755 testsuite/cvs-exclude_test.py mode change 100644 => 100755 testsuite/daemon-access-ip_test.py mode change 100644 => 100755 testsuite/daemon-access_test.py mode change 100644 => 100755 testsuite/daemon-auth_test.py mode change 100644 => 100755 testsuite/daemon-chroot-acl_test.py mode change 100644 => 100755 testsuite/daemon-config_test.py mode change 100644 => 100755 testsuite/daemon-delete-stats_test.py mode change 100644 => 100755 testsuite/daemon-exec_test.py mode change 100644 => 100755 testsuite/daemon-filter_test.py mode change 100644 => 100755 testsuite/daemon-groupmap-wild_test.py mode change 100644 => 100755 testsuite/daemon-gzip-download_test.py mode change 100644 => 100755 testsuite/daemon-gzip-upload_test.py mode change 100644 => 100755 testsuite/daemon-munge_test.py mode change 100644 => 100755 testsuite/daemon-path-root-read_test.py mode change 100644 => 100755 testsuite/daemon-refuse-compress_test.py mode change 100644 => 100755 testsuite/daemon-refuse_test.py mode change 100644 => 100755 testsuite/daemon_test.py mode change 100644 => 100755 testsuite/delay-updates-deep_test.py mode change 100644 => 100755 testsuite/delay-updates_test.py mode change 100644 => 100755 testsuite/delete-deep_test.py mode change 100644 => 100755 testsuite/delete-missing-args-files-from_test.py mode change 100644 => 100755 testsuite/delete_test.py mode change 100644 => 100755 testsuite/devices_test.py mode change 100644 => 100755 testsuite/dir-sgid_test.py mode change 100644 => 100755 testsuite/dirs_test.py mode change 100644 => 100755 testsuite/duplicates_test.py mode change 100644 => 100755 testsuite/exclude_test.py mode change 100644 => 100755 testsuite/executability_test.py mode change 100644 => 100755 testsuite/file-to-file-mkpath-dry-run_test.py mode change 100644 => 100755 testsuite/files-from-depth_test.py mode change 100644 => 100755 testsuite/files-from_test.py mode change 100644 => 100755 testsuite/filter-depth_test.py mode change 100644 => 100755 testsuite/fuzzy-basis_test.py mode change 100644 => 100755 testsuite/fuzzy_test.py mode change 100644 => 100755 testsuite/hands_test.py mode change 100644 => 100755 testsuite/hardlinks-deep_test.py mode change 100644 => 100755 testsuite/hardlinks_test.py mode change 100644 => 100755 testsuite/inplace_test.py mode change 100644 => 100755 testsuite/itemize_test.py mode change 100644 => 100755 testsuite/link-dest-module-escape_test.py mode change 100644 => 100755 testsuite/link-dest-pathroot_test.py mode change 100644 => 100755 testsuite/link-dest-relative-basis_test.py mode change 100644 => 100755 testsuite/links_test.py mode change 100644 => 100755 testsuite/longdir_test.py mode change 100644 => 100755 testsuite/merge_test.py mode change 100644 => 100755 testsuite/metadata-depth_test.py mode change 100644 => 100755 testsuite/missing_test.py mode change 100644 => 100755 testsuite/mkpath_test.py mode change 100644 => 100755 testsuite/omit-times_test.py mode change 100644 => 100755 testsuite/open-noatime_test.py mode change 100644 => 100755 testsuite/output-options_test.py mode change 100644 => 100755 testsuite/ownership-depth_test.py mode change 100644 => 100755 testsuite/partial_nowrite_test.py mode change 100644 => 100755 testsuite/partial_test.py mode change 100644 => 100755 testsuite/preallocate_test.py mode change 100644 => 100755 testsuite/protected-regular_test.py mode change 100644 => 100755 testsuite/proxy-response-line-too-long_test.py mode change 100644 => 100755 testsuite/prune-empty-dirs_test.py mode change 100644 => 100755 testsuite/relative-implied_test.py mode change 100644 => 100755 testsuite/relative_test.py mode change 100644 => 100755 testsuite/reverse-daemon-delta_test.py mode change 100644 => 100755 testsuite/safe-links-absolute-intree_test.py mode change 100644 => 100755 testsuite/safe-links_test.py mode change 100644 => 100755 testsuite/secure-relpath-validation_test.py mode change 100644 => 100755 testsuite/sender-flist-symlink-leak_test.py mode change 100644 => 100755 testsuite/simd-checksum_test.py mode change 100644 => 100755 testsuite/size-filter_test.py mode change 100644 => 100755 testsuite/sparse_test.py mode change 100644 => 100755 testsuite/ssh-basic_test.py mode change 100644 => 100755 testsuite/stop-time_test.py mode change 100644 => 100755 testsuite/symlink-dirlink-basis_test.py mode change 100644 => 100755 testsuite/symlink-ignore_test.py mode change 100644 => 100755 testsuite/temp-dir_test.py mode change 100644 => 100755 testsuite/trimslash_test.py mode change 100644 => 100755 testsuite/unsafe-byname_test.py mode change 100644 => 100755 testsuite/unsafe-links_test.py mode change 100644 => 100755 testsuite/update_test.py mode change 100644 => 100755 testsuite/wildmatch_test.py mode change 100644 => 100755 testsuite/xattrs-depth_test.py mode change 100644 => 100755 testsuite/xattrs_test.py diff --git a/config.guess b/config.guess old mode 100644 new mode 100755 diff --git a/config.sub b/config.sub old mode 100644 new mode 100755 diff --git a/mkproto.awk b/mkproto.awk old mode 100644 new mode 100755 diff --git a/packaging/solaris/build_pkg.sh b/packaging/solaris/build_pkg.sh old mode 100644 new mode 100755 diff --git a/rsync-web/backup.txt b/rsync-web/backup.txt old mode 100644 new mode 100755 diff --git a/rsync-web/convert-gpl b/rsync-web/convert-gpl old mode 100644 new mode 100755 diff --git a/rsync-web/rsync-debug b/rsync-web/rsync-debug old mode 100644 new mode 100755 diff --git a/testsuite/00-hello_test.py b/testsuite/00-hello_test.py old mode 100644 new mode 100755 diff --git a/testsuite/acls-default_test.py b/testsuite/acls-default_test.py old mode 100644 new mode 100755 diff --git a/testsuite/acls-depth_test.py b/testsuite/acls-depth_test.py old mode 100644 new mode 100755 diff --git a/testsuite/acls_test.py b/testsuite/acls_test.py old mode 100644 new mode 100755 diff --git a/testsuite/alt-dest-deep_test.py b/testsuite/alt-dest-deep_test.py old mode 100644 new mode 100755 diff --git a/testsuite/alt-dest-symlink-race_test.py b/testsuite/alt-dest-symlink-race_test.py old mode 100644 new mode 100755 diff --git a/testsuite/alt-dest_test.py b/testsuite/alt-dest_test.py old mode 100644 new mode 100755 diff --git a/testsuite/append-shortsum_test.py b/testsuite/append-shortsum_test.py old mode 100644 new mode 100755 diff --git a/testsuite/append_test.py b/testsuite/append_test.py old mode 100644 new mode 100755 diff --git a/testsuite/atimes_test.py b/testsuite/atimes_test.py old mode 100644 new mode 100755 diff --git a/testsuite/backup-deep_test.py b/testsuite/backup-deep_test.py old mode 100644 new mode 100755 diff --git a/testsuite/backup_test.py b/testsuite/backup_test.py old mode 100644 new mode 100755 diff --git a/testsuite/bare-do-open-symlink-race_test.py b/testsuite/bare-do-open-symlink-race_test.py old mode 100644 new mode 100755 diff --git a/testsuite/batch-mode_test.py b/testsuite/batch-mode_test.py old mode 100644 new mode 100755 diff --git a/testsuite/chdir-symlink-race_test.py b/testsuite/chdir-symlink-race_test.py old mode 100644 new mode 100755 diff --git a/testsuite/chgrp_test.py b/testsuite/chgrp_test.py old mode 100644 new mode 100755 diff --git a/testsuite/chmod-option_test.py b/testsuite/chmod-option_test.py old mode 100644 new mode 100755 diff --git a/testsuite/chmod-symlink-race_test.py b/testsuite/chmod-symlink-race_test.py old mode 100644 new mode 100755 diff --git a/testsuite/chmod-temp-dir_test.py b/testsuite/chmod-temp-dir_test.py old mode 100644 new mode 100755 diff --git a/testsuite/chmod_test.py b/testsuite/chmod_test.py old mode 100644 new mode 100755 diff --git a/testsuite/chown_test.py b/testsuite/chown_test.py old mode 100644 new mode 100755 diff --git a/testsuite/clean-fname-underflow_test.py b/testsuite/clean-fname-underflow_test.py old mode 100644 new mode 100755 diff --git a/testsuite/compare_test.py b/testsuite/compare_test.py old mode 100644 new mode 100755 diff --git a/testsuite/compress-options_test.py b/testsuite/compress-options_test.py old mode 100644 new mode 100755 diff --git a/testsuite/compress-zlib-insert_test.py b/testsuite/compress-zlib-insert_test.py old mode 100644 new mode 100755 diff --git a/testsuite/copy-dest-source-symlink_test.py b/testsuite/copy-dest-source-symlink_test.py old mode 100644 new mode 100755 diff --git a/testsuite/crtimes_test.py b/testsuite/crtimes_test.py old mode 100644 new mode 100755 diff --git a/testsuite/cvs-exclude_test.py b/testsuite/cvs-exclude_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-access-ip_test.py b/testsuite/daemon-access-ip_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-access_test.py b/testsuite/daemon-access_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-auth_test.py b/testsuite/daemon-auth_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-chroot-acl_test.py b/testsuite/daemon-chroot-acl_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-config_test.py b/testsuite/daemon-config_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-delete-stats_test.py b/testsuite/daemon-delete-stats_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-exec_test.py b/testsuite/daemon-exec_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-filter_test.py b/testsuite/daemon-filter_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-groupmap-wild_test.py b/testsuite/daemon-groupmap-wild_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-gzip-download_test.py b/testsuite/daemon-gzip-download_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-gzip-upload_test.py b/testsuite/daemon-gzip-upload_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-munge_test.py b/testsuite/daemon-munge_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-path-root-read_test.py b/testsuite/daemon-path-root-read_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-refuse-compress_test.py b/testsuite/daemon-refuse-compress_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon-refuse_test.py b/testsuite/daemon-refuse_test.py old mode 100644 new mode 100755 diff --git a/testsuite/daemon_test.py b/testsuite/daemon_test.py old mode 100644 new mode 100755 diff --git a/testsuite/delay-updates-deep_test.py b/testsuite/delay-updates-deep_test.py old mode 100644 new mode 100755 diff --git a/testsuite/delay-updates_test.py b/testsuite/delay-updates_test.py old mode 100644 new mode 100755 diff --git a/testsuite/delete-deep_test.py b/testsuite/delete-deep_test.py old mode 100644 new mode 100755 diff --git a/testsuite/delete-missing-args-files-from_test.py b/testsuite/delete-missing-args-files-from_test.py old mode 100644 new mode 100755 diff --git a/testsuite/delete_test.py b/testsuite/delete_test.py old mode 100644 new mode 100755 diff --git a/testsuite/devices_test.py b/testsuite/devices_test.py old mode 100644 new mode 100755 diff --git a/testsuite/dir-sgid_test.py b/testsuite/dir-sgid_test.py old mode 100644 new mode 100755 diff --git a/testsuite/dirs_test.py b/testsuite/dirs_test.py old mode 100644 new mode 100755 diff --git a/testsuite/duplicates_test.py b/testsuite/duplicates_test.py old mode 100644 new mode 100755 diff --git a/testsuite/exclude_test.py b/testsuite/exclude_test.py old mode 100644 new mode 100755 diff --git a/testsuite/executability_test.py b/testsuite/executability_test.py old mode 100644 new mode 100755 diff --git a/testsuite/file-to-file-mkpath-dry-run_test.py b/testsuite/file-to-file-mkpath-dry-run_test.py old mode 100644 new mode 100755 diff --git a/testsuite/files-from-depth_test.py b/testsuite/files-from-depth_test.py old mode 100644 new mode 100755 diff --git a/testsuite/files-from_test.py b/testsuite/files-from_test.py old mode 100644 new mode 100755 diff --git a/testsuite/filter-depth_test.py b/testsuite/filter-depth_test.py old mode 100644 new mode 100755 diff --git a/testsuite/fuzzy-basis_test.py b/testsuite/fuzzy-basis_test.py old mode 100644 new mode 100755 diff --git a/testsuite/fuzzy_test.py b/testsuite/fuzzy_test.py old mode 100644 new mode 100755 diff --git a/testsuite/hands_test.py b/testsuite/hands_test.py old mode 100644 new mode 100755 diff --git a/testsuite/hardlinks-deep_test.py b/testsuite/hardlinks-deep_test.py old mode 100644 new mode 100755 diff --git a/testsuite/hardlinks_test.py b/testsuite/hardlinks_test.py old mode 100644 new mode 100755 diff --git a/testsuite/inplace_test.py b/testsuite/inplace_test.py old mode 100644 new mode 100755 diff --git a/testsuite/itemize_test.py b/testsuite/itemize_test.py old mode 100644 new mode 100755 diff --git a/testsuite/link-dest-module-escape_test.py b/testsuite/link-dest-module-escape_test.py old mode 100644 new mode 100755 diff --git a/testsuite/link-dest-pathroot_test.py b/testsuite/link-dest-pathroot_test.py old mode 100644 new mode 100755 diff --git a/testsuite/link-dest-relative-basis_test.py b/testsuite/link-dest-relative-basis_test.py old mode 100644 new mode 100755 diff --git a/testsuite/links_test.py b/testsuite/links_test.py old mode 100644 new mode 100755 diff --git a/testsuite/longdir_test.py b/testsuite/longdir_test.py old mode 100644 new mode 100755 diff --git a/testsuite/merge_test.py b/testsuite/merge_test.py old mode 100644 new mode 100755 diff --git a/testsuite/metadata-depth_test.py b/testsuite/metadata-depth_test.py old mode 100644 new mode 100755 diff --git a/testsuite/missing_test.py b/testsuite/missing_test.py old mode 100644 new mode 100755 diff --git a/testsuite/mkpath_test.py b/testsuite/mkpath_test.py old mode 100644 new mode 100755 diff --git a/testsuite/omit-times_test.py b/testsuite/omit-times_test.py old mode 100644 new mode 100755 diff --git a/testsuite/open-noatime_test.py b/testsuite/open-noatime_test.py old mode 100644 new mode 100755 diff --git a/testsuite/output-options_test.py b/testsuite/output-options_test.py old mode 100644 new mode 100755 diff --git a/testsuite/ownership-depth_test.py b/testsuite/ownership-depth_test.py old mode 100644 new mode 100755 diff --git a/testsuite/partial_nowrite_test.py b/testsuite/partial_nowrite_test.py old mode 100644 new mode 100755 diff --git a/testsuite/partial_test.py b/testsuite/partial_test.py old mode 100644 new mode 100755 diff --git a/testsuite/preallocate_test.py b/testsuite/preallocate_test.py old mode 100644 new mode 100755 diff --git a/testsuite/protected-regular_test.py b/testsuite/protected-regular_test.py old mode 100644 new mode 100755 diff --git a/testsuite/proxy-response-line-too-long_test.py b/testsuite/proxy-response-line-too-long_test.py old mode 100644 new mode 100755 diff --git a/testsuite/prune-empty-dirs_test.py b/testsuite/prune-empty-dirs_test.py old mode 100644 new mode 100755 diff --git a/testsuite/relative-implied_test.py b/testsuite/relative-implied_test.py old mode 100644 new mode 100755 diff --git a/testsuite/relative_test.py b/testsuite/relative_test.py old mode 100644 new mode 100755 diff --git a/testsuite/reverse-daemon-delta_test.py b/testsuite/reverse-daemon-delta_test.py old mode 100644 new mode 100755 diff --git a/testsuite/safe-links-absolute-intree_test.py b/testsuite/safe-links-absolute-intree_test.py old mode 100644 new mode 100755 diff --git a/testsuite/safe-links_test.py b/testsuite/safe-links_test.py old mode 100644 new mode 100755 diff --git a/testsuite/secure-relpath-validation_test.py b/testsuite/secure-relpath-validation_test.py old mode 100644 new mode 100755 diff --git a/testsuite/sender-flist-symlink-leak_test.py b/testsuite/sender-flist-symlink-leak_test.py old mode 100644 new mode 100755 diff --git a/testsuite/simd-checksum_test.py b/testsuite/simd-checksum_test.py old mode 100644 new mode 100755 diff --git a/testsuite/size-filter_test.py b/testsuite/size-filter_test.py old mode 100644 new mode 100755 diff --git a/testsuite/sparse_test.py b/testsuite/sparse_test.py old mode 100644 new mode 100755 diff --git a/testsuite/ssh-basic_test.py b/testsuite/ssh-basic_test.py old mode 100644 new mode 100755 diff --git a/testsuite/stop-time_test.py b/testsuite/stop-time_test.py old mode 100644 new mode 100755 diff --git a/testsuite/symlink-dirlink-basis_test.py b/testsuite/symlink-dirlink-basis_test.py old mode 100644 new mode 100755 diff --git a/testsuite/symlink-ignore_test.py b/testsuite/symlink-ignore_test.py old mode 100644 new mode 100755 diff --git a/testsuite/temp-dir_test.py b/testsuite/temp-dir_test.py old mode 100644 new mode 100755 diff --git a/testsuite/trimslash_test.py b/testsuite/trimslash_test.py old mode 100644 new mode 100755 diff --git a/testsuite/unsafe-byname_test.py b/testsuite/unsafe-byname_test.py old mode 100644 new mode 100755 diff --git a/testsuite/unsafe-links_test.py b/testsuite/unsafe-links_test.py old mode 100644 new mode 100755 diff --git a/testsuite/update_test.py b/testsuite/update_test.py old mode 100644 new mode 100755 diff --git a/testsuite/wildmatch_test.py b/testsuite/wildmatch_test.py old mode 100644 new mode 100755 diff --git a/testsuite/xattrs-depth_test.py b/testsuite/xattrs-depth_test.py old mode 100644 new mode 100755 diff --git a/testsuite/xattrs_test.py b/testsuite/xattrs_test.py old mode 100644 new mode 100755 From 5cf8bd3f6a583fe3862d74e477f91c7c1216c153 Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sat, 6 Jun 2026 22:19:40 +0200 Subject: [PATCH 05/13] Fix spelling (codespell) --- Doxyfile | 4 +- generator.c | 2 +- hlink.c | 4 +- io.c | 2 +- popt/README | 6 +- popt/popt.c | 2 +- popt/popt.h | 8 +-- receiver.c | 2 +- rsync-web/FAQ.html | 2 +- rsync-web/daylight-savings.html | 2 +- rsync-web/firewall.html | 2 +- rsync-web/issues.html | 2 +- rsync-web/lists.html | 2 +- rsync-web/nt.html | 2 +- rsync-web/nt.txt | 2 +- .../rsync-and-debian/rsync-and-debian.sgml | 2 +- rsync.1.md | 20 +++---- rsync.c | 2 +- runtests.py | 2 +- syscall.c | 2 +- testsuite/exclude_test.py | 2 +- testsuite/hands_test.py | 2 +- testsuite/itemize_test.py | 56 +++++++++---------- usage.c | 2 +- zlib/ChangeLog | 12 ++-- zlib/README | 2 +- zlib/deflate.c | 2 +- zlib/inftrees.h | 2 +- zlib/trees.c | 2 +- zlib/zlib.h | 6 +- 30 files changed, 80 insertions(+), 80 deletions(-) diff --git a/Doxyfile b/Doxyfile index ade1d2893..4db8b8852 100644 --- a/Doxyfile +++ b/Doxyfile @@ -149,7 +149,7 @@ PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::addtions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = @@ -176,7 +176,7 @@ MAX_DOT_GRAPH_HEIGHT = 1024 GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO CGI_NAME = search.cgi diff --git a/generator.c b/generator.c index 09e276d1f..5da7a43a6 100644 --- a/generator.c +++ b/generator.c @@ -1422,7 +1422,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, if (!implied_dirs && file->flags & FLAG_IMPLIED_DIR) goto cleanup; if (am_root < 0) { - /* For --fake-super, the dir must be useable by the copying + /* For --fake-super, the dir must be usable by the copying * user, just like it would be for root. */ added_perms = S_IRUSR|S_IWUSR|S_IXUSR; } else diff --git a/hlink.c b/hlink.c index eb36730fd..a6d886880 100644 --- a/hlink.c +++ b/hlink.c @@ -221,7 +221,7 @@ static int maybe_hard_link(struct file_struct *file, int ndx, 0, ""); } if (INFO_GTE(NAME, 2) && maybe_ATTRS_REPORT) - rprintf(FCLIENT, "%s is uptodate\n", fname); + rprintf(FCLIENT, "%s is up-to-date\n", fname); file->flags |= FLAG_HLINK_DONE; return 0; } @@ -402,7 +402,7 @@ int hard_link_check(struct file_struct *file, int ndx, char *fname, itemizing = 0; code = FNONE; if (INFO_GTE(NAME, 2) && maybe_ATTRS_REPORT) - rprintf(FCLIENT, "%s is uptodate\n", fname); + rprintf(FCLIENT, "%s is up-to-date\n", fname); } break; } diff --git a/io.c b/io.c index 0b96c2709..5445ecb65 100644 --- a/io.c +++ b/io.c @@ -2091,7 +2091,7 @@ void write_sum_head(int f, struct sum_struct *sum) * for slow periods. But arguably this is a feature. In addition, we * ought to take the time used to write the data into account. * - * During some phases of big transfers (file FOO is uptodate) this is + * During some phases of big transfers (file FOO is up-to-date) this is * called with a small bytes_written every time. As the kernel has to * round small waits up to guarantee that we actually wait at least the * requested number of microseconds, this can become grossly inaccurate. diff --git a/popt/README b/popt/README index 57a6acde5..862520c68 100644 --- a/popt/README +++ b/popt/README @@ -1,18 +1,18 @@ -This is the popt command line option parsing library. While it is similiar +This is the popt command line option parsing library. While it is similar to getopt(3), it contains a number of enhancements, including: 1) popt is fully reentrant 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 + 4) popt provides convenience 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. 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 +Application Development" by Michael K. Johnson and Erik Troan (available from Addison Wesley in May, 1998). Comments on popt should be addressed to ewt@redhat.com. diff --git a/popt/popt.c b/popt/popt.c index 98f99a449..be7bb8a59 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -142,7 +142,7 @@ static void invokeCallbacksOPTION(poptContext con, { const void *cbData = (cbopt->descrip ? cbopt->descrip : myData); cbarg.cb(con, POPT_CALLBACK_REASON_OPTION, myOpt, con->os->nextArg, cbData); - /* Terminate (unless explcitly continuing). */ + /* Terminate (unless explicitly continuing). */ if (!CBF_ISSET(cbopt, CONTINUE)) return; } diff --git a/popt/popt.h b/popt/popt.h index 338010df2..ea3ccf906 100644 --- a/popt/popt.h +++ b/popt/popt.h @@ -504,7 +504,7 @@ int poptSaveString(const char *** argvp, unsigned int argInfo, /** * Save a long long, performing logical operation with value. - * @warning Alignment check may be too strict on certain platorms. + * @warning Alignment check may be too strict on certain platforms. * @param arg integer pointer, aligned on int boundary. * @param argInfo logical operation (see POPT_ARGFLAG_*) * @param aLongLong value to use @@ -515,7 +515,7 @@ int poptSaveLongLong(long long * arg, unsigned int argInfo, /** * Save a long, performing logical operation with value. - * @warning Alignment check may be too strict on certain platorms. + * @warning Alignment check may be too strict on certain platforms. * @param arg integer pointer, aligned on int boundary. * @param argInfo logical operation (see POPT_ARGFLAG_*) * @param aLong value to use @@ -525,7 +525,7 @@ int poptSaveLong(long * arg, unsigned int argInfo, long aLong); /** * Save a short integer, performing logical operation with value. - * @warning Alignment check may be too strict on certain platorms. + * @warning Alignment check may be too strict on certain platforms. * @param arg short pointer, aligned on short boundary. * @param argInfo logical operation (see POPT_ARGFLAG_*) * @param aLong value to use @@ -535,7 +535,7 @@ int poptSaveShort(short * arg, unsigned int argInfo, long aLong); /** * Save an integer, performing logical operation with value. - * @warning Alignment check may be too strict on certain platorms. + * @warning Alignment check may be too strict on certain platforms. * @param arg integer pointer, aligned on int boundary. * @param argInfo logical operation (see POPT_ARGFLAG_*) * @param aLong value to use diff --git a/receiver.c b/receiver.c index 2b263cea0..5967bb6d1 100644 --- a/receiver.c +++ b/receiver.c @@ -262,7 +262,7 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file) return -1; if (am_root < 0) { - /* For --fake-super, the file must be useable by the copying + /* For --fake-super, the file must be usable by the copying * user, just like it would be for root. */ added_perms = S_IRUSR|S_IWUSR; } else { diff --git a/rsync-web/FAQ.html b/rsync-web/FAQ.html index 6db02b0f7..9a26266df 100644 --- a/rsync-web/FAQ.html +++ b/rsync-web/FAQ.html @@ -61,7 +61,7 @@

        rsync recopies the same files

        UTC. For a full explanation of this and some suggestions on how to avoid them problem, see this document. -

        Something else that can trip up rsync is a filesystem changeing the +

        Something else that can trip up rsync is a filesystem changing the filename behind the scenes. This can happen when a filesystem changes an all-uppercase name into lowercase, or when it decomposes UTF-8 behind your back. diff --git a/rsync-web/daylight-savings.html b/rsync-web/daylight-savings.html index 925cb2dd3..f3136adb6 100644 --- a/rsync-web/daylight-savings.html +++ b/rsync-web/daylight-savings.html @@ -172,7 +172,7 @@

        Notes and References

        http://support.microsoft.com/default.aspx?scid=kb;[LN];158588

        -I wish to thank Wayne Piekarski for having copiled the +I wish to thank Wayne Piekarski for having compiled the references and also supplying some additional insights.

        diff --git a/rsync-web/firewall.html b/rsync-web/firewall.html index 86003dad1..0d62919de 100644 --- a/rsync-web/firewall.html +++ b/rsync-web/firewall.html @@ -139,7 +139,7 @@

        Method 4 -- for using rsync in daemon-mode (requires nc)

        This command takes advantage of the RSYNC_CONNECT_PROG environment variable, which tells rsync to pipe its socket data to an external program -in place of making a direct socket connection. The command specifed above +in place of making a direct socket connection. The command specified above uses ssh to run the nc (netcat) command on the middle host, which forwards all socket data to port 873 on the target host (%H). The "%H" will be substituted with the target host from the rsync command as long as you're diff --git a/rsync-web/issues.html b/rsync-web/issues.html index 7a89a5b85..3b9114177 100644 --- a/rsync-web/issues.html +++ b/rsync-web/issues.html @@ -53,7 +53,7 @@

        current issues and debugging

        for you: stop it. If you need more info on what rsync is changing, using the --itemize-changes option (-i) and repeat it if you need to see unchanged files. This is a much better way to go that doesn't fill -up the communication pipeline with a large quanity of debug messages. +up the communication pipeline with a large quantity of debug messages.

        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 diff --git a/rsync-web/lists.html b/rsync-web/lists.html index 66efbf5a6..3220452b3 100644 --- a/rsync-web/lists.html +++ b/rsync-web/lists.html @@ -36,7 +36,7 @@

        rsync mailing lists

      • rsync-announce carries only messages from the - maintainer annoucing new releases, which happen at most a few + maintainer announcing new releases, which happen at most a few times per month. [archive 1, diff --git a/rsync-web/nt.html b/rsync-web/nt.html index cfbd1be1d..4245af3e5 100644 --- a/rsync-web/nt.html +++ b/rsync-web/nt.html @@ -59,7 +59,7 @@

        rsync on NT

        Don't do this unless you are comfortable with the changes! Run regedit32 and add the following keys and values (quotation marks ARE IMPORTANT): HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Services->Rsync - Edit->Add Key-> Key Name: Paramaters + Edit->Add Key-> Key Name: Parameters Edit->Add Value-> Value Name: AppDirectory Value: "C:\programfiles\rsync" Edit->Add Value-> Value Name: Application Value: "C:\programfiles\rsync\rsync.exe" Edit->Add Value-> Value Name: AppParamters Value: --config="C:\programfiles\rsync\rsyncd.conf" --daemon diff --git a/rsync-web/nt.txt b/rsync-web/nt.txt index 9fc1003ea..9eade8696 100644 --- a/rsync-web/nt.txt +++ b/rsync-web/nt.txt @@ -50,7 +50,7 @@ The first two lines are important for rsync to work on Windows NT however. Don't do this unless you are comfortable with the changes! Run regedit32 and add the following keys and values (quotation marks ARE IMPORTANT): HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Services->Rsync - Edit->Add Key-> Key Name: Paramaters + Edit->Add Key-> Key Name: Parameters Edit->Add Value-> Value Name: AppDirectory Value: "C:\programfiles\rsync" Edit->Add Value-> Value Name: Application Value: "C:\programfiles\rsync\rsync.exe" Edit->Add Value-> Value Name: AppParamters Value: --config="C:\programfiles\rsync\rsyncd.conf" --daemon diff --git a/rsync-web/rsync-and-debian/rsync-and-debian.sgml b/rsync-web/rsync-and-debian/rsync-and-debian.sgml index 58f0c5e1c..873bcc6bd 100644 --- a/rsync-web/rsync-and-debian/rsync-and-debian.sgml +++ b/rsync-web/rsync-and-debian/rsync-and-debian.sgml @@ -36,7 +36,7 @@ problems more than most.

        - If there are issues ommitted by this document, or if you think + If there are issues omitted by this document, or if you think the answers are incomplete, unbalanced, or incorrect, then please mail ``` +> ```bash > cat < + foo.o > :C @@ -4386,7 +4386,7 @@ Let's say that we want to match two source files, one with an absolute path of "/home/me/foo/bar", and one with a path of "/home/you/bar/baz". Here is how the various command choices differ for a 2-source transfer: -> ``` +> ```plaintext > Example cmd: rsync -a /home/me /home/you /dest > +/- pattern: /me/foo/bar > +/- pattern: /you/bar/baz @@ -4394,7 +4394,7 @@ Here is how the various command choices differ for a 2-source transfer: > Target file: /dest/you/bar/baz > ``` -> ``` +> ```plaintext > Example cmd: rsync -a /home/me/ /home/you/ /dest > +/- pattern: /foo/bar (note missing "me") > +/- pattern: /bar/baz (note missing "you") @@ -4402,7 +4402,7 @@ Here is how the various command choices differ for a 2-source transfer: > Target file: /dest/bar/baz > ``` -> ``` +> ```plaintext > Example cmd: rsync -a --relative /home/me/ /home/you /dest > +/- pattern: /home/me/foo/bar (note full path) > +/- pattern: /home/you/bar/baz (ditto) @@ -4410,7 +4410,7 @@ Here is how the various command choices differ for a 2-source transfer: > Target file: /dest/home/you/bar/baz > ``` -> ``` +> ```plaintext > Example cmd: cd /home; rsync -a --relative me/foo you/ /dest > +/- pattern: /me/foo/bar (starts at specified path) > +/- pattern: /you/bar/baz (ditto) @@ -4462,7 +4462,7 @@ the per-directory merge files (so that they don't get deleted) and then put rules into the local files to control what else should not get deleted. Like one of these commands: -> ``` +> ```bash > rsync -av --filter=':e /.rsync-filter' --delete \ > host:src/dir /dest > rsync -avFF --delete host:src/dir /dest diff --git a/rsync.c b/rsync.c index 1d2ae82a1..59d4040bb 100644 --- a/rsync.c +++ b/rsync.c @@ -673,7 +673,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, if (updated) rprintf(FCLIENT, "%s\n", fname); else - rprintf(FCLIENT, "%s is uptodate\n", fname); + rprintf(FCLIENT, "%s is up-to-date\n", fname); } cleanup: if (sxp == &sx2) diff --git a/runtests.py b/runtests.py index 3a1c74852..fdc8c1909 100755 --- a/runtests.py +++ b/runtests.py @@ -45,7 +45,7 @@ def parse_args(): help='Comma-separated test names/globs to skip entirely: ' 'they are not run and not reported as skipped. Useful ' 'for tests that cannot work in a given build/CI ' - 'environment (e.g. a restricted buildd chroot). ' + 'environment (e.g. a restricted build chroot). ' 'Falls back to the RSYNC_EXCLUDE environment variable.') p.add_argument('-j', '--parallel', type=int, default=1, metavar='N', help='Run up to N tests in parallel (default: 1)') diff --git a/syscall.c b/syscall.c index 55bd32b03..c2838cbbc 100644 --- a/syscall.c +++ b/syscall.c @@ -2147,7 +2147,7 @@ int secure_mkstemp(char *template, mode_t perms) } /* - varient of do_open/do_open_nofollow which does do_open() if the + variant of do_open/do_open_nofollow which does do_open() if the copy_links or copy_unsafe_links options are set and does do_open_nofollow() otherwise diff --git a/testsuite/exclude_test.py b/testsuite/exclude_test.py index bd528f618..a01487555 100755 --- a/testsuite/exclude_test.py +++ b/testsuite/exclude_test.py @@ -230,7 +230,7 @@ def run_with_stdin_filter(args, label="merge"): """Run rsync with `args`, feeding `filtered_excl` content on stdin (which `merge_-` in the filter list picks up). checkit-equivalent - that also re-uses CHKDIR/TODIR for the listing comparison.""" + that also reuses CHKDIR/TODIR for the listing comparison.""" print(f"Running: rsync {' '.join(args)}") with open(filtered_excl, 'rb') as inp: proc = subprocess.run(rsync_argv(*args), stdin=inp) diff --git a/testsuite/hands_test.py b/testsuite/hands_test.py index b693cb0a7..3b478a555 100755 --- a/testsuite/hands_test.py +++ b/testsuite/hands_test.py @@ -29,7 +29,7 @@ checkit(['-avH', '--bwlimit=0', DEBUG_OPTS, f'{FROMDIR}/', str(TODIR)], FROMDIR, TODIR) # 3. one file — delete the destination 'text' and re-sync; only it should -# transfer, everything else stays uptodate. +# transfer, everything else stays up-to-date. (TODIR / 'text').unlink() print("Test one file:") checkit(['-avH', DEBUG_OPTS, f'{FROMDIR}/', str(TODIR)], FROMDIR, TODIR) diff --git a/testsuite/itemize_test.py b/testsuite/itemize_test.py index 9cf9aa972..2b83b8027 100755 --- a/testsuite/itemize_test.py +++ b/testsuite/itemize_test.py @@ -45,7 +45,7 @@ L = 'hL' sym_dots = allspace L_sym_dots = '.L' + allspace - is_uptodate = 'is uptodate' + is_uptodate = 'is up-to-date' chkfile_extra = '' # no extra trailing line else: L = 'cL' @@ -115,10 +115,10 @@ os.chmod(FROMDIR / 'foo' / 'config2', 0o600) checkdiff(['-vvplrH', f'{FROMDIR}/', f'{TODIR}/'], - "bar/baz/rsync is uptodate\n" - "foo/config1 is uptodate\n" - "foo/extra is uptodate\n" - "foo/sym is uptodate\n" + "bar/baz/rsync is up-to-date\n" + "foo/config1 is up-to-date\n" + "foo/extra is up-to-date\n" + "foo/sym is up-to-date\n" "foo/config2\n", filter=v_filt) @@ -173,13 +173,13 @@ shutil.rmtree(to2dir, ignore_errors=True) checkdiff(['-vvplrtH', f'--copy-dest={TODIR}', f'{FROMDIR}/', f'{to2dir}/'], - "./ is uptodate\n" - "bar/ is uptodate\n" - "bar/baz/ is uptodate\n" - "bar/baz/rsync is uptodate\n" - "foo/ is uptodate\n" - "foo/config1 is uptodate\n" - "foo/config2 is uptodate\n" + "./ is up-to-date\n" + "bar/ is up-to-date\n" + "bar/baz/ is up-to-date\n" + "bar/baz/rsync is up-to-date\n" + "foo/ is up-to-date\n" + "foo/config1 is up-to-date\n" + "foo/config2 is up-to-date\n" f"foo/sym {is_uptodate}\n" "foo/extra => foo/config1\n", filter=v_filt) @@ -211,14 +211,14 @@ shutil.rmtree(to2dir, ignore_errors=True) checkdiff(['-vvplrtH', f'--link-dest={TODIR}', f'{FROMDIR}/', f'{to2dir}/'], - "./ is uptodate\n" - "bar/ is uptodate\n" - "bar/baz/ is uptodate\n" - "bar/baz/rsync is uptodate\n" - "foo/ is uptodate\n" - "foo/config1 is uptodate\n" - "foo/config2 is uptodate\n" - "foo/extra is uptodate\n" + "./ is up-to-date\n" + "bar/ is up-to-date\n" + "bar/baz/ is up-to-date\n" + "bar/baz/rsync is up-to-date\n" + "foo/ is up-to-date\n" + "foo/config1 is up-to-date\n" + "foo/config2 is up-to-date\n" + "foo/extra is up-to-date\n" f"foo/sym {is_uptodate}\n", filter=v_filt) @@ -244,13 +244,13 @@ shutil.rmtree(to2dir, ignore_errors=True) checkdiff(['-vvplrtH', f'--compare-dest={TODIR}', f'{FROMDIR}/', f'{to2dir}/'], - "./ is uptodate\n" - "bar/ is uptodate\n" - "bar/baz/ is uptodate\n" - "bar/baz/rsync is uptodate\n" - "foo/ is uptodate\n" - "foo/config1 is uptodate\n" - "foo/config2 is uptodate\n" - "foo/extra is uptodate\n" + "./ is up-to-date\n" + "bar/ is up-to-date\n" + "bar/baz/ is up-to-date\n" + "bar/baz/rsync is up-to-date\n" + "foo/ is up-to-date\n" + "foo/config1 is up-to-date\n" + "foo/config2 is up-to-date\n" + "foo/extra is up-to-date\n" f"foo/sym {is_uptodate}\n", filter=v_filt) diff --git a/usage.c b/usage.c index f346385f4..6d60ac09b 100644 --- a/usage.c +++ b/usage.c @@ -241,7 +241,7 @@ static void output_nno_list(enum logcode f, const char *name, struct name_num_ob for (tok = strtok(tmpbuf, " "); tok; tok = next_tok) { next_tok = strtok(NULL, " "); - if (*tok != '(') /* Ignore the alises in the JSON output */ + if (*tok != '(') /* Ignore the aliases in the JSON output */ printf(" \"%s\"%s", tok, comma + (next_tok ? 0 : 1)); } diff --git a/zlib/ChangeLog b/zlib/ChangeLog index f22aabaef..8ef67c9de 100644 --- a/zlib/ChangeLog +++ b/zlib/ChangeLog @@ -34,7 +34,7 @@ Changes in 1.2.7.1 (24 Mar 2013) - Clean up the usage of z_const and respect const usage within zlib - Clean up examples/gzlog.[ch] comparisons of different types - Avoid shift equal to bits in type (caused endless loop) -- Fix unintialized value bug in gzputc() introduced by const patches +- Fix uninitialized value bug in gzputc() introduced by const patches - Fix memory allocation error in examples/zran.c [Nor] - Fix bug where gzopen(), gzclose() would write an empty file - Fix bug in gzclose() when gzwrite() runs out of memory @@ -53,7 +53,7 @@ Changes in 1.2.7.1 (24 Mar 2013) - Fix types in contrib/minizip to match result of get_crc_table() - Simplify contrib/vstudio/vc10 with 'd' suffix - Add TOP support to win32/Makefile.msc -- Suport i686 and amd64 assembler builds in CMakeLists.txt +- Support i686 and amd64 assembler builds in CMakeLists.txt - Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h - Add vc11 and vc12 build files to contrib/vstudio - Add gzvprintf() as an undocumented function in zlib @@ -194,7 +194,7 @@ Changes in 1.2.5.2 (17 Dec 2011) - Add a transparent write mode to gzopen() when 'T' is in the mode - Update python link in zlib man page - Get inffixed.h and MAKEFIXED result to match -- Add a ./config --solo option to make zlib subset with no libary use +- Add a ./config --solo option to make zlib subset with no library use - Add undocumented inflateResetKeep() function for CAB file decoding - Add --cover option to ./configure for gcc coverage testing - Add #define ZLIB_CONST option to use const in the z_stream interface @@ -260,7 +260,7 @@ Changes in 1.2.5.1 (10 Sep 2011) - Check that pointers fit in ints when gzprint() compiled old style - Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler] - Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt] -- Add debug records in assmebler code [Londer] +- Add debug records in assembler code [Londer] - Update RFC references to use http://tools.ietf.org/html/... [Li] - Add --archs option, use of libtool to configure for Mac OS X [Borstel] @@ -927,7 +927,7 @@ Changes in 1.2.0.1 (17 March 2003) - Include additional header file on VMS for off_t typedef - Try to use _vsnprintf where it supplants vsprintf [Vollant] - Add some casts in inffast.c -- Enchance comments in zlib.h on what happens if gzprintf() tries to +- Enhance comments in zlib.h on what happens if gzprintf() tries to write more than 4095 bytes before compression - Remove unused state from inflateBackEnd() - Remove exit(0) from minigzip.c, example.c @@ -1461,7 +1461,7 @@ Changes in 0.4: - renamed deflateOptions as deflateInit2, call one or the other but not both - added the method parameter for deflateInit2. - added inflateInit2 -- simplied considerably deflateInit and inflateInit by not supporting +- simplified considerably deflateInit and inflateInit by not supporting user-provided history buffer. This is supported only in deflateInit2 and inflateInit2. diff --git a/zlib/README b/zlib/README index 5ca9d127e..3807077e0 100644 --- a/zlib/README +++ b/zlib/README @@ -64,7 +64,7 @@ Notes for some targets: - zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works when compiled with cc. -- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is +- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is necessary to get gzprintf working correctly. This is done by configure. - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with diff --git a/zlib/deflate.c b/zlib/deflate.c index 52fc3c046..507f85443 100644 --- a/zlib/deflate.c +++ b/zlib/deflate.c @@ -1540,7 +1540,7 @@ local void fill_window(deflate_state *s) * Copy without compression as much as possible from the input stream, return * the current block state. * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used + * incompressible data is probably not useful. This function is used * only for the level=0 compression option. * NOTE: this function should be optimized to avoid extra copying from * window to pending_buf. diff --git a/zlib/inftrees.h b/zlib/inftrees.h index baa53a0b1..f53665311 100644 --- a/zlib/inftrees.h +++ b/zlib/inftrees.h @@ -38,7 +38,7 @@ typedef struct { /* Maximum size of the dynamic table. The maximum number of code structures is 1444, which is the sum of 852 for literal/length codes and 592 for distance codes. These values were found by exhaustive searches using the program - examples/enough.c found in the zlib distribtution. The arguments to that + examples/enough.c found in the zlib distribution. The arguments to that program are the number of symbols, the initial root table size, and the maximum bit length of a code. "enough 286 9 15" for literal/length codes returns returns 852, and "enough 30 6 15" for distance codes returns 592. diff --git a/zlib/trees.c b/zlib/trees.c index 0f7a5cd9e..838043ed6 100644 --- a/zlib/trees.c +++ b/zlib/trees.c @@ -311,7 +311,7 @@ local void tr_static_init(void) } /* =========================================================================== - * Genererate the file trees.h describing the static trees. + * Generate the file trees.h describing the static trees. */ #ifdef GEN_TREES_H # ifndef DEBUG diff --git a/zlib/zlib.h b/zlib/zlib.h index c4536ca7d..739a396c2 100644 --- a/zlib/zlib.h +++ b/zlib/zlib.h @@ -488,7 +488,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); instead use raw inflate, see inflateInit2() below, or inflateBack() and perform their own processing of the gzip header and trailer. When processing gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - producted so far. The CRC-32 is checked against the gzip trailer. + produced so far. The CRC-32 is checked against the gzip trailer. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has @@ -849,7 +849,7 @@ ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, to dictionary. dictionary must have enough space, where 32768 bytes is always enough. If inflateGetDictionary() is called with dictionary equal to Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. + Similarly, if dictLength is Z_NULL, then it is not set. inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the stream state is inconsistent. @@ -1419,7 +1419,7 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); If the flush parameter is Z_FINISH, the remaining data is written and the gzip stream is completed in the output. If gzwrite() is called again, a new gzip stream will be started in the output. gzread() is able to read such - concatented gzip streams. + concatenated gzip streams. gzflush should be called only when strictly necessary because it will degrade compression if called too often. From 7a3849d07efb661ce8a181443a4686f1123ac735 Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 15:06:05 +0200 Subject: [PATCH 06/13] Correct transform_arg initializer and shellcheck --- install-sh | 75 +++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/install-sh b/install-sh index 3587aeac4..70009895f 100755 --- a/install-sh +++ b/install-sh @@ -10,6 +10,7 @@ # This script is compatible with the BSD install script, but was written # from scratch. # +# shellcheck disable=2086 # set DOITPROG to echo to test this script @@ -30,7 +31,7 @@ rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" -transform_arg="" +transformarg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" @@ -42,7 +43,7 @@ src="" dst="" dir_arg="" -while [ x"$1" != x ]; do +while [ "$1" != "" ]; do case $1 in -c) instcmd="$cpprog" shift @@ -71,15 +72,15 @@ while [ x"$1" != x ]; do shift continue ;; - -t=*) transformarg=`echo $1 | sed 's/-t=//'` + -t=*) transformarg=$(echo "$1" | sed 's/-t=//') shift continue ;; - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + -b=*) transformbasename=$(echo "$1" | sed 's/-b=//') shift continue ;; - *) if [ x"$src" = x ] + *) if [ "$src" = "" ] then src=$1 else @@ -92,7 +93,7 @@ while [ x"$1" != x ]; do esac done -if [ x"$src" = x ] +if [ "$src" = "" ] then echo "install: no input file specified" exit 1 @@ -100,14 +101,14 @@ else true fi -if [ x"$dir_arg" != x ]; then - dst=$src +if [ "$dir_arg" != "" ]; then + dst="$src" src="" - if [ -d $dst ]; then - instcmd=: + if [ -d "$dst" ]; then + instcmd=":" else - instcmd=mkdir + instcmd="mkdir" fi else @@ -115,7 +116,7 @@ else # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. - if [ -f $src ] || [ -d $src ] + if [ -f "$src" ] || [ -d "$src" ] then true else @@ -123,7 +124,7 @@ else exit 1 fi - if [ x"$dst" = x ] + if [ "$dst" = "" ] then echo "install: no destination specified" exit 1 @@ -134,16 +135,16 @@ else # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic - if [ -d $dst ] + if [ -d "$dst" ] then - dst="$dst"/`basename $src` + dst="$dst"/$(basename "$src") else true fi fi ## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` +dstdir=$(echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,') # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script @@ -157,7 +158,8 @@ if [ ! -d "$dstdir" ]; then oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' - set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` + # shellcheck disable=2046 + set - $(echo "${dstdir}" | sed -e 's@/@%@g' -e 's@^%@/@') IFS="${oIFS}" pathcomp='' @@ -177,31 +179,30 @@ if [ ! -d "$dstdir" ]; then done fi -if [ x"$dir_arg" != x ] +if [ "$dir_arg" != "" ] then - $doit $instcmd $dst && + $doit $instcmd "$dst" && - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi + if [ "$chowncmd" != "" ]; then $doit $chowncmd "$dst"; else true ; fi && + if [ "$chgrpcmd" != "" ]; then $doit $chgrpcmd "$dst"; else true ; fi && + if [ "$stripcmd" != "" ]; then $doit $stripcmd "$dst"; else true ; fi && + if [ "$chmodcmd" != "" ]; then $doit $chmodcmd "$dst"; else true ; fi else # If we're going to rename the final executable, determine the name now. - if [ x"$transformarg" = x ] + if [ "$transformarg" = "" ] then - dstfile=`basename $dst` + dstfile=$(basename "$dst") else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$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 [ "$dstfile" = "" ] then - dstfile=`basename $dst` + dstfile=$(basename "$dst") else true fi @@ -212,9 +213,9 @@ else # Move or copy the file name to the temp name - $doit $instcmd $src $dsttmp && + $doit $instcmd "$src" "$dsttmp" && - trap "rm -f ${dsttmp}" 0 && + trap 'rm -f "${dsttmp}"' 0 && # and set any options; do chmod last to preserve setuid bits @@ -222,15 +223,15 @@ else # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + if [ "$chowncmd" != "" ]; then $doit $chowncmd "$dsttmp"; else true;fi && + if [ "$chgrpcmd" != "" ]; then $doit $chgrpcmd "$dsttmp"; else true;fi && + if [ "$stripcmd" != "" ]; then $doit $stripcmd "$dsttmp"; else true;fi && + if [ "$chmodcmd" != "" ]; then $doit $chmodcmd "$dsttmp"; else true;fi && # Now rename the file to the real destination. - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + $doit $rmcmd -f "$dstdir"/"$dstfile" && + $doit $mvcmd "$dsttmp" "$dstdir"/"$dstfile" fi && From 42309fc6f7145d53301f70941ced0d5f881001e9 Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 15:10:56 +0200 Subject: [PATCH 07/13] Fix shellcheck notices --- cmd-or-msg | 4 +-- configure | 8 +++--- maybe-make-man | 6 ++--- mkgitver | 6 ++--- packaging/prep-auto-dir | 6 ++--- packaging/smart-make | 6 ++--- packaging/solaris/build_pkg.sh | 46 +++++++++++++++++----------------- prepare-source | 10 ++++---- rsync-ssl | 12 ++++----- rsync-web/bin/badge-update | 2 +- rsync-web/bin/upload | 2 +- rsync-web/rsync-debug | 1 + support/deny-rsync | 2 +- support/instant-rsyncd | 10 ++++---- support/lsh.sh | 5 ++-- support/rsync-no-vanished | 4 +-- 16 files changed, 66 insertions(+), 64 deletions(-) diff --git a/cmd-or-msg b/cmd-or-msg index d4ebaad41..4505a867e 100755 --- a/cmd-or-msg +++ b/cmd-or-msg @@ -1,11 +1,11 @@ #!/bin/sh -srcdir=`dirname $0` +srcdir=$(dirname "$0") opt="$1" shift echo "$*" if ! "${@}"; then - echo "If you can't fix the issue, re-run $srcdir/configure with --$opt." + echo "If you can't fix the issue, re-run ${srcdir}/configure with --${opt}." exit 1 fi diff --git a/configure b/configure index d6cdc0950..70304b554 100755 --- a/configure +++ b/configure @@ -3,14 +3,14 @@ # if not, it tries to fetch rsync's generated files or build them. We # then transfer control to the configure.sh script to do the real work. -dir=`dirname $0` -if test x"$dir" = x; then +dir=$(dirname "$0") +if test "$dir" = ""; then dir=. fi if test "$dir" = '.'; then - branch=`packaging/prep-auto-dir` || exit 1 - if test x"$branch" != x; then + branch=$(packaging/prep-auto-dir) || exit 1 + if test "$branch" != ""; then cd build || exit 1 dir=.. fi diff --git a/maybe-make-man b/maybe-make-man index f0fafca27..3f8232128 100755 --- a/maybe-make-man +++ b/maybe-make-man @@ -6,16 +6,16 @@ if [ $# != 1 ]; then fi inname="$1" -srcdir=`dirname "$0"` +srcdir=$(dirname "$0") flagfile="$srcdir/.md2man-works" force_flagfile="$srcdir/.md2man-force" if [ ! -f "$flagfile" ]; then # We test our smallest manpage just to see if the python setup works. if "$srcdir/md-convert" --test "$srcdir/rsync-ssl.1.md" >/dev/null 2>&1; then - touch $flagfile + touch "$flagfile" else - outname=`basename "$inname" .md` + outname=$(basename "$inname" .md) if [ -f "$outname" ]; then exit 0 elif [ -f "$srcdir/$outname" ]; then diff --git a/mkgitver b/mkgitver index 9a938704f..ce8be83b1 100755 --- a/mkgitver +++ b/mkgitver @@ -1,15 +1,15 @@ #!/bin/sh -srcdir=`dirname $0` +srcdir=$(dirname "$0") if [ ! -f git-version.h ]; then touch git-version.h fi if test -d "$srcdir/.git" || test -f "$srcdir/.git"; then - gitver=`git describe --abbrev=8 2>/dev/null` + gitver=$(git describe --abbrev=8 2>/dev/null) # NOTE: I'm avoiding "|" in sed since I'm not sure if sed -r is portable and "\|" fails on some OSes. - verchk=`echo "$gitver-" | sed -n '/^v3\.[0-9][0-9]*\.[0-9][0-9]*\(pre[0-9]*\)*-/p'` + verchk=$(echo "$gitver-" | sed -n '/^v3\.[0-9][0-9]*\.[0-9][0-9]*\(pre[0-9]*\)*-/p') if [ -n "$verchk" ]; then echo "#define RSYNC_GITVER \"$gitver\"" >git-version.h.new if ! diff git-version.h.new git-version.h >/dev/null; then diff --git a/packaging/prep-auto-dir b/packaging/prep-auto-dir index 04c98f882..c91be930b 100755 --- a/packaging/prep-auto-dir +++ b/packaging/prep-auto-dir @@ -14,14 +14,14 @@ auto_top='auto-build-save' if test -d $auto_top && test -d .git; then - desired_branch=`git rev-parse --abbrev-ref HEAD | tr / %` + desired_branch=$(git rev-parse --abbrev-ref HEAD | tr / %) if test "$desired_branch" = HEAD; then echo "ERROR: switch to the right build dir manually when in detached HEAD mode." 1>&2 exit 1 fi auto_dir="$auto_top/$desired_branch" if test -d build; then - cur_branch=`readlink build/.branch` + cur_branch=$(readlink build/.branch) else cur_branch='/' fi @@ -39,5 +39,5 @@ if test -d $auto_top && test -d .git; then rm -f Makefile ln -s packaging/auto-Makefile Makefile fi - echo $desired_branch + echo "$desired_branch" fi diff --git a/packaging/smart-make b/packaging/smart-make index 7674156f9..bf7041062 100755 --- a/packaging/smart-make +++ b/packaging/smart-make @@ -4,8 +4,8 @@ set -e export LANG=C -branch=`packaging/prep-auto-dir` -if test x"$branch" = x; then +branch=$(packaging/prep-auto-dir) +if test "$branch" = ""; then srcdir=. else cd build @@ -40,6 +40,6 @@ fi make all -if test x"$1" = x"check"; then +if test "$1" = "check"; then make check fi diff --git a/packaging/solaris/build_pkg.sh b/packaging/solaris/build_pkg.sh index d93712b18..1d0450b56 100755 --- a/packaging/solaris/build_pkg.sh +++ b/packaging/solaris/build_pkg.sh @@ -20,7 +20,7 @@ PKGNAME=SMBrsync # but for now it is hard coded BASEDIR=/usr/local VERSION="2.5.5" -ARCH=`uname -p` +ARCH=$(uname -p) NAME=rsync # Definitions end here @@ -28,27 +28,27 @@ NAME=rsync ## Start by faking root install echo "Creating install directory (fake $BASEDIR)..." -START=`pwd` -FAKE_ROOT=$START/${PKGNAME} -mkdir $FAKE_ROOT +START=$(pwd) +FAKE_ROOT="$START"/"${PKGNAME}" +mkdir "$FAKE_ROOT" # copy the binary and the man page to their places -mkdir $FAKE_ROOT/bin -mkdir -p $FAKE_ROOT/doc/rsync -mkdir -p $FAKE_ROOT/man/man1 -mkdir -p $FAKE_ROOT/man/man5 +mkdir "$FAKE_ROOT"/bin +mkdir -p "$FAKE_ROOT"/doc/rsync +mkdir -p "$FAKE_ROOT"/man/man1 +mkdir -p "$FAKE_ROOT"/man/man5 -cp ../../../rsync $FAKE_ROOT/bin/rsync -cp ../../../rsync.1 $FAKE_ROOT/man/man1/rsync.1 -cp ../../../rsyncd.conf.5 $FAKE_ROOT/man/man5/rsyncd.conf.5 -cp ../../../README.md $FAKE_ROOT/doc/rsync/README.md -cp ../../../COPYING $FAKE_ROOT/doc/rsync/COPYING -cp ../../../tech_report.pdf $FAKE_ROOT/doc/rsync/tech_report.pdf -cp ../../../COPYING $FAKE_ROOT/COPYING +cp ../../../rsync "$FAKE_ROOT"/bin/rsync +cp ../../../rsync.1 "$FAKE_ROOT"/man/man1/rsync.1 +cp ../../../rsyncd.conf.5 "$FAKE_ROOT"/man/man5/rsyncd.conf.5 +cp ../../../README.md "$FAKE_ROOT"/doc/rsync/README.md +cp ../../../COPYING "$FAKE_ROOT"/doc/rsync/COPYING +cp ../../../tech_report.pdf "$FAKE_ROOT"/doc/rsync/tech_report.pdf +cp ../../../COPYING "$FAKE_ROOT"/COPYING ## Build info file echo "Building pkginfo file..." -cat > $FAKE_ROOT/pkginfo << EOF_INFO +cat > "$FAKE_ROOT"/pkginfo << EOF_INFO PKG=$PKGNAME NAME=$NAME DESC="Program for efficient remote updates of files." @@ -61,7 +61,7 @@ CLASSES=none EOF_INFO ## Build prototype file -cat > $FAKE_ROOT/prototype << EOFPROTO +cat > "$FAKE_ROOT"/prototype << EOFPROTO i copyright=COPYING i pkginfo=pkginfo d none bin 0755 bin bin @@ -81,13 +81,13 @@ EOFPROTO ## And now build the package. OUTPUTFILE=$PKGNAME-$VERSION-sol8-$ARCH-local.pkg echo "Building package.." -echo FAKE_ROOT = $FAKE_ROOT -cd $FAKE_ROOT +echo "FAKE_ROOT = $FAKE_ROOT" +cd "$FAKE_ROOT" || exit pkgmk -d . -r . -f ./prototype -o -pkgtrans -os . $OUTPUTFILE $PKGNAME +pkgtrans -os . "$OUTPUTFILE" "$PKGNAME" -mv $OUTPUTFILE .. -cd .. +mv "$OUTPUTFILE" .. +cd .. || exit # Comment this out if you want to see, which file structure has been created -rm -rf $FAKE_ROOT +rm -rf "$FAKE_ROOT" diff --git a/prepare-source b/prepare-source index 6f9d53b85..bf06026e4 100755 --- a/prepare-source +++ b/prepare-source @@ -11,14 +11,14 @@ # # The script stops after the first successful action. -dir=`dirname $0` -if test x"$dir" = x; then +dir=$(dirname "$0") +if test "$dir" = ""; then dir=. fi if test "$dir" = '.'; then - branch=`packaging/prep-auto-dir` || exit 1 - if test x"$branch" != x; then + branch=$(packaging/prep-auto-dir) || exit 1 + if test "$branch" != ""; then cd build || exit 1 dir=.. fi @@ -51,7 +51,7 @@ for action in "${@}"; do else match='[ca]*' fi - $dir/rsync-ssl -iipc --no-motd "rsync://download.samba.org/rsyncftp/generated-files/$match" ./ + "$dir"/rsync-ssl -iipc --no-motd "rsync://download.samba.org/rsyncftp/generated-files/$match" ./ test $? != 0 && continue sleep 1 # The following files need to be newer than aclocal.m4 touch configure.sh config.h.in diff --git a/rsync-ssl b/rsync-ssl index 64379b954..9bda2b1eb 100755 --- a/rsync-ssl +++ b/rsync-ssl @@ -31,7 +31,7 @@ function rsync_ssl_run { function rsync_ssl_helper { if [[ -z "$RSYNC_SSL_TYPE" ]]; then - found=`path_search openssl stunnel4 stunnel` || exit 1 + found=$(path_search openssl stunnel4 stunnel) || exit 1 if [[ "$found" == */openssl ]]; then RSYNC_SSL_TYPE=openssl RSYNC_SSL_OPENSSL="$found" @@ -47,19 +47,19 @@ function rsync_ssl_helper { case "$RSYNC_SSL_TYPE" in openssl) if [[ -z "$RSYNC_SSL_OPENSSL" ]]; then - RSYNC_SSL_OPENSSL=`path_search openssl` || exit 1 + RSYNC_SSL_OPENSSL=$(path_search openssl) || exit 1 fi optsep=' ' ;; gnutls) if [[ -z "$RSYNC_SSL_GNUTLS" ]]; then - RSYNC_SSL_GNUTLS=`path_search gnutls-cli` || exit 1 + RSYNC_SSL_GNUTLS=$(path_search gnutls-cli) || exit 1 fi optsep=' ' ;; stunnel) if [[ -z "$RSYNC_SSL_STUNNEL" ]]; then - RSYNC_SSL_STUNNEL=`path_search stunnel4 stunnel` || exit 1 + RSYNC_SSL_STUNNEL=$(path_search stunnel4 stunnel) || exit 1 fi optsep=' = ' ;; @@ -137,9 +137,9 @@ function rsync_ssl_helper { fi if [[ $RSYNC_SSL_TYPE == openssl ]]; then - exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt $keyopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port + exec $RSYNC_SSL_OPENSSL s_client "$caopt" "$certopt" "$keyopt" -quiet -verify_quiet -servername "$hostname" -verify_hostname "$hostname" -connect "$hostname:$port" elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then - exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_key_opt $gnutls_opts $hostname:$port + exec $RSYNC_SSL_GNUTLS --logfile=/dev/null "$gnutls_cert_opt" "$gnutls_key_opt" "$gnutls_opts" "$hostname:$port" else # devzero@web.de came up with this no-tmpfile calling syntax: exec $RSYNC_SSL_STUNNEL -fd 10 11<&0 < \035 function byte_escape { - echo -ne "\\0$(printf "%o" $1)" + echo -ne "\\0$(printf "%o" "$1")" } msg="$1" diff --git a/support/instant-rsyncd b/support/instant-rsyncd index 5f262865f..d262b0a0d 100755 --- a/support/instant-rsyncd +++ b/support/instant-rsyncd @@ -20,7 +20,7 @@ echo echo "This will setup an rsync daemon in $dir" if [ $# = 0 ]; then - IFS='' read -p 'Module name to create (or return to exit): ' module + IFS='' read -r -p 'Module name to create (or return to exit): ' module [ ! "$module" ] && exit else module="$1" @@ -28,7 +28,7 @@ else fi if [ $# = 0 ]; then - IFS='' read -p 'Port number the daemon should listen on [873]: ' port + IFS='' read -r -p 'Port number the daemon should listen on [873]: ' port else port="$1" shift @@ -36,14 +36,14 @@ fi [ "$port" ] || port=873 if [ $# = 0 ]; then - IFS='' read -p 'User name for authentication (empty for none): ' user + IFS='' read -r -p 'User name for authentication (empty for none): ' user else user="$1" shift fi if [ "$user" ]; then - IFS='' read -s -p 'Desired password: ' password + IFS='' read -r -s -p 'Desired password: ' password echo fi @@ -117,7 +117,7 @@ if ./start; then echo "Let's test the daemon now." fi echo - echo '$' $rsync --list-only "$path" + echo '$' "$rsync" --list-only "$path" $rsync --list-only "$path" echo echo "You should see an empty folder; it's $moduledir." diff --git a/support/lsh.sh b/support/lsh.sh index 8ea009206..afb316263 100755 --- a/support/lsh.sh +++ b/support/lsh.sh @@ -13,7 +13,7 @@ do_cd=y # Default path is user's home dir (just like ssh) unless host is "lh". while : ; do case "$1" in -l) user="$2"; shift; shift ;; - -l*) user=`echo "$1" | sed 's/^-l//'`; shift ;; + -l*) user=$(echo "$1" | sed 's/^-l//'); shift ;; --no-cd) do_cd=n; shift ;; -*) shift ;; localhost) shift; break ;; @@ -25,7 +25,7 @@ done if [ "$user" ]; then prefix='' if [ $do_cd = y ]; then - home=`perl -e "print((getpwnam('$user'))[7])"` + home=$(perl -e "print((getpwnam('$user'))[7])") prefix="cd '$home' &&" fi sudo -H -u "$user" sh -c "$prefix $*" @@ -33,5 +33,6 @@ else if [ $do_cd = y ]; then cd || exit 1 fi + # shellcheck disable=2294 eval "${@}" fi diff --git a/support/rsync-no-vanished b/support/rsync-no-vanished index 25ee7467a..500cfc72d 100755 --- a/support/rsync-no-vanished +++ b/support/rsync-no-vanished @@ -17,8 +17,8 @@ set -o pipefail # This filters stderr without merging it with stdout: { $REAL_RSYNC "${@}" 2>&1 1>&3 3>&- | grep -E -v "$IGNOREOUT"; ret=${PIPESTATUS[0]}; } 3>&1 1>&2 -if [[ $ret == $IGNOREEXIT ]]; then +if [[ $ret == "$IGNOREEXIT" ]]; then ret=0 fi -exit $ret +exit "$ret" From 9bdfaf50b8d6a3594e494bc76faad4e50a40f4ea Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 15:44:52 +0200 Subject: [PATCH 08/13] Use backticks, code types and 'mdformat' --- INSTALL.md | 385 ++++++++++++++++++++++++++++------------------------- 1 file changed, 204 insertions(+), 181 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 8beb68c0d..035096841 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,74 +1,77 @@ # How to build and install rsync When building rsync, you'll want to install various libraries in order to get -all the features enabled. The configure script will alert you when the -newest libraries are missing and tell you the appropriate `--disable-LIB` -option to use if you want to just skip that feature. What follows are various -support libraries that you may want to install to build rsync with the maximum -features (the impatient can skip down to the package summary): +all the features enabled. The configure script will alert you when the newest +libraries are missing and tell you the appropriate `--disable-LIB` option to use +if you want to just skip that feature. What follows are various support +libraries that you may want to install to build rsync with the maximum features +(the impatient can skip down to the package summary): ## Ubuntu users: skip the build, use the PPA -If you are on a currently supported Ubuntu series (jammy 22.04 LTS, noble -24.04 LTS, questing 25.10, resolute 26.04 LTS) and just want the latest -upstream rsync, the rsync project maintains a Launchpad PPA that tracks -stable releases: +If you are on a currently supported Ubuntu series (jammy 22.04 LTS, noble 24.04 +LTS, questing 25.10, resolute 26.04 LTS) and just want the latest upstream +rsync, the rsync project maintains a Launchpad PPA that tracks stable releases: -> sudo add-apt-repository ppa:rsyncproject/rsync -> sudo apt update && sudo apt install rsync +> ```bash +> sudo add-apt-repository ppa:rsyncproject/rsync +> sudo apt update && sudo apt install rsync +> ``` See [the PPA page][ppa] for current build status across architectures. -[ppa]: https://launchpad.net/~rsyncproject/+archive/ubuntu/rsync - -To test the upcoming release instead, there is also a [`rsync-latest` -PPA][ppa-latest] that is rebuilt from the tip of the git master branch. These -are development snapshots whose version numbers (such as +To test the upcoming release instead, there is also a +[`rsync-latest` PPA][ppa-latest] that is rebuilt from the tip of the git master +branch. These are development snapshots whose version numbers (such as `3.5.0~git20260601...`) deliberately sort below the matching stable release, so the stable PPA above will never silently move you from a release onto a -snapshot. Use it for testing only -- it may contain unreleased changes: - -> sudo add-apt-repository ppa:rsyncproject/rsync-latest -> sudo apt update && sudo apt install rsync +snapshot. Use it for testing only -- it may contain unreleased changes: -[ppa-latest]: https://launchpad.net/~rsyncproject/+archive/ubuntu/rsync-latest +> ```bash +> sudo add-apt-repository ppa:rsyncproject/rsync-latest +> sudo apt update && sudo apt install rsync +> ``` The rest of this document covers building from source. ## The basic setup You need to have a C compiler installed and optionally a C++ compiler in order -to try to build some hardware-accelerated checksum routines. Rsync also needs -a modern awk, which might be provided via gawk or nawk on some OSes. +to try to build some hardware-accelerated checksum routines. Rsync also needs a +modern awk, which might be provided via gawk or nawk on some OSes. ## Autoconf & manpages If you're installing from the git repo (instead of a release tar file) you'll also need the GNU autotools (autoconf & automake) and your choice of 2 python3 -markdown libraries: cmarkgfm or commonmark (needed to generate the manpages). -If your OS doesn't provide a python3-cmarkgfm or python3-commonmark package, -you can run the following to install the commonmark python library for your -build user (after installing python3's pip package): +markdown libraries: cmarkgfm or commonmark (needed to generate the manpages). If +your OS doesn't provide a python3-cmarkgfm or python3-commonmark package, you +can run the following to install the commonmark python library for your build +user (after installing python3's pip package): -> python3 -mpip install --user commonmark +> ```bash +> python3 -mpip install --user commonmark +> ``` You can test if you've got it fixed by running (from the rsync checkout): -> ./md-convert --test rsync-ssl.1.md +> ```bash +> ./md-convert --test rsync-ssl.1.md +> ``` Alternately, you can avoid generating the manpages by fetching the very latest versions (that match the latest git source) from the [generated-files][6] dir. One way to do that is to run: -> ./prepare-source fetchgen - -[6]: https://download.samba.org/pub/rsync/generated-files/ +> ```bash +> ./prepare-source fetchgen +> ``` ## ACL support -To support copying ACL file information, make sure you have an acl -development library installed. It also helps to have the helper programs -installed to manipulate ACLs and to run the rsync testsuite. +To support copying ACL file information, make sure you have an acl development +library installed. It also helps to have the helper programs installed to +manipulate ACLs and to run the rsync testsuite. ## Xattr support @@ -78,198 +81,218 @@ installed to manipulate xattrs and to run the rsync testsuite. ## xxhash -The [xxHash library][1] provides extremely fast checksum functions that can -make the "rsync algorithm" run much more quickly, especially when matching -blocks in large files. Installing this development library adds xxhash -checksums as the default checksum algorithm. You'll need at least v0.8.0 -if you want rsync to include the full range of its checksum algorithms. - -[1]: https://cyan4973.github.io/xxHash/ +The [xxHash library][1] provides extremely fast checksum functions that can make +the "rsync algorithm" run much more quickly, especially when matching blocks in +large files. Installing this development library adds xxhash checksums as the +default checksum algorithm. You'll need at least v0.8.0 if you want rsync to +include the full range of its checksum algorithms. ## zstd -The [zstd library][2] compression algorithm that uses less CPU than -the default zlib algorithm at the same compression level. Note that you -need at least version 1.4, so you might need to skip the zstd compression if -you can only install a 1.3 release. Installing this development library -adds zstd compression as the default compression algorithm. - -[2]: http://facebook.github.io/zstd/ +The [zstd library][2] compression algorithm that uses less CPU than the default +zlib algorithm at the same compression level. Note that you need at least +version 1.4, so you might need to skip the zstd compression if you can only +install a 1.3 release. Installing this development library adds zstd compression +as the default compression algorithm. ## lz4 -The [lz4 library][3] compression algorithm that uses very little CPU, though -it also has the smallest compression ratio of other algorithms. Installing -this development library adds lz4 compression as an available compression -algorithm. - -[3]: https://lz4.github.io/lz4/ +The [lz4 library][3] compression algorithm that uses very little CPU, though it +also has the smallest compression ratio of other algorithms. Installing this +development library adds lz4 compression as an available compression algorithm. ## openssl crypto The [openssl crypto library][4] provides some hardware accelerated checksum -algorithms for MD4 and MD5. Installing this development library makes rsync -use the (potentially) faster checksum routines when computing MD4 & MD5 -checksums. - -[4]: https://www.openssl.org/docs/man1.0.2/man3/crypto.html +algorithms for MD4 and MD5. Installing this development library makes rsync use +the (potentially) faster checksum routines when computing MD4 & MD5 checksums. ## Package summary To help you get the libraries installed, here are some package install commands -for various OSes. The commands are split up to correspond with the above -items, but feel free to combine the package names into a single install, if you -like. - - - For Debian and Ubuntu (Debian Buster users may want to briefly(?) enable - buster-backports to update zstd from 1.3 to 1.4): - - > sudo apt install -y gcc g++ gawk autoconf automake python3-cmarkgfm - > sudo apt install -y acl libacl1-dev - > sudo apt install -y attr libattr1-dev - > sudo apt install -y libxxhash-dev - > sudo apt install -y libzstd-dev - > sudo apt install -y liblz4-dev - > sudo apt install -y libssl-dev - -Or run support/install_deps_ubuntu.sh - - - For CentOS (use EPEL for python3-pip): - - > sudo yum -y install epel-release - > sudo yum -y install gcc g++ gawk autoconf automake python3-pip - > sudo yum -y install acl libacl-devel - > sudo yum -y install attr libattr-devel - > sudo yum -y install xxhash-devel - > sudo yum -y install libzstd-devel - > sudo yum -y install lz4-devel - > sudo yum -y install openssl-devel - > python3 -mpip install --user commonmark - - - For Fedora 33: - - > sudo dnf -y install acl libacl-devel - > sudo dnf -y install attr libattr-devel - > sudo dnf -y install xxhash-devel - > sudo dnf -y install libzstd-devel - > sudo dnf -y install lz4-devel - > sudo dnf -y install openssl-devel - - - For FreeBSD (this assumes that the python3 version is 3.7): - - > sudo pkg install -y autotools python3 py37-CommonMark - > sudo pkg install -y xxhash - > sudo pkg install -y zstd - > sudo pkg install -y liblz4 - - - For macOS: - - > brew install automake - > brew install xxhash - > brew install zstd - > brew install lz4 - > brew install openssl - - - For Cygwin (with all cygwin programs stopped, run the appropriate setup program from a cmd shell): - - > setup-x86_64 --quiet-mode -P make,gawk,autoconf,automake,gcc-core,python38,python38-pip - > setup-x86_64 --quiet-mode -P attr,libattr-devel - > setup-x86_64 --quiet-mode -P libzstd-devel - > setup-x86_64 --quiet-mode -P liblz4-devel - > setup-x86_64 --quiet-mode -P libssl-devel - - Sometimes cygwin has commonmark packaged and sometimes it doesn't. Now that - its python38 has stabilized, you could install python38-commonmark. Or just - avoid the issue by running this from a bash shell as your build user: - - > python3 -mpip install --user commonmark +for various OSes. The commands are split up to correspond with the above items, +but feel free to combine the package names into a single install, if you like. + +- For Debian and Ubuntu (Debian Buster users may want to briefly(?) enable + buster-backports to update zstd from 1.3 to 1.4): + + > ```bash + > sudo apt install -y gcc g++ gawk autoconf automake python3-cmarkgfm + > sudo apt install -y acl libacl1-dev + > sudo apt install -y attr libattr1-dev + > sudo apt install -y libxxhash-dev + > sudo apt install -y libzstd-dev + > sudo apt install -y liblz4-dev + > sudo apt install -y libssl-dev + > ``` + +Or run `support/install_deps_ubuntu.sh` + +- For CentOS (use EPEL for python3-pip): + + > ```bash + > sudo yum -y install epel-release + > sudo yum -y install gcc g++ gawk autoconf automake python3-pip + > sudo yum -y install acl libacl-devel + > sudo yum -y install attr libattr-devel + > sudo yum -y install xxhash-devel + > sudo yum -y install libzstd-devel + > sudo yum -y install lz4-devel + > sudo yum -y install openssl-devel + > python3 -mpip install --user commonmark + > ``` + +- For Fedora 33: + + > ```bash + > sudo dnf -y install acl libacl-devel + > sudo dnf -y install attr libattr-devel + > sudo dnf -y install xxhash-devel + > sudo dnf -y install libzstd-devel + > sudo dnf -y install lz4-devel + > sudo dnf -y install openssl-devel + > ``` + +- For FreeBSD (this assumes that the python3 version is 3.7): + + > ```bash + > sudo pkg install -y autotools python3 py37-CommonMark + > sudo pkg install -y xxhash + > sudo pkg install -y zstd + > sudo pkg install -y liblz4 + > ``` + +- For macOS: + + > ```bash + > brew install automake + > brew install xxhash + > brew install zstd + > brew install lz4 + > brew install openssl + > ``` + +- For Cygwin (with all cygwin programs stopped, run the appropriate setup + program from a cmd shell): + + > ```bash + > setup-x86_64 --quiet-mode -P make,gawk,autoconf,automake,gcc-core,python38,python38-pip + > setup-x86_64 --quiet-mode -P attr,libattr-devel + > setup-x86_64 --quiet-mode -P libzstd-devel + > setup-x86_64 --quiet-mode -P liblz4-devel + > setup-x86_64 --quiet-mode -P libssl-devel + > ``` + + Sometimes cygwin has commonmark packaged and sometimes it doesn't. Now that + its python38 has stabilized, you could install python38-commonmark. Or just + avoid the issue by running this from a bash shell as your build user: + + > ```bash + > python3 -mpip install --user commonmark + > ``` ## Build and install After installing the various libraries, you need to configure, build, and install the source: -> ./configure -> make -> sudo make install +> ```bash +> ./configure +> make +> sudo make install +> ``` -The default install path is /usr/local/bin, but you can set the installation -directory and other parameters using options to ./configure. To see them, use: +The default install path is `/usr/local/bin`, but you can set the installation +directory and other parameters using options to `./configure`. To see them, use: -> ./configure --help +> ```bash +> ./configure --help +> ``` Configure tries to figure out if the local system uses group "nobody" or -"nogroup" by looking in the /etc/group file. (This is only used for the -default group of an rsync daemon, which attempts to run with "nobody" -user and group permissions.) You can change the default user and group -for the daemon by editing the NOBODY_USER and NOBODY_GROUP defines in -config.h, or just override them in your /etc/rsyncd.conf file. - -As of 2.4.7, rsync uses Eric Troan's popt option-parsing library. A -cut-down copy of a recent release is included in the rsync distribution, -and will be used if there is no popt library on your build host, or if -the `--with-included-popt` option is passed to ./configure. - -If you configure using `--enable-maintainer-mode`, then rsync will try -to pop up an xterm on DISPLAY=:0 if it crashes. You might find this -useful, but it should be turned off for production builds. - -If you want to automatically use a separate "build" directory based on -the current git branch name, start with a pristine git checkout and run -"mkdir auto-build-save" before you run the first ./configure command. -That will cause a fresh build dir to spring into existence along with a -special Makefile symlink that allows you to run "make" and "./configure" -from the source dir (the "build" dir gets auto switched based on branch). -This is helpful when using the branch-from-patch and patch-update scripts -to maintain the official rsync patches. If you ever need to build from -a "detached head" git position then you'll need to manually chdir into -the build dir to run make. I also like to create 2 more symlinks in the -source dir: `ln -s build/rsync . ; ln -s build/testtmp .` +"nogroup" by looking in the `/etc/group` file. (This is only used for the +default group of an rsync daemon, which attempts to run with "nobody" user and +group permissions.) You can change the default user and group for the daemon by +editing the NOBODY_USER and NOBODY_GROUP defines in `config.h`, or just override +them in your `/etc/rsyncd.conf` file. + +As of 2.4.7, rsync uses Eric Troan's popt option-parsing library. A cut-down +copy of a recent release is included in the rsync distribution, and will be used +if there is no popt library on your build host, or if the `--with-included-popt` +option is passed to `./configure`. + +If you configure using `--enable-maintainer-mode`, then rsync will try to pop up +an `xterm` on `DISPLAY=:0` if it crashes. You might find this useful, but it +should be turned off for production builds. + +If you want to automatically use a separate `build` directory based on the +current git branch name, start with a pristine `git checkout` and run +`mkdir auto-build-save` before you run the first `./configure command`. That +will cause a fresh build dir to spring into existence along with a special +Makefile symlink that allows you to run `make` and `./configure` from the source +dir (the `build` dir gets auto switched based on branch). This is helpful when +using the branch-from-patch and patch-update scripts to maintain the official +rsync patches. If you ever need to build from a "detached head" git position +then you'll need to manually chdir into the build dir to run make. I also like +to create 2 more symlinks in the source dir: +`ln -s build/rsync . ; ln -s build/testtmp .` ## Make compatibility -Note that Makefile.in has a rule that uses a wildcard in a prerequisite. If +Note that `Makefile.in` has a rule that uses a wildcard in a prerequisite. If your make has a problem with this rule, you will see an error like this: - Don't know how to make ./*.c +```plaintext +Don't know how to make ./*.c +``` -You can change the "proto.h-tstamp" target in Makefile.in to list all the \*.c +You can change the `proto.h-tstamp` target in Makefile.in to list all the `*.c` filenames explicitly in order to avoid this issue. ## RPM notes -Under packaging you will find .spec files for several distributions. -The .spec file in packaging/lsb can be used for Linux systems that -adhere to the Linux Standards Base (e.g., RedHat and others). +Under packaging you will find `.spec` files for several distributions. The +`.spec` file in `packaging/lsb` can be used for Linux systems that adhere to the +Linux Standards Base (e.g., RedHat and others). ## HP-UX notes -The HP-UX 10.10 "bundled" C compiler seems not to be able to cope with -ANSI C. You may see this error message in config.log if ./configure -fails: +The HP-UX 10.10 "bundled" C compiler seems not to be able to cope with ANSI C. +You may see this error message in config.log if `./configure` fails: - (Bundled) cc: "configure", line 2162: error 1705: Function prototypes are an ANSI feature. +```plaintext +(Bundled) cc: "configure", line 2162: error 1705: Function prototypes are an ANSI feature. +``` Install gcc or HP's "ANSI/C Compiler". ## Mac OS X notes -Some versions of Mac OS X (Darwin) seem to have an IPv6 stack, but do -not completely implement the "New Sockets" API. - -[This site][5] says that Apple started to support IPv6 in 10.2 (Jaguar). If -your build fails, try again after running configure with `--disable-ipv6`. +Some versions of Mac OS X (Darwin) seem to have an IPv6 stack, but do not +completely implement the "New Sockets" API. -Apple Silicon macs may install packages in a slightly different location and require flags. -CFLAGS="-I /opt/homebrew/include" LDFLAGS="-L /opt/homebrew/lib" +[This site][5] says that Apple started to support IPv6 in 10.2 (Jaguar). If your +build fails, try again after running configure with `--disable-ipv6`. -[5]: http://www.ipv6.org/impl/mac.html +Apple Silicon macs may install packages in a slightly different location and +require flags. `CFLAGS="-I /opt/homebrew/include" LDFLAGS="-L /opt/homebrew/lib"` ## IBM AIX notes -IBM AIX has a largefile problem with mkstemp. See IBM PR-51921. -The workaround is to append the following to config.h: +IBM AIX has a largefile problem with mkstemp. See IBM PR-51921. The workaround +is to append the following to config.h: + +> ```c +> #ifdef _LARGE_FILES +> #undef HAVE_SECURE_MKSTEMP +> #endif +> ``` -> #ifdef _LARGE_FILES -> #undef HAVE_SECURE_MKSTEMP -> #endif +[1]: https://cyan4973.github.io/xxHash/ +[2]: http://facebook.github.io/zstd/ +[3]: https://lz4.github.io/lz4/ +[4]: https://www.openssl.org/docs/man1.0.2/man3/crypto.html +[5]: http://www.ipv6.org/impl/mac.html +[6]: https://download.samba.org/pub/rsync/generated-files/ +[ppa]: https://launchpad.net/~rsyncproject/+archive/ubuntu/rsync +[ppa-latest]: https://launchpad.net/~rsyncproject/+archive/ubuntu/rsync-latest From 6d25cbd8422dbca31447601d1cfd5b3c2346a690 Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 17:23:06 +0200 Subject: [PATCH 09/13] Fix: error (memleakOnRealloc): Common realloc mistake: 'b' nulled but not freed upon failure --- popt/poptint.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/popt/poptint.c b/popt/poptint.c index 0ce155959..1ba19600a 100644 --- a/popt/poptint.c +++ b/popt/poptint.c @@ -161,7 +161,8 @@ POPT_fprintf (FILE * stream, const char * format, ...) * to do with whether the final '\0' is counted (or not). The code * below already adds +1 for the (possibly already counted) trailing NUL. */ - while ((b = realloc(b, nb+1)) != NULL) { + while ((ob = realloc(b, nb+1)) != NULL) { + b = ob; /* reallocation was successful */ va_start(ap, format); rc = vsnprintf(b, nb, format, ap); va_end(ap); @@ -173,6 +174,11 @@ POPT_fprintf (FILE * stream, const char * format, ...) nb += (nb < (size_t)100 ? (size_t)100 : nb); ob = b; } + if (ob == NULL && b != NULL) { + /* Re-alloc failed, free memory */ + free(b); + b = NULL; + } #endif rc = 0; From 491397f77c4cb0cb1c1b869b7f2d592ffbbb6b4e Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 18:41:47 +0200 Subject: [PATCH 10/13] fix: cppcheck for base64 encoding and authentication checks - Add null check for user parameter - Make base64 encoding string constant --- authenticate.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/authenticate.c b/authenticate.c index b7f6ead93..c09bc3105 100644 --- a/authenticate.c +++ b/authenticate.c @@ -32,7 +32,7 @@ the result. ***************************************************************************/ void base64_encode(const char *buf, int len, char *out, int pad) { - char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + static const char * const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; int bit_offset, byte_offset, idx, i; const uchar *d = (const uchar *)buf; int bytes = (len*8 + 5)/6; @@ -105,7 +105,7 @@ static const char *check_secret(int module, const char *user, const char *group, const char *fname = lp_secrets_file(module); STRUCT_STAT st; int ok = 1; - int user_len = strlen(user); + int user_len = (user != NULL) ? strlen(user) : 0; int group_len = group ? strlen(group) : 0; char *err; FILE *fh; @@ -130,8 +130,8 @@ static const char *check_secret(int module, const char *user, const char *group, return "ignoring secrets file"; } - if (*user == '#') { - /* Reject attempt to match a comment. */ + if (user == NULL || *user == '#') { + /* Reject attempt to match a comment or empty string. */ fclose(fh); return "invalid username"; } @@ -173,7 +173,8 @@ static const char *check_secret(int module, const char *user, const char *group, static const char *getpassf(const char *filename) { STRUCT_STAT st; - char buffer[512], *p; + char buffer[512]; + const *p; int n; if (!filename) From 2913f9095b8af6afe7451aee04536d15ea2e4666 Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 18:50:00 +0200 Subject: [PATCH 11/13] :recycle: Fix memory leak in expand_vars function The function expand_vars was not properly handling the realloc result. The original code did not assign the realloc result to the buf pointer, which could lead to memory leaks. (Possibly out_of_memory() exits, but not sure in context). --- loadparm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/loadparm.c b/loadparm.c index 82faa70c0..85ef9b049 100644 --- a/loadparm.c +++ b/loadparm.c @@ -204,8 +204,10 @@ static char *expand_vars(const char *str) exit_cleanup(RERR_MALLOC); } - if (bufsize && (buf = realloc(buf, t - buf + 1)) == NULL) + if (bufsize && (t = realloc(buf, t - buf + 1)) == NULL) out_of_memory("expand_vars"); + else + buf = t; return buf; } From 3d6ef3001e24e5991a8d616fb1ffe79bb7175daf Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 18:57:28 +0200 Subject: [PATCH 12/13] qual: poptconfig.c fixes (cppcheck) - Change variable types from `char *` to `const char *` where appropriate (cppcheck) - Add temporary variable `new_b` for realloc to prevent potential issues --- popt/poptconfig.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/popt/poptconfig.c b/popt/poptconfig.c index 1c81f622a..79500c687 100644 --- a/popt/poptconfig.c +++ b/popt/poptconfig.c @@ -128,7 +128,8 @@ int poptReadFile(const char * fn, char ** bp, size_t * nbp, int flags) int fdno; char * b = NULL; off_t nb = 0; - char * s, * t, * se; + char * s, * t; + const char * se; int rc = POPT_ERROR_ERRNO; /* assume failure */ fdno = open(fn, O_RDONLY); @@ -277,8 +278,10 @@ static int poptConfigLine(poptContext con, char * line) /* Append remaining text to the interpolated file option text. */ if (*se != '\0') { size_t nse = strlen(se) + 1; - if ((b = realloc(b, (nb + nse))) == NULL) /* XXX can't happen */ + char *new_b = NULL; + if ((new_b = realloc(b, (nb + nse))) == NULL) /* XXX can't happen */ goto exit; + b = new_b; (void) stpcpy( stpcpy(&b[nb-1], " "), se); nb += nse; } @@ -341,7 +344,8 @@ static int poptConfigLine(poptContext con, char * line) int poptReadConfigFile(poptContext con, const char * fn) { - char * b = NULL, *be; + char * b = NULL; + const char *be; size_t nb = 0; const char *se; char *t = NULL, *te; @@ -436,7 +440,7 @@ int poptReadConfigFiles(poptContext con, const char * paths) int poptReadDefaultConfig(poptContext con, UNUSED(int useEnv)) { - char * home; + const char * home; struct stat sb; int rc = 0; /* assume success */ From 3bfb79f45a7d4895f3091056746a8ea0a7f78d4f Mon Sep 17 00:00:00 2001 From: MDW <--unset> Date: Sun, 7 Jun 2026 19:11:55 +0200 Subject: [PATCH 13/13] qual: Fix multiple 'obvious' cppcheck notices. --- access.c | 2 +- batch.c | 2 +- checksum.c | 2 +- clientserver.c | 13 +++++++------ compat.c | 12 ++++++------ exclude.c | 14 +++++++------- getgroups.c | 2 +- loadparm.c | 4 ++-- main.c | 6 +++--- options.c | 8 +++++--- popt/lookup3.c | 4 ++-- popt/popt.c | 14 ++++++++------ popt/popthelp.c | 4 ++-- popt/poptint.c | 4 ++-- testrun.c | 2 +- usage.c | 7 ++++--- util1.c | 6 +++--- zlib/inffast.c | 4 ++-- zlib/inflate.c | 8 ++++---- 19 files changed, 62 insertions(+), 56 deletions(-) diff --git a/access.c b/access.c index b924e0a34..da9c42718 100644 --- a/access.c +++ b/access.c @@ -112,7 +112,7 @@ static int match_address(const char *addr, char *tok) int bits; #endif char mask[16]; - char *a = NULL, *t = NULL; + const char *a = NULL, *t = NULL; if (!addr || !*addr) return 0; diff --git a/batch.c b/batch.c index 878b6dd1d..97d5f5c46 100644 --- a/batch.c +++ b/batch.c @@ -132,7 +132,7 @@ void check_batch_flags(void) tweaked_iconv = iconv_opt != NULL; #endif for (i = 0; flag_ptr[i]; i++) { - int set = batch_stream_flags & (1 << i) ? 1 : 0; + int set = (batch_stream_flags & (1 << i)) ? 1 : 0; if (*flag_ptr[i] != set) { if (i == 9) { rprintf(FERROR, diff --git a/checksum.c b/checksum.c index 24e46bfbb..0d8741a53 100644 --- a/checksum.c +++ b/checksum.c @@ -286,7 +286,7 @@ uint32 get_checksum1(char *buf1, int32 len) { int32 i; uint32 s1, s2; - schar *buf = (schar *)buf1; + const schar *buf = (schar *)buf1; s1 = s2 = 0; for (i = 0; i < (len-4); i+=4) { diff --git a/clientserver.c b/clientserver.c index cc59663ad..7370518f5 100644 --- a/clientserver.c +++ b/clientserver.c @@ -119,7 +119,8 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[], int argc, char *argv[]) { int fd, ret; - char *p, *user = NULL; + char *p; + const char *user = NULL; /* This is redundant with code in start_inband_exchange(), but this * short-circuits a problem in the client before we open a socket, @@ -156,7 +157,7 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int output_daemon_greeting(f_out, am_client); if (!am_client) { - char *motd = lp_motd_file(); + const char *motd = lp_motd_file(); if (motd && *motd) { FILE *f = fopen(motd, "r"); while (f && !feof(f)) { @@ -323,7 +324,7 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char } while ((p = strstr(p+1, line)) != NULL); } if (extra_chars) { - char *f = arg; + const char *f = arg; char *t = arg = new_array(char, strlen(arg) + extra_chars + 1); if (*f == '-') { *t++ = '.'; @@ -1155,9 +1156,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char * Without this, the socket would be in the wrong * state for the upcoming error message. */ if (!files_from) { - int i; - for (i = 0; i < argc; i++) { - if (strncmp(argv[i], "--files-from", 12) == 0) { + int arg_idx; + for (arg_idx = 0; arg_idx < argc; arg_idx++) { + if (strncmp(argv[arg_idx], "--files-from", 12) == 0) { files_from = ""; break; } diff --git a/compat.c b/compat.c index d1ca31614..4c076f7f1 100644 --- a/compat.c +++ b/compat.c @@ -184,7 +184,7 @@ void parse_compress_choice(int final_call) if (valid_compressions.negotiated_nni) do_compression = valid_compressions.negotiated_nni->num; else if (compress_choice) { - struct name_num_item *nni = get_nni_by_name(&valid_compressions, compress_choice, -1); + struct name_num_item const * const nni = get_nni_by_name(&valid_compressions, compress_choice, -1); if (!nni) { rprintf(FERROR, "unknown compress name: %s\n", compress_choice); exit_cleanup(RERR_UNSUPPORTED); @@ -292,7 +292,7 @@ static int parse_nni_str(struct name_num_obj *nno, const char *from, char *tobuf ch = '\0'; if (!ch || at_space) { if (tok) { - struct name_num_item *nni = get_nni_by_name(nno, tok, to - tok); + struct name_num_item const * const nni = get_nni_by_name(nno, tok, to - tok); if (nni && !nno->saw[nni->num]) { nno->saw[nni->num] = ++cnt; if (nni->main_nni) { @@ -743,11 +743,11 @@ void setup_protocol(int f_out,int f_in) do_negotiated_strings = 1; } /* The inc_recurse var MUST be set to 0 or 1. */ - inc_recurse = compat_flags & CF_INC_RECURSE ? 1 : 0; + inc_recurse = (compat_flags & CF_INC_RECURSE) ? 1 : 0; want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM); - proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0; - xfer_flags_as_varint = compat_flags & CF_VARINT_FLIST_FLAGS ? 1 : 0; - xmit_id0_names = compat_flags & CF_ID0_NAMES ? 1 : 0; + proper_seed_order = (compat_flags & CF_CHKSUM_SEED_FIX) ? 1 : 0; + xfer_flags_as_varint = (compat_flags & CF_VARINT_FLIST_FLAGS) ? 1 : 0; + xmit_id0_names = (compat_flags & CF_ID0_NAMES) ? 1 : 0; if (!xfer_flags_as_varint && preserve_crtimes) { fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --crtimes.\n"); exit_cleanup(RERR_PROTOCOL); diff --git a/exclude.c b/exclude.c index 24de64f85..c00f325e9 100644 --- a/exclude.c +++ b/exclude.c @@ -778,7 +778,7 @@ void *push_local_filters(const char *dir, unsigned int dirlen) push->mergelist_cnt = mergelist_cnt; for (i = 0; i < mergelist_cnt; i++) { - filter_rule *ex = mergelist_parents[i]; + const filter_rule *ex = mergelist_parents[i]; if (!ex) continue; memcpy(&push->mergelists[i], ex->u.mergelist, sizeof (filter_rule_list)); @@ -903,15 +903,15 @@ void change_local_filter_dir(const char *dname, int dlen, int dir_depth) static int rule_matches(const char *fname, filter_rule *ex, int name_flags) { int slash_handling, str_cnt = 0, anchored_match = 0; - int ret_match = ex->rflags & FILTRULE_NEGATE ? 0 : 1; + int ret_match = (ex->rflags & FILTRULE_NEGATE) ? 0 : 1; const char *p, *pattern = ex->pattern; const char *strings[16]; /* more than enough */ const char *name = fname + (*fname == '/'); - if (!*name || ex->elide == cur_elide_value) + if (!*name || (ex->elide == cur_elide_value)) return 0; - if (!(name_flags & NAME_IS_XATTR) ^ !(ex->rflags & FILTRULE_XATTR)) + if (!(name_flags & NAME_IS_XATTR) != !(ex->rflags & FILTRULE_XATTR)) return 0; if (!ex->u.slash_cnt && !(ex->rflags & FILTRULE_WILD2)) { @@ -1057,7 +1057,7 @@ int check_filter(filter_rule_list *listp, enum logcode code, } if (rule_matches(name, ent, name_flags)) { report_filter_result(code, name, ent, name_flags, listp->debug_type); - return ent->rflags & FILTRULE_INCLUDE ? 1 : -1; + return (ent->rflags & FILTRULE_INCLUDE) ? 1 : -1; } } @@ -1448,7 +1448,7 @@ void parse_filter_file(filter_rule_list *listp, const char *fname, const filter_ { FILE *fp; char line[BIGPATHBUFLEN]; - char *eob = line + sizeof line - 1; + const char *eob = line + sizeof line - 1; BOOL word_split = (template->rflags & FILTRULE_WORD_SPLIT) != 0; if (!fname || !*fname) @@ -1629,7 +1629,7 @@ static void send_rules(int f_out, filter_rule_list *flp) if (f_out < 0) continue; len = strlen(ent->pattern); - dlen = ent->rflags & FILTRULE_DIRECTORY ? 1 : 0; + dlen = (ent->rflags & FILTRULE_DIRECTORY) ? 1 : 0; if (!(plen + len + dlen)) continue; write_int(f_out, plen + len + dlen); diff --git a/getgroups.c b/getgroups.c index 8a37ed0b7..7739f81cc 100644 --- a/getgroups.c +++ b/getgroups.c @@ -23,7 +23,7 @@ int main(UNUSED(int argc), UNUSED(char *argv[])) { int n, i; - gid_t *list; + const gid_t *list; gid_t gid = MY_GID(); int gid_in_list = 0; diff --git a/loadparm.c b/loadparm.c index 85ef9b049..376974792 100644 --- a/loadparm.c +++ b/loadparm.c @@ -180,7 +180,7 @@ static char *expand_vars(const char *str) if (*f == '%' && isUpper(f+1)) { const char *percent = strchr(f+1, '%'); if (percent && percent - f < bufsize) { - char *val; + const char *val; strlcpy(t, f+1, percent - f); val = getenv(t); if (val) { @@ -485,7 +485,7 @@ static BOOL do_section(char *sectionname) memcpy(vp, &Vars, sizeof Vars); } else if (strcmp(sectionname+1, "pop") == 0 || strcmp(sectionname+1, "reset") == 0) { - all_vars *vp = ((all_vars*)Vars_stack.items) + Vars_stack.count - 1; + const all_vars *vp = ((all_vars*)Vars_stack.items) + Vars_stack.count - 1; if (!Vars_stack.count) return False; memcpy(&Vars, vp, sizeof Vars); diff --git a/main.c b/main.c index 9b52bbe6a..a57e91121 100644 --- a/main.c +++ b/main.c @@ -272,7 +272,7 @@ static void become_copy_as_user() exit_cleanup(RERR_SYNTAX); } } else { - struct passwd *pw; + const struct passwd *pw; if ((pw = getpwuid(uid)) == NULL) { rsyserr(FERROR, errno, "getpwuid failed"); exit_cleanup(RERR_SYNTAX); @@ -925,7 +925,7 @@ static void read_final_goodbye(int f_in, int f_out) static void do_server_sender(int f_in, int f_out, int argc, char *argv[]) { - struct file_list *flist; + const struct file_list *flist; char *dir; if (DEBUG_GTE(SEND, 1)) @@ -1284,7 +1284,7 @@ void start_server(int f_in, int f_out, int argc, char *argv[]) * for rsyncd, remote-shell, and local connections. */ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) { - struct file_list *flist = NULL; + struct file_list *flist; int exit_code = 0, exit_code2 = 0; char *local_name = NULL; diff --git a/options.c b/options.c index 3c2d23526..309260f36 100644 --- a/options.c +++ b/options.c @@ -485,7 +485,8 @@ static void output_item_help(struct output_struct *words) { short *levels = words == info_words ? info_levels : debug_levels; const char *const*verbosity = words == info_words ? info_verbosity : debug_verbosity; - char buf[128], *opt, *fmt = "%-10s %s\n"; + char buf[128], *opt; + static const char * const fmt = "%-10s %s\n"; int j; reset_output_levels(); @@ -943,7 +944,8 @@ static void parse_one_refuse_match(int negated, const char *ref, const struct po **/ static void set_refuse_options(void) { - struct poptOption *op, *list_end = NULL; + struct poptOption *op; + struct poptOption const *list_end = NULL; char *cp, *ref = lp_refuse_options(module_id); int negated; @@ -2871,7 +2873,7 @@ void server_options(char **args, int *argc_p) args[ac++] = "--ignore-missing-args"; if (modify_window_set && am_sender) { - char *fmt = modify_window < 0 ? "-@%d" : "--modify-window=%d"; + const char *fmt = modify_window < 0 ? "-@%d" : "--modify-window=%d"; if (asprintf(&arg, fmt, modify_window) < 0) goto oom; args[ac++] = arg; diff --git a/popt/lookup3.c b/popt/lookup3.c index 7e01d7b56..bf2e0581a 100644 --- a/popt/lookup3.c +++ b/popt/lookup3.c @@ -796,7 +796,7 @@ static void driver1(void) static void driver2(void) { uint8_t qa[MAXLEN+1], qb[MAXLEN+2], *a = &qa[0], *b = &qb[1]; - uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z; + uint32_t c[HASHSTATE], d[HASHSTATE], i, j, k, l, m=0, z; uint32_t e[HASHSTATE],f[HASHSTATE],g[HASHSTATE],h[HASHSTATE]; uint32_t x[HASHSTATE],y[HASHSTATE]; uint32_t hlen; @@ -867,7 +867,7 @@ static void driver3(void) uint32_t j; uint8_t qqqq[] = "xxxThis is the time for all good men to come to the aid of their country..."; uint32_t ref,x,y; - uint8_t *p; + const uint8_t *p; uint32_t m = 13; printf("Endianness. These lines should all be the same (for values filled in):\n"); diff --git a/popt/popt.c b/popt/popt.c index be7bb8a59..898603167 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -408,7 +408,8 @@ static int handleAlias(poptContext con, static const char * findProgramPath(const char * argv0) { - char *path = NULL, *s = NULL, *se; + char *path = NULL, *se; + const char *s = NULL; char *t = NULL; if (argv0 == NULL) return NULL; /* XXX can't happen */ @@ -581,12 +582,12 @@ findOption(const struct poptOption * opt, && callbackData && *callbackData == NULL) *callbackData = opt->descrip; return opt2; - } break; + } // break; // Already continues or returns case POPT_ARG_CALLBACK: cb = opt; cbarg.ptr = opt->arg; continue; - break; + // break; // Already continues default: break; } @@ -804,7 +805,7 @@ int poptBitsDel(poptBits bits, const char * s) int poptBitsIntersect(poptBits *ap, const poptBits b) { __pbm_bits *abits; - __pbm_bits *bbits; + const __pbm_bits *bbits; __pbm_bits rc = 0; size_t nw = (__PBM_IX(_poptBitsM-1) + 1); size_t i; @@ -824,7 +825,7 @@ int poptBitsIntersect(poptBits *ap, const poptBits b) int poptBitsUnion(poptBits *ap, const poptBits b) { __pbm_bits *abits; - __pbm_bits *bbits; + const __pbm_bits *bbits; __pbm_bits rc = 0; size_t nw = (__PBM_IX(_poptBitsM-1) + 1); size_t i; @@ -864,7 +865,8 @@ int poptSaveBits(poptBits * bitsp, UNUSED(unsigned int argInfo), const char * s) { char *tbuf = NULL; - char *t, *te; + const char *t; + char *te; int rc = 0; if (bitsp == NULL || s == NULL || *s == '\0' || _poptBitsNew(bitsp)) diff --git a/popt/popthelp.c b/popt/popthelp.c index 32eb21878..381818fe1 100644 --- a/popt/popthelp.c +++ b/popt/popthelp.c @@ -117,10 +117,11 @@ static size_t maxColumnWidth(FILE *fp) */ static inline size_t stringDisplayWidth(const char *s) { - size_t n = strlen(s); + size_t n; #ifdef HAVE_MBSRTOWCS mbstate_t t; + n = strlen(s); memset ((void *)&t, 0, sizeof (t)); /* In initial state. */ /* Determine number of display characters. */ n = mbsrtowcs (NULL, &s, n, &t); @@ -667,7 +668,6 @@ static size_t singleOptionUsage(FILE * fp, columns_t columns, if (!(prtshort || prtlong)) return columns->cur; - len = sizeof(" []")-1; if (prtshort) len += sizeof("-c")-1; if (prtlong) { diff --git a/popt/poptint.c b/popt/poptint.c index 1ba19600a..f41cd48d3 100644 --- a/popt/poptint.c +++ b/popt/poptint.c @@ -82,7 +82,7 @@ strdup_locale_from_utf8 (char * istr) if (codeset != NULL && strcmp(codeset, "UTF-8") != 0 && (cd = iconv_open(codeset, "UTF-8")) != (iconv_t)-1) { - char * shift_pin = NULL; + const char * shift_pin = NULL; size_t db = strlen(istr); char * dstr = malloc((db + 1) * sizeof(*dstr)); char * dstr_tmp; @@ -122,7 +122,7 @@ strdup_locale_from_utf8 (char * istr) pout = dstr + used; ob = db - used; continue; - } break; + } // break; // Already has continue case EINVAL: case EILSEQ: default: diff --git a/testrun.c b/testrun.c index 049e3ebf0..2d716f627 100644 --- a/testrun.c +++ b/testrun.c @@ -8,7 +8,7 @@ int main(int argc, char *argv[]) { pid_t pid; - char *timeout_env; + const char *timeout_env; int status, timeout_secs, slept = 0; if (argc < 2) { diff --git a/usage.c b/usage.c index 6d60ac09b..aeeea02d7 100644 --- a/usage.c +++ b/usage.c @@ -36,7 +36,7 @@ static char *istring(const char *fmt, int val) static void print_info_flags(enum logcode f) { - STRUCT_STAT *dumstat; + const STRUCT_STAT *dumstat; BOOL as_json = f == FNONE ? 1 : 0; /* We use 1 == first attribute, 2 == need closing array */ char line_buf[75], item_buf[32]; int line_len, j; @@ -164,7 +164,7 @@ static void print_info_flags(enum logcode f) }; for (line_len = 0, j = 0; ; j++) { - char *str = info_flags[j], *next_nfo = str ? info_flags[j+1] : NULL; + const char *str = info_flags[j], *next_nfo = str ? info_flags[j+1] : NULL; int need_comma = next_nfo && *next_nfo != '*' ? 1 : 0; int item_len; if (!str || *str == '*') @@ -218,7 +218,8 @@ static void print_info_flags(enum logcode f) static void output_nno_list(enum logcode f, const char *name, struct name_num_obj *nno) { char namebuf[64], tmpbuf[256]; - char *tok, *next_tok, *comma = ","; + char *tok, *next_tok; + static const * const comma = ","; char *cp; /* Using '(' ensures that we get a trailing "none" but also includes aliases. */ diff --git a/util1.c b/util1.c index 7a1f24b54..c63ee82b8 100644 --- a/util1.c +++ b/util1.c @@ -1247,11 +1247,11 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr) unsigned int len; if (*path != '/') { /* Make path absolute. */ - int len = strlen(path); - if (curr_dir_len + 1 + len >= sizeof curr_dir) + int path_len = strlen(path); + if (curr_dir_len + 1 + path_len >= sizeof curr_dir) return NULL; curr_dir[curr_dir_len] = '/'; - memcpy(curr_dir + curr_dir_len + 1, path, len + 1); + memcpy(curr_dir + curr_dir_len + 1, path, path_len + 1); path = strdup(curr_dir); curr_dir[curr_dir_len] = '\0'; } else if (force_newbuf) diff --git a/zlib/inffast.c b/zlib/inffast.c index 264291ae1..c1707ff54 100644 --- a/zlib/inffast.c +++ b/zlib/inffast.c @@ -51,8 +51,8 @@ void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) z_const unsigned char FAR *in; /* local strm->next_in */ z_const unsigned char FAR *last; /* have enough input while in < last */ unsigned char FAR *out; /* local strm->next_out */ - unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ - unsigned char FAR *end; /* while out < end, enough space available */ + z_const unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ + z_const unsigned char FAR *end; /* while out < end, enough space available */ #ifdef INFLATE_STRICT unsigned dmax; /* maximum distance from zlib header */ #endif diff --git a/zlib/inflate.c b/zlib/inflate.c index 1afe007aa..229909d94 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -594,7 +594,7 @@ int ZEXPORT inflate(z_streamp strm, int flush) unsigned bits; /* bits in bit buffer */ unsigned in, out; /* save starting available input and output */ unsigned copy; /* number of stored or match bytes to copy */ - unsigned char FAR *from; /* where to copy match bytes from */ + z_const unsigned char FAR *from; /* where to copy match bytes from */ code here; /* current decoding table entry */ code last; /* parent table entry */ unsigned len; /* length to copy for repeats, bits to drop */ @@ -1417,7 +1417,7 @@ int ZEXPORT inflateSync(z_streamp strm) */ int ZEXPORT inflateSyncPoint(z_streamp strm) { - struct inflate_state FAR *state; + z_const struct inflate_state FAR *state; if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; @@ -1426,8 +1426,8 @@ int ZEXPORT inflateSyncPoint(z_streamp strm) int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { - struct inflate_state FAR *state; - struct inflate_state FAR *copy; + z_const struct inflate_state FAR *state; + z_const struct inflate_state FAR *copy; unsigned char FAR *window; unsigned wsize;