home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume3 / kaleid3 / patch4 < prev    next >
Encoding:
Text File  |  1989-03-14  |  6.3 KB  |  230 lines

  1. Path: uunet!wyse!mikew
  2. From: mikew@wyse.wyse.com (Mike Wexler)
  3. Newsgroups: comp.sources.x
  4. Subject: v03i051:  a colorful kaleidoscopic display, version 3, Patch4
  5. Message-ID: <2141@wyse.wyse.com>
  6. Date: 14 Mar 89 18:57:22 GMT
  7. Organization: Wyse Technology, San Jose
  8. Lines: 219
  9. Approved: mikew@wyse.com
  10.  
  11. Submitted-by: nathanm@hp-pcd.hp.com (Nathan Meyers)
  12. Posting-number: Volume 3, Issue 51
  13. Archive-name: kaleid3/patch4
  14.  
  15. diff -cr kaleid.old/README kaleid/README
  16.  
  17. *** kaleid.old/README    Fri Mar 10 11:41:44 1989
  18. --- kaleid/README    Tue Mar 14 09:24:17 1989
  19. ***************
  20. *** 11,17 ****
  21.   
  22.   To make on systems of SYSV descent (such as hp-ux):
  23.   
  24. !     make SYSV
  25.   
  26.   ---------------------
  27.   Nathan Meyers
  28. --- 11,17 ----
  29.   
  30.   To make on systems of SYSV descent (such as hp-ux):
  31.   
  32. !     make "CDEBUGFLAGS=-O -DSYSV"
  33.   
  34.   ---------------------
  35.   Nathan Meyers
  36. diff -cr kaleid.old/kaleid.c kaleid/kaleid.c
  37. *** kaleid.old/kaleid.c    Fri Mar 10 11:41:45 1989
  38. --- kaleid/kaleid.c    Tue Mar 14 09:24:29 1989
  39. ***************
  40. *** 19,26 ****
  41.   
  42.   char *progname;
  43.   
  44. - char *strchr();
  45. - char *calloc();
  46.   
  47.   /* Approximation of CGA/EGA/VGA colors -- (out of standard order) */
  48.   unsigned long colors[][3] = { { 0x0000, 0x0000, 0x0000 },    /* black */
  49. --- 19,24 ----
  50. ***************
  51. *** 42,48 ****
  52.   
  53.   #define NCOLORS 16
  54.   
  55. ! static char *what = "@(#)kaleid.c $Revision: 1.98 $";
  56.   
  57.   Display *display;
  58.   int screen;
  59. --- 40,46 ----
  60.   
  61.   #define NCOLORS 16
  62.   
  63. ! static char *what = "@(#)kaleid.c $Revision: 1.101 $";
  64.   
  65.   Display *display;
  66.   int screen;
  67. ***************
  68. *** 107,118 ****
  69.     int iconic=0, bstore=0;
  70.     long delayvalue = -1L, icondelay=100L;
  71.     char *clipcoords = NULL;
  72.     int monochrome=0;
  73.     int o_argc = argc;
  74.     char **o_argv = argv;
  75.     int i,j;
  76.     long time();
  77. !   char *basename;
  78.     long atol();
  79.   
  80.     progname = argv[0];
  81. --- 105,117 ----
  82.     int iconic=0, bstore=0;
  83.     long delayvalue = -1L, icondelay=100L;
  84.     char *clipcoords = NULL;
  85. +   char *strchr();
  86.     int monochrome=0;
  87.     int o_argc = argc;
  88.     char **o_argv = argv;
  89.     int i,j;
  90.     long time();
  91. !   char *basename, *strrchr();
  92.     long atol();
  93.   
  94.     progname = argv[0];
  95. ***************
  96. *** 239,250 ****
  97.       char *calloc();
  98.       double strtod();
  99.       int commacount = 0;
  100. -     int len;
  101.       while (*temp != '\0') commacount += (*(temp++) == ',') ? 1 : 0;
  102.       if ((commacount & 0x3) != 3) usage();
  103.       nclips = (commacount >> 2) + 1;
  104. !     clips = (struct fclip *)calloc(nclips, sizeof(struct fclip));
  105. !     cliplist = (XRectangle *)calloc(nclips, sizeof(XRectangle));
  106.       if (clips == NULL || cliplist == NULL) {
  107.         fprintf(stderr,"%s: calloc() failed\n",progname);
  108.         exit(1);
  109. --- 238,248 ----
  110.       char *calloc();
  111.       double strtod();
  112.       int commacount = 0;
  113.       while (*temp != '\0') commacount += (*(temp++) == ',') ? 1 : 0;
  114.       if ((commacount & 0x3) != 3) usage();
  115.       nclips = (commacount >> 2) + 1;
  116. !     clips = (struct fclip *)calloc((unsigned)nclips, sizeof(struct fclip));
  117. !     cliplist = (XRectangle *)calloc((unsigned)nclips, sizeof(XRectangle));
  118.       if (clips == NULL || cliplist == NULL) {
  119.         fprintf(stderr,"%s: calloc() failed\n",progname);
  120.         exit(1);
  121. ***************
  122. *** 281,286 ****
  123. --- 279,285 ----
  124.         int thiscolor;
  125.         numcolors = 0;
  126.         for (thiscolor=0; thiscolor<NCOLORS; thiscolor++) {
  127.       char *comma=strchr(ucolors,',');
  128.   
  129.       if (comma != NULL) *comma='\0';
  130. ***************
  131. *** 348,354 ****
  132.   
  133.     if (doroot) {
  134.       nwindows=rootx*rooty;
  135. !     if (!allocate_arrays(nwindows)) {
  136.         (void)fprintf(stderr,"%s: malloc() failure\n",progname);
  137.         exit(1);
  138.       }
  139. --- 347,353 ----
  140.   
  141.     if (doroot) {
  142.       nwindows=rootx*rooty;
  143. !     if (!allocate_arrays((unsigned)nwindows)) {
  144.         (void)fprintf(stderr,"%s: malloc() failure\n",progname);
  145.         exit(1);
  146.       }
  147. ***************
  148. *** 730,736 ****
  149.             CY[i] = event->xconfigure.height;
  150.       }
  151.       else {
  152. -       int dorandom=0;
  153.             if (CX[i] != event->xconfigure.width/2 ||
  154.                 CY[i] != event->xconfigure.height/2) {
  155.           XClearWindow(display,event->xconfigure.window);
  156. --- 729,734 ----
  157. ***************
  158. *** 861,867 ****
  159.       "[-bg <background>]",
  160.       "[-bstore]",
  161.       "[-bw <borderwidth>]",
  162. !     "[-clip x,y,w,h[,x,y,w,h[,x,y,w,h]]]",
  163.       "[-colors <color1>[,<color2>[,...]]]",
  164.       "[-delay <msec>]",
  165.       "[-display <displayname>]",
  166. --- 859,865 ----
  167.       "[-bg <background>]",
  168.       "[-bstore]",
  169.       "[-bw <borderwidth>]",
  170. !     "[-clip x,y,w,h[,x,y,w,h[,...]]]",
  171.       "[-colors <color1>[,<color2>[,...]]]",
  172.       "[-delay <msec>]",
  173.       "[-display <displayname>]",
  174. ***************
  175. *** 906,912 ****
  176.   long maxval;
  177.   int element;
  178.   {
  179. !   long lrand48();
  180.     int sr1=15, sr2=16;
  181.     long mv=maxval;
  182.     while (mv > 0x8000L) {
  183. --- 904,910 ----
  184.   long maxval;
  185.   int element;
  186.   {
  187. !   long nrand48(), lrand48();
  188.     int sr1=15, sr2=16;
  189.     long mv=maxval;
  190.     while (mv > 0x8000L) {
  191. ***************
  192. *** 921,926 ****
  193. --- 919,925 ----
  194.   allocate_arrays(nwin)
  195.   unsigned nwin;
  196.   {
  197. +   char *calloc();
  198.     int i;
  199.     if ((window=(Window *)calloc(nwin,sizeof(Window))) == NULL) return 0;
  200.     if ((window_gcs=(GC *)calloc(nwin,sizeof(GC))) == NULL) return 0;
  201. ***************
  202. *** 1019,1025 ****
  203.     /* Set next alarm to current time + interval.  If more than one window
  204.        is visible, introduce a random variance so update is staggered.  */
  205.     interval = intervals[nextalarm-schedule];
  206. !   if (nvisible > 1) interval += rndm(interval/5L,-1) - interval/10L;
  207.     nextalarm->tv_sec = currtime.tv_sec + interval/1000;
  208.     nextalarm->tv_usec = currtime.tv_usec + (interval%1000)*1000;
  209.     if (nextalarm->tv_usec >= 1000000) {
  210. --- 1018,1024 ----
  211.     /* Set next alarm to current time + interval.  If more than one window
  212.        is visible, introduce a random variance so update is staggered.  */
  213.     interval = intervals[nextalarm-schedule];
  214. !   if (nvisible > 1) interval += rndm((long)(interval/5L),-1) - interval/10L;
  215.     nextalarm->tv_sec = currtime.tv_sec + interval/1000;
  216.     nextalarm->tv_usec = currtime.tv_usec + (interval%1000)*1000;
  217.     if (nextalarm->tv_usec >= 1000000) {
  218. diff -cr kaleid.old/patchlevel.h kaleid/patchlevel.h
  219. *** kaleid.old/patchlevel.h    Fri Mar 10 11:41:46 1989
  220. --- kaleid/patchlevel.h    Tue Mar 14 09:24:30 1989
  221. ***************
  222. *** 1 ****
  223. ! #define PATCHLEVEL 3
  224. --- 1 ----
  225. ! #define PATCHLEVEL 4
  226. -- 
  227. Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
  228. Moderator of comp.sources.x
  229.