/*
warn if anything non blank appears, but ignore comments...
*/
-static void warn_if_non_blank(
- const char * what,
- char * ptr,
- ap_configfile_t * cfg)
+static void warn_if_non_blank(const char * what,
+ char * ptr,
+ ap_configfile_t * cfg)
{
char * p;
for (p=ptr; *p; p++) {
if (*p == '#')
break;
if (*p != ' ' && *p != '\t') {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
"%s on line %d of %s: %s",
what, cfg->line_number, cfg->name, ptr);
break;
if (!strncmp(first, "</", 2)) {
any_nesting--;
if (any_nesting < 0) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING,
- 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING,
+ 0, NULL, APLOGNO(02793)
"bad (negative) nesting on line %d of %s",
config_file->line_number - line_number_start,
where);
}
warn_if_non_blank(
- "non blank chars found after directive closing",
+ APLOGNO(02794) "non blank chars found after directive closing",
endp+1, config_file);
macro_nesting--;
if (!macro_nesting) {
if (any_nesting) {
ap_log_error(APLOG_MARK,
- APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
+ APLOG_WARNING, 0, NULL, APLOGNO(02795)
"bad cumulated nesting (%+d) in %s",
any_nesting, where);
}
macro->name, macro->location, i + 1);
}
else if (!looks_like_an_argument(tab[i])) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02796)
"macro '%s' (%s) "
"argument name '%s' (#%d) without expected prefix, "
"better prefix argument names with one of '%s'.",
/* must not use the same argument name twice */
if (!strcmp(tab[i], tab[j])) {
return apr_psprintf(pool,
- "argument name conflict in macro '%s' (%s): "
+ "argument name conflict in macro '%s' (%s): "
"argument '%s': #%d and #%d, "
"change argument names!",
macro->name, macro->location,
/* warn about common prefix, but only if non empty names */
if (ltabi && ltabj &&
!strncmp(tab[i], tab[j], ltabi < ltabj ? ltabi : ltabj)) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING,
- 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING,
+ 0, NULL, APLOGNO(02797)
"macro '%s' (%s): "
- "argument name prefix conflict (%s #%d and %s #%d),"
- " be careful about your macro definition!",
+ "argument name prefix conflict (%s #%d and %s #%d), "
+ "be careful about your macro definition!",
macro->name, macro->location,
tab[i], i + 1, tab[j], j + 1);
}
int i;
for (i = 0; i < array->nelts; i++) {
if (empty_string_p(tab[i])) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02798)
"%s: empty argument #%d", where, i + 1);
}
}
const char *errmsg;
if (macro->contents->nelts == 0) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02799)
"macro '%s' (%s): empty contents!",
macro->name, macro->location);
return NULL; /* no need to further warnings... */
for (i = 0; i < nelts; i++) {
if (!used->elts[i]) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02800)
"macro '%s' (%s): argument '%s' (#%d) never used",
macro->name, macro->location, names[i], i + 1);
}
return BEGIN_MACRO " macro definition: empty name";
}
- warn_if_non_blank("non blank chars found after " BEGIN_MACRO " closing '>'",
+ warn_if_non_blank(APLOGNO(02801) "non blank chars found after "
+ BEGIN_MACRO " closing '>'",
endp+1, cmd->config_file);
/* coldly drop '>[^>]*$' out */
if (macro != NULL) {
/* already defined: warn about the redefinition */
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02802)
"macro '%s' multiply defined: "
"%s, redefined on line %d of \"%s\"",
macro->name, macro->location,
apr_psprintf(pool, "macro '%s' (%s)", macro->name, macro->location);
if (looks_like_an_argument(name)) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02803)
"%s better prefix a macro name with any of '%s'",
where, ARG_PREFIX);
}