Wed Apr 12 21:18:19 PDT 2000 Michael Jennings <mej@eterm.org>

This is the initial commit with Imlib2 support.  READ THIS CAREFULLY.
	There is important information in this commit message that will keep
	you from getting screwed.

	First off, support for Imlib 1.x is GONE.  It is no longer supported
	as of now.  If you want to continue using it, do NOT install this
	version.  I tried to support both for awhile, but the code ended up
	being way too ugly and hackish.  Imlib2 is the future.  And trust me,
	when you see what we do with this future, you'll be happy for the
	switch.

	The good news is that most of the basics work.  Transparency still
	works, and the basic image stuff works.  Most users won't notice any
	major problems, so long as your Imlib2 is 100% up-to-date.

	However, a few things still don't work:

	1.  Auto mode is a bit broken.  You'll get X errors in XFree86 4.0.
	Don't use it if you're running XFree 4.

	2.  Color modifiers for images don't work.  At all.

	3.  Transparency shading/tinting will not work in 8bpp or lower.  Life
	blows sometimes.  Sorry.  Time for a real video card. :-)

	4.  The built-in icon is broken.

	5.  You WILL need to update your theme.cfg files.  The borders on the
	horizontal and vertical bar images were incorrect when combined with
	the new anti-aliased scaling.  The horizontal bars should have a right
	border of 3.  Vertical bars should have a bottom border of 3.  The
	menu images should have both right *and* bottom borders of 3.  You can
	either make those changes by hand, or use the --with-theme-update
	option to autogen.sh.  Your call.

	I think that covers everything I've run into.  I will point out that
	I don't really take advantage of a lot of the Imlib2 features just
	yet.  My first priority is to make all the stuff that worked before
	work again (or at least the important stuff).  Then I'll work on
	new features.

	So there it is.  If you're not ready for it, don't use it.  But if you
	are, I hope you like it.


SVN revision: 2478
This commit is contained in:
Michael Jennings 2000-04-13 04:19:05 +00:00
parent 505ae12785
commit dfc718de71
29 changed files with 464 additions and 1493 deletions

View File

@ -3431,3 +3431,50 @@ Wed Apr 5 21:48:39 PDT 2000 Michael Jennings <mej@eterm.org>
Hopefully this will make more people happy. :-)
-------------------------------------------------------------------------------
Wed Apr 12 21:18:19 PDT 2000 Michael Jennings <mej@eterm.org>
This is the initial commit with Imlib2 support. READ THIS CAREFULLY.
There is important information in this commit message that will keep
you from getting screwed.
First off, support for Imlib 1.x is GONE. It is no longer supported
as of now. If you want to continue using it, do NOT install this
version. I tried to support both for awhile, but the code ended up
being way too ugly and hackish. Imlib2 is the future. And trust me,
when you see what we do with this future, you'll be happy for the
switch.
The good news is that most of the basics work. Transparency still
works, and the basic image stuff works. Most users won't notice any
major problems, so long as your Imlib2 is 100% up-to-date.
However, a few things still don't work:
1. Auto mode is a bit broken. You'll get X errors in XFree86 4.0.
Don't use it if you're running XFree 4.
2. Color modifiers for images don't work. At all.
3. Transparency shading/tinting will not work in 8bpp or lower. Life
blows sometimes. Sorry. Time for a real video card. :-)
4. The built-in icon is broken.
5. You WILL need to update your theme.cfg files. The borders on the
horizontal and vertical bar images were incorrect when combined with
the new anti-aliased scaling. The horizontal bars should have a right
border of 3. Vertical bars should have a bottom border of 3. The
menu images should have both right *and* bottom borders of 3. You can
either make those changes by hand, or use the --with-theme-update
option to autogen.sh. Your call.
I think that covers everything I've run into. I will point out that
I don't really take advantage of a lot of the Imlib2 features just
yet. My first priority is to make all the stuff that worked before
work again (or at least the important stuff). Then I'll work on
new features.
So there it is. If you're not ready for it, don't use it. But if you
are, I hope you like it.
-------------------------------------------------------------------------------

View File

@ -330,6 +330,7 @@
#undef KS_END
#undef CONFIG_BUFF
#undef PKGDATADIR
#undef HAVE_LIBIMLIB2
/* Leave that blank line there!! Autoheader needs it.

View File

@ -278,26 +278,33 @@ AC_ARG_WITH(imlib,
[ --with-imlib[=DIR] compile with Imlib support (Imlib residing in DIR/lib) (default)],
if test "$withval" != "no"; then
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -I${withval}/include -L${withval}/lib"
GRLIBS="-lImlib"
AC_DEFINE(PIXMAP_SUPPORT)
AC_DEFINE(BACKING_STORE)
if test "$withval" != "yes"; then
CFLAGS="$CFLAGS -I${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/lib"
fi
USE_IMLIB=1
else
AC_MSG_RESULT(no)
GRLIBS=""
USE_IMLIB=0
fi, AC_MSG_RESULT(yes)
GRLIBS="-lImlib"
AC_DEFINE(PIXMAP_SUPPORT)
AC_DEFINE(BACKING_STORE)
USE_IMLIB=1
)
if test $USE_IMLIB -eq 1 ; then
AC_CHECK_LIB(Imlib2, imlib_create_image,
GRLIBS="-lImlib2"
AC_CHECK_LIB(dl, dlopen, GRLIBS="$GRLIBS -ldl", , $SUBLIBS $X_LIBS)
AC_DEFINE(PIXMAP_SUPPORT)
AC_DEFINE(BACKING_STORE)
,
, $SUBLIBS $X_LIBS)
fi
AC_MSG_CHECKING(for transparency support)
AC_ARG_ENABLE(trans,
[ --enable-trans[=imlib] compile with transparency support (\"=imlib\" will use Imlib instead of Xlib for transparency)],
if test "$enableval" = "imlib"; then
AC_MSG_RESULT(yes, using Imlib)
AC_DEFINE(PIXMAP_OFFSET)
AC_DEFINE(IMLIB_TRANS)
elif test "$enableval" != "no"; then
[ --enable-trans compile with transparency support],
if test "$enableval" != "no"; then
AC_MSG_RESULT(yes)
AC_DEFINE(PIXMAP_OFFSET)
else
@ -518,7 +525,8 @@ AC_ARG_ENABLE(greek,
CONFIG_BUFF_SIZE=20480
AC_MSG_CHECKING(for the buffer size of the config file parser)
AC_ARG_WITH(config-buffer-size,
[ --config-buffer-size specifies the size of the buffer Eterm uses for parsing the config file (default is 20 Kb)],
[ --with-config-buffer-size
specifies the size of the buffer Eterm uses for parsing the config file (default is 20 Kb)],
if test "$withval" != "yes" -a "$withval" != "no"; then
CONFIG_BUFF_SIZE=$withval
fi)
@ -527,9 +535,7 @@ AC_DEFINE_UNQUOTED(CONFIG_BUFF, $CONFIG_BUFF_SIZE)
AC_ARG_WITH(terminfo,
[ --without-terminfo do not compile the Eterm terminfo file],
if test "$withval" = "yes"; then
:
else
if test "$withval" = "no"; then
TIC=true
fi)
@ -595,61 +601,6 @@ if test "$XIM" = "TRUE"; then
AC_CHECK_LIB(X11, XRegisterIMInstantiateCallback, AC_DEFINE(USE_X11R6_XIM), , $X_LIBS $SUBLIBS)
fi
if test -z "$PIXMAPSED"; then
AC_CHECK_PROG(IMLIB_CONFIG, imlib-config, imlib-config, no)
if test "$IMLIB_CONFIG" != "no"; then
if test "$prefix" = "NONE"; then
AC_MSG_CHECKING(imlib-config for prefix)
prefix="`$IMLIB_CONFIG --prefix`"
AC_MSG_RESULT($prefix)
fi
AC_MSG_CHECKING(imlib-config for the value of CFLAGS)
CFLAGS="$CFLAGS `$IMLIB_CONFIG --cflags`"
AC_MSG_RESULT($CFLAGS)
AC_MSG_CHECKING(imlib-config for the value of GRLIBS)
GRLIBS="$GRLIBS `$IMLIB_CONFIG --libs`"
AC_MSG_RESULT($GRLIBS)
SAVE_LIBS="$LIBS"
LIBS="$GRLIBS"
AC_MSG_CHECKING(the sanity of new compile/link flags)
AC_TRY_LINK(, , echo "yes", echo "no" ; IMLIB_CONFIG="no" ;
AC_WARN(Compile/link failed. Reverting to manual method.)
)
LIBS="$SAVE_LIBS"
fi
if test "$IMLIB_CONFIG" = "no"; then
AC_CHECK_LIB(png, png_get_valid, GRLIBS="$GRLIBS -lpng -lz -lm", ,
$SUBLIBS $X_LIBS -lz -lm)
AC_CHECK_LIB(jpeg, jpeg_read_scanlines, GRLIBS="$GRLIBS -ljpeg", ,
$SUBLIBS $X_LIBS)
AC_CHECK_LIB(tiff, TIFFOpen, GRLIBS="$GRLIBS -ltiff", ,
$SUBLIBS $X_LIBS -lm)
AC_CHECK_LIB(gif, DGifOpenFileName, GRLIBS="$GRLIBS -lgif", ,
$SUBLIBS $X_LIBS)
AC_CHECK_LIB(ungif, DGifOpenFileName, GRLIBS="$GRLIBS -lungif", ,
$SUBLIBS $X_LIBS)
AC_CHECK_LIB(Imlib, Imlib_init, , [
echo "WARNING: Imlib was not found or did not correctly link.";
echo " Please check config.log to see what the error was.";
echo " I will attempt to continue, but things may go wrong.";
AC_MSG_WARN([WARNING: libImlib not found. Attempting to continue anyway.])],
$GRLIBS $SUBLIBS $X_LIBS)
fi
fi
AC_PREFIX(Eterm)
AC_PREFIX(gcc)
if test "$prefix" = "NONE"; then

View File

@ -274,7 +274,7 @@ unsigned short
bbar_calc_height(buttonbar_t *bbar)
{
button_t *b;
ImlibBorder *bbord = images[image_bbar].norm->iml->border, *bord = images[image_button].norm->iml->border;
Imlib_Border *bbord = images[image_bbar].norm->iml->border, *bord = images[image_button].norm->iml->border;
D_BBAR(("bbar_calc_height(%8p): fascent == %d, fdescent == %d, h == %d\n", bbar, bbar->fascent, bbar->fdescent, bbar->h));
@ -321,7 +321,7 @@ bbar_calc_positions(buttonbar_t *bbar)
{
button_t *b;
unsigned short x, y;
ImlibBorder *border = images[image_bbar].norm->iml->border;
Imlib_Border *border = images[image_bbar].norm->iml->border;
D_BBAR(("bbar == %8p\n", bbar));
@ -351,7 +351,7 @@ bbar_calc_positions(buttonbar_t *bbar)
void
button_calc_size(buttonbar_t *bbar, button_t *button)
{
ImlibBorder *bord = images[image_button].norm->iml->border;
Imlib_Border *bord = images[image_button].norm->iml->border;
int ascent, descent, direction;
XCharStruct chars;
@ -379,8 +379,9 @@ button_calc_size(buttonbar_t *bbar, button_t *button)
if (bord) {
b = button->h - bord->top - bord->bottom;
}
button->icon_w = button->icon->iml->im->rgb_width;
button->icon_h = button->icon->iml->im->rgb_height;
imlib_context_set_image(button->icon->iml->im);
button->icon_w = imlib_image_get_width();
button->icon_h = imlib_image_get_height();
D_BBAR((" -> Initial icon dimensions are %hux%hu\n", button->icon_w, button->icon_h));
if (button->icon_h > b) {
button->icon_w = (unsigned short) ((float) button->icon_w / button->icon_h * b);
@ -398,7 +399,7 @@ button_calc_size(buttonbar_t *bbar, button_t *button)
void
button_calc_rel_coords(buttonbar_t *bbar, button_t *button)
{
ImlibBorder *bord = images[image_button].norm->iml->border;
Imlib_Border *bord = images[image_button].norm->iml->border;
D_BBAR(("bbar == %8p, button == %8p\n", bbar, button));

View File

@ -132,6 +132,10 @@ static const char cvs_ident[] = "$Id$";
#endif
#include "windows.h"
static RETSIGTYPE handle_child_signal(int);
static RETSIGTYPE handle_exit_signal(int);
static RETSIGTYPE handle_crash(int);
/* local variables */
int my_ruid, my_euid, my_rgid, my_egid;
char initial_dir[PATH_MAX + 1];
@ -247,11 +251,6 @@ privileges(int mode)
char *
sig_to_str(int sig)
{
/* NOTE: This can't be done with a switch because of possible conflicting
* conflicting signal types. -vendu
*/
#ifdef SIGHUP
if (sig == SIGHUP) {
return ("SIGHUP");
@ -1012,8 +1011,8 @@ dump_stack_trace(void)
/*
* Catch a SIGCHLD signal and exit if the direct child has died
*/
RETSIGTYPE
Child_signal(int sig)
static RETSIGTYPE
handle_child_signal(int sig)
{
int pid, save_errno = errno;
@ -1043,15 +1042,15 @@ Child_signal(int sig)
}
errno = save_errno;
D_CMD(("Child_signal: installing signal handler\n"));
signal(SIGCHLD, Child_signal);
D_CMD(("handle_child_signal: installing signal handler\n"));
signal(SIGCHLD, handle_child_signal);
SIG_RETURN(0);
}
/* Handles signals usually sent by a user, like HUP, TERM, INT. */
RETSIGTYPE
Exit_signal(int sig)
static RETSIGTYPE
handle_exit_signal(int sig)
{
print_error("Received terminal signal %s (%d)", sig_to_str(sig), sig);
@ -1070,7 +1069,7 @@ Exit_signal(int sig)
/* Handles abnormal termination signals -- mej */
static RETSIGTYPE
SegvHandler(int sig)
handle_crash(int sig)
{
print_error("Received terminal signal %s (%d)", sig_to_str(sig), sig);
@ -1088,6 +1087,24 @@ SegvHandler(int sig)
SIG_RETURN(0);
}
void
install_handlers(void)
{
signal(SIGHUP, handle_exit_signal);
#ifndef __svr4__
signal(SIGINT, handle_exit_signal);
#endif
signal(SIGQUIT, handle_crash);
signal(SIGTERM, handle_exit_signal);
signal(SIGCHLD, handle_child_signal);
signal(SIGSEGV, handle_crash);
signal(SIGBUS, handle_crash);
signal(SIGABRT, handle_crash);
signal(SIGFPE, handle_crash);
signal(SIGILL, handle_crash);
signal(SIGSYS, handle_crash);
}
/*
* Exit gracefully, clearing the utmp entry and restoring tty attributes
* TODO: Also free up X resources, etc., if possible
@ -1116,6 +1133,7 @@ clean_exit(void)
#endif
privileges(REVERT);
PABLO_STOP_TRACING();
DPRINTF1(("Cleanup done. I am outta here!\n"));
}
/* Acquire a pseudo-teletype from the system. */
@ -2062,24 +2080,6 @@ run_command(char *argv[])
}
#endif
/* spin off the command interpreter */
signal(SIGHUP, Exit_signal);
#ifndef __svr4__
signal(SIGINT, Exit_signal);
#endif
signal(SIGQUIT, SegvHandler);
signal(SIGTERM, Exit_signal);
signal(SIGCHLD, Child_signal);
signal(SIGSEGV, SegvHandler);
signal(SIGBUS, SegvHandler);
signal(SIGABRT, SegvHandler);
signal(SIGFPE, SegvHandler);
signal(SIGILL, SegvHandler);
signal(SIGSYS, SegvHandler);
/* need to trap SIGURG for SVR4 (Unixware) rlogin */
/* signal (SIGURG, SIG_DFL); */
D_CMD(("Forking\n"));
cmd_pid = fork();
D_CMD(("After fork(), cmd_pid == %d\n", cmd_pid));
@ -2343,7 +2343,8 @@ check_pixmap_change(int sig)
D_PIXMAP(("now %lu >= %lu (last_update %lu + rs_anim_delay %lu) ?\n", now, last_update + rs_anim_delay, last_update, rs_anim_delay));
if (now >= last_update + rs_anim_delay || 1) {
D_PIXMAP(("Time to update pixmap. now == %lu\n", now));
Imlib_destroy_image(imlib_id, images[image_bg].current->iml->im);
imlib_context_set_image(images[image_bg].current->iml->im);
imlib_free_image_and_decache();
images[image_bg].current->iml->im = NULL;
xterm_seq(XTerm_Pixmap, rs_anim_pixmaps[image_idx++]);
last_update = now;

View File

@ -342,8 +342,7 @@ extern char *sig_to_str(int);
extern const char *event_type_to_name(int);
extern const char *request_code_to_name(int);
extern void dump_stack_trace(void);
extern RETSIGTYPE Child_signal(int);
extern RETSIGTYPE Exit_signal(int);
extern void install_handlers(void);
extern void clean_exit(void);
extern int get_pty(void);
extern int get_tty(void);

View File

@ -33,17 +33,28 @@
extern unsigned int debug_level;
/* Assert macros stolen from my work on Ebar. If these macros break with your cpp, let me know -- mej@eterm.org */
/* A NOP. Does nothing. */
# define NOP ((void)0)
/* A macro and an #undef to FIXME-ize individual calls or entire code blocks. */
# define FIXME_NOP(x)
# undef FIXME_BLOCK
/* The basic debugging output leader. */
#if defined(__FILE__) && defined(__LINE__)
# ifdef __GNUC__
# define __DEBUG() fprintf(stderr, "[%lu] %12s | %4d: %s(): ", (unsigned long) time(NULL), __FILE__, __LINE__, __FUNCTION__)
# else
# define __DEBUG() fprintf(stderr, "[%lu] %12s | %4d: ", (unsigned long) time(NULL), __FILE__, __LINE__)
# endif
#else
# define __DEBUG() NOP
#endif
/* A quick and dirty macro to say, "Hi! I got here without crashing!" */
# define MOO() do { __DEBUG(); fprintf(stderr, "Moo.\n"); fflush(stderr); } while (0)
/* Assertion/abort macros which are quite a bit more useful than assert() and abort(). */
#if defined(__FILE__) && defined(__LINE__)
# ifdef __GNUC__
# define ASSERT(x) do {if (!(x)) {if (debug_level>=1) {fatal_error("ASSERT failed in %s() at %s:%d: %s", __FUNCTION__, __FILE__, __LINE__, #x);} \
@ -82,10 +93,6 @@ extern unsigned int debug_level;
# define ABORT() fatal_error("Aborting.")
#endif
#ifndef __DEBUG
# define __DEBUG() NOP
#endif
#define REQUIRE(x) do {if (!(x)) {if (debug_level>=1) {__DEBUG(); real_dprintf("REQUIRE failed: %s\n", #x);} return;}} while (0)
#define REQUIRE_RVAL(x, v) do {if (!(x)) {if (debug_level>=1) {__DEBUG(); real_dprintf("REQUIRE failed: %s\n", #x);} return (v);}} while (0)
#define NONULL(x) ((x) ? (x) : ("<null>"))

View File

@ -1,822 +0,0 @@
/* XPM */
static char * Eterm_xpm[] = {
"48 48 771 2",
" c None",
". c #282722",
"+ c #2E2C27",
"@ c #33332C",
"# c #3A382F",
"$ c #403E36",
"% c #44433B",
"& c #47463C",
"* c #515048",
"= c #58584E",
"- c #5B5B52",
"; c #757469",
"> c #918F83",
", c #8B897D",
"' c #7F7E70",
") c #807E6F",
"! c #878576",
"~ c #8C8C7A",
"{ c #010103",
"] c #020204",
"^ c #32322B",
"/ c #3B382E",
"( c #434035",
"_ c #48473D",
": c #505044",
"< c #565647",
"[ c #5A584A",
"} c #5B5B4A",
"| c #5C5B4D",
"1 c #5E5B50",
"2 c #5E5C50",
"3 c #6D6A5C",
"4 c #757362",
"5 c #787764",
"6 c #7D7B6B",
"7 c #81806F",
"8 c #848372",
"9 c #888675",
"0 c #949484",
"a c #A8A796",
"b c #B3B3A0",
"c c #B9B6A4",
"d c #B4B39F",
"e c #A6A592",
"f c #959482",
"g c #928F7E",
"h c #92917E",
"i c #928F7D",
"j c #3B3A32",
"k c #454337",
"l c #71705B",
"m c #706F5B",
"n c #6C6C5A",
"o c #727261",
"p c #757263",
"q c #757363",
"r c #757563",
"s c #787563",
"t c #787663",
"u c #787863",
"v c #797963",
"w c #7C7969",
"x c #7C7C69",
"y c #7D7C6B",
"z c #7D7D6B",
"A c #7E7D6B",
"B c #807D6B",
"C c #827F6C",
"D c #848270",
"E c #8F8B7D",
"F c #A7A693",
"G c #B2B1A0",
"H c #B6B3A2",
"I c #B6B6A2",
"J c #B3B1A0",
"K c #ADAA99",
"L c #9A9988",
"M c #8C8979",
"N c #8D8A7A",
"O c #8D8D7A",
"P c #8D8B7B",
"Q c #3E3E34",
"R c #34342C",
"S c #726E5C",
"T c #72705E",
"U c #6A6A56",
"V c #72705C",
"W c #71705C",
"X c #716F5E",
"Y c #6D6D5B",
"Z c #6C6B5B",
"` c #6A6758",
" . c #69695A",
".. c #656556",
"+. c #666656",
"@. c #615F53",
"#. c #5F5E4F",
"$. c #5E5D50",
"%. c #5C5950",
"&. c #5C5B4E",
"*. c #59574C",
"=. c #5A594C",
"-. c #5C5D50",
";. c #727166",
">. c #807D71",
",. c #818176",
"'. c #808078",
"). c #7D7D74",
"!. c #777770",
"~. c #6F6E66",
"{. c #5C5C56",
"]. c #717162",
"^. c #8A8874",
"/. c #8A8876",
"(. c #8A8A78",
"_. c #3B3B34",
":. c #706F5D",
"<. c #515044",
"[. c #30312A",
"}. c #2E2D26",
"|. c #2C2B26",
"1. c #2A2A24",
"2. c #282824",
"3. c #272926",
"4. c #252523",
"5. c #262421",
"6. c #232221",
"7. c #282625",
"8. c #232321",
"9. c #212420",
"0. c #1A1919",
"a. c #141411",
"b. c #111214",
"c. c #171616",
"d. c #2C2B2F",
"e. c #404040",
"f. c #484746",
"g. c #4C4C4C",
"h. c #494949",
"i. c #4A4A4A",
"j. c #414146",
"k. c #323235",
"l. c #31312E",
"m. c #62625A",
"n. c #868574",
"o. c #878574",
"p. c #878575",
"q. c #3D3D31",
"r. c #6E6D5B",
"s. c #706E5C",
"t. c #535045",
"u. c #161610",
"v. c #13140D",
"w. c #121519",
"x. c #0B0A0F",
"y. c #0F0F0E",
"z. c #0F0F0D",
"A. c #09090A",
"B. c #060606",
"C. c #060608",
"D. c #050507",
"E. c #07080B",
"F. c #090C14",
"G. c #070708",
"H. c #07080A",
"I. c #1F211F",
"J. c #2D2D2E",
"K. c #333535",
"L. c #323234",
"M. c #343436",
"N. c #353634",
"O. c #373735",
"P. c #373736",
"Q. c #30302F",
"R. c #2B2B29",
"S. c #615F56",
"T. c #82816F",
"U. c #82816D",
"V. c #838172",
"W. c #3C3B34",
"X. c #6C6A5B",
"Y. c #6F6E5C",
"Z. c #5D5D4D",
"`. c #202712",
" + c #1B2C0C",
".+ c #0A0B11",
"++ c #0E1117",
"@+ c #0C0C0D",
"#+ c #111013",
"$+ c #131314",
"%+ c #131310",
"&+ c #101011",
"*+ c #0F1419",
"=+ c #121419",
"-+ c #12110F",
";+ c #1A1B1B",
">+ c #363634",
",+ c #313130",
"'+ c #313131",
")+ c #2F2F31",
"!+ c #343334",
"~+ c #343534",
"{+ c #343433",
"]+ c #333434",
"^+ c #2B2C2C",
"/+ c #232324",
"(+ c #5F5E54",
"_+ c #807F6F",
":+ c #817F6C",
"<+ c #7F7E6C",
"[+ c #434138",
"}+ c #5E5E4E",
"|+ c #6D6A5B",
"1+ c #686554",
"2+ c #101911",
"3+ c #061307",
"4+ c #0B0C09",
"5+ c #0F111D",
"6+ c #0A0D0F",
"7+ c #0A0B09",
"8+ c #0A0A0B",
"9+ c #08080A",
"0+ c #050506",
"a+ c #040405",
"b+ c #040507",
"c+ c #070B11",
"d+ c #0B0C10",
"e+ c #16151A",
"f+ c #202021",
"g+ c #232323",
"h+ c #222625",
"i+ c #292A27",
"j+ c #2B2A2C",
"k+ c #2C2B2D",
"l+ c #2B2B2C",
"m+ c #292929",
"n+ c #242424",
"o+ c #131615",
"p+ c #54584C",
"q+ c #7E7B6C",
"r+ c #7E7E6C",
"s+ c #44443A",
"t+ c #424238",
"u+ c #6D6B5B",
"v+ c #171815",
"w+ c #030203",
"x+ c #040709",
"y+ c #07081E",
"z+ c #01030A",
"A+ c #02070C",
"B+ c #010204",
"C+ c #03030C",
"D+ c #03030B",
"E+ c #010107",
"F+ c #020213",
"G+ c #020208",
"H+ c #040715",
"I+ c #0E0F18",
"J+ c #141412",
"K+ c #1A1A1A",
"L+ c #1E1C21",
"M+ c #202022",
"N+ c #222224",
"O+ c #252524",
"P+ c #242422",
"Q+ c #222120",
"R+ c #1A1D1C",
"S+ c #0F100F",
"T+ c #55544A",
"U+ c #7A7964",
"V+ c #7A7968",
"W+ c #404038",
"X+ c #6A6A57",
"Y+ c #6C6B59",
"Z+ c #22241E",
"`+ c #040403",
" @ c #030506",
".@ c #04090C",
"+@ c #010303",
"@@ c #03060F",
"#@ c #03030D",
"$@ c #030314",
"%@ c #020306",
"&@ c #02030B",
"*@ c #0A1016",
"=@ c #131A1F",
"-@ c #141717",
";@ c #181814",
">@ c #1D1C18",
",@ c #1E1D20",
"'@ c #202020",
")@ c #202026",
"!@ c #1F1E1D",
"~@ c #1C1D1E",
"{@ c #151515",
"]@ c #0D0F0F",
"^@ c #54544C",
"/@ c #787668",
"(@ c #787664",
"_@ c #7A7664",
":@ c #434136",
"<@ c #6B6A57",
"[@ c #6D695B",
"}@ c #302F29",
"|@ c #020415",
"1@ c #010306",
"2@ c #06070E",
"3@ c #030608",
"4@ c #030609",
"5@ c #020307",
"6@ c #050714",
"7@ c #04030A",
"8@ c #0E0F20",
"9@ c #161834",
"0@ c #121418",
"a@ c #171816",
"b@ c #181A1B",
"c@ c #1B1B17",
"d@ c #1C1C1C",
"e@ c #1B1B1F",
"f@ c #1A191A",
"g@ c #171519",
"h@ c #100D0B",
"i@ c #07090D",
"j@ c #454945",
"k@ c #757564",
"l@ c #767668",
"m@ c #777664",
"n@ c #4A493E",
"o@ c #686753",
"p@ c #696955",
"q@ c #403F37",
"r@ c #080807",
"s@ c #050505",
"t@ c #040415",
"u@ c #05050E",
"v@ c #03060A",
"w@ c #04050D",
"x@ c #050708",
"y@ c #030305",
"z@ c #04060B",
"A@ c #02030A",
"B@ c #090916",
"C@ c #131327",
"D@ c #101012",
"E@ c #111113",
"F@ c #151213",
"G@ c #171618",
"H@ c #171714",
"I@ c #161614",
"J@ c #151614",
"K@ c #141413",
"L@ c #0F1012",
"M@ c #070707",
"N@ c #090808",
"O@ c #464339",
"P@ c #737060",
"Q@ c #727263",
"R@ c #727262",
"S@ c #47473F",
"T@ c #696958",
"U@ c #090907",
"V@ c #0D0E13",
"W@ c #0B0B09",
"X@ c #0E0E11",
"Y@ c #0B0B0C",
"Z@ c #090A0D",
"`@ c #09090E",
" # c #030504",
".# c #020205",
"+# c #060605",
"@# c #09090B",
"## c #0C0C0B",
"$# c #0E0E12",
"%# c #11120D",
"&# c #121212",
"*# c #121214",
"=# c #121311",
"-# c #0F0F12",
";# c #0B0C0A",
"># c #030304",
",# c #0C0D0D",
"'# c #4C4C42",
")# c #70705C",
"!# c #727162",
"~# c #47453D",
"{# c #545345",
"]# c #676658",
"^# c #535143",
"/# c #0C0C0A",
"(# c #121314",
"_# c #141517",
":# c #131312",
"<# c #080A08",
"[# c #060707",
"}# c #040506",
"|# c #080806",
"1# c #0A0A0A",
"2# c #0B0D0D",
"3# c #0E0E0C",
"4# c #0E0E0E",
"5# c #0A0A0C",
"6# c #060505",
"7# c #45443C",
"8# c #6F6C5A",
"9# c #726F5D",
"0# c #72715C",
"a# c #47463D",
"b# c #34342A",
"c# c #696858",
"d# c #585648",
"e# c #2E1911",
"f# c #290704",
"g# c #0E0F0C",
"h# c #090B0B",
"i# c #0C0C10",
"j# c #181919",
"k# c #0C0D0A",
"l# c #0B0D12",
"m# c #0A0D0D",
"n# c #010305",
"o# c #020304",
"p# c #0B0B0A",
"q# c #0D0B0C",
"r# c #0C0B0A",
"s# c #0A0B0E",
"t# c #0B0B0B",
"u# c #0C0C0C",
"v# c #0B0A0B",
"w# c #090905",
"x# c #050608",
"y# c #373733",
"z# c #696959",
"A# c #6E6D5C",
"B# c #4F4D43",
"C# c #323229",
"D# c #686553",
"E# c #5A594D",
"F# c #3D201B",
"G# c #480904",
"H# c #111012",
"I# c #111114",
"J# c #080A09",
"K# c #121515",
"L# c #0A0F10",
"M# c #0F1219",
"N# c #0B1217",
"O# c #010608",
"P# c #030605",
"Q# c #0E0E0F",
"R# c #111010",
"S# c #0C1011",
"T# c #090A0E",
"U# c #070706",
"V# c #060709",
"W# c #080608",
"X# c #050404",
"Y# c #030204",
"Z# c #666555",
"`# c #6E6B5C",
" $ c #6D6B5A",
".$ c #4D4D3F",
"+$ c #313129",
"@$ c #656553",
"#$ c #5E5D4D",
"$$ c #3B2B22",
"%$ c #510905",
"&$ c #181829",
"*$ c #101021",
"=$ c #161318",
"-$ c #0D0C15",
";$ c #070811",
">$ c #04040C",
",$ c #050611",
"'$ c #03040F",
")$ c #010105",
"!$ c #020103",
"~$ c #050504",
"{$ c #060604",
"]$ c #171817",
"^$ c #090908",
"/$ c #242420",
"($ c #626154",
"_$ c #6B6A5C",
":$ c #4E4B41",
"<$ c #272721",
"[$ c #605F4F",
"}$ c #616050",
"|$ c #343328",
"1$ c #300805",
"2$ c #170E0E",
"3$ c #110A0A",
"4$ c #0B0713",
"5$ c #0A0511",
"6$ c #090813",
"7$ c #0B0814",
"8$ c #0F0A1C",
"9$ c #09021C",
"0$ c #0B0320",
"a$ c #0A0329",
"b$ c #050337",
"c$ c #020240",
"d$ c #05054E",
"e$ c #0B0C4E",
"f$ c #0E0E30",
"g$ c #0D1022",
"h$ c #080B1A",
"i$ c #050812",
"j$ c #050810",
"k$ c #050711",
"l$ c #070716",
"m$ c #08080C",
"n$ c #61604F",
"o$ c #6A6A59",
"p$ c #4E4D3F",
"q$ c #1E1F1B",
"r$ c #5A5A4C",
"s$ c #646152",
"t$ c #3A392F",
"u$ c #200906",
"v$ c #150303",
"w$ c #0E0303",
"x$ c #0E0203",
"y$ c #210A03",
"z$ c #0D0203",
"A$ c #100403",
"B$ c #1B0603",
"C$ c #210503",
"D$ c #260703",
"E$ c #270803",
"F$ c #120605",
"G$ c #090909",
"H$ c #09093B",
"I$ c #020224",
"J$ c #03033A",
"K$ c #02023E",
"L$ c #030335",
"M$ c #04043A",
"N$ c #030336",
"O$ c #030324",
"P$ c #23231C",
"Q$ c #5F5F52",
"R$ c #6A6855",
"S$ c #6A6A58",
"T$ c #545348",
"U$ c #4E4D42",
"V$ c #636453",
"W$ c #424036",
"X$ c #190C09",
"Y$ c #110403",
"Z$ c #0B0103",
"`$ c #130103",
" % c #210603",
".% c #110203",
"+% c #070203",
"@% c #0B0203",
"#% c #1B0703",
"$% c #1F0603",
"%% c #0E0E10",
"&% c #04043F",
"*% c #020216",
"=% c #020229",
"-% c #020233",
";% c #020238",
">% c #020234",
",% c #020327",
"'% c #20201C",
")% c #5C5C4D",
"!% c #69685A",
"~% c #676756",
"{% c #545143",
"]% c #010102",
"^% c #4B493F",
"/% c #626454",
"(% c #4E4C3F",
"_% c #343128",
":% c #292921",
"<% c #27231D",
"[% c #281F19",
"}% c #221A13",
"|% c #1A1512",
"1% c #1A1311",
"2% c #13100F",
"3% c #17100E",
"4% c #1E100D",
"5% c #1E0C0B",
"6% c #110B09",
"7% c #080809",
"8% c #0C0D1A",
"9% c #060619",
"0% c #02020F",
"a% c #020212",
"b% c #020219",
"c% c #02021C",
"d% c #02021A",
"e% c #1B1B1A",
"f% c #59594A",
"g% c #676655",
"h% c #666657",
"i% c #000001",
"j% c #46453C",
"k% c #626254",
"l% c #5D5D4E",
"m% c #5C5C4E",
"n% c #5F5E50",
"o% c #5C5C4B",
"p% c #5A594B",
"q% c #585749",
"r% c #585447",
"s% c #515143",
"t% c #4E4C41",
"u% c #4B4B3F",
"v% c #4A453A",
"w% c #413F35",
"x% c #3D3D33",
"y% c #363442",
"z% c #312F41",
"A% c #2A293C",
"B% c #26263A",
"C% c #222238",
"D% c #1E1E2F",
"E% c #1A1A2B",
"F% c #18162A",
"G% c #161528",
"H% c #272636",
"I% c #59594F",
"J% c #686455",
"K% c #676556",
"L% c #555548",
"M% c #3A3930",
"N% c #625F4F",
"O% c #5E5E50",
"P% c #606052",
"Q% c #646254",
"R% c #636254",
"S% c #656454",
"T% c #656354",
"U% c #646454",
"V% c #636354",
"W% c #656254",
"X% c #636253",
"Y% c #605F51",
"Z% c #616051",
"`% c #5F6150",
" & c #605F50",
".& c #5D5D4F",
"+& c #5B5A53",
"@& c #595751",
"#& c #555550",
"$& c #514F4F",
"%& c #53504C",
"&& c #616052",
"*& c #636454",
"=& c #646455",
"-& c #585948",
";& c #20201D",
">& c #625F4E",
",& c #605D4D",
"'& c #626153",
")& c #626152",
"!& c #646354",
"~& c #626553",
"{& c #636553",
"]& c #595949",
"^& c #4B4941",
"/& c #524F44",
"(& c #5C5C4C",
"_& c #605E4E",
":& c #636153",
"<& c #626050",
"[& c #626051",
"}& c #5D6F4C",
"|& c #3D9F32",
"1& c #35A92D",
"2& c #59764B",
"3& c #59574B",
"4& c #4A483D",
"5& c #4F4C41",
"6& c #515043",
"7& c #565548",
"8& c #595846",
"9& c #5C5A4B",
"0& c #5F5E4E",
"a& c #5F6750",
"b& c #507F44",
"c& c #4B8640",
"d& c #5D6B4F",
"e& c #504F43",
"f& c #555546",
"g& c #535246",
"h& c #514F40",
"i& c #4F4D40",
"j& c #4C4C40",
"k& c #4D4A40",
"l& c #4A4A3F",
"m& c #49493E",
"n& c #49483E",
"o& c #4A483E",
"p& c #4A493C",
"q& c #505042",
"r& c #525242",
"s& c #555248",
"t& c #585748",
"u& c #5C5949",
"v& c #5C5B4C",
"w& c #5D5A4E",
"x& c #5E5D4E",
"y& c #5F5C4D",
"z& c #5F5E51",
"A& c #5F5F50",
"B& c #5F5E4C",
"C& c #5E5E4C",
"D& c #5D5A4A",
"E& c #5A5848",
"F& c #565445",
"G& c #535144",
"H& c #4F4E43",
"I& c #4D4D40",
"J& c #4A4A40",
"K& c #4B4A3C",
"L& c #4B4B3E",
"M& c #4E4E40",
"N& c #333329",
"O& c #2E2E27",
"P& c #303029",
"Q& c #4D4D44",
"R& c #575547",
"S& c #5C594C",
"T& c #605D4C",
"U& c #605E4C",
"V& c #5E5D4C",
"W& c #5F5D4C",
"X& c #5D5B4A",
"Y& c #5B5A4A",
"Z& c #585848",
"`& c #535345",
" * c #524F42",
".* c #3C3A34",
"+* c #414138",
"@* c #45453D",
"#* c #484638",
"$* c #464638",
"%* c #525248",
"&* c #595749",
"** c #5A584C",
"=* c #5D5D4C",
"-* c #5F5E4D",
";* c #5E5E4D",
">* c #000000",
",* c #21211D",
"'* c #23231F",
")* c #2D2D25",
"!* c #302E27",
"~* c #302E26",
"{* c #37352E",
"]* c #4C4B40",
"^* c #525144",
"/* c #5F5F5F",
"(* c #BFBFBF",
"_* c #8F8F8F",
":* c #FFFFFF",
"<* c #3F3F3F",
"[* c #6F6F6F",
"}* c #7F7F7F",
"|* c #1F1F1F",
"1* c #FEFEFE",
"2* c #2F2F2F",
"3* c #EFEFEF",
"4* c #DFDFDF",
"5* c #9F9F9F",
"6* c #0F0F0F",
" ",
" ",
" ",
" ",
" . + @ # $ % & * = - ; > , ' ) ! ~ @ { ] ",
" ^ / ( _ : < [ } | 1 2 2 3 4 5 6 7 8 9 0 a b c c d e f g h i j { ] ",
" k l m n o 4 p q r s t u v w x y z A B C D E F G H I J K L M N O P Q { ] ",
" R S T U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.{ ] ",
" W :.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.{ ] ",
" r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.C.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.{ ] ",
" X.Y.Z.`. +.+++@+#+$+%+&+y.&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+{ ] ",
" }+|+1+2+3+4+5+6+7+8+9+0+a+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+r+s+{ ] ",
" t+n u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+/+O+P+Q+R+S+T+U+V+U+W+{ ] ",
" X+Y+Z+`+ @.@+@@@] #@$@%@@@&@*@=@-@;@>@,@'@'@)@!@~@{@]@^@/@(@_@:@{ ] ",
" <@[@}@0+`+|@1@2@] 3@4@5@6@7@8@9@0@$+a@b@c@d@e@f@g@h@i@j@k@l@m@n@{ ] ",
" o@p@q@r@s@t@u@v@w@C.x@y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@{ ] ",
" #.T@n@U@M@V@W@X@Y@Z@`@ #.#.#+#@###$#%#&#*#$+=#-#;#>#,#'#)#!#V ~#{ ] ",
" {#]#^#/#G.(#_#:#<#[#}#] { { >#|#1#2#3#z.-#4#3#5#6#] 8+7#8#9#0#a#{ ] ",
" b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#@#t#u#v#w#x#] ] C.y#z#A#A#B#{ ] ",
" C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#r@V#W#X#Y#] ] ] . Z#`# $.${ ] ",
" +$@$#$$$%$&$*$=$-$;$>$,$'$)${ !$`+~$>#{$]$^$] ] ] ] ] /$($_$X.:${ ] ",
" <$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$k$l$m$. n$o$U p${ ] ",
" q$r$s$t$u$v$w$x$y$z$A$B$C$D$E$F$a+G$b.H$I$J$K$L$M$N$O$P$Q$R$S$T${ ] ",
" U$V$W$X$Y$Z$`$ %.%+%@%#%$%C$A${ D.%%&%*%=%-%;%;%>%,%'%)%!%~%{%{ ]% ",
" ^%/%(%_%:%<%[%}%|%1%2%3%4%5%6%7%E.8%9%0%a%b%b%c%d%F+e%f%g%h%^#{ i% ",
" j%k%l%m%n%Z.o%p%q%r%s%t%u%v%w%x%y#y%z%A%B%C%D%E%F%G%H%I%J%K%L%{ i% ",
" M%N%O%P%N%k%Q%R%Q%S%T%U%V%W%X%s$Y%Z%`% &#..&+&@&#&$&%&&&*&=&-&{ ",
" ;&>&,&n%'&'&k%'&)&'&W%W%k%Q%R%Q%*&W%R%R%W%W%S%!&Q%~&{&W%R%W%]&]% ",
" ^&: /&(&_&'&:&<&'&[&k%k%k%W%R%W%R%R%V%k%R%k%R%k%}&|&1&2&Q%3&]% ",
" 4&5&6&T$7&8&9&0&N%k%k%R%k%N%k%R%R%Q%R%k%a&b&c&d&Z%p%]% ",
" e&f&g&h&i&j&k&l&m&n&o&p&'#q&r&s&7&t&u&v&w&x&y&z&A&[$0& ",
" i&B&B&B&C&C&v&D&E&d#t&F&G&<.<.H&I&J&K&L&J&j&M&H&N&O&}@ ",
" P&Q&R&S&T&C&B&B&C&U&B&V&W&T&o%X&Y&&.p%Z&L%`& *U# ",
" .*W++*@*#*$*%*&***Y&=*-*B&;*;*C&]% ",
" >*>*>*>*>*>*>*>*>* ,*'*<$)*!*~*{*]*^* ",
" >*/*(*(*(*(*(*(*(*_*>* >*>* ",
" >*>*:*:*<*>*>*_*(*>*>*[*}*>* ",
" >*>*:*:*<*>*<*|*(*>*/*1*}*>* >*>*>*>* >*>*>*>*>*>*>*>*>*>*>*>*>*>*>*>*>*>* ",
" >*>*:*:*<*>*}*<*2*/*3*:*4*(*>*>*_*(*(*2*>*/*(*(*/*_*(*/*>*(*(*(*(*(*(*>*/*(*_*>* ",
" >*>*:*:*[*[*:*<*>*>*(*:*}*>*>*}*:*>*}*:*2*>*(*:*4*(*:*}*>*<*:*:*>*}*:*3*/*(*:*}*>* ",
" >*>*:*:*5*5*:*<*>*>*(*:*}*>*|*(*:*>*}*:*(*>*(*:*}*>*}*<*>*<*:*:*>*}*:*(*>*(*:*}*>* ",
" >*>*:*:*<*6*5*<*>*>*(*:*}*>*<*:*:*(*4*:*(*>*(*:*}*>*>*>*>*<*:*:*>*}*:*(*>*(*:*}*>* ",
" >*>*:*:*<*>*/*2*6*|*(*:*}*>*<*:*:*>*>*>*>*>*(*:*}*>* >*<*:*:*>*}*:*(*>*(*:*}*>* ",
" >*>*:*:*<*>*>*>*<*}*(*:*}*>*<*:*:*/*>*>*/*>*(*:*}*>* >*<*:*:*>*}*:*(*>*(*:*}*>* ",
" >*>*:*:*<*>*>*_*5*|*(*:*}*_*6*5*:*3*(*(*2*>*(*:*}*>* >*<*:*:*>*}*:*(*>*(*:*}*>* ",
" >*/*(*(*(*(*(*(*(*_*>*>*(*(*2*>*>*_*(*(*2*>*/*(*(*(*2*>* >*(*(*(*(*(*(*(*(*(*(*(*2*>* ",
" >*>*>*>*>*>*>*>*>* >*>*>* >*>*>*>* >*>*>*>*>* >*>*>*>*>*>*>*>*>*>*>*>* ",
" "};

View File

@ -25,7 +25,7 @@
# define _MENUS_H
# include <X11/Xfuncproto.h>
# include <Imlib.h>
# include <Imlib2.h>
# include "events.h"
# include "pixmap.h"

View File

@ -499,11 +499,6 @@ version(void)
#else
printf(" -PIXMAP_OFFSET");
#endif
#ifdef IMLIB_TRANS
printf(" +IMLIB_TRANS");
#else
printf(" -IMLIB_TRANS");
#endif
#ifdef BACKGROUND_CYCLING_SUPPORT
printf(" +BACKGROUND_CYCLING_SUPPORT");
#else
@ -2742,7 +2737,7 @@ parse_image(char *buff, void *state)
n = NumWords(mods);
if (!BEG_STRCASECMP(color, "image ")) {
RESET_AND_ASSIGN(iml->mod, (ImlibColorModifier *) MALLOC(sizeof(ImlibColorModifier)));
RESET_AND_ASSIGN(iml->mod, (colormod_t *) MALLOC(sizeof(colormod_t)));
iml->mod->contrast = iml->mod->gamma = 0xff;
iml->mod->brightness = (int) strtol(mods, (char **) NULL, 0);
if (n > 1) {
@ -2752,7 +2747,7 @@ parse_image(char *buff, void *state)
iml->mod->gamma = (int) strtol(PWord(3, mods), (char **) NULL, 0);
}
} else if (!BEG_STRCASECMP(color, "red ")) {
RESET_AND_ASSIGN(iml->rmod, (ImlibColorModifier *) MALLOC(sizeof(ImlibColorModifier)));
RESET_AND_ASSIGN(iml->rmod, (colormod_t *) MALLOC(sizeof(colormod_t)));
iml->rmod->contrast = iml->rmod->gamma = 0xff;
iml->rmod->brightness = (int) strtol(mods, (char **) NULL, 0);
if (n > 1) {
@ -2762,7 +2757,7 @@ parse_image(char *buff, void *state)
iml->rmod->gamma = (int) strtol(PWord(3, mods), (char **) NULL, 0);
}
} else if (!BEG_STRCASECMP(color, "green ")) {
RESET_AND_ASSIGN(iml->gmod, (ImlibColorModifier *) MALLOC(sizeof(ImlibColorModifier)));
RESET_AND_ASSIGN(iml->gmod, (colormod_t *) MALLOC(sizeof(colormod_t)));
iml->gmod->contrast = iml->gmod->gamma = 0xff;
iml->gmod->brightness = (int) strtol(mods, (char **) NULL, 0);
if (n > 1) {
@ -2772,7 +2767,7 @@ parse_image(char *buff, void *state)
iml->gmod->gamma = (int) strtol(PWord(3, mods), (char **) NULL, 0);
}
} else if (!BEG_STRCASECMP(color, "blue ")) {
RESET_AND_ASSIGN(iml->bmod, (ImlibColorModifier *) MALLOC(sizeof(ImlibColorModifier)));
RESET_AND_ASSIGN(iml->bmod, (colormod_t *) MALLOC(sizeof(colormod_t)));
iml->bmod->contrast = iml->bmod->gamma = 0xff;
iml->bmod->brightness = (int) strtol(mods, (char **) NULL, 0);
if (n > 1) {
@ -2795,7 +2790,7 @@ parse_image(char *buff, void *state)
print_error("Parse error in file %s, line %lu: Invalid parameter list for attribute \"border\"", file_peek_path(), file_peek_line());
return NULL;
}
RESET_AND_ASSIGN(images[idx].current->iml->border, (ImlibBorder *) MALLOC(sizeof(ImlibBorder)));
RESET_AND_ASSIGN(images[idx].current->iml->border, (Imlib_Border *) MALLOC(sizeof(Imlib_Border)));
images[idx].current->iml->border->left = (unsigned short) strtoul(PWord(2, buff), (char **) NULL, 0);
images[idx].current->iml->border->right = (unsigned short) strtoul(PWord(3, buff), (char **) NULL, 0);
@ -2805,7 +2800,7 @@ parse_image(char *buff, void *state)
if ((images[idx].current->iml->border->left == 0) && (images[idx].current->iml->border->right == 0)
&& (images[idx].current->iml->border->top == 0) && (images[idx].current->iml->border->bottom == 0)) {
FREE(images[idx].current->iml->border);
images[idx].current->iml->border = (ImlibBorder *) NULL; /* No sense in wasting CPU time and memory if there are no borders */
images[idx].current->iml->border = (Imlib_Border *) NULL; /* No sense in wasting CPU time and memory if there are no borders */
}
} else if (!BEG_STRCASECMP(buff, "bevel ")) {
if (idx < 0) {
@ -2825,7 +2820,7 @@ parse_image(char *buff, void *state)
FREE(images[idx].current->iml->bevel);
}
images[idx].current->iml->bevel = (bevel_t *) MALLOC(sizeof(bevel_t));
images[idx].current->iml->bevel->edges = (ImlibBorder *) MALLOC(sizeof(ImlibBorder));
images[idx].current->iml->bevel->edges = (Imlib_Border *) MALLOC(sizeof(Imlib_Border));
if (!BEG_STRCASECMP(PWord(2, buff), "down")) {
images[idx].current->iml->bevel->up = 0;
@ -2840,7 +2835,7 @@ parse_image(char *buff, void *state)
if ((images[idx].current->iml->bevel->edges->left == 0) && (images[idx].current->iml->bevel->edges->right == 0)
&& (images[idx].current->iml->bevel->edges->top == 0) && (images[idx].current->iml->bevel->edges->bottom == 0)) {
FREE(images[idx].current->iml->bevel->edges);
images[idx].current->iml->bevel->edges = (ImlibBorder *) NULL;
images[idx].current->iml->bevel->edges = (Imlib_Border *) NULL;
FREE(images[idx].current->iml->bevel);
images[idx].current->iml->bevel = (bevel_t *) NULL;
}
@ -2857,7 +2852,7 @@ parse_image(char *buff, void *state)
print_error("Parse error in file %s, line %lu: Invalid parameter list for attribute \"padding\"", file_peek_path(), file_peek_line());
return NULL;
}
RESET_AND_ASSIGN(images[idx].current->iml->pad, (ImlibBorder *) MALLOC(sizeof(ImlibBorder)));
RESET_AND_ASSIGN(images[idx].current->iml->pad, (Imlib_Border *) MALLOC(sizeof(Imlib_Border)));
images[idx].current->iml->pad->left = (unsigned short) strtoul(PWord(2, buff), (char **) NULL, 0);
images[idx].current->iml->pad->right = (unsigned short) strtoul(PWord(3, buff), (char **) NULL, 0);
@ -2867,7 +2862,7 @@ parse_image(char *buff, void *state)
if ((images[idx].current->iml->pad->left == 0) && (images[idx].current->iml->pad->right == 0)
&& (images[idx].current->iml->pad->top == 0) && (images[idx].current->iml->pad->bottom == 0)) {
FREE(images[idx].current->iml->pad);
images[idx].current->iml->pad = (ImlibBorder *) NULL;
images[idx].current->iml->pad = (Imlib_Border *) NULL;
}
} else {
print_error("Parse error in file %s, line %lu: Attribute \"%s\" is not valid "
@ -3850,7 +3845,7 @@ post_parse(void)
unsigned char n = NumWords(rs_cmod_image);
imlib_t *iml = images[image_bg].norm->iml;
RESET_AND_ASSIGN(iml->mod, (ImlibColorModifier *) MALLOC(sizeof(ImlibColorModifier)));
RESET_AND_ASSIGN(iml->mod, (colormod_t *) MALLOC(sizeof(colormod_t)));
iml->mod->contrast = iml->mod->gamma = 0xff;
iml->mod->brightness = (int) strtol(rs_cmod_image, (char **) NULL, 0);
if (n > 1) {
@ -3865,7 +3860,7 @@ post_parse(void)
unsigned char n = NumWords(rs_cmod_red);
imlib_t *iml = images[image_bg].norm->iml;
RESET_AND_ASSIGN(iml->rmod, (ImlibColorModifier *) MALLOC(sizeof(ImlibColorModifier)));
RESET_AND_ASSIGN(iml->rmod, (colormod_t *) MALLOC(sizeof(colormod_t)));
iml->rmod->contrast = iml->rmod->gamma = 0xff;
iml->rmod->brightness = (int) strtol(rs_cmod_red, (char **) NULL, 0);
if (n > 1) {
@ -3880,7 +3875,7 @@ post_parse(void)
unsigned char n = NumWords(rs_cmod_green);