summaryrefslogtreecommitdiff
path: root/lib/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compat.c')
-rw-r--r--lib/compat.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/compat.c b/lib/compat.c
index 90abd4e8a..b5cd17cb1 100644
--- a/lib/compat.c
+++ b/lib/compat.c
@@ -30,8 +30,8 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "config.h"
-#include "dpkg.h"
+#include <config.h>
+#include <dpkg.h>
#ifndef HAVE_VSNPRINTF
int vsnprintf (char *buf, size_t maxsize, const char *fmt, va_list al) {
@@ -43,15 +43,15 @@ int vsnprintf (char *buf, size_t maxsize, const char *fmt, va_list al) {
if (maxsize == 0) return -1;
if (!file) {
- file= tmpfile(); if (!file) ohshite("unable to open tmpfile for vsnprintf");
+ file= tmpfile(); if (!file) ohshite(_("unable to open tmpfile for vsnprintf"));
} else {
- if (fseek(file,0,0)) ohshite("unable to rewind at start of vsnprintf");
- if (ftruncate(fileno(file),0)) ohshite("unable to truncate in vsnprintf");
+ if (fseek(file,0,0)) ohshite(_("unable to rewind at start of vsnprintf"));
+ if (ftruncate(fileno(file),0)) ohshite(_("unable to truncate in vsnprintf"));
}
- if (vfprintf(file,fmt,al) == EOF) ohshite("write error in vsnprintf");
- if (fflush(file)) ohshite("unable to flush in vsnprintf");
- if (fstat(fileno(file),&stab)) ohshite("unable to stat in vsnprintf");
- if (fseek(file,0,0)) ohshite("unable to rewind in vsnprintf");
+ if (vfprintf(file,fmt,al) == EOF) ohshite(_("write error in vsnprintf"));
+ if (fflush(file)) ohshite(_("unable to flush in vsnprintf"));
+ if (fstat(fileno(file),&stab)) ohshite(_("unable to stat in vsnprintf"));
+ if (fseek(file,0,0)) ohshite(_("unable to rewind in vsnprintf"));
want= stab.st_size;
if (want >= maxsize) {
want= maxsize-1; retval= -1;
@@ -59,7 +59,7 @@ int vsnprintf (char *buf, size_t maxsize, const char *fmt, va_list al) {
retval= want;
}
nr= fread(buf,1,want-1,file);
- if (nr != want-1) ohshite("read error in vsnprintf truncated");
+ if (nr != want-1) ohshite(_("read error in vsnprintf truncated"));
buf[want]= 0;
return retval;
@@ -72,7 +72,7 @@ extern const int sys_nerr;
const char *strerror(int e) {
static char buf[100];
if (e >= 0 && e < sys_nerr) return sys_errlist[e];
- sprintf(buf, "System error no.%d", e);
+ sprintf(buf, _("System error no.%d"), e);
return buf;
}
#endif
@@ -82,7 +82,7 @@ extern const char *const sys_siglist[];
const char *strsignal(int e) {
static char buf[100];
if (e >= 0 && e < NSIG) return sys_siglist[e];
- sprintf(buf, "Signal no.%d", e);
+ sprintf(buf, _("Signal no.%d"), e);
return buf;
}
#endif