Expand the FMT_FIRST anf FMT_CONTD macros inline so they get picked

up by xgettext.
This commit is contained in:
Todd C. Miller
2012-11-09 15:30:06 -05:00
parent 6a7884d474
commit 693e6767f0

View File

@@ -123,9 +123,6 @@ mysyslog(int pri, const char *fmt, ...)
debug_return; debug_return;
} }
#define FMT_FIRST "%8s : %s"
#define FMT_CONTD "%8s : (command continued) %s"
/* /*
* Log a message to syslog, pre-pending the username and splitting the * Log a message to syslog, pre-pending the username and splitting the
* message into parts if it is longer than MAXSYSLOGLEN. * message into parts if it is longer than MAXSYSLOGLEN.
@@ -144,7 +141,7 @@ do_syslog(int pri, char *msg)
/* /*
* Log the full line, breaking into multiple syslog(3) calls if necessary * Log the full line, breaking into multiple syslog(3) calls if necessary
*/ */
fmt = _(FMT_FIRST); fmt = _("%8s : %s");
maxlen = MAXSYSLOGLEN - (strlen(fmt) - 5 + strlen(user_name)); maxlen = MAXSYSLOGLEN - (strlen(fmt) - 5 + strlen(user_name));
for (p = msg; *p != '\0'; ) { for (p = msg; *p != '\0'; ) {
len = strlen(p); len = strlen(p);
@@ -172,7 +169,7 @@ do_syslog(int pri, char *msg)
mysyslog(pri, fmt, user_name, p); mysyslog(pri, fmt, user_name, p);
p += len; p += len;
} }
fmt = _(FMT_CONTD); fmt = _("%8s : (command continued) %s");
maxlen = MAXSYSLOGLEN - (strlen(fmt) - 5 + strlen(user_name)); maxlen = MAXSYSLOGLEN - (strlen(fmt) - 5 + strlen(user_name));
} }