[brlcad-commits] SF.net SVN: brlcad:[32499] brlcad/trunk/include/ged.h
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2008-08-22 02:09:54
|
Revision: 32499 http://brlcad.svn.sourceforge.net/brlcad/?rev=32499&view=rev Author: brlcad Date: 2008-08-22 02:10:03 +0000 (Fri, 22 Aug 2008) Log Message: ----------- ws Modified Paths: -------------- brlcad/trunk/include/ged.h Modified: brlcad/trunk/include/ged.h =================================================================== --- brlcad/trunk/include/ged.h 2008-08-20 20:58:59 UTC (rev 32498) +++ brlcad/trunk/include/ged.h 2008-08-22 02:10:03 UTC (rev 32499) @@ -95,14 +95,14 @@ #endif /* Check if the object is a combination */ -#define GED_CHECK_COMB(_gedp,_dp,_ret) \ +#define GED_CHECK_COMB(_gedp, _dp, _ret) \ if (((_dp)->d_flags & DIR_COMB) == 0) { \ bu_vls_printf(&(_gedp)->ged_result_str, "%s: not a combination", (_dp)->d_namep); \ return (_ret); \ } /* Check if a database is open */ -#define GED_CHECK_DATABASE_OPEN(_gedp,_ret) \ +#define GED_CHECK_DATABASE_OPEN(_gedp, _ret) \ if ((_gedp) == GED_NULL || (_gedp)->ged_wdbp == RT_WDB_NULL || (_gedp)->ged_wdbp->dbip == DBI_NULL) { \ if ((_gedp) != GED_NULL) \ bu_vls_printf(&(_gedp)->ged_result_str, "A database is not open!"); \ @@ -112,62 +112,62 @@ } /* Check if a drawable exists */ -#define GED_CHECK_DRAWABLE(_gedp,_ret) \ +#define GED_CHECK_DRAWABLE(_gedp, _ret) \ if (_gedp->ged_gdp == GED_DRAWABLE_NULL) { \ bu_vls_printf(&(_gedp)->ged_result_str, "A drawable does not exist!"); \ return (_ret); \ } /* Check if a view exists */ -#define GED_CHECK_VIEW(_gedp,_ret) \ +#define GED_CHECK_VIEW(_gedp, _ret) \ if (_gedp->ged_gvp == GED_VIEW_NULL) { \ bu_vls_printf(&(_gedp)->ged_result_str, "A view does not exist!"); \ return (_ret); \ } /* Lookup database object */ -#define GED_CHECK_EXISTS(_gedp,_name,_noisy,_ret) \ +#define GED_CHECK_EXISTS(_gedp, _name, _noisy, _ret) \ if (db_lookup((_gedp)->ged_wdbp->dbip, (_name), (_noisy)) != DIR_NULL) { \ bu_vls_printf(&(_gedp)->ged_result_str, "%s already exists", (_name)); \ return (_ret); \ } /* Check if the database is read only */ -#define GED_CHECK_READ_ONLY(_gedp,_ret) \ +#define GED_CHECK_READ_ONLY(_gedp, _ret) \ if ((_gedp)->ged_wdbp->dbip->dbi_read_only) { \ bu_vls_printf(&(_gedp)->ged_result_str, "Sorry, this database is READ-ONLY"); \ return (_ret); \ } /* Check if the object is a region */ -#define GED_CHECK_REGION(_gedp,_dp,_ret) \ +#define GED_CHECK_REGION(_gedp, _dp, _ret) \ if (((_dp)->d_flags & DIR_REGION) == 0) { \ bu_vls_printf(&(_gedp)->ged_result_str, "%s: not a region", (_dp)->d_namep); \ return (_ret); \ } -#define GED_DB_DIRADD(_gedp,_dp,_name,_laddr,_len,_flags,_ptr,_ret) \ +#define GED_DB_DIRADD(_gedp, _dp, _name, _laddr, _len, _flags, _ptr, _ret) \ if (((_dp) = db_diradd((_gedp)->ged_wdbp->dbip, (_name), (_laddr), (_len), (_flags), (_ptr))) == DIR_NULL) { \ bu_vls_printf(&(_gedp)->ged_result_str, "An error has occured while adding a new object to the database."); \ return (_ret); \ } /* Lookup database object */ -#define GED_DB_LOOKUP(_gedp,_dp,_name,_noisy,_ret) \ +#define GED_DB_LOOKUP(_gedp, _dp, _name, _noisy, _ret) \ if (((_dp) = db_lookup((_gedp)->ged_wdbp->dbip, (_name), (_noisy))) == DIR_NULL) { \ bu_vls_printf(&(_gedp)->ged_result_str, "%s: not found", (_name)); \ return (_ret); \ } /* Get internal representation */ -#define GED_DB_GET_INTERNAL(_gedp,_intern,_dp,_mat,_resource,_ret) \ +#define GED_DB_GET_INTERNAL(_gedp, _intern, _dp, _mat, _resource, _ret) \ if (rt_db_get_internal((_intern), (_dp), (_gedp)->ged_wdbp->dbip, (_mat), (_resource)) < 0) { \ bu_vls_printf(&(_gedp)->ged_result_str, "Database read error, aborting"); \ return (_ret); \ } /* Put internal representation */ -#define GED_DB_PUT_INTERNAL(_gedp,_dp,_intern,_resource,_ret) \ +#define GED_DB_PUT_INTERNAL(_gedp, _dp, _intern, _resource, _ret) \ if (rt_db_put_internal((_dp), (_gedp)->ged_wdbp->dbip, (_intern), (_resource)) < 0) { \ bu_vls_printf(&(_gedp)->ged_result_str, "Database write error, aborting"); \ return (_ret); \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |