C++ and C do this differently - fix C build.

This commit is contained in:
Clifford Yapp committed 2026-06-10 20:10:54 +00:00
1 parent e09b768258
commit 3a9d6607dd
36 files changed
+37 -35

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@
* created this table so we could create a substantially bigger one
* while retaining these 20x20x20 values for backwards-compatibility.
*/
extern const fastf_t turb_table[20][20][20] = {
EXTERNVARINIT const fastf_t turb_table[20][20][20] = {
{{ 0.105489192064851520, -0.203732953406870370, -0.001023580785840750, -0.418433680199086670,
0.019490496721118689, -0.494057352188974620, 0.379220851697027680, -0.381280504632741210,
0.073469225782901049, -0.087082616984844208, -0.120197215583175420, 0.007280763704329729,
+1 -1
View File
@@ -39,7 +39,7 @@
#include "raytrace.h"
extern const struct bu_structparse rt_constraint_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_constraint_parse[] = {
{"%d", 1, "ID", bu_offsetof(struct rt_constraint_internal, id), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
{"%d", 1, "N", bu_offsetof(struct rt_constraint_internal, type), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
{"%V", 1, "Ex", bu_offsetof(struct rt_constraint_internal, expression), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
+1 -1
View File
@@ -167,7 +167,7 @@ static const int rt_arb_planes[5][24] = {
#define ARB_AO(_t, _a, _i) offsetof(_t, _a) + sizeof(point_t) * _i + sizeof(point_t) / ELEMENTS_PER_POINT * X
extern const struct bu_structparse rt_arb_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_arb_parse[] = {
{ "%f", 3, "V1", ARB_AO(struct rt_arb_internal, pt, 0), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "V2", ARB_AO(struct rt_arb_internal, pt, 1), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "V3", ARB_AO(struct rt_arb_internal, pt, 2), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -54,7 +54,7 @@ struct cline_specific {
#define RT_CLINE_O(m) bu_offsetof(struct rt_cline_internal, m)
extern const struct bu_structparse rt_cline_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_cline_parse[] = {
{ "%f", 3, "V", RT_CLINE_O(v), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "H", RT_CLINE_O(h), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 1, "r", RT_CLINE_O(radius), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -296,7 +296,7 @@ const struct bu_structparse dsp_v4_parse[] = {
/* only used on v5 database */
extern const struct bu_structparse rt_dsp_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_dsp_parse[] = {
{"%V", 1, "file", DSP_O(dsp_name), hook_file, NULL, NULL },
{"%V", 1, "name", DSP_O(dsp_name), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%c", 1, "src", DSP_O(dsp_datasrc), hook_verify, NULL, NULL },
+1 -1
View File
@@ -62,7 +62,7 @@ struct rt_ebm_specific {
#define RT_EBM_O(m) bu_offsetof(struct rt_ebm_internal, m)
extern const struct bu_structparse rt_ebm_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_ebm_parse[] = {
{"%s", RT_EBM_NAME_LEN, "file", bu_offsetof(struct rt_ebm_internal, name), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%s", RT_EBM_NAME_LEN, "name", bu_offsetof(struct rt_ebm_internal, name), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%c", 1, "src", RT_EBM_O(datasrc), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -175,7 +175,7 @@ struct ehy_specific {
};
extern const struct bu_structparse rt_ehy_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_ehy_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_ehy_internal, ehy_V, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "H", bu_offsetofarray(struct rt_ehy_internal, ehy_H, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "A", bu_offsetofarray(struct rt_ehy_internal, ehy_Au, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -45,7 +45,7 @@
extern int rt_sph_prep(struct soltab *stp, struct rt_db_internal *ip,
struct rt_i *rtip);
extern const struct bu_structparse rt_ell_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_ell_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_ell_internal, v, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "A", bu_offsetofarray(struct rt_ell_internal, a, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "B", bu_offsetofarray(struct rt_ell_internal, b, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -175,7 +175,7 @@ struct epa_specific {
};
extern const struct bu_structparse rt_epa_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_epa_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_epa_internal, epa_V, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "H", bu_offsetofarray(struct rt_epa_internal, epa_H, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "A", bu_offsetofarray(struct rt_epa_internal, epa_Au, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -141,7 +141,7 @@ struct eto_specific {
};
extern const struct bu_structparse rt_eto_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_eto_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_eto_internal, eto_V, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "N", bu_offsetofarray(struct rt_eto_internal, eto_N, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "C", bu_offsetofarray(struct rt_eto_internal, eto_C, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -57,7 +57,7 @@ struct grip_specific {
};
#define GRIP_NULL ((struct grip_specific *)0)
extern const struct bu_structparse rt_grp_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_grp_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_grip_internal, center, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "N", bu_offsetofarray(struct rt_grip_internal, normal, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 1, "L", bu_offsetof(struct rt_grip_internal, mag), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -60,7 +60,7 @@ struct half_specific {
};
#define HALF_NULL ((struct half_specific *)0)
extern const struct bu_structparse rt_hlf_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_hlf_parse[] = {
{ "%f", 3, "N", bu_offsetofarray(struct rt_half_internal, eqn, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 1, "d", bu_offsetofarray(struct rt_half_internal, eqn, fastf_t, W), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }
+1 -1
View File
@@ -63,7 +63,7 @@
#define HF_O(m) bu_offsetof(struct rt_hf_internal, m)
/* All fields valid in string solid */
extern const struct bu_structparse rt_hf_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_hf_parse[] = {
{"%s", 128, "cfile", HF_O(cfile), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
{"%s", 128, "dfile", HF_O(dfile), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
{"%s", 8, "fmt", HF_O(fmt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
+1 -1
View File
@@ -125,7 +125,7 @@
#include "../../librt_private.h"
extern const struct bu_structparse rt_hrt_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_hrt_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_hrt_internal, v, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "X", bu_offsetofarray(struct rt_hrt_internal, xdir, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "Y", bu_offsetofarray(struct rt_hrt_internal, ydir, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -105,7 +105,7 @@ hyp_internal_to_specific(struct rt_hyp_internal *hyp_in) {
}
extern const struct bu_structparse rt_hyp_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_hyp_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_hyp_internal, hyp_Vi, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "H", bu_offsetofarray(struct rt_hyp_internal, hyp_Hi, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "A", bu_offsetofarray(struct rt_hyp_internal, hyp_A, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -64,7 +64,7 @@ struct joint_specific {
#define JOINT_NULL ((struct joint_specific *)0)
#define JOINT_FLOAT_SIZE 10
extern const struct bu_structparse rt_joint_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_joint_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_joint_internal, location, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%V", 1, "RP1", bu_offsetof(struct rt_joint_internal, reference_path_1), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%V", 1, "RP2", bu_offsetof(struct rt_joint_internal, reference_path_2), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -212,7 +212,7 @@ struct part_specific {
#define RT_PARTICLE_SURF_BODY 2
#define RT_PARTICLE_SURF_HSPHERE 3
extern const struct bu_structparse rt_part_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_part_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_part_internal, part_V, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "H", bu_offsetofarray(struct rt_part_internal, part_H, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 1, "r_v", bu_offsetof(struct rt_part_internal, part_vrad), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -47,7 +47,7 @@ struct revolve_specific {
};
extern const struct bu_structparse rt_revolve_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_revolve_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_revolve_internal, v3d, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "axis", bu_offsetofarray(struct rt_revolve_internal, axis3d, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "R", bu_offsetofarray(struct rt_revolve_internal, r, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -225,7 +225,7 @@ clt_rhc_pack(struct bu_pool *pool, struct soltab *stp)
#endif /* USE_OPENCL */
extern const struct bu_structparse rt_rhc_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_rhc_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_rhc_internal, rhc_V, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "H", bu_offsetofarray(struct rt_rhc_internal, rhc_H, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "B", bu_offsetofarray(struct rt_rhc_internal, rhc_B, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -223,7 +223,7 @@ clt_rpc_pack(struct bu_pool *pool, struct soltab *stp)
#endif /* USE_OPENCL */
extern const struct bu_structparse rt_rpc_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_rpc_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_rpc_internal, rpc_V, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "H", bu_offsetofarray(struct rt_rpc_internal, rpc_H, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "B", bu_offsetofarray(struct rt_rpc_internal, rpc_B, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -48,7 +48,7 @@
#define RT_SUBMODEL_O(m) bu_offsetof(struct rt_submodel_internal, m)
extern const struct bu_structparse rt_submodel_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_submodel_parse[] = {
{"%V", 1, "file", RT_SUBMODEL_O(file), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%V", 1, "treetop", RT_SUBMODEL_O(treetop), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%d", 1, "meth", RT_SUBMODEL_O(meth), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -49,7 +49,7 @@
extern double tgamma(double x);
#endif
extern const struct bu_structparse rt_superell_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_superell_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_superell_internal, v, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "A", bu_offsetofarray(struct rt_superell_internal, a, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "B", bu_offsetofarray(struct rt_superell_internal, b, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -109,7 +109,7 @@ void rt_pnt_sort(register fastf_t *t, int npts);
}
extern const struct bu_structparse rt_tgc_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_tgc_parse[] = {
{ "%f", 3, "V", bu_offsetofarray(struct rt_tgc_internal, v, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "H", bu_offsetofarray(struct rt_tgc_internal, h, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{ "%f", 3, "A", bu_offsetofarray(struct rt_tgc_internal, a, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+1 -1
View File
@@ -135,7 +135,7 @@
*
*/
extern const struct bu_structparse rt_tor_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_tor_parse[] = {
{"%f", 3, "V", bu_offsetofarray(struct rt_tor_internal, v, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
{"%f", 3, "H", bu_offsetofarray(struct rt_tor_internal, h, fastf_t, X), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
{"%f", 1, "r_a", bu_offsetof(struct rt_tor_internal, r_a), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL},
+1 -1
View File
@@ -64,7 +64,7 @@ struct rt_vol_specific {
#define VOL_O(m) bu_offsetof(struct rt_vol_internal, m)
extern const struct bu_structparse rt_vol_parse[] = {
EXTERNVARINIT const struct bu_structparse rt_vol_parse[] = {
{"%s", RT_VOL_NAME_LEN, "file", bu_offsetof(struct rt_vol_internal, name), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%s", RT_VOL_NAME_LEN, "name", bu_offsetof(struct rt_vol_internal, name), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
{"%c", 1, "src", VOL_O(datasrc), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL },
+2
View File
@@ -67,6 +67,7 @@
#include "./mged_dm.h"
#include "./sedit.h"
__BEGIN_DECLS
void mged_finish(struct mged_state *s, int exitcode); /* in mged.c */
void update_grids(struct mged_state *s, fastf_t sf); /* in grid.c */
void set_localunit_TclVar(struct mged_state *s); /* in chgmodel.c */
@@ -75,6 +76,7 @@ extern void init_qray(void); /* in qray.c */
/* in tclsync.c */
Tcl_Obj *BuildInterpSnapshot(Tcl_Interp *interp);
int ReplayInterpSnapshot(Tcl_Interp *interp, Tcl_Obj *snapshot);
__END_DECLS
// FIXME: Globals
+1 -1
View File
@@ -83,7 +83,7 @@ extern int srv_scanlen; /* BUFMODE_RTSRV buffer length */
#endif
extern const char title[] = "The BRL-CAD Raytracer RT";
EXTERNVARINIT const char title[] = "The BRL-CAD Raytracer RT";
static struct scanline* scanline = NULL;
static fastf_t* psum_buffer; /* Buffer that keeps partial sums for multi-samples modes */
+1 -1
View File
@@ -70,7 +70,7 @@ struct bu_structparse view_parse[] = {
};
extern const char title[] = "RT Area";
EXTERNVARINIT const char title[] = "RT Area";
struct point_list {
struct point_list * next;
+1 -1
View File
@@ -62,7 +62,7 @@ struct bu_structparse view_parse[] = {
extern FILE *outfp;
extern const char title[] = "RT Check";
EXTERNVARINIT const char title[] = "RT Check";
static size_t noverlaps; /* Number of overlaps seen */
+1 -1
View File
@@ -63,7 +63,7 @@ struct bu_structparse view_parse[] = {
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}
};
extern const char title[] = "RT Depth";
EXTERNVARINIT const char title[] = "RT Depth";
/*
* Called at the start of a run.
+1 -1
View File
@@ -278,7 +278,7 @@ struct bu_structparse view_parse[] = {
};
extern const char title[] = "RT Hidden-Line Renderer";
EXTERNVARINIT const char title[] = "RT Hidden-Line Renderer";
int handle_main_ray(struct application *ap, register struct partition *PartHeadp, struct seg *segp);
+1 -1
View File
@@ -81,7 +81,7 @@ struct bu_structparse view_parse[] = {
static mat_t model2hv; /* model coords to GIFT h, v in inches */
static FILE *plotfp; /* optional plotting file */
extern const char title[] = "RTG3";
EXTERNVARINIT const char title[] = "RTG3";
int rayhit(register struct application *ap, struct partition *PartHeadp, struct seg *segp);
int raymiss(register struct application *ap);
+1 -1
View File
@@ -82,7 +82,7 @@ struct bu_structparse view_parse[] = {
};
extern const char title[] = "RT Hidden-Line Plot";
EXTERNVARINIT const char title[] = "RT Hidden-Line Plot";
int rayhit(register struct application *ap, struct partition *PartHeadp, struct seg *);
int raymiss(register struct application *ap);
+1 -1
View File
@@ -56,7 +56,7 @@ struct bu_structparse view_parse[] = {
{"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}
};
extern const char title[] = "RT Simple Intersection Lightmap";
EXTERNVARINIT const char title[] = "RT Simple Intersection Lightmap";
int rayhit(register struct application *ap, struct partition *PartHeadp, struct seg *segp);
+1 -1
View File
@@ -60,7 +60,7 @@ struct bu_structparse view_parse[] = {
};
extern const char title[] = "RT Weight";
EXTERNVARINIT const char title[] = "RT Weight";
int noverlaps = 0;
FILE *densityfp;
+1 -1
View File
@@ -72,7 +72,7 @@ struct bu_structparse view_parse[] = {
static char *floatfilename=NULL;
const char floatfileext[] = ".los";
extern const char title[] = "RT X-Ray";
EXTERNVARINIT const char title[] = "RT X-Ray";
/*
* Called at the start of a run.