Simplified background config, removed unneeded code. - sam - An updated version of the sam text editor.
 (HTM) git clone git://vernunftzentrum.de/sam.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 6a7718b03b78265e0a434e398f5c8775d495caf0
 (DIR) parent 61839919f24c2b7cbfe1cf02f52c303d21f96a52
 (HTM) Author: Rob King <jking@deadpixi.com>
       Date:   Thu,  1 Sep 2016 14:47:31 -0500
       
       Simplified background config, removed unneeded code.
       
       Diffstat:
         config.h.def                        |       8 +++++---
         libXg/xtbinit.c                     |      18 ++----------------
         samterm/main.c                      |       3 ---
       
       3 files changed, 7 insertions(+), 22 deletions(-)
       ---
 (DIR) diff --git a/config.h.def b/config.h.def
       @@ -27,12 +27,14 @@
        #define DEFAULT_BORDER     "black"
        
        /* You can specify multiple background colors, and sam will cycle through
       - * them. This makes differentiating between multiple documents easier.
       + * them. I think this makes differentiating between multiple files easier.
         * Others might consider this an abomination. This support is always
         * available (see ENVIRONMENT in sam(1)), but you can enable a more
       - * color default by uncommenting the line below.
       + * color default by using the line below.
         *
       -#define ANGRY_FRUIT_SALAD
       +#define DEFAULT_BACKGROUND ("white:powderblue:oldlace:lightcyan:"   \
       +                            "gainsboro:lightyellow:mintcream:snow:" \
       +                            "lightblue:thistle")
         */
        
        #endif
 (DIR) diff --git a/libXg/xtbinit.c b/libXg/xtbinit.c
       @@ -35,7 +35,7 @@
        
        /* default colors */
        #ifndef MAX_BACKGROUNDS
       -    #define MAX_BACKGROUNDS 11
       +    #define MAX_BACKGROUNDS 20
        #endif
        
        #ifndef DEFAULT_FOREGROUND
       @@ -50,20 +50,6 @@
            #define DEFAULT_BORDER "#000000"
        #endif
        
       -#ifndef ANGRY_FRUIT_SALAD
       -    #ifndef DEFAULT_BACKGROUND
       -        #define DEFAULT_BACKGROUND "#ffffff"
       -    #endif
       -#else
       -    #undef DEFAULT_FOREGROUND
       -    #undef DEFAULT_BACKGROUND
       -    #undef DEFAULT_BORDER
       -
       -    #define DEFAULT_FOREGROUND "#000000"
       -    #define DEFAULT_BACKGROUND "white:powderblue:oldlace:lightcyan:gainsboro:lightyellow:mintcream:snow:lightblue:thistle"
       -    #define DEFAULT_BORDER "#000000"
       -#endif
       -
        /* libg globals */
        Bitmap        screen;
        XftFont        *font;
       @@ -322,7 +308,7 @@ gotchar(int c, int kind, int target, int x, int y)
            if(!einitcalled || Skeyboard == -1)
                    return;
            eb = ebadd(&esrc[Skeyboard], 0);
       -    if (eb == 0)
       +    if (eb == NULL)
                    berror("eballoc can't malloc");
            k.c = c;
            k.k = kind;
 (DIR) diff --git a/samterm/main.c b/samterm/main.c
       @@ -861,9 +861,6 @@ type(Flayer *l, int res)        /* what a bloody mess this is -- but it's getting bette
                if (k.c < 0 || k.c >= Cmax)
                    panic("command table miss");
        
       -        Flayer *kl = (k.t == Tcurrent) ? l : flwhich(k.p);
       -        Text *kt = (k.t == Tcurrent) ? t : (Text *)l->user1;
       -        long ka = (k.t == Tcurrent) ? a : l->p0;
                CommandEntry *e = &commands[k.c];
                if (!e->unlocked || !lock){
                    if (k.t == Tcurrent)