[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright configure ACE-desktop/ACE rootcat/Mak...
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright configure ACE-desktop/ACE rootcat/Mak... |
Date: |
Thu, 22 Jul 2010 19:50:36 +0000 |
CVSROOT: /sources/antiright
Module name: antiright
Changes by: Jeffrey Bedard <jefbed> 10/07/22 19:50:36
Modified files:
. : configure
ACE-desktop : ACE
rootcat : Makefile rootcat.c
Log message:
Make distcc only used as an explicit option. Added font and color
selection
to rootcat. Added consistant usage display.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/configure?cvsroot=antiright&r1=1.120&r2=1.121
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/ACE?cvsroot=antiright&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/antiright/rootcat/Makefile?cvsroot=antiright&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/antiright/rootcat/rootcat.c?cvsroot=antiright&r1=1.4&r2=1.5
Patches:
Index: configure
===================================================================
RCS file: /sources/antiright/antiright/configure,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -b -r1.120 -r1.121
--- configure 11 Nov 2008 04:19:09 -0000 1.120
+++ configure 22 Jul 2010 19:50:36 -0000 1.121
@@ -2,7 +2,7 @@
###############################################################################
#
# AntiRight
-# (c) 2004-2007 Jeffrey Bedard
+# (c) 2004-2010 Jeffrey Bedard
# address@hidden
#
# This file is part of AntiRight.
@@ -110,8 +110,10 @@
CC=gcc
fi
-if check_path_for distcc; then
+if [ "$USE_DISTCC" = "YES" ]; then
+ if check_path_for distcc; then
CC=distcc
+ fi
fi
if check_path_for ccache; then
Index: ACE-desktop/ACE
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/ACE,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- ACE-desktop/ACE 20 Dec 2007 00:21:11 -0000 1.57
+++ ACE-desktop/ACE 22 Jul 2010 19:50:36 -0000 1.58
@@ -1,6 +1,6 @@
#!/bin/sh
-# AntiRight (c) 2002-2007 Jeffrey Bedard address@hidden
+# AntiRight (c) 2002-2010 Jeffrey Bedard address@hidden
# This file is part of AntiRight.
@@ -274,17 +274,14 @@
AR()
{
AR_Prepare_Environment
- ACE -A Deskbar
- if [ "$WINDOWMANAGER" != "" ]; then
- exec $WINDOWMANAGER
- elif [ "$(which evilwm)" != "" ]; then
- exec evilwm
- elif [ "$(which twm)" != "" ]; then
- exec twm
- else
- echo AR: error: WINDOWMANAGER not set, starting terminal
- exec gshterm
+ ACE -A Deskbar &
+ for WM in $WINDOWMANAGER arwm evilwm fluxbox twm\
+ fvwm metacity gshterm ACE; do
+ if [ "`which $WM 2> /dev/null`" != "" ]; then
+ exec $wm
+ break
fi
+ done
}
Prompt_User()
{
Index: rootcat/Makefile
===================================================================
RCS file: /sources/antiright/antiright/rootcat/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- rootcat/Makefile 26 Oct 2008 00:18:39 -0000 1.3
+++ rootcat/Makefile 22 Jul 2010 19:50:36 -0000 1.4
@@ -44,5 +44,5 @@
clean:
rm -f $(objs) $(PROG) *.core
install:
- $(INSTALL) -c $(PROG) $(PREFIX)/bin
+ $(INSTALL) -sc $(PROG) $(PREFIX)/bin
Index: rootcat/rootcat.c
===================================================================
RCS file: /sources/antiright/antiright/rootcat/rootcat.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- rootcat/rootcat.c 21 Jan 2008 11:56:32 -0000 1.4
+++ rootcat/rootcat.c 22 Jul 2010 19:50:36 -0000 1.5
@@ -43,6 +43,7 @@
XftDraw * __draw;
XftColor color;
XftFont * font;
+
void (*delete)(struct _StringRenderer *);
unsigned int (*draw)(struct _StringRenderer *,
const int, const int, const char *);
@@ -159,12 +160,12 @@
}
static StringRenderer *
-new_StringRenderer_root(const char * font)
+new_StringRenderer_root(const char * font, const char * color)
{
Display * dpy = XOpenDisplay(getenv("DISPLAY"));
if(!dpy)
error_opening_display();
- return new_StringRenderer(dpy, DefaultRootWindow(dpy), font, NULL);
+ return new_StringRenderer(dpy, DefaultRootWindow(dpy), font, color);
}
static inline void
@@ -174,10 +175,31 @@
exit(exit_code);
}
-static void
-parse_command_line(StringRenderer * rc, int argc, char ** argv)
+static void clear()
{
+ StringRenderer * rc;
+
+ rc=new_StringRenderer_root(NULL, NULL);
+ $(rc, clear);
+ $(rc, delete);
+}
+
+static void print_usage(const char * app_name, int exit_code)
+{
+ if(exit_code!=0)
+ fprintf(stderr, "%s: Invalid argument\n", app_name);
+ printf("USAGE %s [-CFcf] [string] ...\n", app_name);
+ exit(exit_code);
+}
+
+static char * rootcat_color=NULL;
+static char * rootcat_font=NULL;
+
+int main(int argc, char ** argv)
+{
+ StringRenderer *rc=NULL;
int counter;
+ int line=0;
for(counter=1; counter<argc; counter++)
{
@@ -187,38 +209,47 @@
{
switch(string[1])
{
- case 'c':
- /* Since the root window is cleared before
- this function is called, simply exiting
- at this point will achieve desired
- operation. */
- rootcat_end(rc, 0);
+ case 'C': /* Set color */
+ counter++;
+ if(argv[counter])
+ rootcat_color=argv[counter];
+ else
+ print_usage(argv[0], 1);
break;
+ case 'c': /* Clean up previous invocations. */
+ clear();
+ break;
+ case 'F': /* Set font */
+ counter++;
+ if(argv[counter])
+ rootcat_font=argv[counter];
+ else
+ print_usage(argv[0], 1);
+ break;
+ case 'h':
+ print_usage(argv[0], 0);
default:
- printf("USAGE %s [-c] [string] ...\n",
- argv[0]);
- rootcat_end(rc, 1);
+ print_usage(argv[0], 1);
}
}
else
{
- unsigned int height=$(rc, get_line_height, string);
+ if(rc==NULL)
+ {
+ rc=new_StringRenderer_root(
+ rootcat_font, rootcat_color);
+ $(rc, clear);
+ }
+ {
+ unsigned int height
+ =$(rc, get_line_height, string);
$(rc, draw, (height/2),
- ((counter)*1.5*height), string);
+ ((++line)*1.5*height), string);
}
}
-}
-
-int
-main(int argc, char ** argv)
-{
- StringRenderer * rc;
-
- rc=new_StringRenderer_root(NULL);
- assert(rc);
- $(rc, clear);
- parse_command_line(rc, argc, argv);
+ }
+ if(rc!=NULL)
$(rc, delete);
return 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright configure ACE-desktop/ACE rootcat/Mak...,
Jeffrey Bedard <=