#define SECRIT_MULTILINE_CHAR '\x02'
-#ifdef X11
-
static inline int calc_text_width(const char *s)
{
size_t slen = strlen(s);
+#ifdef X11
if ((output_methods & TO_X) == 0) {
+#endif /* X11 */
return slen;
+#ifdef X11
}
#ifdef XFT
if (use_xft) {
{
return XTextWidth(fonts[selected_font].font, s, slen);
}
-}
#endif /* X11 */
+}
/* formatted text to render on screen, generated in generate_text(),
* drawn in draw_stuff() */
iconv_convert(&a, buff_in, p, p_max_size);
#endif /* HAVE_ICONV */
if (obj->type != OBJ_text && obj->type != OBJ_execp && obj->type != OBJ_execpi
- && obj->type != OBJ_lua && obj->type != OBJ_lua_parse) {
+#ifdef HAVE_LUA
+ && obj->type != OBJ_lua && obj->type != OBJ_lua_parse
+#endif /* HAVE_LUA */
+ ) {
substitute_newlines(p, a - 2);
}
p += a;
obj->data.i = arg ? atoi(arg) : 1;
END OBJ_ARG(goto, 0, "goto needs arguments")
obj->data.i = atoi(arg);
+#ifdef X11
END OBJ(tab, 0)
scan_tab(obj, arg);
+#endif /* X11 */
#ifdef __linux__
END OBJ_ARG(i2c, 0, "i2c needs arguments")
parse_i2c_sensor(obj, arg);
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <unistd.h>
struct execi_data {
double last_update;
obj->data.opaque = ed;
}
+#ifdef X11
void scan_execgraph_arg(struct text_object *obj, const char *arg)
{
struct execi_data *ed;
ed->cmd = buf;
obj->data.opaque = ed;
}
+#endif /* X11 */
void print_exec(struct text_object *obj, char *p, int p_max_size)
{