View | Details | Raw Unified | Return to bug 205796 | Differences between
and this patch

Collapse All | Expand All

(-)xgraph.c (-5 / +14 lines)
Lines 74-81 Link Here
74
#define BTNPAD		1
74
#define BTNPAD		1
75
#define BTNINTER	3
75
#define BTNINTER	3
76
76
77
#define MAX(a,b)	((a) > (b) ? (a) : (b))
78
#define MIN(a,b)	((a) < (b) ? (a) : (b))
79
#define ABS(x)		((x) < 0 ? -(x) : (x))
77
#define ABS(x)		((x) < 0 ? -(x) : (x))
80
#define ZERO_THRES	1.0E-07
78
#define ZERO_THRES	1.0E-07
81
79
Lines 333-338 Link Here
333
	if (!strm) {
331
	if (!strm) {
334
	    (void) fprintf(stderr, "Warning:  cannot open file `%s'\n",
332
	    (void) fprintf(stderr, "Warning:  cannot open file `%s'\n",
335
			   inFileNames[idx]);
333
			   inFileNames[idx]);
334
	    errs++;
336
	} else {
335
	} else {
337
	    if ((maxitems = ReadData(strm, inFileNames[idx])) < 0) {
336
	    if ((maxitems = ReadData(strm, inFileNames[idx])) < 0) {
338
		errs++;
337
		errs++;
Lines 415-420 Link Here
415
	    continue;
414
	    continue;
416
	}
415
	}
417
	switch (theEvent.type) {
416
	switch (theEvent.type) {
417
	case ConfigureNotify:
418
		win_info->dev_info.area_w = theEvent.xconfigure.width;
419
		win_info->dev_info.area_h = theEvent.xconfigure.height;
420
		XClearArea(disp, theEvent.xany.window, 1, 1, win_info->dev_info.area_w, win_info->dev_info.area_h, 0);
421
		DrawWindow(win_info);
422
		break;
418
	case Expose:
423
	case Expose:
419
	    if (theEvent.xexpose.count <= 0) {
424
	    if (theEvent.xexpose.count <= 0) {
420
		XWindowAttributes win_attr;
425
		XWindowAttributes win_attr;
Lines 422-428 Link Here
422
		XGetWindowAttributes(disp, theEvent.xany.window, &win_attr);
427
		XGetWindowAttributes(disp, theEvent.xany.window, &win_attr);
423
		win_info->dev_info.area_w = win_attr.width;
428
		win_info->dev_info.area_w = win_attr.width;
424
		win_info->dev_info.area_h = win_attr.height;
429
		win_info->dev_info.area_h = win_attr.height;
425
		init_X(win_info->dev_info.user_state);
430
    		init_X(win_info->dev_info.user_state);
431
		XClearArea(disp, theEvent.xany.window, 1, 1, win_info->dev_info.area_w, win_info->dev_info.area_h, 0);
426
		DrawWindow(win_info);
432
		DrawWindow(win_info);
427
	    }
433
	    }
428
	    break;
434
	    break;
Lines 715-721 Link Here
715
        if (sizehints.x<0) sizehints.x = 0;
721
        if (sizehints.x<0) sizehints.x = 0;
716
        sizehints.y += 25; 
722
        sizehints.y += 25; 
717
    }
723
    }
718
#endif
724
#else
719
725
720
    /* Aspect ratio computation */
726
    /* Aspect ratio computation */
721
    if (asp < 1.0) {
727
    if (asp < 1.0) {
Lines 723-728 Link Here
723
    } else {
729
    } else {
724
	height = ((int) (((double) NORMSIZE) / asp));
730
	height = ((int) (((double) NORMSIZE) / asp));
725
    }
731
    }
732
#endif
726
    height = MAX(MINDIM, height);
733
    height = MAX(MINDIM, height);
727
    width = MAX(MINDIM, width);
734
    width = MAX(MINDIM, width);
728
735
Lines 789-795 Link Here
789
796
790
	new_info->flags = 0;
797
	new_info->flags = 0;
791
	XSelectInput(disp, new_window,
798
	XSelectInput(disp, new_window,
792
		     ExposureMask|KeyPressMask|ButtonPressMask);
799
		     ExposureMask|KeyPressMask|ButtonPressMask|StructureNotifyMask);
793
	if (!theCursor) {
800
	if (!theCursor) {
794
	    theCursor = XCreateFontCursor(disp, XC_top_left_arrow);
801
	    theCursor = XCreateFontCursor(disp, XC_top_left_arrow);
795
	    fg_color = PM_COLOR("Foreground");
802
	    fg_color = PM_COLOR("Foreground");
Lines 1478-1483 Link Here
1478
	    while (*line && (*line != '\n') && (*line != '"')) line++;
1485
	    while (*line && (*line != '\n') && (*line != '"')) line++;
1479
	    if (*line) *line = '\0';
1486
	    if (*line) *line = '\0';
1480
	} else {
1487
	} else {
1488
	    /* treat comma's as white space */
1489
	    for (first=line; *first; ++first) if (*first == ',') *first = ' ';
1481
	    first = line;
1490
	    first = line;
1482
	    while (*line && !isspace(*line)) line++;
1491
	    while (*line && !isspace(*line)) line++;
1483
	    if (*line) {
1492
	    if (*line) {

Return to bug 205796