summaryrefslogtreecommitdiffstats
path: root/x11-wm/fluxconf/files
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2002-05-02 23:26:45 +0000
committerpat <pat@FreeBSD.org>2002-05-02 23:26:45 +0000
commit3fb7a0b3c7983fe9f2710fda815f061fa77771e8 (patch)
treeb226d46b8388495f0a638682bfde1cff6965cbcc /x11-wm/fluxconf/files
parent252ed204083ad73b142b089284c9e28dbd23842f (diff)
downloadFreeBSD-ports-3fb7a0b3c7983fe9f2710fda815f061fa77771e8.zip
FreeBSD-ports-3fb7a0b3c7983fe9f2710fda815f061fa77771e8.tar.gz
Add new port fluxconf - a configuration program for the fluxbox
window manager PR: 37588 Submitted by: Hendrik Scholz <hendrik@scholz.net>
Diffstat (limited to 'x11-wm/fluxconf/files')
-rw-r--r--x11-wm/fluxconf/files/patch-Makefile16
-rw-r--r--x11-wm/fluxconf/files/patch-fluxconf.c61
2 files changed, 77 insertions, 0 deletions
diff --git a/x11-wm/fluxconf/files/patch-Makefile b/x11-wm/fluxconf/files/patch-Makefile
new file mode 100644
index 0000000..aed5561
--- /dev/null
+++ b/x11-wm/fluxconf/files/patch-Makefile
@@ -0,0 +1,16 @@
+--- Makefile.orig Fri Feb 15 16:45:52 2002
++++ Makefile Tue Apr 30 19:44:15 2002
+@@ -1,8 +1,11 @@
+ .PHONY: clean install
+
+ EXE=fluxconf
+-CC=gcc
+-CFLAGS=`gtk-config --cflags --libs` -Wall -s -O
++.ifdef(WITHOUT_LOGO)
++FLAGS= -DWITHOUT_LOGO
++.endif
++
++CFLAGS+=`${GTK_CONFIG} --cflags --libs` -Wall -s -O $(FLAGS)
+
+ all: $(EXE) actions.h
+ ln -sf fluxconf fluxkeys
diff --git a/x11-wm/fluxconf/files/patch-fluxconf.c b/x11-wm/fluxconf/files/patch-fluxconf.c
new file mode 100644
index 0000000..2c85501
--- /dev/null
+++ b/x11-wm/fluxconf/files/patch-fluxconf.c
@@ -0,0 +1,61 @@
+--- fluxconf.c.orig Tue Apr 30 12:28:32 2002
++++ fluxconf.c Tue Apr 30 12:39:53 2002
+@@ -160,8 +160,9 @@
+ #define NB 16
+ #define KEYLEN 30
+ #define ACTLEN 30
+-#define EXELEN 80
++#define EXELEN 255
+ #define MAXKEYCOUNT 100
++#define MAXLINELEN 1024
+
+ /* STRUCTURE ABOUT WIDGETS :
+
+@@ -369,10 +370,10 @@
+ g_print("Can't open %s\n",initpath);
+ exit(1);
+ }
+- buf=(char*) malloc(100*sizeof(char));
++ buf=(char*) malloc(MAXLINELEN*sizeof(char)+1);
+ checkptr(buf);
+ /* get all lines */
+- while(fgets(buf,100,file)) {
++ while(fgets(buf,MAXLINELEN,file)) {
+ config=realloc(config,1+i*sizeof(char*));
+ checkptr(config);
+ config[i-1]=(char*)malloc(15+strlen(buf)*sizeof(char)); /* I get some unused space for bigger numbers, etc...*/
+@@ -535,8 +536,10 @@
+ gtk_button_set_relief(GTK_BUTTON(but),GTK_RELIEF_NONE);
+
+ gtk_widget_show_all(win);
++#ifndef WITHOUT_LOGO
+ gtk_timeout_add(100,(GtkFunction) show,logowin); /* show the logo */
+ gtk_timeout_add(3500,(GtkFunction) hide,logowin); /* hide the logo */
++#endif
+ gtk_main();
+ return 0;
+ }
+@@ -692,10 +695,10 @@
+ g_print("Can't open %s\n",initpath);
+ exit(1);
+ }
+- buf=(char*) malloc(KEYLEN+ACTLEN+EXELEN*sizeof(char));
++ buf=(char*) malloc(KEYLEN+ACTLEN+EXELEN*sizeof(char)+1);
+ checkptr(buf);
+ /* read the config */
+- while(fgets(buf,100,file)) {
++ while(fgets(buf,KEYLEN+ACTLEN+EXELEN,file)) {
+ config=realloc(config,1+i*sizeof(char*));
+ checkptr(config);
+ config[i-1]=(char*)malloc(10+strlen(buf)*sizeof(char));
+@@ -770,8 +773,10 @@
+ gtk_signal_connect(GTK_OBJECT(win), "destroy", GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
+
+ gtk_widget_show_all(win);
++#ifndef WITHOUT_LOGO
+ gtk_timeout_add(100,(GtkFunction) show,logowin); /* show the logo */
+ gtk_timeout_add(3500,(GtkFunction) hide,logowin); /* hide the logo */
++#endif
+ gtk_main();
+
+
OpenPOWER on IntegriCloud