home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!wupost!sdd.hp.com!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!ames!news.hawaii.edu!lee
- From: lee@Hawaii.Edu (Greg Lee)
- Subject: xfishtank 2.0
- Message-ID: <1992Nov19.125454.23592@news.Hawaii.Edu>
- Sender: root@news.Hawaii.Edu (News Service)
- Nntp-Posting-Host: uhunix.uhcc.hawaii.edu
- Organization: University of Hawaii
- X-Newsreader: TIN [version 1.1 PL6]
- Date: Thu, 19 Nov 1992 12:54:54 GMT
- Lines: 107
-
- Xfishtank 2.0 is available now from export.lcs.mit.edu:
- contrib/xfishtank.tar.Z
- I just compiled it with some minor changes, given below.
- It's pretty nice -- more pretty fish. Compilation uses
- a lot of space in /usr/tmp. (I'm using 0.98.5, jump libs
- 4.2.)
- --
- Greg Lee <lee@uhunix.uhcc.hawaii.edu>
- -------patch for xfish.c------
- *** xfish.c.orig Sun Oct 18 20:30:19 1992
- --- xfish.c Thu Nov 19 02:02:39 1992
- ***************
- *** 46,52 ****
-
- /* constants are based on rand(3C) returning an integer between 0 and 32767 */
-
- ! #if defined(ultrix) || defined(sun)
- #define RAND_I_1_16 134217728
- #define RAND_F_1_8 268435455.875
- #define RAND_I_1_4 536870911
- --- 46,52 ----
-
- /* constants are based on rand(3C) returning an integer between 0 and 32767 */
-
- ! #if defined(ultrix) || defined(sun) || defined(linux)
- #define RAND_I_1_16 134217728
- #define RAND_F_1_8 268435455.875
- #define RAND_I_1_4 536870911
- ***************
- *** 982,988 ****
- --- 982,990 ----
- XColor hdef, edef;
- struct colr_data *cdp;
- struct colr_data colrs[256];
- + #ifndef linux
- extern char *malloc();
- + #endif
-
- colormap = XDefaultColormap(Dpy, screen);
-
- ***************
- *** 1213,1219 ****
- --- 1215,1223 ----
- unsigned char *data;
- register int i, j, k;
- int cnt, wcnt;
- + #ifndef linux
- extern char *malloc();
- + #endif
-
- cnt = 1;
- cnt += Pcnt;
- ***************
- *** 1453,1458 ****
- --- 1457,1465 ----
- void
- init_signals()
- {
- + #ifdef linux
- + signal(SIGUSR1, toggle_secure);
- + #else
- #ifdef MOTOROLA
- sigset(SIGUSR1, toggle_secure);
- #else
- ***************
- *** 1468,1473 ****
- --- 1475,1481 ----
- sigvector(SIGUSR1, &vec, &vec);
- #endif
- #endif /* MOTOROLA */
- + #endif /* linux */
- }
-
-
- ***************
- *** 1932,1938 ****
- }
- }
-
- !
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- Higher-resolution sleep
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- --- 1940,1948 ----
- }
- }
-
- ! #ifdef linux
- ! #include <sys/types.h>
- ! #endif
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- Higher-resolution sleep
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- ***************
- *** 1940,1946 ****
- --- 1950,1960 ----
- high_res_sleep(seconds)
- double seconds;
- {
- + #ifdef linux
- + fd_set fds;
- + #else
- int fds = 0;
- + #endif
- struct timeval timeout;
-
- timeout.tv_sec = seconds;
-