home *** CD-ROM | disk | FTP | other *** search
Wrap
This is the BETA32-0.98a of the AfterStep X11 window manager, compiled quad-FAT for NEXTSTEP 3.x. AfterStep is fvwm-derivate that establishes a NEXTSTEP-like look-and-feel for X11. On NEXTSTEP, it can be used with X11 servers like Cub'X and Co-Xist or Stefan Leuker's shareware X11R6 server Xnext (for information about Xnext, see http://www-users.informatik.rwth-aachen.de/~leuker/Xnext). For compiling with NEXTSTEP, a few little hacks had to be applied. A patch file is included below. I hope that the final 1.0 release of AfterStep will include these fixes. Gregor Hoffleit <flight@mathi.uni-heidelberg.de> ### ### Patch for compiling as-b32 with NEXTSTEP ### (patch release 0.01, 030996) ### ### - unpack ### - apply patch ### - make ### ### Patch release note: ### - Patch introduces a new file lib/myputenv.c ### - To compile thin, change ./configure.h: #define COMPILER CC=cc ### diff -urN /tmp/O_1_as-b32/AfterStep-0.98aBETA32/configure.h ./configure.h --- /tmp/O_1_as-b32/AfterStep-0.98aBETA32/configure.h Mon Aug 26 21:09:46 1996 +++ ./configure.h Tue Sep 3 12:43:03 1996 @@ -19,7 +19,7 @@ /* Compiler over-ride for Imakefiles */ /* Leave it as shown to get your default compiler */ -#define COMPILER CC=cc +#define COMPILER CC=cc -arch "m68k" -arch "i486" -arch "sparc" -arch "hppa" /* #define COMPILER */ @@ -140,6 +140,17 @@ #else +#if defined(NeXT) + +#undef HAVE_WAITPID +#define HAVE_GETITIMER 1 +#define HAVE_SETITIMER 1 +#undef HAVE_SYSCONF +#undef HAVE_UNAME +#define HAVE_GETHOSTNAME 1 + +#else + /************************************************************************** * * Do it yourself here if you don't like the above! @@ -167,6 +178,7 @@ #define HAVE_UNAME 1 /* #define HAVE_GETHOSTNAME 1 */ +#endif /* NeXT */ #endif /* End of do-it-yourself OS support section */ diff -urN /tmp/O_1_as-b32/AfterStep-0.98aBETA32/lib/Imakefile ./lib/Imakefile --- /tmp/O_1_as-b32/AfterStep-0.98aBETA32/lib/Imakefile Wed Aug 21 16:23:33 1996 +++ ./lib/Imakefile Tue Sep 3 12:23:40 1996 @@ -12,7 +12,7 @@ OBJS = CatString3.o SendInfo.o SendText.o wild.o safemalloc.o findIconFile.o \ mystrcasecmp.o strncmp.o hostname.o ReadPacket.o \ - sleep.o CopyString.o mygetostype.o GetFdWidth.o + sleep.o CopyString.o mygetostype.o GetFdWidth.o myputenv.o NormalLibraryTarget(afterstep, $(OBJS)) diff -urN /tmp/O_1_as-b32/AfterStep-0.98aBETA32/lib/myputenv.c ./lib/myputenv.c --- /tmp/O_1_as-b32/AfterStep-0.98aBETA32/lib/myputenv.c Thu Jan 1 01:00:00 1970 +++ ./lib/myputenv.c Tue Sep 3 12:23:27 1996 @@ -0,0 +1,111 @@ +/****************************************************************/ +/* */ +/* putenv(3) */ +/* */ +/* Change or add an environment entry */ +/* */ +/****************************************************************/ +/* origination 1987-Oct-7 T. Holm */ +/* (slightly modified by karl@cs.umb.edu for kpathsea.) */ +/****************************************************************/ + +/* +Path: hoptoad!pacbell!ames!ll-xn!mit-eddie!uw-beaver!ssc-vax!uvicctr!tholm +From: tholm@uvicctr.UUCP (Terrence W. Holm) +Newsgroups: comp.os.minix +Subject: putenv(3) +Message-ID: <395@uvicctr.UUCP> +Date: 5 May 88 06:40:52 GMT +Organization: University of Victoria, Victoria B.C. Canada + +EFTH Minix report #2 - May 1988 - putenv(3) + +This is an implementation of putenv(3) that we +wrote for Minix. Please consider this a public +domain program. +*/ + +#define NULL 0 +#define PSIZE sizeof(char *) + +extern char **environ; + +char *strchr(); +char *malloc(); + +/****************************************************************/ +/* */ +/* int */ +/* putenv( entry ) */ +/* */ +/* The "entry" should follow the form */ +/* "NAME=VALUE". This routine will search the */ +/* user environment for "NAME" and replace its */ +/* value with "VALUE". */ +/* */ +/* Note that "entry" is not copied, it is used */ +/* as the environment entry. This means that it */ +/* must not be unallocated or otherwise modifed */ +/* by the caller, unless it is replaced by a */ +/* subsequent putenv(). */ +/* */ +/* If the name is not found in the environment, */ +/* then a new vector of pointers is allocated, */ +/* "entry" is put at the end and the global */ +/* variable "environ" is updated. */ +/* */ +/* This function normally returns 0, but -1 */ +/* is returned if it can not allocate enough */ +/* space using malloc(3), or "entry" does not */ +/* contain a '='. */ +/* */ +/****************************************************************/ + + +int +putenv( entry ) + char *entry; +{ + unsigned length; + unsigned size; + char *temp; + char **p; + char **new_environ; + + /* Find the length of the "NAME=" */ + + temp = strchr(entry,'='); + if ( temp == 0 ) + return( -1 ); + + length = (unsigned) (temp - entry + 1); + + + /* Scan through the environment looking for "NAME=" */ + + for ( p=environ; *p != 0 ; p++ ) + if ( strncmp( entry, *p, length ) == 0 ) + { + *p = entry; + return( 0 ); + } + + + /* The name was not found, build a bigger environment */ + + size = p - environ; + + new_environ = (char **) malloc( (size+2)*PSIZE ); + + if ( new_environ == (char **) NULL ) + return( -1 ); + + memcpy ((char *) new_environ, (const char *) environ, size*PSIZE ); + + new_environ[size] = entry; + new_environ[size+1] = NULL; + + environ = new_environ; + + return(0); +}