JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed backspace problem, updated terminfo entry and moved TNAME in config.h.
[st.git] / st.c
diff --git a/st.c b/st.c
index 5715f0f..f8d2257 100644 (file)
--- a/st.c
+++ b/st.c
@@ -20,8 +20,6 @@
 #include <X11/keysym.h>
 #include <X11/Xutil.h>
 
-#define TNAME "st-256color"
-
 /* Arbitrary sizes */
 #define ESC_TITLE_SIZ 256
 #define ESC_BUF_SIZ   256
@@ -107,8 +105,6 @@ typedef struct {
        char s[ESC_BUF_SIZ];
 } Key;
 
-#include "config.h"
-
 /* Drawing Context */
 typedef struct {
        unsigned long col[256];
@@ -117,6 +113,8 @@ typedef struct {
        GC gc;
 } DC;
 
+#include "config.h"
+
 static void die(const char *errstr, ...);
 static void draw(int);
 static void execsh(void);
@@ -157,6 +155,7 @@ static void ttywrite(const char *, size_t);
 static void xclear(int, int, int, int);
 static void xcursor(int);
 static void xinit(void);
+static void xloadcols(void);
 
 static void expose(XEvent *);
 static char* kmap(KeySym);
@@ -1035,7 +1034,7 @@ tresize(int col, int row) {
 }
 
 void
-tloadcols(void) {
+xloadcols(void) {
        int i, r, g, b;
        XColor color;
        Colormap cmap = DefaultColormap(xw.dis, xw.scr);
@@ -1115,7 +1114,7 @@ xinit(void) {
        xw.ch = dc.font->ascent + dc.font->descent;
 
        /* colors */
-       tloadcols();
+       xloadcols();
 
        term.c.attr.fg = DefaultFG;
        term.c.attr.bg = DefaultBG;