diff options
author | Allan McRae <mcrae_allan@hotmail.com> | 2008-05-11 13:30:27 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-05-11 20:05:28 -0500 |
commit | 3c3cb001a441656c2afba62f0361b83d4987339c (patch) | |
tree | 93434e85ea3ea40e6aa45009b9c11b67e4555e87 /src/pacman/conf.c | |
parent | 3175faace439158f5c18b20bb2358e845c4167e0 (diff) |
Make all error messages use pm_fprintf
Tested using many easily generated error conditions. Also added "malloc
failure" (conf.c) and "segmentation fault" (pacman.c) error messages for
translation.
Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
[Dan: fix trailing whitespace errors, other compilation issues]
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/conf.c')
-rw-r--r-- | src/pacman/conf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index bf3a4624..27c254b5 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -25,6 +25,7 @@ /* pacman */ #include "conf.h" +#include "util.h" /* global config variable */ config_t *config = NULL; @@ -33,8 +34,9 @@ config_t *config_new(void) { config_t *newconfig = calloc(1, sizeof(config_t)); if(!newconfig) { - fprintf(stderr, "malloc failure: could not allocate %zd bytes\n", - sizeof(config_t)); + pm_fprintf(stderr, PM_LOG_ERROR, + _("malloc failure: could not allocate %zd bytes\n"), + sizeof(config_t)); return(NULL); } /* defaults which may get overridden later */ |