[PATCH] No LaTeX documentation for sane-backend package
[openwrt/svn-archive/archive.git] / utils / powertop / patches / 200-no-gettext.patch
1 --- a/powertop.c
2 +++ b/powertop.c
3 @@ -30,7 +30,9 @@
4 #include <stdint.h>
5 #include <sys/types.h>
6 #include <dirent.h>
7 +#ifdef ENABLE_GETTEXT
8 #include <libintl.h>
9 +#endif
10 #include <ctype.h>
11 #include <assert.h>
12 #include <locale.h>
13 @@ -783,9 +785,11 @@ int main(int argc, char **argv)
14 uint64_t cur_usage[8], cur_duration[8];
15 double wakeups_per_second = 0;
16
17 +#ifdef ENABLE_GETTEXT
18 setlocale (LC_ALL, "");
19 bindtextdomain ("powertop", "/usr/share/locale");
20 textdomain ("powertop");
21 +#endif
22
23 while (1) {
24 static struct option opts[] = {
25 --- a/powertop.h
26 +++ b/powertop.h
27 @@ -26,7 +26,9 @@
28 #ifndef __INCLUDE_GUARD_POWERTOP_H_
29 #define __INCLUDE_GUARD_POWERTOP_H_
30
31 +#ifdef ENABLE_GETTEXT
32 #include <libintl.h>
33 +#endif
34
35 struct line {
36 char *string;
37 @@ -86,7 +88,11 @@ extern suggestion_func *suggestion_activ
38 _x < _y ? _x : _y; })
39
40
41 +#ifdef ENABLE_GETTEXT
42 #define _(STRING) gettext(STRING)
43 +#else
44 +#define _(STRING) STRING
45 +#endif
46
47
48 #define PT_COLOR_DEFAULT 1