Current versions of gcc complain about statements of the form #else FOO and #endif BAR This syntax has historically been acceptable to most C compilers, although it is not permitted by ANSI/ISO C; any tokens following #else or #endif on the same line are simply ignored. Some writers have exploited this permissiveness to make their code more easily readable, although most are careful to mark their comments using /* ... */ (which is permitted even by finicky compilers such as gcc). In the standard XView distribution, six of the *.h files normally found in /usr/openwin/include/pixrect/ contain #else or #endif statements that provoke warnings from gcc. Although these warnings do not prevent successful compilation of wave, they are so numerous that more serious errors can easily go unnoticed. This file contains patches that correct these bugs. To apply them, copy this file to the parent directory of 'pixrect' (normally /usr/openwin/include), then type patch -p0 pr_ops->pro_getattributes)((pr), (planes)) -#endif !KERNEL +#endif /* !KERNEL */ -#else !lint || KERNEL +#else /* !lint || KERNEL */ extern pr_rop(); extern pr_stencil(); @@ -186,7 +186,7 @@ extern pr_putattributes(); extern pr_getattributes(); -#endif lint +#endif /* lint */ /* * Several of the above operations return a common, distinguished value when @@ -277,7 +277,7 @@ #define pr_line(pr, x0, y0, x1, y1, brush, tex, op) \ pro_line((pr), (x0), (y0), (x1), (y1), (brush), (tex), (op), 0) -#else !lint || KERNEL +#else /* !lint || KERNEL */ extern prs_rop(); extern prs_stencil(); @@ -296,7 +296,7 @@ extern pr_close(); extern pr_line(); -#endif !lint || KERNEL +#endif /* !lint || KERNEL */ @@ -329,7 +329,7 @@ #define pr_getlut(pr, ind, cnt, red, grn, blu) \ (*(pr)->pr_ops->pro_getcolormap)((pr), PR_FORCE_UPDATE | (ind), \ (cnt), (red), (grn), (blu)) -#endif !KERNEL +#endif /* !KERNEL */ #endif /* !_pixrect_pixrect_h */ diff -Naur pixrect-/pr_line.h pixrect/pr_line.h --- pixrect-/pr_line.h Mon Jun 5 04:39:17 2000 +++ pixrect/pr_line.h Fri Oct 12 14:06:54 2001 @@ -47,7 +47,7 @@ int width; } Pr_brush; -#endif pr_line_h_DEFINED +#endif /* pr_line_h_DEFINED */ diff -Naur pixrect-/pr_planegroups.h pixrect/pr_planegroups.h --- pixrect-/pr_planegroups.h Mon Jun 5 04:39:17 2000 +++ pixrect/pr_planegroups.h Fri Oct 12 14:04:05 2001 @@ -47,4 +47,4 @@ extern void pr_set_plane_group(); extern void pr_set_planes(); -#endif pr_planegroups_DEFINED +#endif /* pr_planegroups_DEFINED */ diff -Naur pixrect-/pr_util.h pixrect/pr_util.h --- pixrect-/pr_util.h Mon Jun 5 04:39:17 2000 +++ pixrect/pr_util.h Fri Oct 12 14:04:36 2001 @@ -66,11 +66,11 @@ op; \ }; \ asm("dbra d6,label"); -#else mc68000 +#else /* mc68000 */ #define rop_slowloop(n, op) \ { register int _loop = (n); \ while (--_loop >= 0) { op; } } -#endif mc68000 +#endif /* mc68000 */ #ifdef mc68010 #define cases8(n, op) \ @@ -88,9 +88,9 @@ cases8(0, op); \ case 0: break; \ } } -#else mc68010 +#else /* mc68010 */ #define rop_fastloop rop_slowloop -#endif mc68010 +#endif /* mc68010 */ /* * Alloctype(datatype) allocates a datatype structure using calloc @@ -133,6 +133,6 @@ #ifndef KERNEL Pixrect *pr_makefromfd(); -#endif !KERNEL +#endif /* !KERNEL */ -#endif pr_util_DEFINED +#endif /* pr_util_DEFINED */ diff -Naur pixrect-/traprop.h pixrect/traprop.h --- pixrect-/traprop.h Mon Jun 5 04:39:17 2000 +++ pixrect/traprop.h Fri Oct 12 14:06:02 2001 @@ -23,4 +23,4 @@ int y0, y1; /* top+bottom boundaries */ }; -#endif traprop_DEFINED +#endif /* traprop_DEFINED */