SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
74
benchmarks/xengine/patches/patch-xengine_c
Normal file
74
benchmarks/xengine/patches/patch-xengine_c
Normal file
|
@ -0,0 +1,74 @@
|
|||
--- xengine.c.orig Sun Jul 14 21:16:31 2002
|
||||
+++ xengine.c Sun Jul 14 21:16:31 2002
|
||||
@@ -29,13 +29,13 @@ static char sccsid[] = "@(#)xengine.
|
||||
|
||||
#define PI 3.141592654
|
||||
|
||||
-XtCallbackProc redraw_callback();
|
||||
-XtTimerCallbackProc Cylcle();
|
||||
+void redraw_callback( Widget, XEvent*, String*, Cardinal*);
|
||||
+void Cycle( XtPointer, XtIntervalId* );
|
||||
|
||||
Widget toplevel, base, rpm_info, engine;
|
||||
GC gcPiston, gcShaft, gcCylinder, gcRoter, gcBack, gcDep, gcPre, gcEngine;
|
||||
Pixmap enginePixmap;
|
||||
-int width, height;
|
||||
+Dimension width, height;
|
||||
|
||||
String colors[] = {"gray", "lightseagreen", "dimgrey", "forestgreen", "black", "red", "cyan", "firebrick"};
|
||||
|
||||
@@ -47,7 +47,7 @@ main(argc, argv)
|
||||
Arg args[10];
|
||||
XtTranslations newTranslations;
|
||||
static XtActionsRec redrawActions[] = {
|
||||
- {"expose", (XtCallbackProc) redraw_callback},
|
||||
+ {"expose", redraw_callback},
|
||||
};
|
||||
|
||||
static char *overrideTranslations =
|
||||
@@ -59,8 +59,6 @@ main(argc, argv)
|
||||
int i;
|
||||
int count;
|
||||
|
||||
- XtTimerCallbackProc Cycle();
|
||||
-
|
||||
toplevel = XtInitialize("xengine", "XEngine", NULL, 0, &argc, argv);
|
||||
|
||||
for (count = 1; count < argc; count++) {
|
||||
@@ -170,7 +168,7 @@ main(argc, argv)
|
||||
XtMainLoop();
|
||||
}
|
||||
|
||||
-XtCallbackProc
|
||||
+void
|
||||
redraw_callback(w, event, params, nparams)
|
||||
Widget w;
|
||||
XEvent *event;
|
||||
@@ -180,22 +178,19 @@ redraw_callback(w, event, params, nparam
|
||||
|
||||
Arg args[10];
|
||||
|
||||
- XtSetArg(args[0], XtNwidth, 0);
|
||||
- XtSetArg(args[1], XtNheight, 0);
|
||||
+ XtSetArg(args[0], XtNwidth, &width);
|
||||
+ XtSetArg(args[1], XtNheight, &height);
|
||||
XtGetValues(w, args, 2);
|
||||
|
||||
- width = args[0].value;
|
||||
- height = args[1].value;
|
||||
-
|
||||
XFreePixmap(XtDisplay(engine), enginePixmap);
|
||||
enginePixmap = XCreatePixmap(XtDisplay(engine), XtWindow(engine), width, height, DefaultDepthOfScreen(XtScreen(engine)));
|
||||
|
||||
}
|
||||
|
||||
-XtTimerCallbackProc
|
||||
+void
|
||||
Cycle(client_data, id)
|
||||
- caddr_t client_data;
|
||||
- XtIntervalId id;
|
||||
+ XtPointer client_data;
|
||||
+ XtIntervalId* id;
|
||||
{
|
||||
|
||||
Arg args[10];
|
Loading…
Add table
Add a link
Reference in a new issue