Revision: 57095
http://sourceforge.net/p/brlcad/code/57095
Author: brlcad
Date: 2013-08-23 04:53:09 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
the *_ARGS() macros can go away as well, since c89+ is required.
Modified Paths:
--------------
brlcad/trunk/include/fbio.h
brlcad/trunk/include/nmg.h
brlcad/trunk/include/pc.h
brlcad/trunk/include/pkg.h
brlcad/trunk/include/wdb.h
Modified: brlcad/trunk/include/fbio.h
===================================================================
--- brlcad/trunk/include/fbio.h 2013-08-23 04:44:59 UTC (rev 57094)
+++ brlcad/trunk/include/fbio.h 2013-08-23 04:53:09 UTC (rev 57095)
@@ -33,8 +33,6 @@
#include "bu.h"
-#define FB_ARGS(args) args
-
#ifndef FB_EXPORT
# if defined(FB_DLL_EXPORTS) && defined(FB_DLL_IMPORTS)
# error "Only FB_DLL_EXPORTS or FB_DLL_IMPORTS can be defined, not both."
@@ -92,26 +90,26 @@
typedef struct FBIO_ {
uint32_t if_magic;
/* Static information: per device TYPE. */
- int (*if_open)FB_ARGS((struct FBIO_ *ifp, const char *file, int _width,
int _height)); /**< @brief open device */
- int (*if_close)FB_ARGS((struct FBIO_ *ifp));
/**< @brief close device */
- int (*if_clear)FB_ARGS((struct FBIO_ *ifp, unsigned char *pp));
/**< @brief clear device */
- ssize_t (*if_read)FB_ARGS((struct FBIO_ *ifp, int x, int y, unsigned char
*pp, size_t count)); /**< @brief read pixels */
- ssize_t (*if_write)FB_ARGS((struct FBIO_ *ifp, int x, int y, const
unsigned char *pp, size_t count)); /**< @brief write pixels */
- int (*if_rmap)FB_ARGS((struct FBIO_ *ifp, ColorMap *cmap));
/**< @brief read colormap */
- int (*if_wmap)FB_ARGS((struct FBIO_ *ifp, const ColorMap *cmap));
/**< @brief write colormap */
- int (*if_view)FB_ARGS((struct FBIO_ *ifp, int xcent, int ycent, int xzoom,
int yzoom)); /**< @brief set view */
- int (*if_getview)FB_ARGS((struct FBIO_ *ifp, int *xcent, int *ycent, int
*xzoom, int *yzoom)); /**< @brief get view */
- int (*if_setcursor)FB_ARGS((struct FBIO_ *ifp, const unsigned char *bits,
int xb, int yb, int xo, int yo)); /**< @brief define cursor */
- int (*if_cursor)FB_ARGS((struct FBIO_ *ifp, int mode, int x, int y));
/**< @brief set cursor */
- int (*if_getcursor)FB_ARGS((struct FBIO_ *ifp, int *mode, int *x, int
*y)); /**< @brief get cursor */
- int (*if_readrect)FB_ARGS((struct FBIO_ *ifp, int xmin, int ymin, int
_width, int _height, unsigned char *pp)); /**< @brief read rectangle
*/
- int (*if_writerect)FB_ARGS((struct FBIO_ *ifp, int xmin, int ymin, int
_width, int _height, const unsigned char *pp)); /**< @brief write rectangle
*/
- int (*if_bwreadrect)FB_ARGS((struct FBIO_ *ifp, int xmin, int ymin, int
_width, int _height, unsigned char *pp)); /**< @brief read monochrome
rectangle */
- int (*if_bwwriterect)FB_ARGS((struct FBIO_ *ifp, int xmin, int ymin, int
_width, int _height, const unsigned char *pp)); /**< @brief write rectangle */
- int (*if_poll)FB_ARGS((struct FBIO_ *ifp)); /**< @brief
handle events */
- int (*if_flush)FB_ARGS((struct FBIO_ *ifp)); /**< @brief flush
output */
- int (*if_free)FB_ARGS((struct FBIO_ *ifp)); /**< @brief
free resources */
- int (*if_help)FB_ARGS((struct FBIO_ *ifp)); /**< @brief
print useful info */
+ int (*if_open)(struct FBIO_ *ifp, const char *file, int _width, int
_height); /**< @brief open device */
+ int (*if_close)(struct FBIO_ *ifp);
/**< @brief close device */
+ int (*if_clear)(struct FBIO_ *ifp, unsigned char *pp);
/**< @brief clear device */
+ ssize_t (*if_read)(struct FBIO_ *ifp, int x, int y, unsigned char *pp,
size_t count); /**< @brief read pixels */
+ ssize_t (*if_write)(struct FBIO_ *ifp, int x, int y, const unsigned char
*pp, size_t count); /**< @brief write pixels */
+ int (*if_rmap)(struct FBIO_ *ifp, ColorMap *cmap);
/**< @brief read colormap */
+ int (*if_wmap)(struct FBIO_ *ifp, const ColorMap *cmap);
/**< @brief write colormap */
+ int (*if_view)(struct FBIO_ *ifp, int xcent, int ycent, int xzoom, int
yzoom); /**< @brief set view */
+ int (*if_getview)(struct FBIO_ *ifp, int *xcent, int *ycent, int *xzoom,
int *yzoom); /**< @brief get view */
+ int (*if_setcursor)(struct FBIO_ *ifp, const unsigned char *bits, int xb,
int yb, int xo, int yo); /**< @brief define cursor */
+ int (*if_cursor)(struct FBIO_ *ifp, int mode, int x, int y);
/**< @brief set cursor */
+ int (*if_getcursor)(struct FBIO_ *ifp, int *mode, int *x, int *y);
/**< @brief get cursor */
+ int (*if_readrect)(struct FBIO_ *ifp, int xmin, int ymin, int _width, int
_height, unsigned char *pp); /**< @brief read rectangle */
+ int (*if_writerect)(struct FBIO_ *ifp, int xmin, int ymin, int _width, int
_height, const unsigned char *pp); /**< @brief write rectangle */
+ int (*if_bwreadrect)(struct FBIO_ *ifp, int xmin, int ymin, int _width,
int _height, unsigned char *pp); /**< @brief read monochrome
rectangle */
+ int (*if_bwwriterect)(struct FBIO_ *ifp, int xmin, int ymin, int _width,
int _height, const unsigned char *pp); /**< @brief write rectangle */
+ int (*if_poll)(struct FBIO_ *ifp); /**< @brief handle events */
+ int (*if_flush)(struct FBIO_ *ifp); /**< @brief flush
output */
+ int (*if_free)(struct FBIO_ *ifp); /**< @brief free resources */
+ int (*if_help)(struct FBIO_ *ifp); /**< @brief print useful info */
char *if_type; /**< @brief what "open" calls it */
int if_max_width; /**< @brief max device width */
int if_max_height; /**< @brief max device height */
Modified: brlcad/trunk/include/nmg.h
===================================================================
--- brlcad/trunk/include/nmg.h 2013-08-23 04:44:59 UTC (rev 57094)
+++ brlcad/trunk/include/nmg.h 2013-08-23 04:53:09 UTC (rev 57095)
@@ -75,13 +75,6 @@
\017LABEL_PTS\016POLYTO\015MESH_EU\014MESH\013BASIC\012BOOLEVAL\011CLASSIFY\
\010BOOL\7VERIFY\6POLYSECT\5PLOTEM\4PL_LOOP\3GRAPHCL\2PL_SLOW\1PL_ANIM"
-/*
- * Macros for providing function prototypes, regardless of whether the
- * compiler understands them or not. It is vital that the argument
- * list given for "args" be enclosed in parens.
- */
-#define NMG_ARGS(args) args
-
/* Boolean operations */
#define NMG_BOOL_SUB 1 /**< @brief subtraction */
#define NMG_BOOL_ADD 2 /**< @brief addition/union */
@@ -761,43 +754,43 @@
* be written, if desired.
*/
struct nmg_visit_handlers {
- void (*bef_model) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*aft_model) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*bef_model)(uint32_t *, genptr_t, int);
+ void (*aft_model)(uint32_t *, genptr_t, int);
- void (*bef_region) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*aft_region) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*bef_region)(uint32_t *, genptr_t, int);
+ void (*aft_region)(uint32_t *, genptr_t, int);
- void (*vis_region_a) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*vis_region_a)(uint32_t *, genptr_t, int);
- void (*bef_shell) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*aft_shell) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*bef_shell)(uint32_t *, genptr_t, int);
+ void (*aft_shell)(uint32_t *, genptr_t, int);
- void (*vis_shell_a) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*vis_shell_a)(uint32_t *, genptr_t, int);
- void (*bef_faceuse) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*aft_faceuse) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*bef_faceuse)(uint32_t *, genptr_t, int);
+ void (*aft_faceuse)(uint32_t *, genptr_t, int);
- void (*vis_face) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*vis_face_g) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*vis_face)(uint32_t *, genptr_t, int);
+ void (*vis_face_g)(uint32_t *, genptr_t, int);
- void (*bef_loopuse) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*aft_loopuse) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*bef_loopuse)(uint32_t *, genptr_t, int);
+ void (*aft_loopuse)(uint32_t *, genptr_t, int);
- void (*vis_loop) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*vis_loop_g) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*vis_loop)(uint32_t *, genptr_t, int);
+ void (*vis_loop_g)(uint32_t *, genptr_t, int);
- void (*bef_edgeuse) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*aft_edgeuse) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*bef_edgeuse)(uint32_t *, genptr_t, int);
+ void (*aft_edgeuse)(uint32_t *, genptr_t, int);
- void (*vis_edge) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*vis_edge_g) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*vis_edge)(uint32_t *, genptr_t, int);
+ void (*vis_edge_g)(uint32_t *, genptr_t, int);
- void (*bef_vertexuse) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*aft_vertexuse) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*bef_vertexuse)(uint32_t *, genptr_t, int);
+ void (*aft_vertexuse)(uint32_t *, genptr_t, int);
- void (*vis_vertexuse_a) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*vis_vertex) NMG_ARGS((uint32_t *, genptr_t, int));
- void (*vis_vertex_g) NMG_ARGS((uint32_t *, genptr_t, int));
+ void (*vis_vertexuse_a)(uint32_t *, genptr_t, int);
+ void (*vis_vertex)(uint32_t *, genptr_t, int);
+ void (*vis_vertex_g)(uint32_t *, genptr_t, int);
};
#endif /* __NMG_H__ */
Modified: brlcad/trunk/include/pc.h
===================================================================
--- brlcad/trunk/include/pc.h 2013-08-23 04:44:59 UTC (rev 57094)
+++ brlcad/trunk/include/pc.h 2013-08-23 04:53:09 UTC (rev 57095)
@@ -50,8 +50,6 @@
* list given for "args" be enclosed in parens.
*/
-#define PC_ARGS(args) args
-
#define PC_PCSET_PUSHP(_pcsp,_par) \
BU_LIST_PUSH(&(_pcsp->ps->l),&(_par->l));
#define PC_PCSET_PUSHC(_pcsp,_con) \
Modified: brlcad/trunk/include/pkg.h
===================================================================
--- brlcad/trunk/include/pkg.h 2013-08-23 04:44:59 UTC (rev 57094)
+++ brlcad/trunk/include/pkg.h 2013-08-23 04:53:09 UTC (rev 57095)
@@ -44,23 +44,15 @@
# endif
#endif
-/*
- * Macros for providing function prototypes, regardless of whether
- * the compiler understands them or not.
- * It is vital that the argument list given for "args" be enclosed
- * in parens.
- */
-#define PKG_ARGS(args) args
-
#ifdef __cplusplus
extern "C" {
#endif
struct pkg_conn;
-typedef void (*pkg_callback)PKG_ARGS((struct pkg_conn*, char*));
-typedef void (*pkg_errlog)PKG_ARGS((char *msg));
+typedef void (*pkg_callback)(struct pkg_conn*, char*);
+typedef void (*pkg_errlog)(char *msg);
struct pkg_switch {
unsigned short pks_type; /**< @brief Type code */
Modified: brlcad/trunk/include/wdb.h
===================================================================
--- brlcad/trunk/include/wdb.h 2013-08-23 04:44:59 UTC (rev 57094)
+++ brlcad/trunk/include/wdb.h 2013-08-23 04:53:09 UTC (rev 57095)
@@ -58,13 +58,6 @@
# endif
#endif
-/*
- * Macros for providing function prototypes, regardless of whether
- * the compiler understands them or not.
- * It is vital that the argument list given for "args" be enclosed
- * in parentheses.
- */
-#define WDB_ARGS(args) args
/*
* In-memory form of database combinations
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits