#if defined(ENABLE_NLS)
extern int _nl_msg_cat_cntr; /* XXX GNU gettext voodoo */
#endif
-static const char * language = "LANGUAGE";
+static const char * const language = "LANGUAGE";
-static const char * _macro_i18ndomains = "%{?_i18ndomains}";
+static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
/**
* Retrieve i18n text.
static int _print_pkts = 0;
-static unsigned int nkeyids_max = 256;
+static const unsigned int nkeyids_max = 256;
static unsigned int nkeyids = 0;
static unsigned int nextkeyid = 0;
static unsigned int * keyids;
* @todo Should other macros be added from header when installing a package?
*/
static struct tagMacro {
-const char * macroname; /*!< Macro name to define. */
- rpmTag tag; /*!< Header tag to use for value. */
-} tagMacros[] = {
+ const char *macroname; /*!< Macro name to define. */
+ rpmTag tag; /*!< Header tag to use for value. */
+} const tagMacros[] = {
{ "name", RPMTAG_NAME },
{ "version", RPMTAG_VERSION },
{ "release", RPMTAG_RELEASE },
static int rpmInstallLoadMacros(rpmfi fi, Header h)
{
HGE_t hge = (HGE_t) fi->hge;
- struct tagMacro * tagm;
+ const struct tagMacro * tagm;
union {
void * ptr;
const char ** argv;
fstate = rpmfiFState(fi);
fsize = rpmfiFSize(fi);
fn = rpmfiFN(fi);
- { static char hex[] = "0123456789abcdef";
+ { static char const hex[] = "0123456789abcdef";
unsigned const char * s = rpmfiMD5(fi);
char * p = fmd5;
int j;
if (t->name == NULL)
continue;
if (rpmIsVerbose()) {
- static const char * tagtypes[] = {
+ static const char * const tagtypes[] = {
"", "char", "int8", "int16", "int32", "int64",
"string", "blob", "argv", "i18nstring"
};
const char * featureDescription;
};
-static struct rpmlibProvides_s rpmlibProvides[] = {
+static const struct rpmlibProvides_s rpmlibProvides[] = {
{ "rpmlib(VersionedDependencies)", "3.0.3-1",
(RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
N_("PreReq:, Provides:, and Obsoletes: dependencies support versions.") },
int nrefs; /*!< Reference count. */
};
-static int indent = 2;
-
-static const char * ftsInfoStrings[] = {
+static const char * const ftsInfoStrings[] = {
"UNKNOWN",
"D",
"DC",
FTSENT * fts = gi->fts;
rpmRC rpmrc = RPMRC_NOTFOUND;
const char * s;
+ static const int indent = 2;
+
if (_rpmgi_debug < 0)
rpmlog(RPMLOG_DEBUG, "FTS_%s\t%*s %s%s\n", ftsInfoStr(fts->fts_info),
/* Internal interface */
#define RPMLOCK_PATH LOCALSTATEDIR "/lock/rpm/transaction"
-static const char * rpmlock_path_default = "%{?_rpmlock_path}";
+static const char * const rpmlock_path_default = "%{?_rpmlock_path}";
static const char * rpmlock_path = NULL;
enum {
#include "debug.h"
-static const char *defrcfiles =
+static const char * const defrcfiles =
RPMCONFIGDIR "/rpmrc"
":" RPMCONFIGDIR "/" RPMCANONVENDOR "/rpmrc"
":" SYSCONFDIR "/rpmrc"
MACROFILES;
#endif
-static const char * platform = SYSCONFDIR "/rpm/platform";
+static const char * const platform = SYSCONFDIR "/rpm/platform";
static char ** platpat = NULL;
static int nplatpat = 0;
/* this *must* be kept in alphabetical order */
/* The order of the flags is archSpecific, required, macroize, localize */
-static struct rpmOption optionTable[] = {
+static const struct rpmOption const optionTable[] = {
{ "include", RPMVAR_INCLUDE, 0, 1, 0, 2 },
{ "macrofiles", RPMVAR_MACROFILES, 0, 0, 0, 1 },
{ "optflags", RPMVAR_OPTFLAGS, 1, 0, 1, 0 },
};
-static size_t optionTableSize = sizeof(optionTable) / sizeof(*optionTable);
+static const size_t optionTableSize = sizeof(optionTable) / sizeof(*optionTable);
#define OS 0
#define ARCH 1
}
}
-static const char * prescriptenviron = "\n\
+static const char * const prescriptenviron = "\n\
RPM_SOURCE_DIR=\"%{_sourcedir}\"\n\
RPM_BUILD_DIR=\"%{_builddir}\"\n\
RPM_OPT_FLAGS=\"%{optflags}\"\n\
int rpmShowRC(FILE * fp)
{
- struct rpmOption *opt;
+ const struct rpmOption *opt;
rpmds ds = NULL;
int i, xx;
machEquivTable equivTable;
static int isArch(const char * arch)
{
- const char ** av;
- static const char *arches[] = {
+ const char * const * av;
+ static const char * const arches[] = {
"i386", "i486", "i586", "i686", "athlon", "pentium3", "pentium4", "x86_64", "amd64", "ia32e", "geode",
"alpha", "alphaev5", "alphaev56", "alphapca56", "alphaev6", "alphaev67",
"sparc", "sun4", "sun4m", "sun4c", "sun4d", "sparcv8", "sparcv9", "sparcv9v",
static void rpmtsPrintStat(const char * name, struct rpmop_s * op)
{
- static unsigned int scale = (1000 * 1000);
+ static const unsigned int scale = (1000 * 1000);
if (op != NULL && op->count > 0)
fprintf(stderr, " %s %6d %6lu.%06lu MB %6lu.%06lu secs\n",
name, op->count,