home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17177 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.9 KB  |  120 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!wupost!sdd.hp.com!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!ames!news.hawaii.edu!lee
  3. From: lee@Hawaii.Edu (Greg Lee)
  4. Subject: xfishtank 2.0
  5. Message-ID: <1992Nov19.125454.23592@news.Hawaii.Edu>
  6. Sender: root@news.Hawaii.Edu (News Service)
  7. Nntp-Posting-Host: uhunix.uhcc.hawaii.edu
  8. Organization: University of Hawaii
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. Date: Thu, 19 Nov 1992 12:54:54 GMT
  11. Lines: 107
  12.  
  13. Xfishtank 2.0 is available now from export.lcs.mit.edu:
  14.     contrib/xfishtank.tar.Z
  15. I just compiled it with some minor changes, given below.
  16. It's pretty nice -- more pretty fish.  Compilation uses
  17. a lot of space in /usr/tmp. (I'm using 0.98.5, jump libs
  18. 4.2.)
  19. --
  20. Greg Lee <lee@uhunix.uhcc.hawaii.edu>
  21. -------patch for xfish.c------
  22. *** xfish.c.orig    Sun Oct 18 20:30:19 1992
  23. --- xfish.c    Thu Nov 19 02:02:39 1992
  24. ***************
  25. *** 46,52 ****
  26.   
  27.   /* constants are based on rand(3C) returning an integer between 0 and 32767 */
  28.   
  29. ! #if defined(ultrix) || defined(sun)
  30.   #define  RAND_I_1_16   134217728
  31.   #define  RAND_F_1_8    268435455.875
  32.   #define  RAND_I_1_4    536870911
  33. --- 46,52 ----
  34.   
  35.   /* constants are based on rand(3C) returning an integer between 0 and 32767 */
  36.   
  37. ! #if defined(ultrix) || defined(sun) || defined(linux)
  38.   #define  RAND_I_1_16   134217728
  39.   #define  RAND_F_1_8    268435455.875
  40.   #define  RAND_I_1_4    536870911
  41. ***************
  42. *** 982,988 ****
  43. --- 982,990 ----
  44.       XColor hdef, edef;
  45.       struct colr_data *cdp;
  46.       struct colr_data colrs[256];
  47. + #ifndef linux
  48.       extern char *malloc();
  49. + #endif
  50.   
  51.       colormap = XDefaultColormap(Dpy, screen);
  52.   
  53. ***************
  54. *** 1213,1219 ****
  55. --- 1215,1223 ----
  56.       unsigned char *data;
  57.       register int i, j, k;
  58.       int cnt, wcnt;
  59. + #ifndef linux
  60.       extern char *malloc();
  61. + #endif
  62.   
  63.       cnt = 1;
  64.       cnt += Pcnt;
  65. ***************
  66. *** 1453,1458 ****
  67. --- 1457,1465 ----
  68.   void 
  69.   init_signals()
  70.   {
  71. + #ifdef linux
  72. +     signal(SIGUSR1, toggle_secure);
  73. + #else
  74.   #ifdef MOTOROLA
  75.       sigset(SIGUSR1, toggle_secure);
  76.   #else
  77. ***************
  78. *** 1468,1473 ****
  79. --- 1475,1481 ----
  80.       sigvector(SIGUSR1, &vec, &vec);
  81.   #endif
  82.   #endif /* MOTOROLA */
  83. + #endif /* linux */
  84.   }
  85.   
  86.   
  87. ***************
  88. *** 1932,1938 ****
  89.       }
  90.   }
  91.   
  92.   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  93.   Higher-resolution sleep
  94.   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  95. --- 1940,1948 ----
  96.       }
  97.   }
  98.   
  99. ! #ifdef linux
  100. ! #include <sys/types.h>
  101. ! #endif
  102.   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  103.   Higher-resolution sleep
  104.   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  105. ***************
  106. *** 1940,1946 ****
  107. --- 1950,1960 ----
  108.   high_res_sleep(seconds)
  109.       double      seconds;
  110.   {
  111. + #ifdef linux
  112. +     fd_set    fds;
  113. + #else
  114.       int         fds = 0;
  115. + #endif
  116.       struct timeval timeout;
  117.   
  118.       timeout.tv_sec = seconds;
  119.