1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

Fix compiling with --disable-x11

This commit is contained in:
Nikolas Garofil 2009-11-22 14:05:11 +01:00
parent 66df73f74a
commit 6ee76e5c55
8 changed files with 15 additions and 22 deletions

View File

@ -361,7 +361,6 @@ void print_texeci(struct text_object *obj, char *p, int p_max_size)
} }
} }
#ifdef X11
void print_execgauge(struct text_object *obj, char *p, int p_max_size) void print_execgauge(struct text_object *obj, char *p, int p_max_size)
{ {
double barnum; double barnum;
@ -375,6 +374,7 @@ void print_execgauge(struct text_object *obj, char *p, int p_max_size)
} }
} }
#ifdef X11
void print_execgraph(struct text_object *obj, char *p, int p_max_size) void print_execgraph(struct text_object *obj, char *p, int p_max_size)
{ {
double barnum; double barnum;
@ -411,6 +411,7 @@ void print_execigraph(struct text_object *obj, char *p, int p_max_size)
} }
new_graph(obj, p, (int) (ed->barnum)); new_graph(obj, p, (int) (ed->barnum));
} }
#endif /* X11 */
void print_execigauge(struct text_object *obj, char *p, int p_max_size) void print_execigauge(struct text_object *obj, char *p, int p_max_size)
{ {
@ -432,7 +433,6 @@ void print_execigauge(struct text_object *obj, char *p, int p_max_size)
} }
new_gauge(obj, p, p_max_size, round_to_int(ed->barnum)); new_gauge(obj, p, p_max_size, round_to_int(ed->barnum));
} }
#endif /* X11 */
void print_execbar(struct text_object *obj, char *p, int p_max_size) void print_execbar(struct text_object *obj, char *p, int p_max_size)
{ {

View File

@ -42,12 +42,12 @@ void print_execp(struct text_object *, char *, int);
void print_execi(struct text_object *, char *, int); void print_execi(struct text_object *, char *, int);
void print_execpi(struct text_object *, char *, int); void print_execpi(struct text_object *, char *, int);
void print_texeci(struct text_object *, char *, int); void print_texeci(struct text_object *, char *, int);
#ifdef X11
void print_execgauge(struct text_object *, char *, int); void print_execgauge(struct text_object *, char *, int);
#ifdef X11
void print_execgraph(struct text_object *, char *, int); void print_execgraph(struct text_object *, char *, int);
void print_execigraph(struct text_object *, char *, int); void print_execigraph(struct text_object *, char *, int);
void print_execigauge(struct text_object *, char *, int);
#endif /* X11 */ #endif /* X11 */
void print_execigauge(struct text_object *, char *, int);
void print_execbar(struct text_object *, char *, int); void print_execbar(struct text_object *, char *, int);
void print_execibar(struct text_object *, char *, int); void print_execibar(struct text_object *, char *, int);
void free_exec(struct text_object *); void free_exec(struct text_object *);

View File

@ -566,6 +566,7 @@ void print_lua_graph(struct text_object *obj, char *p, int p_max_size)
new_graph(obj, p, per); new_graph(obj, p, per);
} }
} }
#endif /* X11 */
void print_lua_gauge(struct text_object *obj, char *p, int p_max_size) void print_lua_gauge(struct text_object *obj, char *p, int p_max_size)
{ {
@ -578,4 +579,3 @@ void print_lua_gauge(struct text_object *obj, char *p, int p_max_size)
new_gauge(obj, p, p_max_size, (per/100.0 * 255)); new_gauge(obj, p, p_max_size, (per/100.0 * 255));
} }
} }
#endif /* X11 */

View File

@ -70,7 +70,7 @@ void print_lua_parse(struct text_object *, char *, int);
void print_lua_bar(struct text_object *, char *, int); void print_lua_bar(struct text_object *, char *, int);
#ifdef X11 #ifdef X11
void print_lua_graph(struct text_object *, char *, int); void print_lua_graph(struct text_object *, char *, int);
void print_lua_gauge(struct text_object *, char *, int);
#endif /* X11 */ #endif /* X11 */
void print_lua_gauge(struct text_object *, char *, int);
#endif /* LUA_H_*/ #endif /* LUA_H_*/

View File

@ -325,7 +325,6 @@ int check_mixer_muted(struct text_object *obj)
return 1; return 1;
} }
#ifdef X11
void scan_mixer_bar(struct text_object *obj, const char *arg) void scan_mixer_bar(struct text_object *obj, const char *arg)
{ {
char buf1[64]; char buf1[64];
@ -372,5 +371,3 @@ void print_mixerr_bar(struct text_object *obj, char *p, int p_max_size)
{ {
print_mixer_bar_chan(obj, 1, p, p_max_size); print_mixer_bar_chan(obj, 1, p, p_max_size);
} }
#endif /* X11 */

View File

@ -48,8 +48,8 @@ int special_count;
int default_bar_width = 0, default_bar_height = 6; int default_bar_width = 0, default_bar_height = 6;
#ifdef X11 #ifdef X11
int default_graph_width = 0, default_graph_height = 25; int default_graph_width = 0, default_graph_height = 25;
int default_gauge_width = 40, default_gauge_height = 25;
#endif /* X11 */ #endif /* X11 */
int default_gauge_width = 40, default_gauge_height = 25;
/* /*
* Special data typedefs * Special data typedefs
@ -82,7 +82,6 @@ struct tab {
* Scanning arguments to various special text objects * Scanning arguments to various special text objects
*/ */
#ifdef X11
const char *scan_gauge(struct text_object *obj, const char *args) const char *scan_gauge(struct text_object *obj, const char *args)
{ {
struct gauge *g; struct gauge *g;
@ -109,7 +108,6 @@ const char *scan_gauge(struct text_object *obj, const char *args)
obj->special_data = g; obj->special_data = g;
return args; return args;
} }
#endif /* X11 */
const char *scan_bar(struct text_object *obj, const char *args) const char *scan_bar(struct text_object *obj, const char *args)
{ {

View File

@ -103,13 +103,13 @@ void scan_tab(struct text_object *, const char *);
void scan_stippled_hr(struct text_object *, const char*); void scan_stippled_hr(struct text_object *, const char*);
/* printing specials */ /* printing specials */
void new_gauge(struct text_object *, char *, int, int);
void new_bar(struct text_object *, char *, int, int);
void new_font(char *, char *); void new_font(char *, char *);
void new_graph(struct text_object *, char *, double); void new_graph(struct text_object *, char *, double);
void new_hr(char *, int); void new_hr(char *, int);
void new_stippled_hr(struct text_object *, char *); void new_stippled_hr(struct text_object *, char *);
#endif #endif
void new_gauge(struct text_object *, char *, int, int);
void new_bar(struct text_object *, char *, int, int);
void new_fg(char *, long); void new_fg(char *, long);
void new_bg(char *, long); void new_bg(char *, long);
void new_outline(char *, long); void new_outline(char *, long);

View File

@ -67,8 +67,8 @@ enum text_object_type {
OBJ_font, OBJ_font,
OBJ_cpu, OBJ_cpu,
OBJ_cpubar, OBJ_cpubar,
#ifdef X11
OBJ_cpugauge, OBJ_cpugauge,
#ifdef X11
OBJ_cpugraph, OBJ_cpugraph,
OBJ_loadgraph, OBJ_loadgraph,
#endif /* X11 */ #endif /* X11 */
@ -94,11 +94,11 @@ enum text_object_type {
OBJ_texeci, OBJ_texeci,
OBJ_execbar, OBJ_execbar,
OBJ_execibar, OBJ_execibar,
#ifdef X11
OBJ_execgauge, OBJ_execgauge,
OBJ_execigauge,
#ifdef X11
OBJ_execgraph, OBJ_execgraph,
OBJ_execigraph, OBJ_execigraph,
OBJ_execigauge,
#endif /* X11 */ #endif /* X11 */
OBJ_execp, OBJ_execp,
OBJ_execpi, OBJ_execpi,
@ -207,8 +207,8 @@ enum text_object_type {
OBJ_mem, OBJ_mem,
OBJ_memeasyfree, OBJ_memeasyfree,
OBJ_memfree, OBJ_memfree,
#ifdef X11
OBJ_memgauge, OBJ_memgauge,
#ifdef X11
OBJ_memgraph, OBJ_memgraph,
#endif /* X11 */ #endif /* X11 */
OBJ_membar, OBJ_membar,
@ -217,11 +217,9 @@ enum text_object_type {
OBJ_mixer, OBJ_mixer,
OBJ_mixerl, OBJ_mixerl,
OBJ_mixerr, OBJ_mixerr,
#ifdef X11
OBJ_mixerbar, OBJ_mixerbar,
OBJ_mixerlbar, OBJ_mixerlbar,
OBJ_mixerrbar, OBJ_mixerrbar,
#endif /* X11 */
OBJ_if_mixer_mute, OBJ_if_mixer_mute,
#ifdef X11 #ifdef X11
OBJ_monitor, OBJ_monitor,
@ -427,9 +425,9 @@ enum text_object_type {
OBJ_lua, OBJ_lua,
OBJ_lua_parse, OBJ_lua_parse,
OBJ_lua_bar, OBJ_lua_bar,
OBJ_lua_gauge,
#ifdef X11 #ifdef X11
OBJ_lua_graph, OBJ_lua_graph,
OBJ_lua_gauge,
#endif /* X11 */ #endif /* X11 */
#endif /* HAVE_LUA */ #endif /* HAVE_LUA */
#ifdef TCP_PORT_MONITOR #ifdef TCP_PORT_MONITOR
@ -461,9 +459,9 @@ enum text_object_type {
OBJ_apcupsd_linev, OBJ_apcupsd_linev,
OBJ_apcupsd_load, OBJ_apcupsd_load,
OBJ_apcupsd_loadbar, OBJ_apcupsd_loadbar,
OBJ_apcupsd_loadgauge,
#ifdef X11 #ifdef X11
OBJ_apcupsd_loadgraph, OBJ_apcupsd_loadgraph,
OBJ_apcupsd_loadgauge,
#endif /* X11 */ #endif /* X11 */
OBJ_apcupsd_charge, OBJ_apcupsd_charge,
OBJ_apcupsd_timeleft, OBJ_apcupsd_timeleft,