[hackers] [swk] * Properly fix fPIC build || pancake

From: <hg_AT_suckless.org>
Date: Tue, 31 Aug 2010 22:47:07 +0000 (UTC)

changeset: 75:11a76216ccbf
tag: tip
user: pancake <pancake_AT_nopcode.org>
date: Wed Sep 01 00:43:56 2010 +0200
files: Makefile gi_x11.c swk.c text.c
description:
* Properly fix fPIC build

diff -r dd9792dc8644 -r 11a76216ccbf Makefile
--- a/Makefile Wed Sep 01 00:31:19 2010 +0200
+++ b/Makefile Wed Sep 01 00:43:56 2010 +0200
@@ -1,4 +1,4 @@
-.PHONY: all rmo t clean install
+.PHONY: all t clean install
 
 -include config.mk
 
@@ -36,13 +36,10 @@
 config.mk: config.h
         cp config.def.mk config.mk
 
-clean: rmo
+clean:
         echo >swk.mk
         cd t && ${MAKE} clean
- rm -f swk.pc swk.mk libswk.a libswk.so ${GI_OBJS}
-
-rmo:
- rm -f ${OBJS}
+ rm -f swk.pc swk.mk libswk.a libswk.so ${OBJS} ${GI_OBJS}
 
 install:
         mkdir -p ${DESTDIR}/${INCDIR}
@@ -66,12 +63,12 @@
 
 shared: libswk.so
 
-libswk.so: rmo config.mk ${OBJS} ${GI_OBJS}
- ${CC} ${CFLAGS} -fPIC -shared ${OBJS} ${GI_SRCS} -o libswk.so
+libswk.so: config.mk ${OBJS} ${GI_OBJS}
+ ${CC} ${CFLAGS} -fPIC -shared image.c swk.c text.c ${GI_SRCS} -o libswk.so
 
 swk.o: config.mk
 
-libswk.a: rmo config.mk ${OBJS} ${GI_OBJS}
+libswk.a: config.mk ${OBJS} ${GI_OBJS}
         rm -f libswk.a
         ar qcvf libswk.a ${OBJS} ${GI_OBJS}
         echo SWKINCS+=-I${PREFIX}/include > swk.mk
diff -r dd9792dc8644 -r 11a76216ccbf gi_x11.c
--- a/gi_x11.c Wed Sep 01 00:31:19 2010 +0200
+++ b/gi_x11.c Wed Sep 01 00:43:56 2010 +0200
@@ -13,7 +13,7 @@
 #include "config.h"
 
 //#define FONTNAME "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*"
-#define FONTNAME "10x20"
+#define FONTNAME "--10x20"
 
 static int fs = FONTSIZE; // TODO: we need fsW and fsH
 static Window window;
diff -r dd9792dc8644 -r 11a76216ccbf swk.c
--- a/swk.c Wed Sep 01 00:31:19 2010 +0200
+++ b/swk.c Wed Sep 01 00:43:56 2010 +0200
@@ -426,9 +426,6 @@
                         }
                 }
                 break;
- default:
- swk_label(e);
- break;
         case EExpose:
                 // XXX: add support for cursor (handle arrow keys)
                 swk_gi_fill(e->box->r, ColorBG, 1);
@@ -451,6 +448,9 @@
                         swk_gi_fill(r, ColorFG, 2);
                 }
                 break;
+ default:
+ swk_label(e);
+ break;
         }
 }
 
diff -r dd9792dc8644 -r 11a76216ccbf text.c
--- a/text.c Wed Sep 01 00:31:19 2010 +0200
+++ b/text.c Wed Sep 01 00:43:56 2010 +0200
@@ -116,7 +116,7 @@
                 t->cur = 0;
         if(t->cur>t->len)
                 t->cur = t->len;
- if(t->text[t->cur]=='\n')
+ if(dir<0 && t->text[t->cur]=='\n')
                 t->cur+=dir;
 }
 
Received on Wed Sep 01 2010 - 00:47:07 CEST

This archive was generated by hypermail 2.2.0 : Wed Sep 01 2010 - 00:48:04 CEST