The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4394 ripley 1
/*
2
 * GraphApp - Cross-Platform Graphics Programming Library.
3
 *
4
 * File: xredef.c -- redefinitions for cross-platform portability.
5
 * Platform: Neutral  Version: 2.20  Date: 1997/05/05
6
 *
7
 * Version: 1.00  Changes: Original version by Lachlan Patrick.
8
 */
9
 
10
/* Copyright (C) 1993-1997 Lachlan Patrick
11
 
12
   This file is part of GraphApp, a cross-platform C graphics library.
13
 
14
   GraphApp is free software; you can redistribute it and/or modify it
15
   under the terms of the GNU Library General Public License.
16
   GraphApp is distributed in the hope that it will be useful, but
17
   WITHOUT ANY WARRANTY.
18
 
19
   See the file COPYLIB.TXT for details.
20
*/
21
 
22
#include "internal.h"
23
 
24
/*
25
 *  This file only exists to allow GraphApp code to link to the
26
 *  real function names defined in the graphapp.h header file.
27
 *
28
 *  Certain functions are redefined in the header file because
29
 *  the Macintosh  platform rejects them.
30
 *  Rather than redesign the library to avoid these name-clashes,
31
 *  the function names are defined differently using macros.
32
 *
33
 *  This file defines the real function names. Usually this will
34
 *  be unnecessary, but it's included here for completeness.
35
 */
36
 
37
#ifdef REDEFINE_FUNC_NAMES
38
#undef addpt
39
#undef subpt
40
#undef equalpt
41
#undef newmenu
42
#undef newcontrol
43
#undef newwindow
44
 
45
point addpt(point p1, point p2);
46
point subpt(point p1, point p2);
47
int equalpt(point p1, point p2);
48
menu newmenu(char *name);
49
control newcontrol(char *text, rect r);
50
window newwindow(char *name, rect r, long flags);
51
 
52
point addpt(point p1, point p2)
53
{
54
	p1.x += p2.x;
55
	p1.y += p2.y;
56
	return p1;
57
}
58
 
59
point subpt(point p1, point p2)
60
{
61
	p1.x -= p2.x;
62
	p1.y -= p2.y;
63
	return p1;
64
}
65
 
66
int equalpt(point p1, point p2)
67
{
68
	if ((p1.x==p2.x) && (p1.y==p2.y))
69
		return 1;
70
	else
71
		return 0;
72
}
73
 
74
menu newmenu(char *name)
75
{
76
	return GA_newmenu(name);
77
}
78
 
79
control newcontrol(char *text, rect r)
80
{
81
	return GA_newcontrol(text, r);
82
}
83
 
84
window newwindow(char *name, rect r, long flags)
85
{
86
	return GA_newwindow(name, r, flags);
87
}
88
 
89
#endif
90