1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00

Fix building without X11 support broke after commits f1c47e5fc4 and 670e9a0eb1

This commit is contained in:
Nikolas Garofil 2009-07-20 01:02:27 +02:00
parent ba414d8ab8
commit 09d41cb0b6

View File

@ -452,10 +452,10 @@ int check_contains(char *f, char *s)
return ret;
}
#ifdef X11
#define SECRIT_MULTILINE_CHAR '\x02'
#ifdef X11
static inline int calc_text_width(const char *s, int l)
{
if ((output_methods & TO_X) == 0) {
@ -5858,8 +5858,10 @@ static void generate_text_internal(char *p, int p_max_size,
if(buf[obj->data.scroll.start] == 0){
obj->data.scroll.start = 0;
}
#ifdef X11
//reset color when scroll is finished
new_fg(p + strlen(p), obj->data.scroll.resetcolor);
#endif
}
OBJ(combine) {
char buf[2][max_user_text];
@ -6144,18 +6146,16 @@ static inline int get_string_width(const char *s)
return strlen(s);
}
#ifdef X11
static int get_string_width_special(char *s, int special_index)
{
#ifdef X11
char *p, *final;
int idx = 1;
int width = 0;
long i;
if ((output_methods & TO_X) == 0) {
#endif /* X11 */
return (s) ? strlen(s) : 0;
#ifdef X11
}
if (!s) {
@ -6190,10 +6190,8 @@ static int get_string_width_special(char *s, int special_index)
}
free(final);
return width;
#endif /* X11 */
}
#ifdef X11
static int text_size_updater(char *s, int special_index);
int last_font_height;
@ -6943,7 +6941,8 @@ static int draw_line(char *s, int special_index)
if ((output_methods & TO_X) == 0) {
#endif /* X11 */
draw_string(s);
return 0;
//'special_index - special_index' instead of 0 otherwise gcc complains about not using special_index when build without X11
return special_index - special_index;
#ifdef X11
}