[hackers] [libdraw] renamed libdc || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Sat, 11 Sep 2010 12:35:25 +0000 (UTC)

changeset: 22:91fdc4ef4afc
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Sat Sep 11 13:35:18 2010 +0100
files: Makefile README color.c config.mk dc.h draw.h drawrect.c drawtext.c drawtextn.c eprintf.c font.c free.c init.c map.c resize.c textnw.c textw.c weprintf.c
description:
renamed libdc

diff -r c348a5e7bfd7 -r 91fdc4ef4afc Makefile
--- a/Makefile Fri Aug 27 20:32:35 2010 +0100
+++ b/Makefile Sat Sep 11 13:35:18 2010 +0100
@@ -1,4 +1,4 @@
-# libdraw - dynamic drawing library
+# libdc - dynamic drawing library
 # See LICENSE file for copyright and license details.
 
 include config.mk
@@ -8,10 +8,10 @@
 
 OBJ = ${SRC:.c=.o}
 
-all: options libdraw.a
+all: options libdc.a
 
 options:
- @echo libdraw build options:
+ @echo libdc build options:
         @echo "CFLAGS = ${CFLAGS}"
         @echo "CC = ${CC}"
 
@@ -19,37 +19,37 @@
         @echo CC $<
         @${CC} -c ${CFLAGS} $<
 
-${OBJ}: config.mk draw.h
+${OBJ}: config.mk dc.h
 
-libdraw.a: ${OBJ}
+libdc.a: ${OBJ}
         @echo AR $@
         @rm -f $@
         @ar rc $@ $+
 
 clean:
         @echo cleaning
- @rm -f libdraw.a ${OBJ} libdraw-${VERSION}.tar.gz
+ @rm -f libdc.a ${OBJ} libdc-${VERSION}.tar.gz
 
 dist: clean
         @echo creating dist tarball
- @mkdir -p libdraw-${VERSION}
- @cp -R LICENSE Makefile README config.mk ${SRC} libdraw-${VERSION}
- @tar -cf libdraw-${VERSION}.tar libdraw-${VERSION}
- @gzip libdraw-${VERSION}.tar
- @rm -rf libdraw-${VERSION}
+ @mkdir -p libdc-${VERSION}
+ @cp -R LICENSE Makefile README config.mk ${SRC} libdc-${VERSION}
+ @tar -cf libdc-${VERSION}.tar libdc-${VERSION}
+ @gzip libdc-${VERSION}.tar
+ @rm -rf libdc-${VERSION}
 
 install: all
         @echo installing header file to ${DESTDIR}${PREFIX}/include
         @mkdir -p ${DESTDIR}${PREFIX}/include
- @cp -f draw.h ${DESTDIR}${PREFIX}/include
+ @cp -f dc.h ${DESTDIR}${PREFIX}/include
         @echo installing library to ${DESTDIR}${PREFIX}/lib
         @mkdir -p ${DESTDIR}${PREFIX}/lib
- @cp -f libdraw.a ${DESTDIR}${PREFIX}/lib
+ @cp -f libdc.a ${DESTDIR}${PREFIX}/lib
 
 uninstall:
         @echo removing header file from ${DESTDIR}${PREFIX}/include
- @rm -f ${DESTDIR}${PREFIX}/include/draw.h
+ @rm -f ${DESTDIR}${PREFIX}/include/dc.h
         @echo removing library from ${DESTDIR}${PREFIX}/lib
- @rm -f ${DESTDIR}${PREFIX}/lib/libdraw.a
+ @rm -f ${DESTDIR}${PREFIX}/lib/libdc.a
 
 .PHONY: all options clean dist install uninstall
diff -r c348a5e7bfd7 -r 91fdc4ef4afc README
--- a/README Fri Aug 27 20:32:35 2010 +0100
+++ b/README Sat Sep 11 13:35:18 2010 +0100
@@ -1,19 +1,19 @@
-libdraw
-=======
-libdraw is a simple dynamic drawing library.
+libdc
+=====
+libdc is a simple dynamic drawing library.
 
 
 Requirements
 ------------
-In order to build libdraw you need the Xlib header files.
+In order to build libdc you need the Xlib header files.
 
 
 Installation
 ------------
-Edit config.mk to match your local setup (libdraw is installed into
+Edit config.mk to match your local setup (libdc is installed into
 the /usr/local namespace by default).
 
-Afterwards enter the following command to build and install libdraw
+Afterwards enter the following command to build and install libdc
 (if necessary as root):
 
     make clean install
diff -r c348a5e7bfd7 -r 91fdc4ef4afc color.c
--- a/color.c Fri Aug 27 20:32:35 2010 +0100
+++ b/color.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,6 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 unsigned long
 dc_color(DC *dc, const char *colstr) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc config.mk
--- a/config.mk Fri Aug 27 20:32:35 2010 +0100
+++ b/config.mk Sat Sep 11 13:35:18 2010 +0100
@@ -1,4 +1,4 @@
-# libdraw version
+# libdc version
 VERSION = 0.1
 
 # Customize below to fit your system
diff -r c348a5e7bfd7 -r 91fdc4ef4afc dc.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dc.h Sat Sep 11 13:35:18 2010 +0100
@@ -0,0 +1,37 @@
+/* See LICENSE file for copyright and license details. */
+
+#define FG(dc, col) ((col)[(dc)->invert ? ColBG : ColFG])
+#define BG(dc, col) ((col)[(dc)->invert ? ColFG : ColBG])
+
+enum { ColBG, ColFG, ColBorder, ColLast };
+
+typedef struct {
+ int x, y, w, h;
+ Bool invert;
+ Display *dpy;
+ GC gc;
+ Pixmap canvas;
+ struct {
+ int ascent;
+ int descent;
+ int height;
+ XFontSet set;
+ XFontStruct *xfont;
+ } font;
+} DC; /* draw context */
+
+unsigned long dc_color(DC *dc, const char *colstr);
+void dc_drawrect(DC *dc, int x, int y, unsigned int w, unsigned int h, Bool fill, unsigned long color);
+void dc_drawtext(DC *dc, const char *text, unsigned long col[ColLast]);
+void dc_drawtextn(DC *dc, const char *text, size_t n, unsigned long col[ColLast]);
+void dc_font(DC *dc, const char *fontstr);
+void dc_free(DC *dc);
+DC *dc_init(void);
+void dc_map(DC *dc, Window win, unsigned int w, unsigned int h);
+void dc_resize(DC *dc, unsigned int w, unsigned int h);
+int dc_textnw(DC *dc, const char *text, size_t len);
+int dc_textw(DC *dc, const char *text);
+void eprintf(const char *fmt, ...);
+void weprintf(const char *fmt, ...);
+
+const char *progname;
diff -r c348a5e7bfd7 -r 91fdc4ef4afc draw.h
--- a/draw.h Fri Aug 27 20:32:35 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-#define FG(dc, col) ((col)[(dc)->invert ? ColBG : ColFG])
-#define BG(dc, col) ((col)[(dc)->invert ? ColFG : ColBG])
-
-enum { ColBG, ColFG, ColBorder, ColLast };
-
-typedef struct {
- int x, y, w, h;
- Bool invert;
- Display *dpy;
- GC gc;
- Pixmap canvas;
- struct {
- int ascent;
- int descent;
- int height;
- XFontSet set;
- XFontStruct *xfont;
- } font;
-} DC; /* draw context */
-
-unsigned long dc_color(DC *dc, const char *colstr);
-void dc_drawrect(DC *dc, int x, int y, unsigned int w, unsigned int h, Bool fill, unsigned long color);
-void dc_drawtext(DC *dc, const char *text, unsigned long col[ColLast]);
-void dc_drawtextn(DC *dc, const char *text, size_t n, unsigned long col[ColLast]);
-void dc_font(DC *dc, const char *fontstr);
-void dc_free(DC *dc);
-DC *dc_init(void);
-void dc_map(DC *dc, Window win, unsigned int w, unsigned int h);
-void dc_resize(DC *dc, unsigned int w, unsigned int h);
-int dc_textnw(DC *dc, const char *text, size_t len);
-int dc_textw(DC *dc, const char *text);
-void eprintf(const char *fmt, ...);
-void weprintf(const char *fmt, ...);
-
-const char *progname;
diff -r c348a5e7bfd7 -r 91fdc4ef4afc drawrect.c
--- a/drawrect.c Fri Aug 27 20:32:35 2010 +0100
+++ b/drawrect.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,6 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 void
 dc_drawrect(DC *dc, int x, int y, unsigned int w, unsigned int h, Bool fill, unsigned long color) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc drawtext.c
--- a/drawtext.c Fri Aug 27 20:32:35 2010 +0100
+++ b/drawtext.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,7 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <string.h>
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
diff -r c348a5e7bfd7 -r 91fdc4ef4afc drawtextn.c
--- a/drawtextn.c Fri Aug 27 20:32:35 2010 +0100
+++ b/drawtextn.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,6 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 void
 dc_drawtextn(DC *dc, const char *text, size_t n, unsigned long col[ColLast]) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc eprintf.c
--- a/eprintf.c Fri Aug 27 20:32:35 2010 +0100
+++ b/eprintf.c Sat Sep 11 13:35:18 2010 +0100
@@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 void
 eprintf(const char *fmt, ...) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc font.c
--- a/font.c Fri Aug 27 20:32:35 2010 +0100
+++ b/font.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,6 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 #define DEFAULT "fixed"
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
diff -r c348a5e7bfd7 -r 91fdc4ef4afc free.c
--- a/free.c Fri Aug 27 20:32:35 2010 +0100
+++ b/free.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,7 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdlib.h>
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 void
 dc_free(DC *dc) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc init.c
--- a/init.c Fri Aug 27 20:32:35 2010 +0100
+++ b/init.c Sat Sep 11 13:35:18 2010 +0100
@@ -2,7 +2,7 @@
 #include <locale.h>
 #include <stdlib.h>
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 DC *
 dc_init(void) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc map.c
--- a/map.c Fri Aug 27 20:32:35 2010 +0100
+++ b/map.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,6 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 void
 dc_map(DC *dc, Window win, unsigned int w, unsigned int h) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc resize.c
--- a/resize.c Fri Aug 27 20:32:35 2010 +0100
+++ b/resize.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,6 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 void
 dc_resize(DC *dc, unsigned int w, unsigned int h) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc textnw.c
--- a/textnw.c Fri Aug 27 20:32:35 2010 +0100
+++ b/textnw.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,6 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 int
 dc_textnw(DC *dc, const char *text, size_t len) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc textw.c
--- a/textw.c Fri Aug 27 20:32:35 2010 +0100
+++ b/textw.c Sat Sep 11 13:35:18 2010 +0100
@@ -1,7 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <string.h>
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 int
 dc_textw(DC *dc, const char *text) {
diff -r c348a5e7bfd7 -r 91fdc4ef4afc weprintf.c
--- a/weprintf.c Fri Aug 27 20:32:35 2010 +0100
+++ b/weprintf.c Sat Sep 11 13:35:18 2010 +0100
@@ -2,7 +2,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <X11/Xlib.h>
-#include "draw.h"
+#include "dc.h"
 
 void
 weprintf(const char *fmt, ...) {
Received on Sat Sep 11 2010 - 14:35:25 CEST

This archive was generated by hypermail 2.2.0 : Sat Sep 11 2010 - 14:36:04 CEST