Centralized compile-time configuration into config.mk. - 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 77ac2ab259fd0b38a9352b83aa95345e67655541
 (DIR) parent 12a9f4ecc8874ab4610e2cf8a3e6ad3a1a1c361c
 (HTM) Author: Rob King <jking@deadpixi.com>
       Date:   Fri,  9 Sep 2016 17:47:30 -0500
       
       Centralized compile-time configuration into config.mk.
       
       Diffstat:
         Makefile                            |       7 ++-----
         include/u.h                         |       2 --
         libXg/Makefile                      |       2 +-
         libXg/cursorswitch.c                |       8 +-------
         libXg/gwin.c                        |       1 -
         libXg/latin1.c                      |       2 --
         libXg/xtbinit.c                     |       1 -
         libframe/Makefile                   |       2 +-
         rsam/rsam.c                         |       2 --
         sam/Makefile                        |       2 +-
         sam/mesg.c                          |       1 -
         sam/sam.h                           |       1 -
         samterm/Makefile                    |       2 +-
         samterm/main.c                      |       2 --
         samterm/samterm.h                   |       2 --
       
       15 files changed, 7 insertions(+), 30 deletions(-)
       ---
 (DIR) diff --git a/Makefile b/Makefile
       @@ -6,10 +6,7 @@
        
        MODE?=user
        
       -all:    config.h config.mk lXg lframe rsamdir samdir samtermdir docdir
       -
       -config.h:
       -        cp config.h.def config.h
       +all:    config.mk lXg lframe rsamdir samdir samtermdir docdir
        
        config.mk:
                cp config.mk.def config.mk
       @@ -49,4 +46,4 @@ clean:
                cd rsam; $(MAKE) clean
        
        nuke: clean
       -        rm -f config.h config.mk
       +        rm -f config.mk
 (DIR) diff --git a/include/u.h b/include/u.h
       @@ -9,8 +9,6 @@
        #include <unistd.h>
        #include <wchar.h>
        
       -#include "../config.h"
       -
        typedef uint16_t ushort;
        typedef uint8_t  uchar;
        typedef uint16_t  Rune;
 (DIR) diff --git a/libXg/Makefile b/libXg/Makefile
       @@ -20,7 +20,7 @@ AR=ar
        #        the name of the library
        LIB=libXg.a
        
       -CFLAGS=$(STANDARDS) $(INCS) $(INCLUDES)
       +CFLAGS=$(STANDARDS) $(INCS) $(INCLUDES) -DUSE64BITS=$(USE64BITS)
        CC?=c99
        
        OBJS=          arith.o balloc.o bitblt.o   border.o bscreenrect.o\
 (DIR) diff --git a/libXg/cursorswitch.c b/libXg/cursorswitch.c
       @@ -4,8 +4,6 @@
        #include <libg.h>
        #include "libgint.h"
        
       -#include "../config.h"
       -
        #include <X11/cursorfont.h>
        
        extern Window _topwindow;
       @@ -32,10 +30,6 @@ cursorswitch(unsigned int c)
            XDefineCursor(_dpy, _topwindow, i);
        }
        
       -#ifndef DEFAULT_CURSOR
       -#define DEFAULT_CURSOR XC_left_ptr
       -#endif
       -
        void
        initcursors(void)
        {
       @@ -43,6 +37,6 @@ initcursors(void)
            crosshair = XCreateFontCursor(_dpy, XC_crosshair);
            pirate = XCreateFontCursor(_dpy, XC_pirate);
            watch = XCreateFontCursor(_dpy, XC_watch);
       -    defcursor = XCreateFontCursor(_dpy, DEFAULT_CURSOR);
       +    defcursor = XCreateFontCursor(_dpy, XC_left_ptr);
        }
        
 (DIR) diff --git a/libXg/gwin.c b/libXg/gwin.c
       @@ -15,7 +15,6 @@
        #endif
        
        #include "GwinP.h"
       -#include "../config.h"
        #include <commands.h>
        
        /* Forward declarations */
 (DIR) diff --git a/libXg/latin1.c b/libXg/latin1.c
       @@ -5,8 +5,6 @@
        #include <stdlib.h>
        #include <string.h>
        
       -#include "../config.h"
       -
        #define MAPPING_MAX 65535
        
        struct latin
 (DIR) diff --git a/libXg/xtbinit.c b/libXg/xtbinit.c
       @@ -5,7 +5,6 @@
        #include <stdio.h>
        #include <string.h>
        #include "libgint.h"
       -#include "../config.h"
        
        #define COMPRESSMOUSE
        
 (DIR) diff --git a/libframe/Makefile b/libframe/Makefile
       @@ -15,7 +15,7 @@ RANLIB=:
        #        add name of library
        AR=ar
        
       -CFLAGS=-c $(INCS) $(STANDARDS) $(INCLUDES)
       +CFLAGS=-c $(INCS) $(STANDARDS) $(INCLUDES) -DUSE64BITS=$(USE64BITS)
        
        LIB=libframe.a
        CC?=c99
 (DIR) diff --git a/rsam/rsam.c b/rsam/rsam.c
       @@ -15,8 +15,6 @@
        #include <sys/types.h>
        #include <unistd.h>
        
       -#include "../config.h"
       -
        #define PARENT_READ  readpipe[0]
        #define CHILD_WRITE  readpipe[1]
        #define CHILD_READ   writepipe[0]
 (DIR) diff --git a/sam/Makefile b/sam/Makefile
       @@ -28,7 +28,7 @@ RXPATHNAME=/usr/bin/ssh
        #   Set RXSAMNAME to the name of the command to run on the remote host.
        RXSAMNAME=rsam
        
       -CFLAGS=$(STANDARDS) $(INCS) $(INCLUDES)
       +CFLAGS=$(STANDARDS) $(INCS) $(INCLUDES) -DUSE64BITS=$(USE64BITS) -DRXPATH='"$(RXPATH)"'
        
        LIB=../libframe/libframe.a ../libXg/libXg.a
        CC?=c99
 (DIR) diff --git a/sam/mesg.c b/sam/mesg.c
       @@ -1,6 +1,5 @@
        /* Copyright (c) 1998 Lucent Technologies - All rights reserved. */
        #include "sam.h"
       -#include "../config.h"
        
        Header  h;
        uchar   indata[DATASIZE];
 (DIR) diff --git a/sam/sam.h b/sam/sam.h
       @@ -2,7 +2,6 @@
        #include <u.h>
        #include <libc.h>
        #include "errors.h"
       -#include "../config.h"
        
        /*
         * BLOCKSIZE is relatively small to keep memory consumption down.
 (DIR) diff --git a/samterm/Makefile b/samterm/Makefile
       @@ -17,7 +17,7 @@ SAMTERM=$(BINDIR)/samterm
        #        or if you need extra libraries to load with X11 applications
        XLIBS=-lXt -lX11 -lXft
        
       -CFLAGS=$(INCS) $(STANDARDS) $(INCLUDES)
       +CFLAGS=$(INCS) $(STANDARDS) $(INCLUDES) -DUSE64BITS=$(USE64BITS)
        
        LIBS=../libframe/libframe.a ../libXg/libXg.a
        CC?=c99
 (DIR) diff --git a/samterm/main.c b/samterm/main.c
       @@ -8,8 +8,6 @@
        #include "samterm.h"
        #include <commands.h>
        
       -#include "../config.h"
       -
        extern unsigned long _bgpixel;
        extern void hmoveto(int, long, Flayer *);
        
 (DIR) diff --git a/samterm/samterm.h b/samterm/samterm.h
       @@ -1,8 +1,6 @@
        /* Copyright (c) 1998 Lucent Technologies - All rights reserved. */
        #define SAMTERM
        
       -#include "../config.h"
       -
        #define RUNESIZE    sizeof(Rune)
        #define MAXFILES    256
        #define NL  5