Update to release 20030528.

From new maintainer Gregory Steuck <greg-openbsd-pwm@nest.cx>.
This commit is contained in:
naddy 2003-06-05 23:01:51 +00:00
parent 195725f399
commit 73912c9d4a
14 changed files with 269 additions and 72 deletions

View File

@ -1,16 +1,16 @@
# $OpenBSD: Makefile,v 1.8 2002/12/29 20:31:41 fgsch Exp $
# $OpenBSD: Makefile,v 1.9 2003/06/05 23:01:51 naddy Exp $
COMMENT= "lightweight window manager with emphasis on usability"
DISTNAME= pwm-20010309
DISTNAME= pwm-20030528
CATEGORIES= x11
HOMEPAGE= http://modeemi.cs.tut.fi/~tuomov/pwm/
MASTER_SITES= http://modeemi.cs.tut.fi/~tuomov/dl/
MAINTAINER= Andrey Smagin <andrey@smagin.com>
MAINTAINER= Gregory Steuck <greg-openbsd-pwm@nest.cx>
# Artistic License
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes

View File

@ -1,3 +1,3 @@
MD5 (pwm-20010309.tar.gz) = 2d5e5c33020c97edd85c4e0b47930e00
RMD160 (pwm-20010309.tar.gz) = e083a60b6bd2a6e40715ec75a277f5e9b0a7b1df
SHA1 (pwm-20010309.tar.gz) = 2c66b778095793cb4ddbf4cbc721edac67250ae9
MD5 (pwm-20030528.tar.gz) = fce8d3609f88507979a02d5fedabc770
RMD160 (pwm-20030528.tar.gz) = 50c6f89009a81b5df1ac1358b1a496e00e8356a4
SHA1 (pwm-20030528.tar.gz) = 36445864c5a2e19c35d7eb49ca5572651f4588d2

View File

@ -1,13 +1,13 @@
$OpenBSD: patch-Makefile,v 1.2 2002/02/20 12:47:55 naddy Exp $
--- Makefile.orig Fri Mar 9 09:20:04 2001
+++ Makefile Mon Feb 18 21:54:35 2002
@@ -1,69 +1,34 @@
$OpenBSD: patch-Makefile,v 1.3 2003/06/05 23:01:51 naddy Exp $
--- Makefile.orig Wed May 28 14:58:16 2003
+++ Makefile Tue Jun 3 21:49:21 2003
@@ -1,69 +1,33 @@
-##
-## PWM Makefile
-##
-
-# System-specific configuration is in system.mk
-include system.mk
-include system-inc.mk
-
-######################################
-
@ -55,25 +55,12 @@ $OpenBSD: patch-Makefile,v 1.2 2002/02/20 12:47:55 naddy Exp $
- $(INSTALLDIR) $(ETCDIR)/pwm
- for i in etc/pwm/*.conf; do \
- $(INSTALL) -m $(DATA_MODE) $$i $(ETCDIR)/pwm; \
- done
- @ if test -f $(ETCDIR)/pwm/pwm.conf ; then \
- echo "$(ETCDIR)/pwm/pwm.conf already exists. Not installing one."; \
- else \
- echo "Installing sample configuration file $(ETCDIR)/pwm/pwm.conf"; \
- $(INSTALL) -m $(DATA_MODE) etc/pwm/sample.conf $(ETCDIR)/pwm/pwm.conf; \
- fi
-
+CFLAGS += -DPREFIX=\"${PREFIX}\" -DETCDIR=\"${SYSCONFDIR}\" -Ilibtu/include -I${X11BASE}/include
-# Disclaimer: I don't have either Gnome or KDE.
+
+LDFLAGS += ${WARN} -Llibtu -ltu -lm -lX11 -L${X11BASE}/lib
-install-gnomede: support/PWM.desktop
- $(INSTALL) -m $(DATA_MODE) support/PWM.desktop \
- `gnome-config --datadir`/gnome/wm-properties
+
+all: main
-install-gnome: install install-gnomede
+
+main: ${OBJS}
+ ${CC} ${OBJS} ${LDFLAGS} -o pwm
+ sed -e 's#/usr/local/etc#${SYSCONFDIR}#g' -e 's#PREFIX#${PREFIX}/share#g' pwm.1x.in > pwm.1x
@ -90,9 +77,23 @@ $OpenBSD: patch-Makefile,v 1.2 2002/02/20 12:47:55 naddy Exp $
+ ${BSD_INSTALL_DATA} LICENSE ${PREFIX}/share/doc/pwm
+ ${BSD_INSTALL_DATA} config.txt ${PREFIX}/share/doc/pwm
+ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/examples/pwm
+ ${BSD_INSTALL_DATA} etc/pwm/buttons-default.conf ${PREFIX}/share/examples/pwm/buttons-default.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/look-beoslike.conf ${PREFIX}/share/examples/pwm/look-beoslike.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/menus-default.conf ${PREFIX}/share/examples/pwm/menus-default.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/keys-default.conf ${PREFIX}/share/examples/pwm/keys-default.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/look-brownsteel.conf ${PREFIX}/share/examples/pwm/look-brownsteel.conf-sample
+ ${BSD_INSTALL_DATA} etc/pwm/sample.conf ${PREFIX}/share/examples/pwm/pwm.conf-sample
+ for i in buttons-default.conf look-beoslike.conf menus-default.conf \
+ keys-default.conf look-brownsteel.conf ; do \
+ ${BSD_INSTALL_DATA} etc/pwm/$$i ${PREFIX}/share/examples/pwm ;\
done
- @ if test -f $(ETCDIR)/pwm/pwm.conf ; then \
- echo "$(ETCDIR)/pwm/pwm.conf already exists. Not installing one."; \
- else \
- echo "Installing sample configuration file $(ETCDIR)/pwm/pwm.conf"; \
- $(INSTALL) -m $(DATA_MODE) etc/pwm/sample.conf $(ETCDIR)/pwm/pwm.conf; \
- fi
-
-
-# Disclaimer: I don't have either Gnome or KDE.
-
-install-gnomede: support/PWM.desktop
- $(INSTALL) -m $(DATA_MODE) support/PWM.desktop \
- `gnome-config --datadir`/gnome/wm-properties
-
-install-gnome: install install-gnomede
+ ${BSD_INSTALL_DATA} etc/pwm/sample.conf ${PREFIX}/share/examples/pwm/pwm.conf

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-clientwin_c,v 1.1 2003/06/05 23:01:51 naddy Exp $
--- clientwin.c.orig Wed May 28 14:55:08 2003
+++ clientwin.c Sun Jun 1 13:53:26 2003
@@ -864,7 +864,7 @@ void clientwin_make_label(WClientWin *cw
char tmp[16];
if(cwin->label_inst!=0)
- sprintf(tmp, CLIENTNUM_TMPL, cwin->label_inst);
+ snprintf(tmp, sizeof(tmp), CLIENTNUM_TMPL, cwin->label_inst);
else
*tmp='\0';
@@ -881,7 +881,7 @@ char *clientwin_full_label(WClientWin *c
char tmp[16];
if(cwin->label_inst!=0){
- sprintf(tmp, CLIENTNUM_TMPL, cwin->label_inst);
+ snprintf(tmp, sizeof(tmp), CLIENTNUM_TMPL, cwin->label_inst);
return scat(str, tmp);
}else{
return scopy(str);

View File

@ -0,0 +1,62 @@
$OpenBSD: patch-exec_c,v 1.1 2003/06/05 23:01:51 naddy Exp $
--- exec.c.orig Sun Jun 1 14:01:30 2003
+++ exec.c Sun Jun 1 14:53:55 2003
@@ -51,6 +51,7 @@ void wm_exec(const char *cmd)
{
int pid;
char *tmp;
+ int tmp_len;
pid=fork();
@@ -64,12 +65,13 @@ void wm_exec(const char *cmd)
close(wglobal.conn);
- tmp=ALLOC_N(char, strlen(cmd)+8);
+ tmp_len = strlen(cmd)+8;
+ tmp=ALLOC_N(char, tmp_len);
if(tmp==NULL)
die_err();
- sprintf(tmp, "exec %s", cmd);
+ snprintf(tmp, tmp_len, "exec %s", cmd);
do_exec(tmp);
}
@@ -79,17 +81,19 @@ void setup_environ(int scr)
{
char *tmp, *ptr;
char *display;
+ int tmp_len;
display=XDisplayName(wglobal.display);
- tmp=ALLOC_N(char, strlen(display)+16);
+ tmp_len = strlen(display)+16;
+ tmp=ALLOC_N(char, tmp_len);
if(tmp==NULL){
warn_err();
return;
}
- sprintf(tmp, "DISPLAY=%s", display);
+ snprintf(tmp, tmp_len, "DISPLAY=%s", display);
ptr=strchr(tmp, ':');
if(ptr!=NULL){
@@ -98,8 +102,10 @@ void setup_environ(int scr)
*ptr='\0';
}
- if(scr>=0)
- sprintf(tmp+strlen(tmp), ".%i", scr);
+ if(scr>=0) {
+ int curr_len = strlen(tmp);
+ snprintf(tmp+curr_len, tmp_len-curr_len, ".%i", scr);
+ }
putenv(tmp);

View File

@ -1,27 +1,27 @@
$OpenBSD: patch-libtu_Makefile,v 1.1 2002/02/20 12:47:55 naddy Exp $
--- libtu/Makefile.orig Fri Mar 9 09:20:04 2001
+++ libtu/Makefile Mon Feb 18 20:15:03 2002
$OpenBSD: patch-libtu_Makefile,v 1.2 2003/06/05 23:01:51 naddy Exp $
--- libtu-20030528/Makefile.orig Sun Jun 1 15:28:03 2003
+++ libtu-20030528/Makefile Sun Jun 1 15:28:32 2003
@@ -1,56 +1,4 @@
-LIBTU_NO_ERRMSG=1
-##
-## libtu Makefile
-##
-
-# System-specific configuration is in ../system.mk
-include ../system.mk
-# System-specific configuration is in system.mk
-TOPDIR=.
-include system-inc.mk
-
-######################################
-
-INCLUDES += -I./include
-CFLAGS += $(POSIX_SOURCE)
-
-OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o
-SOURCES=misc.c output.c util.c optparser.c parser.c tokenizer.c map.c
-
-ifdef LIBTU_NO_ERRMSG
-DEFINES += -DLIBTU_NO_ERRMSG
-else
-ifndef HAS_SYSTEM_ASPRINTF
-OBJS += ../snprintf_2.2/snprintf.o
-SOURCES += snprintf_2.2/snprintf.c
-else
-DEFINES += -DHAS_SYSTEM_ASPRINTF
-endif
@ -32,7 +32,7 @@ $OpenBSD: patch-libtu_Makefile,v 1.1 2002/02/20 12:47:55 naddy Exp $
-
-######################################
-
-include ../rules.mk
-include $(TOPDIR)/rules.mk
-
-######################################
-

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-moveres_c,v 1.1 2003/06/05 23:01:51 naddy Exp $
--- moveres.c.orig Sun Jun 1 13:54:30 2003
+++ moveres.c Sun Jun 1 13:55:26 2003
@@ -41,7 +41,7 @@ static XSizeHints dummy_size_hints={
static void show_pos(int x, int y)
{
- sprintf(moveres_tmpstr, "%+d %+d", x, y);
+ snprintf(moveres_tmpstr, sizeof(moveres_tmpstr), "%+d %+d", x, y);
draw_moveres(moveres_tmpstr);
}
@@ -54,7 +54,7 @@ static void show_size(int w, int h, XSiz
h/=hints->height_inc;
}
- sprintf(moveres_tmpstr, "%dx%d", w, h);
+ snprintf(moveres_tmpstr, sizeof(moveres_tmpstr), "%dx%d", w, h);
draw_moveres(moveres_tmpstr);
}

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-readconfig_c,v 1.1 2003/06/05 23:01:51 naddy Exp $
--- readconfig.c.orig Sun Jun 1 14:01:37 2003
+++ readconfig.c Sun Jun 1 15:15:23 2003
@@ -1025,8 +1025,9 @@ bool read_config(const char* cfgfile)
if(cfgfile==NULL){
cfgfile=getenv("HOME");
if(cfgfile!=NULL){
- tmp=ALLOC_N(char, strlen(cfgfile)+strlen(CF_USER_CFGFILE)+2);
- sprintf(tmp, "%s/%s", cfgfile, CF_USER_CFGFILE);
+ int tmp_len = strlen(cfgfile)+strlen(CF_USER_CFGFILE)+2;
+ tmp=ALLOC_N(char, tmp_len);
+ snprintf(tmp, tmp_len, "%s/%s", cfgfile, CF_USER_CFGFILE);
cfgfile=tmp;
}

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-screen_c,v 1.1 2003/06/05 23:01:51 naddy Exp $
--- screen.c.orig Sun Jun 1 14:01:48 2003
+++ screen.c Sun Jun 1 15:03:00 2003
@@ -58,11 +58,11 @@ static int my_error_handler(Display *dpy
XmuPrintDefaultErrorMessage(dpy, ev, stderr);
#else
XGetErrorText(dpy, ev->error_code, msg, 128);
- sprintf(num, "%d", ev->request_code);
+ snprintf(num, sizeof(num), "%d", ev->request_code);
XGetErrorDatabaseText(dpy, "XRequest", num, "", request, 64);
if(request[0]=='\0')
- sprintf(request, "<unknown request>");
+ snprintf(request, sizeof(request), "<unknown request>");
if(ev->minor_code!=0){
warn("[%d] %s (%d.%d) %#lx: %s", ev->serial, request,

View File

@ -0,0 +1,61 @@
$OpenBSD: patch-winlist_c,v 1.1 2003/06/05 23:01:51 naddy Exp $
--- winlist.c.orig Sun Jun 1 14:01:55 2003
+++ winlist.c Sun Jun 1 15:14:48 2003
@@ -167,7 +167,7 @@ static bool winlist_menudata_init(WMenuD
WFrame *frame;
int ws;
WClientWin *cwin;
- int nents, l, i=0;
+ int nents, length, entryname_length, i=0;
const char *winname;
char *entryname;
@@ -201,9 +201,9 @@ static bool winlist_menudata_init(WMenuD
continue;
winname=clientwin_full_label(cwin);
- l=32+strlen(winname);
+ length=32+strlen(winname);
- entryname=ALLOC_N(char, l);
+ entryname=ALLOC_N(char, length);
if(entryname==NULL){
warn_err();
@@ -214,15 +214,20 @@ static bool winlist_menudata_init(WMenuD
if(ws>=0){
- sprintf(entryname+0, "%d%c", ws+1,
- (cwin==frame->current_cwin ? '+' : '-'));
+ entryname_length =
+ snprintf(entryname+0, length, "%d%c", ws+1,
+ (cwin==frame->current_cwin ? '+' : '-'));
}else{
- sprintf(entryname+0, "%c%c",
- (ws==WORKSPACE_STICKY ? '*' : '?'),
- (cwin==frame->current_cwin ? '+' : '-'));
+ entryname_length =
+ snprintf(entryname+0, length, "%c%c",
+ (ws==WORKSPACE_STICKY ? '*' : '?'),
+ (cwin==frame->current_cwin ? '+' : '-'));
}
-
- sprintf(entryname+strlen(entryname), " %s", winname);
+
+
+ snprintf(entryname + entryname_length,
+ length - entryname_length,
+ " %s", winname);
ents[i].name=entryname;
ents[i].flags=0;
@@ -382,7 +387,7 @@ static bool wslist_menudata_init(WMenuDa
}
- sprintf(entryname, "ws %d", i+1);
+ snprintf(entryname, l, "ws %d", i+1);
ents[i].name=entryname;
ents[i].flags=0;

View File

@ -1,19 +1,14 @@
PWM is a rather lightweight window manager for X11. It has the unique
feature that multiple client windows can be attached to the same frame.
This feature helps keeping windows, especially the numerous xterms,
organized. A look at the screenshots below might clarify the idea.
PWM is a lightweight window manager for X11 with emphasis on usability.
It was the first window manager to implement "tabbed frames". This
feature helps keeping windows, especially the numerous xterms,
organized.
Being a lightweight window manager with emphasis on usability, PWM does
not have all the features that one might expect from a window manager.
Those features are simply unnecessary. PWM does not provide pixmapped
themes or other bloated eye candies but has a clean and simple look
inspired by BeOS and Motif. There are no icons and frames cannot be
iconified, only "shaded". Only One True (pointer) focus mode is supported:
sloppy. PWM does not even have titlebar buttons and may not be the easiest
window manager to get into, most Good Things are not.
PWM has a clean and simple look inspired by BeOS and Motif. It does have
workspaces, menus and Window Maker dockapp support as well as good
keyboard support and almost all the functionality is configurable.
PWM does have workspaces, menus and Window Maker dockapp support. It has
pretty good keyboard support and almost all the functionality is
configurable.
It does not have all the features (such as pixmapped themes, icons,
iconified windows or titlebar buttons) that one might expect from a
typical window manager and may not be the easiest one to get into.
WWW: ${HOMEPAGE}

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $OpenBSD: INSTALL,v 1.2 2002/03/08 11:50:57 naddy Exp $
# $OpenBSD: INSTALL,v 1.3 2003/06/05 23:01:51 naddy Exp $
# Pre/post-installation setup of pwm
# exit on errors, use a sane path and install prefix
@ -26,12 +26,12 @@ do_notice()
do_install()
{
install -d -o root -g wheel -m 755 $CONFIG_DIR
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/buttons-default.conf-sample $CONFIG_DIR/buttons-default.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/look-beoslike.conf-sample $CONFIG_DIR/look-beoslike.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/menus-default.conf-sample $CONFIG_DIR/menus-default.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/keys-default.conf-sample $CONFIG_DIR/keys-default.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/look-brownsteel.conf-sample $CONFIG_DIR/look-brownsteel.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/pwm.conf-sample $CONFIG_DIR/pwm.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/buttons-default.conf $CONFIG_DIR/buttons-default.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/look-beoslike.conf $CONFIG_DIR/look-beoslike.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/menus-default.conf $CONFIG_DIR/menus-default.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/keys-default.conf $CONFIG_DIR/keys-default.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/look-brownsteel.conf $CONFIG_DIR/look-brownsteel.conf
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/pwm.conf $CONFIG_DIR/pwm.conf
echo
echo "+---------------"
echo "| The $1 configuration files have been installed into"

View File

@ -1,13 +1,13 @@
@comment $OpenBSD: PLIST,v 1.2 2002/02/20 12:47:55 naddy Exp $
@comment $OpenBSD: PLIST,v 1.3 2003/06/05 23:01:51 naddy Exp $
bin/pwm
man/man1/pwm.1
share/doc/pwm/LICENSE
share/doc/pwm/config.txt
share/examples/pwm/buttons-default.conf-sample
share/examples/pwm/keys-default.conf-sample
share/examples/pwm/look-beoslike.conf-sample
share/examples/pwm/look-brownsteel.conf-sample
share/examples/pwm/menus-default.conf-sample
share/examples/pwm/pwm.conf-sample
share/examples/pwm/buttons-default.conf
share/examples/pwm/keys-default.conf
share/examples/pwm/look-beoslike.conf
share/examples/pwm/look-brownsteel.conf
share/examples/pwm/menus-default.conf
share/examples/pwm/pwm.conf
@dirrm share/examples/pwm
@dirrm share/doc/pwm

4
x11/pwm/pkg/SECURITY Normal file
View File

@ -0,0 +1,4 @@
Patches replace all sprintf occurrences with snprintf.
Sent the patches back to the author.
$OpenBSD: SECURITY,v 1.1 2003/06/05 23:01:51 naddy Exp $