NULL
};
-static char *flag_name[] = {
+static const char *const flag_name[] = {
"--recurse (-r)",
"--owner (-o)",
"--group (-g)",
BEGIN {
heading = "/* DO NOT EDIT THIS FILE! It is auto-generated from a list of values in " ARGV[1] "! */\n\n"
sect = psect = defines = accessors = prior_ptype = ""
- parms = "\nstatic struct parm_struct parm_table[] = {"
+ parms = "\nstatic const struct parm_struct parm_table[] = {"
comment_fmt = "\n/********** %s **********/\n"
tdstruct = "typedef struct {"
}
} else
*uidbuf = '\0';
if (gid_ndx) {
- static char parens[] = "(\0)\0\0\0";
- char *pp = parens + (file->flags & FLAG_SKIP_GROUP ? 0 : 3);
+ static const char parens[] = "(\0)\0\0\0";
+ const char *pp = parens + (file->flags & FLAG_SKIP_GROUP ? 0 : 3);
snprintf(gidbuf, sizeof gidbuf, " gid=%s%u%s",
pp, F_GROUP(file), pp + 2);
} else
static OFF_T active_bytecnt = 0;
static int first_message = 1;
-static char int_byte_extra[64] = {
+static const char int_byte_extra[64] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* (00 - 3F)/4 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* (40 - 7F)/4 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* (80 - BF)/4 */
static void check_for_d_option_error(const char *msg)
{
- static char rsync263_opts[] = "BCDHIKLPRSTWabceghlnopqrtuvxz";
+ static const char rsync263_opts[] = "BCDHIKLPRSTWabceghlnopqrtuvxz";
char *colon;
int saw_d = 0;
memcpy(ctx->buffer + left, input, length);
}
-static uchar md5_padding[CSUM_CHUNK] = { 0x80 };
+static const uchar md5_padding[CSUM_CHUNK] = { 0x80 };
void md5_result(md_context *ctx, uchar digest[MD5_DIGEST_LEN])
{
struct enum_list {
int value;
- char *name;
+ const char *name;
};
struct parm_struct {
parm_type type;
parm_class class;
void *ptr;
- struct enum_list *enum_list;
+ const struct enum_list *enum_list;
unsigned flags;
};
static int iSectionIndex = -1;
static BOOL bInGlobalSection = True;
-static struct enum_list enum_syslog_facility[] = {
+static const struct enum_list enum_syslog_facility[] = {
#ifdef LOG_AUTH
{ LOG_AUTH, "auth" },
#endif
static void output_itemized_counts(const char *prefix, int *counts)
{
- static char *labels[] = { "reg", "dir", "link", "dev", "special" };
+ static char *const labels[] = { "reg", "dir", "link", "dev", "special" };
char buf[1024], *pre = " (";
int j, len = 0;
int total = counts[0];
struct chmod_mode_struct *chmod_modes = NULL;
-static const char *debug_verbosity[] = {
+static const char *const debug_verbosity[] = {
/*0*/ NULL,
/*1*/ NULL,
/*2*/ "BIND,CMD,CONNECT,DEL,DELTASUM,DUP,FILTER,FLIST,ICONV",
#define MAX_VERBOSITY ((int)(sizeof debug_verbosity / sizeof debug_verbosity[0]) - 1)
-static const char *info_verbosity[1+MAX_VERBOSITY] = {
+static const char *const info_verbosity[1+MAX_VERBOSITY] = {
/*0*/ "NONREG",
/*1*/ "COPY,DEL,FLIST,MISC,NAME,STATS,SYMSAFE",
/*2*/ "BACKUP,MISC2,MOUNT,NAME2,REMOVE,SKIP",
static void output_item_help(struct output_struct *words)
{
short *levels = words == info_words ? info_levels : debug_levels;
- const char **verbosity = words == info_words ? info_verbosity : debug_verbosity;
+ const char *const*verbosity = words == info_words ? info_verbosity : debug_verbosity;
char buf[128], *opt, *fmt = "%-10s %s\n";
int j;
{0,0,0,0, 0, 0, 0}
};
-static struct poptOption long_daemon_options[] = {
+static const struct poptOption long_daemon_options[] = {
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
{"address", 0, POPT_ARG_STRING, &bind_address, 0, 0, 0 },
{"bwlimit", 0, POPT_ARG_INT, &daemon_bwlimit, 0, 0, 0 },
mtimebuf, atimebuf, crtimebuf, fname, linkbuf);
}
-static struct poptOption long_options[] = {
+static const struct poptOption long_options[] = {
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
{"atimes", 'U', POPT_ARG_NONE, &display_atimes, 0, 0, 0},
#ifdef SUPPORT_CRTIMES
int empty_at_start = 0;
int empty_at_end = 0;
-static struct poptOption long_options[] = {
+static const struct poptOption long_options[] = {
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
{"iterations", 'i', POPT_ARG_NONE, &output_iterations, 0, 0, 0},
{"empties", 'e', POPT_ARG_STRING, 0, 'e', 0, 0},