home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
x
/
volume5
/
xpclock
/
patch1
/
xpclock.patch1
< prev
Wrap
Text File
|
1989-11-29
|
2KB
|
93 lines
diff -c ../old/Imakefile ./Imakefile
*** ../old/Imakefile Wed Nov 29 14:32:24 1989
--- ./Imakefile Wed Nov 29 14:33:02 1989
***************
*** 1,4 ****
! # SCCS ID : @(#)Imakefile 1.5 11/11/89
#
# Imakefile - Imakefile for xpclock
#
--- 1,4 ----
! # SCCS ID : @(#)Imakefile 1.6 11/29/89
#
# Imakefile - Imakefile for xpclock
#
***************
*** 24,30 ****
#CC = gcc
CC = cc
! #DEBUGFLAGS = -g
CDEBUGFLAGS = -O
ComplexProgramTarget(xpclock)
--- 24,30 ----
#CC = gcc
CC = cc
! #CDEBUGFLAGS = -g
CDEBUGFLAGS = -O
ComplexProgramTarget(xpclock)
Only in .: README.patch1
Only in .: patchlevel.h
diff -c ../old/xpclock.c ./xpclock.c
*** ../old/xpclock.c Wed Nov 29 14:32:26 1989
--- ./xpclock.c Wed Nov 29 14:33:32 1989
***************
*** 1,4 ****
! static char sccsid[] = "@(#)xpclock.c 1.7 11/1/89";
/*
* xpclock.c - Pendulum Clock for X11
*
--- 1,4 ----
! static char sccsid[] = "@(#)xpclock.c 1.8 11/29/89";
/*
* xpclock.c - Pendulum Clock for X11
*
***************
*** 27,32 ****
--- 27,33 ----
#include "xpclock.h"
#include "xpclock.icon"
+ #include "patchlevel.h"
XtTimerCallbackProc MovePendulum();
XtCallbackProc RedrawPendulum();
***************
*** 159,164 ****
--- 160,166 ----
static double old_pendulum_theta;
static int old_pendulum_x = 0;
static int old_pendulum_y = 0;
+ static int pendulum_moment_count = 0;
if ((pendulum_x != 0) && (pendulum_y != 0)) {
old_pendulum_theta = pendulum_theta;
***************
*** 165,175 ****
old_pendulum_x = pendulum_x;
old_pendulum_y = pendulum_y;
}
- if ((pendulum_theta + pendulum_vector < 0) ||
- (pendulum_theta + pendulum_vector > 45))
- pendulum_vector = -pendulum_vector;
! pendulum_theta += (double) pendulum_vector;
XtSetArg(args[0], XtNheight, 0);
XtSetArg(args[1], XtNwidth, 0);
--- 167,176 ----
old_pendulum_x = pendulum_x;
old_pendulum_y = pendulum_y;
}
! pendulum_theta = (22.5 * sin((double)pendulum_moment_count * 2
! * PI / 45) + 22.5);
! pendulum_moment_count++;
XtSetArg(args[0], XtNheight, 0);
XtSetArg(args[1], XtNwidth, 0);
Only in .: xpclock.patch1