home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume5 / xpclock / patch1 / xpclock.patch1 < prev   
Text File  |  1989-11-29  |  2KB  |  93 lines

  1. diff -c ../old/Imakefile ./Imakefile
  2. *** ../old/Imakefile    Wed Nov 29 14:32:24 1989
  3. --- ./Imakefile    Wed Nov 29 14:33:02 1989
  4. ***************
  5. *** 1,4 ****
  6. ! #   SCCS ID : @(#)Imakefile    1.5   11/11/89
  7.   #
  8.   #   Imakefile - Imakefile for xpclock
  9.   # 
  10. --- 1,4 ----
  11. ! #   SCCS ID : @(#)Imakefile    1.6   11/29/89
  12.   #
  13.   #   Imakefile - Imakefile for xpclock
  14.   # 
  15. ***************
  16. *** 24,30 ****
  17.   #CC = gcc
  18.   CC = cc
  19.   
  20. ! #DEBUGFLAGS = -g
  21.   CDEBUGFLAGS = -O
  22.   
  23.   ComplexProgramTarget(xpclock)
  24. --- 24,30 ----
  25.   #CC = gcc
  26.   CC = cc
  27.   
  28. ! #CDEBUGFLAGS = -g
  29.   CDEBUGFLAGS = -O
  30.   
  31.   ComplexProgramTarget(xpclock)
  32. Only in .: README.patch1
  33. Only in .: patchlevel.h
  34. diff -c ../old/xpclock.c ./xpclock.c
  35. *** ../old/xpclock.c    Wed Nov 29 14:32:26 1989
  36. --- ./xpclock.c    Wed Nov 29 14:33:32 1989
  37. ***************
  38. *** 1,4 ****
  39. ! static char     sccsid[] = "@(#)xpclock.c    1.7   11/1/89";
  40.   /*
  41.    * xpclock.c - Pendulum Clock for X11
  42.    * 
  43. --- 1,4 ----
  44. ! static char     sccsid[] = "@(#)xpclock.c    1.8   11/29/89";
  45.   /*
  46.    * xpclock.c - Pendulum Clock for X11
  47.    * 
  48. ***************
  49. *** 27,32 ****
  50. --- 27,33 ----
  51.   
  52.   #include "xpclock.h"
  53.   #include "xpclock.icon"
  54. + #include "patchlevel.h"
  55.   
  56.   XtTimerCallbackProc MovePendulum();
  57.   XtCallbackProc  RedrawPendulum();
  58. ***************
  59. *** 159,164 ****
  60. --- 160,166 ----
  61.       static double   old_pendulum_theta;
  62.       static int      old_pendulum_x = 0;
  63.       static int      old_pendulum_y = 0;
  64. +     static int    pendulum_moment_count = 0;
  65.   
  66.       if ((pendulum_x != 0) && (pendulum_y != 0)) {
  67.           old_pendulum_theta = pendulum_theta;
  68. ***************
  69. *** 165,175 ****
  70.           old_pendulum_x = pendulum_x;
  71.           old_pendulum_y = pendulum_y;
  72.       }
  73. -     if ((pendulum_theta + pendulum_vector < 0) ||
  74. -         (pendulum_theta + pendulum_vector > 45))
  75. -         pendulum_vector = -pendulum_vector;
  76.   
  77. !     pendulum_theta += (double) pendulum_vector;
  78.   
  79.       XtSetArg(args[0], XtNheight, 0);
  80.       XtSetArg(args[1], XtNwidth, 0);
  81. --- 167,176 ----
  82.           old_pendulum_x = pendulum_x;
  83.           old_pendulum_y = pendulum_y;
  84.       }
  85.   
  86. !     pendulum_theta = (22.5 * sin((double)pendulum_moment_count * 2 
  87. !                             * PI / 45) + 22.5);
  88. !     pendulum_moment_count++;
  89.   
  90.       XtSetArg(args[0], XtNheight, 0);
  91.       XtSetArg(args[1], XtNwidth, 0);
  92. Only in .: xpclock.patch1
  93.