Revision: 52758
          http://brlcad.svn.sourceforge.net/brlcad/?rev=52758&view=rev
Author:   brlcad
Date:     2012-10-04 05:29:25 +0000 (Thu, 04 Oct 2012)
Log Message:
-----------
Nu_int0 and Nu_void begone.  utilize the new null interface functions which 
have properly expanded signatures for better type checking.  new functions are 
all prefixed with null_

Modified Paths:
--------------
    brlcad/trunk/include/dm.h
    brlcad/trunk/src/libdm/dm-X.c
    brlcad/trunk/src/libdm/dm-generic.c
    brlcad/trunk/src/libdm/dm-ogl.c
    brlcad/trunk/src/libdm/dm-plot.c
    brlcad/trunk/src/libdm/dm-ps.c
    brlcad/trunk/src/libdm/dm-rtgl.c
    brlcad/trunk/src/libdm/dm-tk.c
    brlcad/trunk/src/libdm/dm-wgl.c

Modified: brlcad/trunk/include/dm.h
===================================================================
--- brlcad/trunk/include/dm.h   2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/include/dm.h   2012-10-04 05:29:25 UTC (rev 52758)
@@ -218,38 +218,38 @@
  * Interface to a specific Display Manager
  */
 struct dm {
-    int (*dm_close)();
-    int (*dm_drawBegin)();     /**< @brief formerly dmr_prolog */
-    int (*dm_drawEnd)();               /**< @brief formerly dmr_epilog */
-    int (*dm_normal)();
-    int (*dm_loadMatrix)();
-    int (*dm_drawString2D)();  /**< @brief formerly dmr_puts */
-    int (*dm_drawLine2D)();    /**< @brief formerly dmr_2d_line */
-    int (*dm_drawLine3D)();
-    int (*dm_drawLines3D)();
-    int (*dm_drawPoint2D)();
-    int (*dm_drawPoint3D)();
-    int (*dm_drawPoints3D)();
-    int (*dm_drawVList)();
-    int (*dm_drawVListHiddenLine)();
+    int (*dm_close)(struct dm *dmp);
+    int (*dm_drawBegin)(struct dm *dmp);       /**< @brief formerly dmr_prolog 
*/
+    int (*dm_drawEnd)(struct dm *dmp);         /**< @brief formerly dmr_epilog 
*/
+    int (*dm_normal)(struct dm *dmp);
+    int (*dm_loadMatrix)(struct dm *dmp, fastf_t *mat, int which_eye);
+    int (*dm_drawString2D)(struct dm *dmp, const char *str, fastf_t x, fastf_t 
y, int size, int use_aspect);   /**< @brief formerly dmr_puts */
+    int (*dm_drawLine2D)(struct dm *dmp, fastf_t x_1, fastf_t y_1, fastf_t 
x_2, fastf_t y_2);  /**< @brief formerly dmr_2d_line */
+    int (*dm_drawLine3D)(struct dm *dmp, point_t pt1, point_t pt2);
+    int (*dm_drawLines3D)(struct dm *dmp, int npoints, point_t *points, int 
sflag);
+    int (*dm_drawPoint2D)(struct dm *dmp, fastf_t x, fastf_t y);
+    int (*dm_drawPoint3D)(struct dm *dmp, point_t point);
+    int (*dm_drawPoints3D)(struct dm *dmp, int npoints, point_t *points);
+    int (*dm_drawVList)(struct dm *dmp, struct bn_vlist *vp);
+    int (*dm_drawVListHiddenLine)(struct dm *dmp, register struct bn_vlist 
*vp);
     int (*dm_draw)(struct dm *dmp, struct bn_vlist *(*callback_function)(void 
*), genptr_t *data);     /**< @brief formerly dmr_object */
     int (*dm_setFGColor)(struct dm *dmp, unsigned char r, unsigned char g, 
unsigned char b, int strict, fastf_t transparency);
     int (*dm_setBGColor)(struct dm *, unsigned char, unsigned char, unsigned 
char);
-    int (*dm_setLineAttr)();   /**< @brief currently - linewidth, (not-)dashed 
*/
-    int (*dm_configureWin)();
-    int (*dm_setWinBounds)();
-    int (*dm_setLight)();
-    int (*dm_setTransparency)();
-    int (*dm_setDepthMask)();
-    int (*dm_setZBuffer)();
-    int (*dm_debug)();         /**< @brief Set DM debug level */
-    int (*dm_beginDList)();
-    int (*dm_endDList)();
-    void (*dm_drawDList)();
-    int (*dm_freeDLists)();
-    int (*dm_genDLists)();
+    int (*dm_setLineAttr)(struct dm *dmp, int width, int style);       /**< 
@brief currently - linewidth, (not-)dashed */
+    int (*dm_configureWin)(struct dm *dmp, int force);
+    int (*dm_setWinBounds)(struct dm *dmp, fastf_t *w);
+    int (*dm_setLight)(struct dm *dmp, int light_on);
+    int (*dm_setTransparency)(struct dm *dmp, int transparency_on);
+    int (*dm_setDepthMask)(struct dm *dmp, int depthMask_on);
+    int (*dm_setZBuffer)(struct dm *dmp, int zbuffer_on);
+    int (*dm_debug)(struct dm *dmp, int lvl);          /**< @brief Set DM 
debug level */
+    int (*dm_beginDList)(struct dm *dmp, unsigned int list);
+    int (*dm_endDList)(struct dm *dmp);
+    void (*dm_drawDList)(unsigned int list);
+    int (*dm_freeDLists)(struct dm *dmp, unsigned int list, int range);
+    int (*dm_genDLists)(struct dm *dmp, size_t range);
     int (*dm_getDisplayImage)(struct dm *dmp, unsigned char **image);
-    void (*dm_reshape)();
+    void (*dm_reshape)(struct dm *dmp, int width, int height);
     unsigned long dm_id;          /**< @brief window id */
     int dm_displaylist;                /**< @brief !0 means device has 
displaylist */
     int dm_stereo;                /**< @brief stereo flag */
@@ -321,7 +321,6 @@
 #define DM_GEN_DLISTS(_dmp, _range) _dmp->dm_genDLists(_dmp, _range)
 #define DM_GET_DISPLAY_IMAGE(_dmp, _image) _dmp->dm_getDisplayImage(_dmp, 
_image)
 
-DM_EXPORT extern struct dm dm_Null;
 DM_EXPORT extern struct dm dm_ogl;
 DM_EXPORT extern struct dm dm_plot;
 DM_EXPORT extern struct dm dm_ps;
@@ -353,9 +352,6 @@
 DM_EXPORT extern int dm_limit(int i);
 DM_EXPORT extern int dm_unlimit(int i);
 DM_EXPORT extern fastf_t dm_wrap(fastf_t f);
-DM_EXPORT extern void Nu_void();
-DM_EXPORT extern int Nu_int0();
-DM_EXPORT extern unsigned Nu_unsign();
 
 /* adc.c */
 DM_EXPORT extern void dm_draw_adc(struct dm *dmp,

Modified: brlcad/trunk/src/libdm/dm-X.c
===================================================================
--- brlcad/trunk/src/libdm/dm-X.c       2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/src/libdm/dm-X.c       2012-10-04 05:29:25 UTC (rev 52758)
@@ -59,6 +59,7 @@
 #include "raytrace.h"
 #include "dm.h"
 #include "dm-X.h"
+#include "dm-Null.h"
 #include "dm_xvars.h"
 #include "solid.h"
 
@@ -1148,7 +1149,7 @@
  * beam is as specified.
  */
 HIDDEN int
-X_drawString2D(struct dm *dmp, char *str, fastf_t x, fastf_t y, int size, int 
use_aspect)
+X_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int 
size, int use_aspect)
 {
     int sx, sy;
     struct dm_xvars *pubvars = (struct dm_xvars *)dmp->dm_vars.pub_vars;
@@ -1639,8 +1640,8 @@
     X_drawLine3D,
     X_drawLines3D,
     X_drawPoint2D,
-    Nu_int0,
-    Nu_int0,
+    null_drawPoint3D,
+    null_drawPoints3D,
     X_drawVList,
     X_drawVList,
     X_draw,
@@ -1650,15 +1651,15 @@
     X_configureWin,
     X_setWinBounds,
     X_setLight,
-    Nu_int0,
-    Nu_int0,
+    null_setTransparency,
+    null_setDepthMask,
     X_setZBuffer,
     X_debug,
-    Nu_int0,
-    Nu_int0,
-    Nu_void,
-    Nu_int0,
-    Nu_int0,
+    null_beginDList,
+    null_endDList,
+    null_drawDList,
+    null_freeDLists,
+    null_genDLists,
     X_getDisplayImage, /* display to image function */
     X_reshape,
     0,

Modified: brlcad/trunk/src/libdm/dm-generic.c
===================================================================
--- brlcad/trunk/src/libdm/dm-generic.c 2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/src/libdm/dm-generic.c 2012-10-04 05:29:25 UTC (rev 52758)
@@ -34,7 +34,9 @@
 #include "vmath.h"
 #include "dm.h"
 
+#include "dm-Null.h"
 
+
 extern struct dm *plot_open(Tcl_Interp *interp, int argc, const char *argv[]);
 extern struct dm *ps_open(Tcl_Interp *interp, int argc, const char *argv[]);
 
@@ -70,7 +72,7 @@
 
 
 HIDDEN struct dm *
-Nu_open(Tcl_Interp *interp, int argc, const char *argv[])
+null_open(Tcl_Interp *interp, int argc, const char *argv[])
 {
     struct dm *dmp;
 
@@ -81,7 +83,7 @@
     if (dmp == DM_NULL)
        return DM_NULL;
 
-    *dmp = dm_Null;
+    *dmp = dm_null;
     dmp->dm_interp = interp;
 
     return dmp;
@@ -93,7 +95,7 @@
 {
     switch (type) {
        case DM_TYPE_NULL:
-           return Nu_open(interp, argc, argv);
+           return null_open(interp, argc, argv);
        case DM_TYPE_PLOT:
            return plot_open(interp, argc, argv);
        case DM_TYPE_PS:

Modified: brlcad/trunk/src/libdm/dm-ogl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-ogl.c     2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/src/libdm/dm-ogl.c     2012-10-04 05:29:25 UTC (rev 52758)
@@ -103,7 +103,7 @@
 HIDDEN int ogl_drawEnd(struct dm *dmp);
 HIDDEN int ogl_normal(struct dm *dmp);
 HIDDEN int ogl_loadMatrix(struct dm *dmp, fastf_t *mat, int which_eye);
-HIDDEN int ogl_drawString2D(struct dm *dmp, register char *str, fastf_t x, 
fastf_t y, int size, int use_aspect);
+HIDDEN int ogl_drawString2D(struct dm *dmp, const char *str, fastf_t x, 
fastf_t y, int size, int use_aspect);
 HIDDEN int ogl_drawLine2D(struct dm *dmp, fastf_t X1, fastf_t Y1, fastf_t X2, 
fastf_t Y2);
 HIDDEN int ogl_drawLine3D(struct dm *dmp, point_t pt1, point_t pt2);
 HIDDEN int ogl_drawLines3D(struct dm *dmp, int npoints, point_t *points, int 
sflag);
@@ -132,7 +132,6 @@
 HIDDEN int ogl_getDisplayImage(struct dm *dmp, unsigned char **image);
 HIDDEN void ogl_reshape(struct dm *dmp, int width, int height);
 
-HIDDEN int ogl_drawString2D(struct dm *dmp, char *str, fastf_t x, fastf_t y, 
int size, int use_aspect);
 HIDDEN int ogl_setLight(struct dm *dmp, int lighting_on);
 HIDDEN int ogl_setZBuffer(struct dm *dmp, int zbuffer_on);
 
@@ -1765,7 +1764,7 @@
  * The starting position of the beam is as specified.
  */
 HIDDEN int
-ogl_drawString2D(struct dm *dmp, char *str, fastf_t x, fastf_t y, int 
UNUSED(size), int use_aspect)
+ogl_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int 
UNUSED(size), int use_aspect)
 {
     if (dmp->dm_debugLevel)
        bu_log("ogl_drawString2D()\n");

Modified: brlcad/trunk/src/libdm/dm-plot.c
===================================================================
--- brlcad/trunk/src/libdm/dm-plot.c    2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/src/libdm/dm-plot.c    2012-10-04 05:29:25 UTC (rev 52758)
@@ -47,7 +47,10 @@
 #include "mater.h"
 #include "raytrace.h"
 #include "dm.h"
+
 #include "dm-plot.h"
+#include "dm-Null.h"
+
 #include "solid.h"
 #include "plot3.h"
 
@@ -360,7 +363,7 @@
  * The starting position of the beam is as specified.
  */
 HIDDEN int
-plot_drawString2D(struct dm *dmp, char *str, fastf_t x, fastf_t y, int size, 
int UNUSED(use_aspect))
+plot_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int 
size, int UNUSED(use_aspect))
 {
     int sx, sy;
 
@@ -509,28 +512,28 @@
     plot_drawLine3D,
     plot_drawLines3D,
     plot_drawPoint2D,
-    Nu_int0,
-    Nu_int0,
+    null_drawPoint3D,
+    null_drawPoints3D,
     plot_drawVList,
     plot_drawVList,
     plot_draw,
     plot_setFGColor,
     plot_setBGColor,
     plot_setLineAttr,
-    Nu_int0,
+    null_configureWin,
     plot_setWinBounds,
-    Nu_int0,
-    Nu_int0,
-    Nu_int0,
-    Nu_int0,
+    null_setLight,
+    null_setTransparency,
+    null_setDepthMask,
+    null_setZBuffer,
     plot_debug,
-    Nu_int0,
-    Nu_int0,
-    Nu_void,
-    Nu_int0,
-    Nu_int0,
-    Nu_int0, /* display to image function */
-    Nu_void,
+    null_beginDList,
+    null_endDList,
+    null_drawDList,
+    null_freeDLists,
+    null_genDLists,
+    null_getDisplayImage,      /* display to image function */
+    null_reshape,
     0,
     0,                         /* no displaylist */
     0,                         /* no stereo */

Modified: brlcad/trunk/src/libdm/dm-ps.c
===================================================================
--- brlcad/trunk/src/libdm/dm-ps.c      2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/src/libdm/dm-ps.c      2012-10-04 05:29:25 UTC (rev 52758)
@@ -44,8 +44,11 @@
 #include "bn.h"
 #include "mater.h"
 #include "raytrace.h"
+
 #include "dm.h"
 #include "dm-ps.h"
+#include "dm-Null.h"
+
 #include "solid.h"
 
 #include "./dm_util.h"
@@ -350,7 +353,7 @@
  */
 /* ARGSUSED */
 HIDDEN int
-ps_drawString2D(struct dm *dmp, char *str, fastf_t x, fastf_t y, int size, int 
UNUSED(use_aspect))
+ps_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int 
size, int UNUSED(use_aspect))
 {
     int sx, sy;
 
@@ -513,28 +516,28 @@
     ps_drawLine3D,
     ps_drawLines3D,
     ps_drawPoint2D,
-    Nu_int0,
-    Nu_int0,
+    null_drawPoint3D,
+    null_drawPoints3D,
     ps_drawVList,
     ps_drawVList,
     ps_draw,
     ps_setFGColor,
     ps_setBGColor,
     ps_setLineAttr,
-    Nu_int0,
+    null_configureWin,
     ps_setWinBounds,
-    Nu_int0,
-    Nu_int0,
-    Nu_int0,
-    Nu_int0,
+    null_setLight,
+    null_setTransparency,
+    null_setDepthMask,
+    null_setZBuffer,
     ps_debug,
-    Nu_int0,
-    Nu_int0,
-    Nu_void,
-    Nu_int0,
-    Nu_int0,
-    Nu_int0, /* display to image function */
-    Nu_void,
+    null_beginDList,
+    null_endDList,
+    null_drawDList,
+    null_freeDLists,
+    null_genDLists,
+    null_getDisplayImage,      /* display to image function */
+    null_reshape,
     0,
     0,                         /* no displaylist */
     0,                            /* no stereo */
@@ -674,7 +677,7 @@
                break;
            case 's':               /* size in inches */
                {
-                   fastf_t size;
+                   double size;
 
                    if (argv[0][2] != '\0')
                        sscanf(&argv[0][2], "%lf", &size);

Modified: brlcad/trunk/src/libdm/dm-rtgl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-rtgl.c    2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/src/libdm/dm-rtgl.c    2012-10-04 05:29:25 UTC (rev 52758)
@@ -118,8 +118,8 @@
     rtgl_drawDList,
     rtgl_freeDLists,
     rtgl_genDLists,
-    Nu_int0, /* display to image function */
-    Nu_void,
+    null_getDisplayImage,      /* display to image function */
+    null_reshape,
     0,
     1,                         /* has displaylist */
     0,                          /* no stereo by default */
@@ -2012,7 +2012,7 @@
  * The starting position of the beam is as specified.
  */
 HIDDEN int
-rtgl_drawString2D(struct dm *dmp, char *str, fastf_t x, fastf_t y, int 
UNUSED(size), int use_aspect)
+rtgl_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int 
UNUSED(size), int use_aspect)
 {
     if (!dmp)
        return TCL_ERROR;

Modified: brlcad/trunk/src/libdm/dm-tk.c
===================================================================
--- brlcad/trunk/src/libdm/dm-tk.c      2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/src/libdm/dm-tk.c      2012-10-04 05:29:25 UTC (rev 52758)
@@ -60,6 +60,7 @@
 #include "dm.h"
 #include "dm-tk.h"
 #include "dm-X.h"
+#include "dm-Null.h"
 #include "dm_xvars.h"
 #include "solid.h"
 
@@ -493,7 +494,7 @@
  */
 /* ARGSUSED */
 HIDDEN int
-tk_drawString2D(struct dm *dmp, char *str, fastf_t x, fastf_t y, int size, int 
use_aspect)
+tk_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int 
size, int use_aspect)
 {
     int sx, sy;
 
@@ -818,8 +819,8 @@
     tk_drawLine3D,
     tk_drawLines3D,
     tk_drawPoint2D,
-    Nu_int0,
-    Nu_int0,
+    null_drawPoint3D,
+    null_drawPoints3D,
     tk_drawVList,
     tk_drawVList,
     tk_draw,
@@ -829,20 +830,20 @@
     tk_configureWin,
     tk_setWinBounds,
     tk_setLight,
-    Nu_int0,
-    Nu_int0,
+    null_setTransparency,
+    null_setDepthMask,
     tk_setZBuffer,
     tk_debug,
-    Nu_int0,
-    Nu_int0,
-    Nu_void,
-    Nu_int0,
-    Nu_int0,
-    Nu_int0, /* display to image function */
-    Nu_void,
+    null_beginDList,
+    null_endDList,
+    null_drawDList,
+    null_freeDLists,
+    null_genDLists,
+    null_getDisplayImage,      /* display to image function */
+    null_reshape,
     0,
     0,                         /* no displaylist */
-    0,                            /* no stereo */
+    0,                         /* no stereo */
     PLOTBOUND,                 /* zoom-in limit */
     1,                         /* bound flag */
     "Tk",

Modified: brlcad/trunk/src/libdm/dm-wgl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-wgl.c     2012-10-04 05:26:35 UTC (rev 52757)
+++ brlcad/trunk/src/libdm/dm-wgl.c     2012-10-04 05:29:25 UTC (rev 52758)
@@ -1287,7 +1287,7 @@
  * The starting position of the beam is as specified.
  */
 HIDDEN int
-wgl_drawString2D(struct dm *dmp, char *str, fastf_t x, fastf_t y, int size, 
int use_aspect)
+wgl_drawString2D(struct dm *dmp, const char *str, fastf_t x, fastf_t y, int 
size, int use_aspect)
 {
     if (dmp->dm_debugLevel)
        bu_log("wgl_drawString2D()\n");
@@ -2136,12 +2136,12 @@
     wgl_drawDList,
     wgl_freeDLists,
     wgl_genDLists,
-    Nu_int0, /* display to image function */
+    null_getDisplayImage,      /* display to image function */
     wgl_reshape,
     0,
     1,                         /* has displaylist */
-    0,                            /* no stereo by default */
-    1.0,                               /* zoom-in limit */
+    0,                          /* no stereo by default */
+    1.0,                       /* zoom-in limit */
     1,                         /* bound flag */
     "wgl",
     "Windows with OpenGL graphics",

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to