# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar BUILD_LINUX_TRUE BUILD_LINUX_FALSE BUILD_SOLARIS_TRUE BUILD_SOLARIS_FALSE BUILD_FREEBSD_TRUE BUILD_FREEBSD_FALSE BUILD_NETBSD_TRUE BUILD_NETBSD_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP BUILD_SETI_TRUE BUILD_SETI_FALSE BUILD_MPD_TRUE BUILD_MPD_FALSE BUILD_CAIRO_TRUE BUILD_CAIRO_FALSE CAIROCONFIG BUILD_METAR_TRUE BUILD_METAR_FALSE BUILD_MLDONKEY_TRUE BUILD_MLDONKEY_FALSE BUILD_X11_TRUE BUILD_X11_FALSE XFTCONFIG HELP2MAN HAVE_HELP2MAN_TRUE HAVE_HELP2MAN_FALSE X11_LIBS XFT_LIBS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar BUILD_LINUX_TRUE BUILD_LINUX_FALSE BUILD_SOLARIS_TRUE BUILD_SOLARIS_FALSE BUILD_FREEBSD_TRUE BUILD_FREEBSD_FALSE BUILD_NETBSD_TRUE BUILD_NETBSD_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP BUILD_SETI_TRUE BUILD_SETI_FALSE BUILD_MPD_TRUE BUILD_MPD_FALSE BUILD_CAIRO_TRUE BUILD_CAIRO_FALSE CAIROCONFIG BUILD_METAR_TRUE BUILD_METAR_FALSE BUILD_MLDONKEY_TRUE BUILD_MLDONKEY_FALSE BUILD_X11_TRUE BUILD_X11_FALSE XFTCONFIG X11_LIBS XFT_LIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
-# Extract the first word of "help2man", so it can be a program name with args.
-set dummy help2man; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_HELP2MAN+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $HELP2MAN in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-HELP2MAN=$ac_cv_path_HELP2MAN
-
-if test -n "$HELP2MAN"; then
- echo "$as_me:$LINENO: result: $HELP2MAN" >&5
-echo "${ECHO_T}$HELP2MAN" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-
-if test x$HELP2MAN != x; then
- HAVE_HELP2MAN_TRUE=
- HAVE_HELP2MAN_FALSE='#'
-else
- HAVE_HELP2MAN_TRUE='#'
- HAVE_HELP2MAN_FALSE=
-fi
-
-
if test x$WANT_SYSINFO = xyes; then
dah=no
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${HAVE_HELP2MAN_TRUE}" && test -z "${HAVE_HELP2MAN_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"HAVE_HELP2MAN\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_HELP2MAN\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
s,@BUILD_X11_TRUE@,$BUILD_X11_TRUE,;t t
s,@BUILD_X11_FALSE@,$BUILD_X11_FALSE,;t t
s,@XFTCONFIG@,$XFTCONFIG,;t t
-s,@HELP2MAN@,$HELP2MAN,;t t
-s,@HAVE_HELP2MAN_TRUE@,$HAVE_HELP2MAN_TRUE,;t t
-s,@HAVE_HELP2MAN_FALSE@,$HAVE_HELP2MAN_FALSE,;t t
s,@X11_LIBS@,$X11_LIBS,;t t
s,@XFT_LIBS@,$XFT_LIBS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
if (sscanf(args, "%d,%d %x %x", h, w, first_colour, last_colour) < 4) {
*w = 0;
*h = 25;
- if (sscanf(args, "%*s %x %x", first_colour, last_colour) < 2) {
+ if (sscanf(args, "%*s %x %x", first_colour, last_colour) < 3) {
*w = 0;
*h = 25;
if (sscanf(args, "%x %x", first_colour, last_colour) < 2) {
screen),
DefaultColormap(display,
screen));
-
} else
#endif
{
memcpy(tmpstring1, s, TEXT_BUFFER_SIZE);
}
+long redmask, greenmask, bluemask;
+short colour_depth = 0;
+
+void set_up_gradient()
+{
+ colour_depth = DisplayPlanes(display, screen);
+ if (colour_depth != 24 && colour_depth != 16) {
+ ERR("using non-standard colour depth, gradients may look like a lolly-pop");
+ }
+ int i;
+ redmask = 0;
+ greenmask = 0;
+ bluemask = 0;
+ for(i = (colour_depth / 3)-1; i>=0; i--) {
+ redmask |= 1 << i;
+ greenmask |= 1 << i;
+ bluemask |= 1 << i;
+ }
+ if (colour_depth%3 == 1) {
+ greenmask |= 1 << (colour_depth / 3);
+ }
+ redmask = redmask << (2*colour_depth / 3 + colour_depth%3);
+ greenmask = greenmask << (colour_depth / 3);
+}
+
inline unsigned long do_gradient(unsigned long first_colour, unsigned long last_colour) { /* this function returns the next colour between two colours for a gradient */
int tmp_color = 0;
int red1, green1, blue1; // first colour
int red2, green2, blue2; // second colour
int red3 = 0, green3 = 0, blue3 = 0; // difference
- red1 = (first_colour & 0xff0000) >> 16;
- green1 = (first_colour & 0xff00) >> 8;
- blue1 = first_colour & 0xff;
- red2 = (last_colour & 0xff0000) >> 16;
- green2 = (last_colour & 0xff00) >> 8;
- blue2 = last_colour & 0xff;
+ short redshift = (2*colour_depth / 3 + colour_depth%3);
+ short greenshift = (colour_depth / 3);
+ red1 = (first_colour & redmask) >> redshift;
+ green1 = (first_colour & greenmask) >> greenshift;
+ blue1 = first_colour & bluemask;
+ red2 = (last_colour & redmask) >> redshift;
+ green2 = (last_colour & greenmask) >> greenshift;
+ blue2 = last_colour & bluemask;
if (red1 > red2) {
red3 = -1;
}
if (blue1 < 0) {
blue1 = 0;
}
- if (red1 > 0xff) {
- red1 = 0xff;
+ if (red1 > bluemask) {
+ red1 = bluemask;
}
- if (green1 > 0xff) {
- green1 = 0xff;
+ if (green1 > bluemask) {
+ green1 = bluemask;
}
- if (blue1 > 0xff) {
- blue1 = 0xff;
+ if (blue1 > bluemask) {
+ blue1 = bluemask;
}
- tmp_color = (red1 << 16) | (green1 << 8) | blue1;
+ tmp_color = (red1 << redshift) | (green1 << greenshift) | blue1;
return tmp_color;
}
inline unsigned long gradient_max(unsigned long first_colour, unsigned long last_colour) { /* this function returns the max diff for a gradient */
+ if (colour_depth == 0) {
+ set_up_gradient();
+ }
int red1, green1, blue1; // first colour
int red2, green2, blue2; // second colour
+ long redshift = (2*colour_depth / 3 + colour_depth%3);
+ long greenshift = (colour_depth / 3);
int red3 = 0, green3 = 0, blue3 = 0; // difference
- red1 = (first_colour & 0xff0000) >> 16;
- green1 = (first_colour & 0xff00) >> 8;
- blue1 = first_colour & 0xff;
- red2 = (last_colour & 0xff0000) >> 16;
- green2 = (last_colour & 0xff00) >> 8;
- blue2 = last_colour & 0xff;
+ red1 = (first_colour & redmask) >> redshift;
+ green1 = (first_colour & greenmask) >> greenshift;
+ blue1 = first_colour & bluemask;
+ red2 = (last_colour & redmask) >> redshift;
+ green2 = (last_colour & greenmask) >> greenshift;
+ blue2 = last_colour & bluemask;
red3 = abs(red1 - red2);
green3 = abs(green1 - green2);
blue3 = abs(blue1 - blue2);
gradient_update--;
}
}
- if (i /
- ((float) (w - 3) /
- (specials
- [special_index].
- graph_width)) > j) {
+ if (i / ((float) (w - 3) / (specials[special_index].graph_width)) > j) {
j++;
}
XDrawLine(display, window.drawable, window.gc, cur_x + i + 2, by + h, cur_x + i + 2, by + h - specials[special_index].graph[j] * (h - 1) / specials[special_index].graph_scale); /* this is mugfugly, but it works */
case ALIGNR:
{
- int pos_x = text_width - gap_x - get_string_width(p) - border_margin*2 - 1;
+ int pos_x = text_width + gap_x - get_string_width(p) /*- border_margin*2 - 1*/;
/*printf("pos_x %i text_start_x %i text_width %i cur_x %i get_string_width(p) %i gap_x %i specials[special_index].arg %i border_margin %i border_width %i\n", pos_x, text_start_x, text_width, cur_x, get_string_width(p), gap_x, specials[special_index].arg, border_margin, border_width);*/
- if (pos_x > specials[special_index].arg) {
- w = pos_x - specials[special_index].arg;
- }
+ if (pos_x > specials[special_index].arg && pos_x > cur_x) {
+ cur_x = pos_x - specials[special_index].arg;
+ }
}
break;