Revision: 41081
http://brlcad.svn.sourceforge.net/brlcad/?rev=41081&view=rev
Author: brlcad
Date: 2010-10-19 04:50:49 +0000 (Tue, 19 Oct 2010)
Log Message:
-----------
replace the 'i' bu_structparse type identifier with '%p' instead so that it's
more consistent with the other types for representing the pointer indirection
to another bu_structparse structure and run-on sentences can be awesome on
tuesdays with developer deprecation warnings firmly in place to blather so any
missed entries can be readily identified and updated.
Modified Paths:
--------------
brlcad/trunk/src/libbu/parse.c
brlcad/trunk/src/liboptical/sh_billboard.c
brlcad/trunk/src/liboptical/sh_fire.c
brlcad/trunk/src/liboptical/sh_gauss.c
brlcad/trunk/src/liboptical/sh_grass.c
brlcad/trunk/src/liboptical/sh_noise.c
brlcad/trunk/src/liboptical/sh_prj.c
brlcad/trunk/src/liboptical/sh_tcl.c
brlcad/trunk/src/liboptical/sh_toon.c
brlcad/trunk/src/liboptical/sh_xxx.c
brlcad/trunk/src/rt/do.c
brlcad/trunk/src/rt/hurt.c
Modified: brlcad/trunk/src/libbu/parse.c
===================================================================
--- brlcad/trunk/src/libbu/parse.c 2010-10-19 04:46:41 UTC (rev 41080)
+++ brlcad/trunk/src/libbu/parse.c 2010-10-19 04:50:49 UTC (rev 41081)
@@ -114,10 +114,10 @@
int
bu_struct_export(struct bu_external *ext, const genptr_t base, const struct
bu_structparse *imp)
{
- register char *cp; /* current possition in buffer */
- char *ep; /* &ext->ext_buf[ext->ext_nbytes] */
+ register char *cp; /* current possition in buffer */
+ char *ep; /* &ext->ext_buf[ext->ext_nbytes] */
const struct bu_structparse *ip; /* current imexport structure */
- char *loc; /* where host-format data is */
+ char *loc; /* where host-format data is */
size_t len;
register size_t i;
@@ -140,9 +140,7 @@
/* DEPRECATED: use %p instead. */
static int warned = 0;
if (!warned) {
-#ifdef NOTYET
- bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is
replaced by \"%p\" for chained bu_structparse tables.\n");
-#endif
+ bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is
replaced by \"%%p\" for chained bu_structparse tables.\n");
warned++;
}
}
@@ -246,6 +244,7 @@
{
/* Indirect to another structure */
/* FIXME: unimplemented */
+ bu_log("INTERNAL ERROR: attempt to indirectly export
bu_structparse table, unimplemented\n");
}
continue;
default:
@@ -292,9 +291,7 @@
/* DEPRECATED: use %p instead. */
static int warned = 0;
if (!warned) {
-#ifdef NOTYET
- bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is
replaced by \"%p\" for chained bu_structparse tables.\n");
-#endif
+ bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is
replaced by \"%%p\" for chained bu_structparse tables.\n");
warned++;
}
}
@@ -394,6 +391,7 @@
{
/* Indirect to another structure */
/* FIXME: unimplemented */
+ bu_log("INTERNAL ERROR: attempt to indirectly import
bu_structparse table, unimplemented\n");
}
break;
default:
@@ -619,9 +617,7 @@
if (sdp->sp_fmt[0] == 'i') {
static int warned = 0;
if (!warned) {
-#ifdef NOTYET
- bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is replaced
by \"%p\" for chained bu_structparse tables.\n");
-#endif
+ bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is replaced
by \"%%p\" for chained bu_structparse tables.\n");
warned++;
}
/* Indirect to another structure */
@@ -1021,9 +1017,9 @@
break;
case 'p':
{
- bu_log("Cannot print type '%%p' yet!\n");
/* Indirect to another structure */
/* FIXME: unimplemented */
+ bu_log("INTERNAL ERROR: Cannot print type '%%p' yet!\n");
}
break;
default:
@@ -1075,9 +1071,7 @@
/* DEPRECATED: use %p instead. */
static int warned = 0;
if (!warned) {
-#ifdef NOTYET
- bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is replaced
by \"%p\" for chained bu_structparse tables.\n");
-#endif
+ bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is replaced
by \"%%p\" for chained bu_structparse tables.\n");
warned++;
}
bu_struct_print(sdp->sp_name, (struct bu_structparse
*)sdp->sp_count, base);
@@ -1251,17 +1245,12 @@
/* DEPRECATED: use %p instead. */
static int warned = 0;
if (!warned) {
-#ifdef NOTYET
- bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is replaced
by \"%p\" for chained bu_structparse tables.\n");
-#endif
+ bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is replaced
by \"%%p\" for chained bu_structparse tables.\n");
warned++;
}
bu_vls_init(&sub_str);
- bu_vls_struct_print(&sub_str,
- (struct bu_structparse *)sdp->sp_count,
- base);
-
+ bu_vls_struct_print(&sub_str, (struct bu_structparse
*)sdp->sp_count, base);
bu_vls_vlscat(vls, &sub_str);
bu_vls_free(&sub_str);
continue;
@@ -1444,9 +1433,7 @@
/* DEPRECATED: use %p instead. */
static int warned = 0;
if (!warned) {
-#ifdef NOTYET
- bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is replaced
by \"%p\" for chained bu_structparse tables.\n");
-#endif
+ bu_log("DEVELOPER DEPRECATION NOTICE: Use of \"i\" is replaced
by \"%%p\" for chained bu_structparse tables.\n");
warned++;
}
bu_vls_struct_print2(vls_out, sdp->sp_name, (struct bu_structparse
*)sdp->sp_count, base);
@@ -2542,6 +2529,7 @@
case 'p': {
/* Indirect to another structure */
/* FIXME: unimplemented */
+ bu_log("INTERNAL ERROR: referencing indirect bu_structparse
table, unimplemented\n");
}
default: {
Modified: brlcad/trunk/src/liboptical/sh_billboard.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_billboard.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_billboard.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -115,7 +115,7 @@
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL }
};
struct bu_structparse bbd_parse_tab[] = {
- {"i", bu_byteoffset(bbd_print_tab[0]), "bbd_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(bbd_print_tab[0]), "bbd_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL }
};
Modified: brlcad/trunk/src/liboptical/sh_fire.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_fire.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_fire.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -156,7 +156,7 @@
};
struct bu_structparse fire_parse_tab[] = {
- {"i", bu_byteoffset(fire_print_tab[0]), "fire_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(fire_print_tab[0]), "fire_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "f", SHDR_O(fire_flicker),
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "st", SHDR_O(fire_stretch),
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "l", SHDR_O(noise_lacunarity),
BU_STRUCTPARSE_FUNC_NULL },
Modified: brlcad/trunk/src/liboptical/sh_gauss.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_gauss.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_gauss.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -126,7 +126,7 @@
};
struct bu_structparse gauss_parse_tab[] = {
- {"i", bu_byteoffset(gauss_print_tab[0]), "gauss_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(gauss_print_tab[0]), "gauss_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "s", SHDR_O(gauss_sigma),
BU_STRUCTPARSE_FUNC_NULL },
{"", 0, (char *)0, 0,
BU_STRUCTPARSE_FUNC_NULL }
};
Modified: brlcad/trunk/src/liboptical/sh_grass.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_grass.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_grass.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -178,7 +178,7 @@
};
struct bu_structparse grass_parse_tab[] = {
- {"i", bu_byteoffset(grass_print_tab[0]), "grass_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(grass_print_tab[0]), "grass_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 2, "c", SHDR_AO(cell),
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "p", SHDR_O(ppc),
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "pd", SHDR_O(ppcd),
BU_STRUCTPARSE_FUNC_NULL },
Modified: brlcad/trunk/src/liboptical/sh_noise.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_noise.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_noise.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -150,7 +150,7 @@
};
struct bu_structparse noise_parse_tab[] = {
- {"i", bu_byteoffset(noise_print_tab[0]), "noise_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(noise_print_tab[0]), "noise_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "lacunarity", SHDR_O(lacunarity),
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "l", SHDR_O(lacunarity),
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "H", SHDR_O(h_val),
BU_STRUCTPARSE_FUNC_NULL },
Modified: brlcad/trunk/src/liboptical/sh_prj.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_prj.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_prj.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -407,7 +407,7 @@
{"", 0, (char *)0, 0,
BU_STRUCTPARSE_FUNC_NULL}
};
struct bu_structparse img_print_tab[] = {
- {"i", bu_byteoffset(img_parse_tab[0]), "img_parse_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(img_parse_tab[0]), "img_parse_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 4, "i_plane", IMG_AO(i_plane),
BU_STRUCTPARSE_FUNC_NULL},
{"", 0, (char *)0, 0,
BU_STRUCTPARSE_FUNC_NULL}
};
Modified: brlcad/trunk/src/liboptical/sh_tcl.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_tcl.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_tcl.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -82,7 +82,7 @@
};
struct bu_structparse tcl_parse_tab[] = {
- {"i", bu_byteoffset(tcl_print_tab[0]), "tcl_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(tcl_print_tab[0]), "tcl_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"%V", 1, "f", SHDR_O(tcl_file), BU_STRUCTPARSE_FUNC_NULL },
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL }
};
Modified: brlcad/trunk/src/liboptical/sh_toon.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_toon.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_toon.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -69,7 +69,7 @@
};
struct bu_structparse toon_parse_tab[] = {
- {"i", bu_byteoffset(toon_print_tab[0]), "toon_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(toon_print_tab[0]), "toon_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"", 0, (char *)0, 0,
BU_STRUCTPARSE_FUNC_NULL }
};
Modified: brlcad/trunk/src/liboptical/sh_xxx.c
===================================================================
--- brlcad/trunk/src/liboptical/sh_xxx.c 2010-10-19 04:46:41 UTC (rev
41080)
+++ brlcad/trunk/src/liboptical/sh_xxx.c 2010-10-19 04:50:49 UTC (rev
41081)
@@ -123,7 +123,7 @@
};
struct bu_structparse xxx_parse_tab[] = {
- {"i", bu_byteoffset(xxx_print_tab[0]), "xxx_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(xxx_print_tab[0]), "xxx_print_tab", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "v", SHDR_O(xxx_val),
BU_STRUCTPARSE_FUNC_NULL },
{"%f", 1, "dist", SHDR_O(xxx_dist), bu_mm_cvt },
{"%f", 3, "d", SHDR_AO(xxx_delta),
BU_STRUCTPARSE_FUNC_NULL },
Modified: brlcad/trunk/src/rt/do.c
===================================================================
--- brlcad/trunk/src/rt/do.c 2010-10-19 04:46:41 UTC (rev 41080)
+++ brlcad/trunk/src/rt/do.c 2010-10-19 04:50:49 UTC (rev 41081)
@@ -441,7 +441,7 @@
{"%f", 1, "rt_cline_radius", bu_byteoffset(rt_cline_radius),
BU_STRUCTPARSE_FUNC_NULL },
#endif
{"%V", 1, "ray_data_file", bu_byteoffset(ray_data_file),
BU_STRUCTPARSE_FUNC_NULL },
- {"i", bu_byteoffset(view_parse[0]), "View_Module-Specific Parameters", 0,
BU_STRUCTPARSE_FUNC_NULL },
+ {"%p", bu_byteoffset(view_parse[0]), "View_Module-Specific Parameters", 0,
BU_STRUCTPARSE_FUNC_NULL },
{"", 0, (char *)0, 0,
BU_STRUCTPARSE_FUNC_NULL }
};
Modified: brlcad/trunk/src/rt/hurt.c
===================================================================
--- brlcad/trunk/src/rt/hurt.c 2010-10-19 04:46:41 UTC (rev 41080)
+++ brlcad/trunk/src/rt/hurt.c 2010-10-19 04:50:49 UTC (rev 41081)
@@ -174,7 +174,7 @@
{"%d", 1, "height", bu_byteoffset(height),
BU_STRUCTPARSE_FUNC_NULL, "height", &height },
{"%f", 1, "perspective", bu_byteoffset(rt_perspective),
BU_STRUCTPARSE_FUNC_NULL, "perspective", &rt_perspective },
{"%f", 1, "angle", bu_byteoffset(rt_perspective),
BU_STRUCTPARSE_FUNC_NULL, "angle", &rt_perspective },
- {"i", bu_byteoffset(view_parse[0]), "View_Module-Specific Parameters", 0,
BU_STRUCTPARSE_FUNC_NULL, "params", NULL },
+ {"%p", bu_byteoffset(view_parse[0]), "View_Module-Specific Parameters", 0,
BU_STRUCTPARSE_FUNC_NULL, "params", NULL },
{"", 0, (char *)0, 0,
BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
};
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits