diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bi_db.m4 | 15 | ||||
-rw-r--r-- | src/bi_sprintf.m4 | 6 | ||||
-rw-r--r-- | src/db.c | 8 | ||||
-rw-r--r-- | src/engine.c | 2 | ||||
-rw-r--r-- | src/main.c | 5 | ||||
-rw-r--r-- | src/mtasim.c | 5 | ||||
-rw-r--r-- | src/prog.c | 8 |
7 files changed, 28 insertions, 21 deletions
diff --git a/src/bi_db.m4 b/src/bi_db.m4 index bb0b9f48..f366008f 100644 --- a/src/bi_db.m4 +++ b/src/bi_db.m4 @@ -1,5 +1,5 @@ -/* This file is part of mailfromd. -*- c -*- - Copyright (C) 2006, 2007 Sergey Poznyakoff +/* This file is part of Mailfromd. -*- c -*- + Copyright (C) 2006, 2007, 2008 Sergey Poznyakoff This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -137,7 +137,7 @@ MF_DEFUN(dbdel, VOID, STRING dbname, STRING keystr, OPTIONAL, NUMBER null) MF_ASSERT(rc == 0, mf_dbfailure, _("Failed to delete data `%s' from `%s': %s"), - key, + keystr, dbname, mu_dbm_strerror()); } @@ -238,9 +238,10 @@ MF_DEFUN(greylist, NUMBER, STRING email, NUMBER interval) memcpy(MU_DATUM_PTR(contents), &now, sizeof now); if (mu_dbm_insert(&db, key, contents, 1)) - mu_error(_("Cannot insert datum `%s' in " + mu_error(_("Cannot insert datum `%-.*s' in " "greylist database %s: %s"), - key, + MU_DATUM_SIZE(key), + (char*)MU_DATUM_PTR(key), greylist_format->dbname, mu_dbm_strerror()); } else @@ -259,9 +260,9 @@ MF_DEFUN(greylist, NUMBER, STRING email, NUMBER interval) MU_DATUM_PTR(contents) = (void*)&now; MU_DATUM_SIZE(contents) = sizeof now; if (mu_dbm_insert(&db, key, contents, 1)) - mu_error(_("Cannot insert datum `%s' in greylist " + mu_error(_("Cannot insert datum `%-.*s' in greylist " "database %s: %s"), - key, + MU_DATUM_SIZE(key), (char*)MU_DATUM_PTR(key), greylist_format->dbname, mu_dbm_strerror()); rc = 1; diff --git a/src/bi_sprintf.m4 b/src/bi_sprintf.m4 index 3f3f434d..afd63d32 100644 --- a/src/bi_sprintf.m4 +++ b/src/bi_sprintf.m4 @@ -1,5 +1,5 @@ -/* This file is part of mailfromd. -*- c -*- - Copyright (C) 2007 Sergey Poznyakoff +/* This file is part of Mailfromd. -*- c -*- + Copyright (C) 2007, 2008 Sergey Poznyakoff This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -376,7 +376,7 @@ MF_DEFUN_VARARGS(sprintf, STRING, STRING format) /* A - overrides a 0 if both are given.*/ if (prec || (flags & FMT_ADJUST_LEFT)) flags &= ~FMT_PADZERO; - snprintf(buf+1, sizeof(buf)-1, "%o", num); + snprintf(buf+1, sizeof(buf)-1, "%lo", num); str = buf + 2; n = strlen(str); if (prec && prec > n) { @@ -1,5 +1,5 @@ -/* This file is part of mailfromd. - Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff +/* This file is part of Mailfromd. + Copyright (C) 2005, 2006, 2007, 2008 Sergey Poznyakoff This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -128,7 +128,7 @@ db_enumerate(DBM_FILE *db, db_enum_func fun, void *data) } else { mu_error(_("Cannot fetch data `%*.*s' from `%s': %s"), MU_DATUM_SIZE(key), MU_DATUM_SIZE(key), - MU_DATUM_PTR(key), + (char*) MU_DATUM_PTR(key), db->name, mu_dbm_strerror()); rc = 1; @@ -327,7 +327,7 @@ db_compact_func(DBM_DATUM key, DBM_DATUM contents, void *data) } else if (mu_dbm_insert(&dp->ndb, key, contents, 1)) { mu_error(_("Cannot insert datum `%*.*s' into `%s': %s"), MU_DATUM_SIZE(key), MU_DATUM_SIZE(key), - MU_DATUM_PTR(key), + (char*) MU_DATUM_PTR(key), dp->ndb.name, mu_dbm_strerror()); dp->rc = 1; diff --git a/src/engine.c b/src/engine.c index a2b26f50..b40e75ed 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1285,7 +1285,7 @@ check_pidfile(char *name) } fclose(fp); if (unlink(pidfile)) { - mu_error(_("Cannot unlink pidfile `%s'"), + mu_error(_("Cannot unlink pidfile `%s': %s"), name, mu_strerror(errno)); exit(EX_USAGE); } @@ -1,5 +1,5 @@ /* This file is part of mailfromd. - Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff + Copyright (C) 2005, 2006, 2007, 2008 Sergey Poznyakoff This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,6 +33,9 @@ #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> +#ifdef HAVE_LOCALE_H +# include <locale.h> +#endif #include <mailutils/mailutils.h> #if MAILUTILS_VERSION_NUMBER < 1290 diff --git a/src/mtasim.c b/src/mtasim.c index 2a12a436..8940b7a8 100644 --- a/src/mtasim.c +++ b/src/mtasim.c @@ -1,6 +1,6 @@ /* This file is part of Mailfromd. - Copyright (C) 2003, 2004, 2007 The Anubis Team. + Copyright (C) 2003, 2004, 2007, 2008 The Anubis Team. Mailfromd is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,6 +36,9 @@ # include <readline/readline.h> # include <readline/history.h> #endif +#ifdef HAVE_LOCALE_H +# include <locale.h> +#endif #include <pwd.h> #include <sys/stat.h> @@ -1,5 +1,5 @@ /* This file is part of mailfromd. - Copyright (C) 2006, 2007 Sergey Poznyakoff + Copyright (C) 2006, 2007, 2008 Sergey Poznyakoff This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -410,12 +410,12 @@ runtime_stack_trace(eval_environ_t env) } if (ploc) - mu_error("%04d: %s:%lu: %s", + mu_error("%04lu: %s:%lu: %s", (unsigned long) pc, ploc->file, (unsigned long) ploc->line, name); else - mu_error("%04d: %s", + mu_error("%04lu: %s", (unsigned long) pc, name); } @@ -1087,7 +1087,7 @@ instr_div(eval_environ_t env) prog_trace(env, "DIV %ld %ld", a, b); if (b == 0) env_throw(env, mf_divzero, - "Division by zero at %08x", env->pc); + "Division by zero at %08lx", (unsigned long)env->pc); push(env, (STKVAL) (a / b)); } |