wrong character in the GSM 03.38 table (ç for Ç)
[gammu.git] / helper / printing.c
blobacd60284f93f3ae8b1eea9bbd66ef2310d555416
1 /**
2 * Generic message printing helpers.
3 */
5 #include <gammu-misc.h>
6 #include "locales.h"
8 #include <stdarg.h>
9 #include <stdio.h>
11 PRINTF_STYLE(1, 2)
12 int printf_err(const char *format, ...)
14 va_list ap;
15 int ret;
17 /* l10n: Generic prefix for error messages */
18 printf("%s: ", _("Error"));
20 va_start(ap, format);
21 ret = vprintf(format, ap);
22 va_end(ap);
24 return ret;
27 PRINTF_STYLE(1, 2)
28 int printf_warn(const char *format, ...)
30 va_list ap;
31 int ret;
33 /* l10n: Generic prefix for warning messages */
34 printf("%s: ", _("Warning"));
36 va_start(ap, format);
37 ret = vprintf(format, ap);
38 va_end(ap);
40 return ret;
43 PRINTF_STYLE(1, 2)
44 int printf_info(const char *format, ...)
46 va_list ap;
47 int ret;
49 /* l10n: Generic prefix for informational messages */
50 printf("%s: ", _("Information"));
52 va_start(ap, format);
53 ret = vprintf(format, ap);
54 va_end(ap);
56 return ret;