Common subdirectories: 2006-10-13.org/dmenu and 2006-10-13/dmenu Common subdirectories: 2006-10-13.org/dwm and 2006-10-13/dwm Common subdirectories: 2006-10-13.org/libixp and 2006-10-13/libixp Common subdirectories: 2006-10-13.org/wmii and 2006-10-13/wmii diff -ru 2006-10-13.org/dmenu/config.mk 2006-10-13/dmenu/config.mk --- 2006-10-13.org/dmenu/config.mk Thu Oct 12 13:00:01 2006 +++ 2006-10-13/dmenu/config.mk Fri Oct 13 17:57:39 2006 @@ -15,11 +15,16 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 # flags -CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -LDFLAGS = ${LIBS} +#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" +#LDFLAGS = ${LIBS} #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" #LDFLAGS = -g ${LIBS} +# Solaris +CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" +LDFLAGS = ${LIBS} +CFLAGS += -xtarget=ultra + # compiler and linker CC = cc LD = ${CC} diff -ru 2006-10-13.org/libixp/config.mk 2006-10-13/libixp/config.mk --- 2006-10-13.org/libixp/config.mk Thu Oct 12 17:00:02 2006 +++ 2006-10-13/libixp/config.mk Fri Oct 13 17:56:03 2006 @@ -12,11 +12,17 @@ LIBS = -L/usr/lib -lc -L. # flags -CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -LDFLAGS = ${LIBS} +#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" +#LDFLAGS = ${LIBS} #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" #LDFLAGS = -g ${LIBS} +# Solaris +CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" +LDFLAGS = ${LIBS} +LIBS += -lsocket -lnsl +CFLAGS += -xtarget=ultra + # compiler and linker AR = ar cr CC = cc diff -ru 2006-10-13.org/libixp/ixp.h 2006-10-13/libixp/ixp.h --- 2006-10-13.org/libixp/ixp.h Thu Oct 12 17:00:02 2006 +++ 2006-10-13/libixp/ixp.h Fri Oct 13 17:55:20 2006 @@ -159,54 +159,54 @@ unsigned char type; unsigned short tag; unsigned int fid; - union { - struct { /* Tversion, Rversion */ +// union { +// struct { /* Tversion, Rversion */ unsigned int msize; char *version; - }; - struct { /* Tflush */ +// }; +// struct { /* Tflush */ unsigned short oldtag; - }; - struct { /* Rerror */ +// }; +// struct { /* Rerror */ char *ename; - }; - struct { /* Ropen, Rcreate */ +// }; +// struct { /* Ropen, Rcreate */ Qid qid; /* +Rattach */ unsigned int iounit; - }; - struct { /* Rauth */ +// }; +// struct { /* Rauth */ Qid aqid; - }; - struct { /* Tauth, Tattach */ +// }; +// struct { /* Tauth, Tattach */ unsigned int afid; char *uname; char *aname; - }; - struct { /* Tcreate */ +// }; +// struct { /* Tcreate */ unsigned int perm; char *name; unsigned char mode; /* +Topen */ - }; - struct { /* Twalk */ +// }; +// struct { /* Twalk */ unsigned int newfid; unsigned short nwname; char *wname[IXP_MAX_WELEM]; - }; - struct { /* Rwalk */ +// }; +// struct { /* Rwalk */ unsigned short nwqid; Qid wqid[IXP_MAX_WELEM]; - }; - struct { /* Twrite */ +// }; +// struct { /* Twrite */ unsigned long long offset; /* +Tread */ /* +Rread */ unsigned int count; /* +Tread */ char *data; - }; - struct { /* Twstat, Rstat */ +// }; +// struct { /* Twstat, Rstat */ unsigned short nstat; unsigned char *stat; - }; - }; +// }; +// }; } Fcall; typedef struct IXPServer IXPServer; diff -ru 2006-10-13.org/wmii/config.mk 2006-10-13/wmii/config.mk --- 2006-10-13.org/wmii/config.mk Thu Oct 12 17:00:04 2006 +++ 2006-10-13/wmii/config.mk Fri Oct 13 18:29:05 2006 @@ -13,14 +13,21 @@ # includes and libs INCS = -I. -I${PREFIX}/include -I/usr/include -I${X11INC} -LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -L${PREFIX} -lixp -lm +LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -L${PREFIX} -L../libixp -lixp -lm # flags -CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -LDFLAGS = ${LIBS} +#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" +#LDFLAGS = ${LIBS} #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" #LDFLAGS = -g ${LIBS} +# Solaris +INCS += -I../libixp +CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" +LDFLAGS = ${LIBS} +LIBS += -lsocket -lnsl +CFLAGS += -xtarget=ultra + # compiler and linker CC = cc LD = ${CC} diff -ru 2006-10-13.org/wmii/event.c 2006-10-13/wmii/event.c --- 2006-10-13.org/wmii/event.c Thu Oct 12 17:00:04 2006 +++ 2006-10-13/wmii/event.c Fri Oct 13 18:00:45 2006 @@ -62,12 +62,12 @@ if(ev->window == screen->barwin) { for(b=screen->lbar; b; b=b->next) if(ispointinrect(ev->x, ev->y, &b->brush.rect)) - return write_event("LeftBarClick %d %s\n", - ev->button, b->name); + write_event("LeftBarClick %d %s\n", + ev->button, b->name); return; for(b=screen->rbar; b; b=b->next) if(ispointinrect(ev->x, ev->y, &b->brush.rect)) - return write_event("RightBarClick %d %s\n", - ev->button, b->name); + write_event("RightBarClick %d %s\n", + ev->button, b->name); return; } else if((f = frame_of_win(ev->window))) write_event("ClientClick %d %d\n", idx_of_client(f->client), ev->button); diff -ru 2006-10-13.org/wmii/fs.c 2006-10-13/wmii/fs.c --- 2006-10-13.org/wmii/fs.c Thu Oct 12 17:00:04 2006 +++ 2006-10-13/wmii/fs.c Fri Oct 13 18:08:43 2006 @@ -29,7 +29,7 @@ typedef struct FileId FileId; struct FileId { FileId *next; - union { +// union { void *ref; char *buf; Bar *bar; @@ -38,7 +38,7 @@ Client *client; Ruleset *rule; BlitzColor *col; - }; +// }; unsigned int id; unsigned int index; Dirtab tab; @@ -123,12 +123,12 @@ * removes the need for casting and allows for C90 conformance, * since otherwise we would need to use compound literals */ static Dirtab *dirtab[] = { - [FsRoot] dirtab_root, - [FsDBars] dirtab_bars, - [FsDClients] dirtab_clients, - [FsDClient] dirtab_client, - [FsDTags] dirtab_tags, - [FsDTag] dirtab_tag, + /*[FsRoot]*/ dirtab_root, + /*[FsDBars]*/ dirtab_bars, + /*[FsDClients]*/ dirtab_clients, + /*[FsDClient]*/ dirtab_client, + /*[FsDTags]*/ dirtab_tags, + /*[FsDTag]*/ dirtab_tag, }; /* Utility Functions */ @@ -558,7 +558,7 @@ f=f->next; free_file(nf); } - return respond(r, Enofile); + respond(r, Enofile); return; } /* Remove refs for r->fid if no new fid */ /* If Fids were ref counted, this could be @@ -639,46 +639,46 @@ free_file(f); } r->ofcall.count = r->ifcall.count - size; - return respond(r, NULL); + respond(r, NULL); return; } else{ switch(f->tab.type) { case FsFprops: write_buf(r, (void *)f->client->props, strlen(f->client->props)); - return respond(r, NULL); + respond(r, NULL); return; case FsFColRules: case FsFTagRules: write_buf(r, (void *)f->rule->string, f->rule->size); - return respond(r, NULL); + respond(r, NULL); return; case FsFKeys: write_buf(r, (void *)def.keys, def.keyssz); - return respond(r, NULL); + respond(r, NULL); return; case FsFCtags: write_buf(r, (void *)f->client->tags, strlen(f->client->tags)); - return respond(r, NULL); + respond(r, NULL); return; case FsFTctl: write_buf(r, (void *)f->view->name, strlen(f->view->name)); - return respond(r, NULL); + respond(r, NULL); return; case FsFBar: write_buf(r, (void *)f->bar->buf, strlen(f->bar->buf)); - return respond(r, NULL); + respond(r, NULL); return; case FsFRctl: buf = read_root_ctl(); write_buf(r, buf, strlen(buf)); - return respond(r, NULL); + respond(r, NULL); return; case FsFCctl: if(r->ifcall.offset) - return respond(r, NULL); + respond(r, NULL); return; r->ofcall.data = ixp_emallocz(16); n = snprintf(r->ofcall.data, 16, "%d", f->index); assert(n >= 0); r->ofcall.count = n; - return respond(r, NULL); + respond(r, NULL); return; case FsFTindex: buf = (char *)view_index(f->view); n = strlen(buf); write_buf(r, (void *)buf, n); - return respond(r, NULL); + respond(r, NULL); return; case FsFEvent: respond_event(r); return; @@ -697,40 +697,40 @@ unsigned int i; if(r->ifcall.count == 0) - return respond(r, NULL); + respond(r, NULL); return; f = r->fid->aux; switch(f->tab.type) { case FsFColRules: case FsFTagRules: write_to_buf(r, &f->rule->string, &f->rule->size, 0); - return respond(r, NULL); + respond(r, NULL); return; case FsFKeys: write_to_buf(r, &def.keys, &def.keyssz, 0); - return respond(r, NULL); + respond(r, NULL); return; case FsFCtags: data_to_cstring(r); i=strlen(f->client->tags); write_to_buf(r, &f->client->tags, &i, 255); r->ofcall.count = i- r->ifcall.offset; - return respond(r, NULL); + respond(r, NULL); return; case FsFBar: /* XXX: This should validate after each write */ i = strlen(f->bar->buf); write_to_buf(r, &f->bar->buf, &i, 279); r->ofcall.count = i - r->ifcall.offset; - return respond(r, NULL); + respond(r, NULL); return; case FsFCctl: data_to_cstring(r); if((errstr = message_client(f->client, r->ifcall.data))) - return respond(r, errstr); + respond(r, errstr); return; r->ofcall.count = r->ifcall.count; - return respond(r, NULL); + respond(r, NULL); return; case FsFTctl: data_to_cstring(r); if((errstr = message_view(f->view, r->ifcall.data))) - return respond(r, errstr); + respond(r, errstr); return; r->ofcall.count = r->ifcall.count; - return respond(r, NULL); + respond(r, NULL); return; case FsFRctl: data_to_cstring(r); { unsigned int n; @@ -744,9 +744,9 @@ } } if(errstr) - return respond(r, errstr); + respond(r, errstr); return; r->ofcall.count = r->ifcall.count; - return respond(r, NULL); + respond(r, NULL); return; case FsFEvent: if(r->ifcall.data[r->ifcall.count-1] == '\n') write_event("%.*s", r->ifcall.count, r->ifcall.data); @@ -753,7 +753,7 @@ else write_event("%.*s\n", r->ifcall.count, r->ifcall.data); r->ofcall.count = r->ifcall.count; - return respond(r, NULL); + respond(r, NULL); return; } /* This is an assert because it should this should not be called if * the file is not open for writing. */ @@ -774,13 +774,13 @@ break; } if((r->ifcall.mode&3) == P9OEXEC) - return respond(r, Enoperm); + respond(r, Enoperm); return; if((r->ifcall.mode&3) != P9OREAD && !(f->tab.perm & 0200)) - return respond(r, Enoperm); + respond(r, Enoperm); return; if((r->ifcall.mode&3) != P9OWRITE && !(f->tab.perm & 0400)) - return respond(r, Enoperm); + respond(r, Enoperm); return; if((r->ifcall.mode&~(3|P9OAPPEND|P9OTRUNC))) - return respond(r, Enoperm); + respond(r, Enoperm); return; respond(r, NULL); } @@ -791,14 +791,14 @@ switch(f->tab.type) { default: /* XXX: This should be taken care of by the library */ - return respond(r, Enoperm); + respond(r, Enoperm); return; case FsDBars: if(!strlen(r->ifcall.name)) - return respond(r, Ebadvalue); + respond(r, Ebadvalue); return; create_bar(f->bar_p, r->ifcall.name); f = lookup_file(f, r->ifcall.name); if(!f) - return respond(r, Enofile); + respond(r, Enofile); return; r->ofcall.qid.type = f->tab.qtype; r->ofcall.qid.path = QID(f->tab.type, f->id); f->next = r->fid->aux; @@ -815,7 +815,7 @@ switch(f->tab.type) { default: /* XXX: This should be taken care of by the library */ - return respond(r, Enoperm); + respond(r, Enoperm); return; case FsFBar: destroy_bar(f->next->bar_p, f->bar); draw_bar(screen); Common subdirectories: 2006-10-13.org/wmii/rc and 2006-10-13/wmii/rc diff -ru 2006-10-13.org/wmii/wm.c 2006-10-13/wmii/wm.c --- 2006-10-13.org/wmii/wm.c Thu Oct 12 17:00:04 2006 +++ 2006-10-13/wmii/wm.c Fri Oct 13 18:18:05 2006 @@ -210,7 +210,7 @@ starting = True; blz.dpy = XOpenDisplay(0); if(!blz.dpy) - error("wmiiwm: cannot open dpy\n"); + fprintf(stderr, "wmiiwm: cannot open dpy\n"); blz.screen = DefaultScreen(blz.dpy); blz.root = RootWindow(blz.dpy, blz.screen); /* check if another WM is already running */ @@ -220,7 +220,7 @@ XSelectInput(blz.dpy, blz.root, SubstructureRedirectMask | EnterWindowMask); XSync(blz.dpy, False); if(other_wm_running) - error("wmiiwm: another window manager is already running\n"); + fprintf(stderr, "wmiiwm: another window manager is already running\n"); if(!address) usage(); /* Check namespace permissions */ @@ -231,13 +231,13 @@ if(namespace[i] == '/') break; namespace[i+1] = '\0'; if(stat(namespace, &st)) - error("wmiiwm: can't stat namespace directory \"%s\": %s\n", + fprintf(stderr, "wmiiwm: can't stat namespace directory \"%s\": %s\n", namespace, strerror(errno)); if(getuid() != st.st_uid) - error("wmiiwm: namespace directory \"%s\" exists, but is not owned by you", + fprintf(stderr, "wmiiwm: namespace directory \"%s\" exists, but is not owned by you", namespace); if(st.st_mode & 077) - error("wmiiwm: namespace directory \"%s\" exists, " + fprintf(stderr, "wmiiwm: namespace directory \"%s\" exists, " "but has group or world permissions", namespace); free(namespace); @@ -247,7 +247,7 @@ errstr = NULL; i = ixp_create_sock(address, &errstr); if(i < 0) - error("wmiiwm: fatal: %s\n", errstr); + fprintf(stderr, "wmiiwm: fatal: %s\n", errstr); /* start wmiirc */ if(wmiirc) { @@ -256,14 +256,14 @@ switch(fork()) { case 0: if(setsid() == -1) - error("wmiim: can't setsid: %s\n", strerror(errno)); + fprintf(stderr, "wmiim: can't setsid: %s\n", strerror(errno)); close(i); close(ConnectionNumber(blz.dpy)); snprintf(execstr, name_len, "exec %s", wmiirc); execl("/bin/sh", "sh", "-c", execstr, NULL); - error("wmiiwm: can't exec \"%s\": %s\n", wmiirc, strerror(errno)); + fprintf(stderr, "wmiiwm: can't exec \"%s\": %s\n", wmiirc, strerror(errno)); case -1: - perror("wmiiwm: cannot fork wmiirc"); + fprintf(stderr, "wmiiwm: cannot fork wmiirc"); default: break; }