[brlcad-commits] SF.net SVN: brlcad:[35650] brlcad/trunk/src/proc-db/tea.c
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2009-08-20 13:23:43
|
Revision: 35650 http://brlcad.svn.sourceforge.net/brlcad/?rev=35650&view=rev Author: brlcad Date: 2009-08-20 13:23:26 +0000 (Thu, 20 Aug 2009) Log Message: ----------- eliminate globals. Modified Paths: -------------- brlcad/trunk/src/proc-db/tea.c Modified: brlcad/trunk/src/proc-db/tea.c =================================================================== --- brlcad/trunk/src/proc-db/tea.c 2009-08-20 13:19:51 UTC (rev 35649) +++ brlcad/trunk/src/proc-db/tea.c 2009-08-20 13:23:26 UTC (rev 35650) @@ -37,17 +37,7 @@ #include "./ducks.h" /* Teapot Vertex data */ #include "./patches.h" /* Teapot Patch data */ -extern dt ducks[DUCK_COUNT]; /* Vertex data of teapot */ -extern pt patches[PATCH_COUNT]; /* Patch data of teapot */ -struct face_g_snurb **surfaces; - -char *Usage = "This program ordinarily generates a database on stdout.\n\ - Your terminal probably wouldn't like it."; - -struct rt_wdb *outfp; - - /* IEEE patch number of the Bi-Cubic Bezier patch and convert it * to a B-Spline surface (Bezier surfaces are a subset of B-spline surfaces * and output it to a BRL-CAD binary format. @@ -55,6 +45,9 @@ void dump_patch(struct face_g_snurb **surfp, pt patch) { + /* Vertex data of teapot */ + extern dt ducks[DUCK_COUNT]; + struct face_g_snurb *b_patch; int i, j, pt_type; fastf_t *mesh_pointer; @@ -102,9 +95,16 @@ int main(int argc, char **argv) { - char *id_name = "Spline Example"; - char *tea_name = "UtahTeapot"; + /* Patch data of teapot */ + extern pt patches[PATCH_COUNT]; + + const char *Usage = "This program ordinarily generates a database on stdout.\n\tYour terminal probably wouldn't like it."; + const char *id_name = "Spline Example"; + const char *tea_name = "UtahTeapot"; + int i; + struct rt_wdb *outfp; + struct face_g_snurb **surfaces; rt_init_resource(&rt_uniresource, 0, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |