mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 10:35:10 +00:00
Merge branch 'master' into fix-build-with-warnings-enabled
This commit is contained in:
commit
5e7b1764b2
64
doc/lua.xml
64
doc/lua.xml
@ -190,9 +190,12 @@
|
||||
<option>function</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Call this function to return a new cairo_text_extents_t structure. A creation function for this structure is not provided by the cairo API. After calling this, you should use tolua.takeownership() on the return value to ensure ownership is passed properly.
|
||||
</para>
|
||||
<para>Call this function to return a new
|
||||
cairo_text_extents_t structure. A creation function for
|
||||
this structure is not provided by the cairo API. After
|
||||
calling this, you should use tolua.takeownership() on
|
||||
the return value to ensure ownership is passed
|
||||
properly.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
@ -203,9 +206,12 @@
|
||||
<option>function</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Call this function to return a new cairo_font_extents_t structure. A creation function for this structure is not provided by the cairo API. After calling this, you should use tolua.takeownership() on the return value to ensure ownership is passed properly.
|
||||
</para>
|
||||
<para>Call this function to return a new
|
||||
cairo_font_extents_t structure. A creation function for
|
||||
this structure is not provided by the cairo API. After
|
||||
calling this, you should use tolua.takeownership() on
|
||||
the return value to ensure ownership is passed
|
||||
properly.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
@ -216,9 +222,49 @@
|
||||
<option>function</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Call this function to return a new cairo_matrix_t structure. A creation function for this structure is not provided by the cairo API. After calling this, you should use tolua.takeownership() on the return value to ensure ownership is passed properly.
|
||||
</para>
|
||||
<para>Call this function to return a new cairo_matrix_t
|
||||
structure. A creation function for this structure is
|
||||
not provided by the cairo API. After calling this, you
|
||||
should use tolua.takeownership() on the return value to
|
||||
ensure ownership is passed properly.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>
|
||||
<option>
|
||||
cairo_text_extents_t:destroy(structure)</option>
|
||||
</command>
|
||||
<option>function</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Call this function to free memory allocated by
|
||||
cairo_text_extents_t:create.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>
|
||||
<option>
|
||||
cairo_font_extents_t:destroy(structure)</option>
|
||||
</command>
|
||||
<option>function</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Call this function to free memory allocated by
|
||||
cairo_font_extents_t:create.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>
|
||||
<option>cairo_matrix_t:destroy(structure)</option>
|
||||
</command>
|
||||
<option>function</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Call this function to free memory allocated by
|
||||
cairo_matrix_t:create.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -1378,6 +1378,7 @@ static void draw_string(const char *s) {
|
||||
int draw_each_line_inner(char *s, int special_index, int last_special_applied) {
|
||||
#ifndef BUILD_X11
|
||||
static int cur_x, cur_y; /* current x and y for drawing */
|
||||
(void)cur_y;
|
||||
#endif
|
||||
#ifdef BUILD_X11
|
||||
int font_h = 0;
|
||||
@ -2004,7 +2005,9 @@ static void main_loop() {
|
||||
#ifdef SIGNAL_BLOCKING
|
||||
sigset_t newmask, oldmask;
|
||||
#endif
|
||||
#ifdef BUILD_X11
|
||||
double t;
|
||||
#endif /* BUILD_X11 */
|
||||
#ifdef HAVE_SYS_INOTIFY_H
|
||||
int inotify_config_wd = -1;
|
||||
#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event))
|
||||
|
@ -52,7 +52,9 @@ inline int scroll_character_length(char c) {
|
||||
|
||||
return len;
|
||||
}
|
||||
#endif
|
||||
#else /* BUILD_X11 */
|
||||
(void)c;
|
||||
#endif /* BUILD_X11 */
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -104,13 +106,15 @@ static unsigned int scroll_count_characters_to_right(
|
||||
static void scroll_scroll_left(struct scroll_data *sd,
|
||||
const std::vector<char> &buf,
|
||||
unsigned int amount) {
|
||||
for (unsigned int i = 0;
|
||||
(i < amount) && (buf[sd->start] != '\0') && ((unsigned int) sd->start < buf.size());
|
||||
for (unsigned int i = 0; (i < amount) && (buf[sd->start] != '\0') &&
|
||||
((unsigned int)sd->start < buf.size());
|
||||
++i) {
|
||||
sd->start += scroll_character_length(buf[sd->start]);
|
||||
}
|
||||
|
||||
if (buf[sd->start] == 0 || (unsigned int) sd->start > strlen(buf.data())) { sd->start = 0; }
|
||||
if (buf[sd->start] == 0 || (unsigned int)sd->start > strlen(buf.data())) {
|
||||
sd->start = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void scroll_scroll_right(struct scroll_data *sd,
|
||||
@ -229,7 +233,7 @@ void print_scroll(struct text_object *obj, char *p, unsigned int p_max_size) {
|
||||
}
|
||||
// if length of text changed to shorter so the (sd->start) is already
|
||||
// outside of actual text then reset (sd->start)
|
||||
if ((unsigned int) sd->start >= strlen(&(buf[0]))) { sd->start = 0; }
|
||||
if ((unsigned int)sd->start >= strlen(&(buf[0]))) { sd->start = 0; }
|
||||
// make sure a colorchange at the front is not part of the string we are going
|
||||
// to show
|
||||
while (buf[sd->start] == SPECIAL_CHAR) { sd->start++; }
|
||||
|
Loading…
Reference in New Issue
Block a user