[brlcad-commits] CVS: brlcad/src/nirt nirt.h,14.8,14.9
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: Sean M. <br...@us...> - 2007-12-17 23:08:53
|
Update of /cvsroot/brlcad/brlcad/src/nirt In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14828 Modified Files: nirt.h Log Message: clean ws and style consistency, document origin, remove min/max/abs and DEBUG_FORMAT (raytrace.h provides it), add header wrapper protection Index: nirt.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/nirt/nirt.h,v retrieving revision 14.8 retrieving revision 14.9 diff -w -u -r14.8 -r14.9 --- nirt.h 23 Jan 2007 01:13:44 -0000 14.8 +++ nirt.h 17 Dec 2007 23:08:55 -0000 14.9 @@ -19,14 +19,28 @@ */ /** @file nirt.h * + * Common defines and declarations used by nirt. + * + * Author: + * Natalie L. Barker + * + * Date: + * Jan 90 + * */ -/* NIRT.H */ +#ifndef __NIRT_H__ +#define __NIRT_H__ -/* Needed for some struct definitions */ -#include "./usrfmt.h" +#include "common.h" -/* CONSTANTS */ +#include "machine.h" +#include "raytrace.h" /* for DEBUG_FORMAT */ + +#include "./usrfmt.h" /* Needed for some struct definitions */ + + +/** CONSTANTS */ #define VAR_NULL ((struct VarTable *) 0) #define CT_NULL ((com_table *) 0) #define SILENT_UNSET 0 @@ -56,41 +70,32 @@ #define READING_STRING 2 #define deg2rad 0.01745329 -/* FLAG VALUES FOR overlap_claims */ +/** FLAG VALUES FOR overlap_claims */ #define OVLP_RESOLVE 0 #define OVLP_REBUILD_FASTGEN 1 #define OVLP_REBUILD_ALL 2 #define OVLP_RETAIN 3 -/* FLAG VALUES FOR nirt_debug */ +/** FLAG VALUES FOR nirt_debug */ #define DEBUG_INTERACT 0x001 #define DEBUG_SCRIPTS 0x002 #define DEBUG_MAT 0x004 #define DEBUG_BACKOUT 0x008 #define DEBUG_HITS 0x010 -#ifdef DEBUG_FORMAT + # define RT_DEBUG_FMT DEBUG_FORMAT -#endif #define DEBUG_FMT "\020\5HITS\4BACKOUT\3MAT\2SCRIPTS\1INTERACT" -/* STRING FOR USE WITH GETOPT(3) */ +/** STRING FOR USE WITH GETOPT(3) */ #define OPT_STRING "A:bB:Ee:f:MO:su:vx:X:?" #define made_it() bu_log("Made it to %s:%d\n", __FILE__, __LINE__) -/* MACROS WITH ARGUMENTS */ -#ifndef _WIN32 -/* already defined */ -# define max(a,b) (((a)>(b))?(a):(b)) -# define min(a,b) (((a)<(b))?(a):(b)) -#endif -#if !defined(abs) -# define abs(a) ((a)>=0 ? (a):(-a)) -#endif +/** MACROS WITH ARGUMENTS */ #define com_usage(c) fprintf (stderr, "Usage: %s %s\n", \ c -> com_name, c -> com_args); -/* DATA STRUCTURES */ +/** DATA STRUCTURES */ typedef struct { char *com_name; /* for invoking */ void (*com_func)(); /* what to do? */ @@ -98,8 +103,7 @@ char *com_args; /* Command arguments for usage */ } com_table; -struct VarTable -{ +struct VarTable { double azimuth; double elevation; vect_t direct; @@ -152,6 +156,8 @@ extern void bot_minpieces(); extern int need_prep; +#endif /* __NIRT_H__ */ + /* * Local Variables: * mode: C |