[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ePiX and gcc-3.2
Hi Andy,
> Please send your patch! :)
Here it is, it just changes the draw_polygon, polygon and polyline
function such that it will compile with newer gcc versions (as far as I
know gcc>3.2.1, but not quite sure about that - the compiler that comes
with suse 8.1 does _not_ work f.e.). I haven't tested thoroughly if the
polygon/polyline actually still does what it is supposed to do, but it
seems to work :)
Apply the patch with "patch -p1 < epix-gcc.patch" (inside the epix-src
directory).
Ciao, Thorsten.
*** epix-0.8.10/objects.cc Thu Jun 5 06:45:46 2003
--- epix-0.8.10-ex/objects.cc Wed Jun 18 17:36:52 2003
***************
*** 849,863 ****
// polygon specified by number of points and list of vertices
// draw_polygon prints data points only (for pstricks...)
// polygon is closed, polyline is not
! void draw_polygon(int num_pts, triple p1, ...)
{
va_list ap;
! va_start(ap, p1);
triple* curr;
std::cout << "\n";
! print(p1);
for (int i=1; i <= num_pts-1; ++i) {
curr = va_arg(ap, triple*);
--- 849,866 ----
// polygon specified by number of points and list of vertices
// draw_polygon prints data points only (for pstricks...)
// polygon is closed, polyline is not
! void draw_polygon(int num_pts ...)
{
va_list ap;
! va_start(ap, num_pts);
triple* curr;
+ triple* p1 = va_arg(ap, triple*);
+
std::cout << "\n";
! // print(p1);
! print(*p1);
for (int i=1; i <= num_pts-1; ++i) {
curr = va_arg(ap, triple*);
***************
*** 868,887 ****
va_end(ap);
! print(p1); // close path
}
! void polygon(int num_pts, triple p1, ...)
{
epix_comment("polygon");
start_path();
va_list ap;
! va_start(ap, p1);
triple* curr;
! print(p1);
for (int i=1; i <= num_pts-1; ++i) {
curr = va_arg(ap, triple*);
--- 871,892 ----
va_end(ap);
! print(*p1); // close path
}
! void polygon(int num_pts ...)
{
epix_comment("polygon");
start_path();
va_list ap;
! va_start(ap, num_pts);
triple* curr;
! triple* p1 = va_arg(ap, triple*);
! print(*p1);
! // print(p1);
for (int i=1; i <= num_pts-1; ++i) {
curr = va_arg(ap, triple*);
***************
*** 891,913 ****
}
va_end(ap);
! print(p1); // close path
end_stanza();
}
! void polyline(int num_pts, triple p1, ...)
{
epix_comment("polyline");
start_path();
va_list ap;
! va_start(ap, p1);
triple* curr;
! print(p1);
! for (int i=1; i <= num_pts-1; ++i) {
curr = va_arg(ap, triple*);
print(*curr);
--- 896,918 ----
}
va_end(ap);
! print(*p1); // close path
end_stanza();
}
! void polyline(int num_pts ...)
{
epix_comment("polyline");
start_path();
va_list ap;
! va_start(ap, num_pts);
triple* curr;
! // print(p1);
! for (int i=1; i <= num_pts; ++i) {
curr = va_arg(ap, triple*);
print(*curr);
*** epix-0.8.10/objects.h Thu Jun 5 06:10:46 2003
--- epix-0.8.10-ex/objects.h Wed Jun 18 17:37:14 2003
***************
*** 239,247 ****
void swatch(triple, triple);
// polygon/polyline with variable number of vertices
! void draw_polygon(int num_pts, triple p1, ...); // data points only
! void polygon(int num_pts, triple p1, ...);
! void polyline(int num_pts, triple p1, ...);
void draw_arrowhead(triple tail, triple head, double width, double scale=1);
void draw_shaft(triple tail, triple head, double width, double scale=1);
--- 239,247 ----
void swatch(triple, triple);
// polygon/polyline with variable number of vertices
! void draw_polygon(int num_pts ...); // data points only
! void polygon(int num_pts ...);
! void polyline(int num_pts ...);
void draw_arrowhead(triple tail, triple head, double width, double scale=1);
void draw_shaft(triple tail, triple head, double width, double scale=1);