71146f333e
- unified format - only one patch per file - no files gets patched twice
65 lines
1.8 KiB
Text
65 lines
1.8 KiB
Text
$NetBSD: patch-ai,v 1.2 2001/12/20 09:19:55 tron Exp $
|
|
|
|
--- lib/libxview/canvas/cnvs_input.c.orig Tue Jun 29 07:14:46 1993
|
|
+++ lib/libxview/canvas/cnvs_input.c Thu Dec 20 10:10:42 2001
|
|
@@ -415,20 +415,25 @@
|
|
register Event *event;
|
|
{
|
|
Xv_Window paint_window;
|
|
- Event tmp_event;
|
|
+ Event *tmp_event;
|
|
int x, y;
|
|
|
|
+ if ( (tmp_event = (Event *) malloc(sizeof(Event))) == NULL){
|
|
+ fprintf(stderr,"canvas_window_event: malloc failed\n");
|
|
+ exit(1);
|
|
+ }
|
|
paint_window = xv_get(canvas_public, CANVAS_NTH_PAINT_WINDOW, 0);
|
|
if (paint_window == NULL) {
|
|
/* call xv_error */
|
|
return (event);
|
|
}
|
|
- tmp_event = *event;
|
|
+
|
|
+ memcpy(tmp_event,event,sizeof(Event));
|
|
win_translate_xy(paint_window, canvas_public,
|
|
event_x(event), event_y(event), &x, &y);
|
|
- event_set_x(&tmp_event, x);
|
|
- event_set_y(&tmp_event, y);
|
|
- return (&tmp_event);
|
|
+ event_set_x(tmp_event, x);
|
|
+ event_set_y(tmp_event, y);
|
|
+ return (tmp_event);
|
|
}
|
|
|
|
/*
|
|
@@ -440,20 +445,24 @@
|
|
register Event *event;
|
|
{
|
|
Xv_Window paint_window;
|
|
- Event tmp_event;
|
|
+ Event *tmp_event;
|
|
int x, y;
|
|
|
|
+ if ( (tmp_event = (Event *) malloc(sizeof(Event))) == NULL){
|
|
+ fprintf(stderr,"canvas_window_event: malloc failed\n");
|
|
+ exit(1);
|
|
+ }
|
|
paint_window = xv_get(canvas_public, CANVAS_NTH_PAINT_WINDOW, 0);
|
|
if (paint_window == NULL) {
|
|
/* call xv_error */
|
|
return (event);
|
|
}
|
|
- tmp_event = *event;
|
|
+ memcpy(tmp_event,event,sizeof(Event));
|
|
win_translate_xy(paint_window, canvas_public,
|
|
event_x(event), event_y(event), &x, &y);
|
|
- event_set_x(&tmp_event, x);
|
|
- event_set_y(&tmp_event, y);
|
|
- return (&tmp_event);
|
|
+ event_set_x(tmp_event, x);
|
|
+ event_set_y(tmp_event, y);
|
|
+ return (tmp_event);
|
|
}
|
|
|
|
|