[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright Makefile rootcat/Makefile rootcat/roo...
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright Makefile rootcat/Makefile rootcat/roo... |
Date: |
Sun, 13 Jan 2008 21:27:05 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 08/01/13 21:27:05
Modified files:
. : Makefile
Added files:
rootcat : Makefile rootcat.c
Log message:
Added the rootcat utility to display text on the root window.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/Makefile?cvsroot=antiright&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/antiright/rootcat/Makefile?cvsroot=antiright&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/antiright/rootcat/rootcat.c?cvsroot=antiright&rev=1.1
Patches:
Index: Makefile
===================================================================
RCS file: /sources/antiright/antiright/Makefile,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- Makefile 20 Jul 2007 01:26:34 -0000 1.20
+++ Makefile 13 Jan 2008 21:27:04 -0000 1.21
@@ -1,7 +1,7 @@
###############################################################################
#
# AntiRight
-# (c) 2004-2007 Jeffrey Bedard
+# (c) 2004-2008 Jeffrey Bedard
# address@hidden
#
# This file is part of AntiRight.
@@ -32,7 +32,7 @@
cd gtkshell && $(MAKE)
cd ACE-desktop && $(MAKE)
cd xshell && $(MAKE)
-
+ cd rootcat && $(MAKE)
ctags:
ctags -w */*.[ch] ACE-desktop/ACE
@@ -41,6 +41,7 @@
cd gtkshell && $(MAKE) clean
cd ACE-desktop && $(MAKE) clean
cd xshell && $(MAKE) clean
+ cd rootcat && $(MAKE) clean
distclean: clean
rm -rf config.mk tags */.\#* .\#*
@@ -73,6 +74,7 @@
cd gtkshell && $(MAKE) install
cd ACE-desktop && $(MAKE) install
cd xshell && $(MAKE) install
+ cd roottail $$ $(MAKE) install
bzball: distclean
cd .. && cp -R antiright antiright-$(VERSION) \
Index: rootcat/Makefile
===================================================================
RCS file: rootcat/Makefile
diff -N rootcat/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ rootcat/Makefile 13 Jan 2008 21:27:04 -0000 1.1
@@ -0,0 +1,43 @@
+###############################################################################
+#
+# AntiRight
+# (c) 2008 Jeffrey Bedard
+# address@hidden
+#
+# This file is part of AntiRight.
+#
+# AntiRight is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# AntiRight is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with AntiRight; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+###############################################################################
+
+include ../config.mk
+
+PROG=rootcat
+INCLUDES=-I/usr/X11R6/include -I/usr/pkg/include
+LDFLAGS=-L/usr/X11R6/lib -L/usr/pkg/lib -lX11
+CFLAGS+=$(INCLUDES)
+CFLAGS+=-g3
+objs=rootcat.o
+
+all: $(PROG)
+
+$(PROG): $(objs)
+ $(CC) -o $(PROG) $(objs) $(LDFLAGS)
+clean:
+ rm -f $(objs) $(PROG)
+install:
+ $(INSTALL) -c $(PROG) $(PREFIX)/bin
+
Index: rootcat/rootcat.c
===================================================================
RCS file: rootcat/rootcat.c
diff -N rootcat/rootcat.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ rootcat/rootcat.c 13 Jan 2008 21:27:04 -0000 1.1
@@ -0,0 +1,58 @@
+#include <X11/X.h>
+#include <X11/Xutil.h>
+#include <X11/Xlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+/*
+ AntiRight
+ (c) 2008 Jeffrey Bedard
+ address@hidden
+
+ This file is part of AntiRight.
+
+ AntiRight is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ AntiRight is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AntiRight; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
+*/
+
+
+int
+main(int argc, char ** argv)
+{
+ char * display_name = getenv("DISPLAY");
+ Display * dpy = XOpenDisplay(display_name);
+ Window root = DefaultRootWindow(dpy);
+ XGCValues values;
+ GC gc;
+ const int scr = DefaultScreen(dpy);
+ const int line_height = 16;
+
+ values.foreground=WhitePixel(dpy, scr);
+ values.font=XLoadFont(dpy, "fixed");
+ gc=XCreateGC(dpy, root, GCForeground | GCFont, &values);
+
+ XClearWindow(dpy, root);
+ for(;argc>1; argc--)
+ {
+ XDrawString(dpy, root, gc, line_height/2, (argc-1)*line_height,
+ argv[argc-1], strlen(argv[argc-1]));
+ }
+
+ XFreeGC(dpy, gc);
+ XUnloadFont(dpy, values.font);
+ XCloseDisplay(dpy);
+
+ return 0;
+}
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright Makefile rootcat/Makefile rootcat/roo...,
Jeffrey Bedard <=