@@ -186,7 +186,7 @@ static int
186186parse_model_string (struct bu_vls * format , struct bu_vls * slog , const char * opt , const char * input )
187187{
188188 int type_int = 0 ;
189- bu_mime_context_t type = BU_MIME_MODEL_UNKNOWN ;
189+ bu_mime_t type = BU_MIME_MODEL_UNKNOWN ;
190190
191191 struct bu_vls format_cpy = BU_VLS_INIT_ZERO ;
192192 struct bu_vls path = BU_VLS_INIT_ZERO ;
@@ -206,8 +206,8 @@ parse_model_string(struct bu_vls *format, struct bu_vls *slog, const char *opt,
206206
207207 /* If we have an explicit option, that overrides any other format specifiers */
208208 if (opt ) {
209- type_int = bu_file_mime (opt , BU_MIME_AUTO );
210- type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_context_t )type_int ;
209+ type_int = bu_file_mime (opt );
210+ type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_t )type_int ;
211211 if (type == BU_MIME_MODEL_UNKNOWN ) {
212212 /* Have prefix, but doesn't result in a known format - that's an error */
213213 if (slog )
@@ -223,8 +223,8 @@ parse_model_string(struct bu_vls *format, struct bu_vls *slog, const char *opt,
223223 * find out if it maps to a valid type */
224224 if (type == BU_MIME_MODEL_UNKNOWN && format ) {
225225 /* Yes - see if the prefix specifies a model format */
226- type_int = bu_file_mime (bu_vls_addr (format ), BU_MIME_AUTO );
227- type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_context_t )type_int ;
226+ type_int = bu_file_mime (bu_vls_addr (format ));
227+ type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_t )type_int ;
228228 if (type == BU_MIME_MODEL_UNKNOWN ) {
229229 /* Have prefix, but doesn't result in a known format - that's an error */
230230 if (slog )
@@ -238,8 +238,8 @@ parse_model_string(struct bu_vls *format, struct bu_vls *slog, const char *opt,
238238 /* If we don't already have a type and we were passed a format string, give it a try */
239239 if (type == BU_MIME_MODEL_UNKNOWN && format && bu_vls_strlen (& format_cpy ) > 0 ) {
240240 bu_vls_sprintf (format , "%s" , bu_vls_addr (& format_cpy ));
241- type_int = bu_file_mime (bu_vls_addr (& format_cpy ), BU_MIME_AUTO );
242- type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_context_t )type_int ;
241+ type_int = bu_file_mime (bu_vls_addr (& format_cpy ));
242+ type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_t )type_int ;
243243 if (type == BU_MIME_MODEL_UNKNOWN ) {
244244 /* Have prefix, but doesn't result in a known format - that's an error */
245245 if (slog )
@@ -252,8 +252,8 @@ parse_model_string(struct bu_vls *format, struct bu_vls *slog, const char *opt,
252252 /* If we have no prefix or the prefix didn't map to a model type, try file extension */
253253 if (type == BU_MIME_MODEL_UNKNOWN && extract_path (& path , input )) {
254254 if (bu_path_component (format , bu_vls_addr (& path ), BU_PATH_EXT )) {
255- type_int = bu_file_mime (bu_vls_addr (format ), BU_MIME_AUTO );
256- type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_context_t )type_int ;
255+ type_int = bu_file_mime (bu_vls_addr (format ));
256+ type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_t )type_int ;
257257 if (type == BU_MIME_MODEL_UNKNOWN ) {
258258 /* Have file extension, but doesn't result in a known format - that's an error */
259259 if (slog )
@@ -315,13 +315,13 @@ static int
315315model_mime (struct bu_vls * msg , size_t argc , const char * * argv , void * set_mime )
316316{
317317 int type_int ;
318- bu_mime_context_t type = BU_MIME_MODEL_UNKNOWN ;
319- bu_mime_context_t * set_type = (bu_mime_context_t * )set_mime ;
318+ bu_mime_t type = BU_MIME_MODEL_UNKNOWN ;
319+ bu_mime_t * set_type = (bu_mime_t * )set_mime ;
320320
321321 BU_OPT_CHECK_ARGV0 (msg , argc , argv , "mime format" );
322322
323- type_int = bu_file_mime (argv [0 ], BU_MIME_AUTO );
324- type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_context_t )type_int ;
323+ type_int = bu_file_mime (argv [0 ]);
324+ type = (type_int < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_t )type_int ;
325325 if (type == BU_MIME_MODEL_UNKNOWN ) {
326326 if (msg ) {
327327 bu_vls_sprintf (msg , "Error - unknown geometry file type: %s \n" , argv [0 ]);
@@ -361,8 +361,8 @@ help(struct bu_vls *UNUSED(msg), size_t argc, const char **argv, void *set_var)
361361static int
362362do_conversion (
363363 struct bu_vls * messages ,
364- const char * in_path , bu_mime_context_t in_type ,
365- const char * out_path , bu_mime_context_t out_type ,
364+ const char * in_path , bu_mime_t in_type ,
365+ const char * out_path , bu_mime_t out_type ,
366366 size_t in_argc , const char * * in_argv ,
367367 size_t out_argc , const char * * out_argv )
368368{
@@ -372,7 +372,7 @@ do_conversion(
372372 struct gcv_context context ;
373373
374374 for (BU_PTBL_FOR (entry , (const struct gcv_filter * const * ), filters )) {
375- bu_mime_context_t emt = (* entry )-> mime_type ;
375+ bu_mime_t emt = (* entry )-> mime_type ;
376376 if ((* entry )-> filter_type == GCV_FILTER_READ ) {
377377 if (!in_filter && (emt != BU_MIME_MODEL_AUTO ) && (emt == in_type ))
378378 in_filter = * entry ;
@@ -385,16 +385,16 @@ do_conversion(
385385 if (!out_filter && (emt != BU_MIME_MODEL_AUTO ) && (emt == out_type ))
386386 out_filter = * entry ;
387387 if (!out_filter && (emt == BU_MIME_MODEL_AUTO ) &&
388- ((* entry )-> data_supported && (* (* entry )-> data_supported )(bu_file_mime_str (out_type , BU_MIME_AUTO )))) {
388+ ((* entry )-> data_supported && (* (* entry )-> data_supported )(bu_file_mime_str (out_type )))) {
389389 out_filter = * entry ;
390390 }
391391 }
392392 }
393393
394394 if (!in_filter )
395- bu_vls_printf (messages , "No filter for %s\n" , bu_file_mime_str (in_type , BU_MIME_AUTO ));
395+ bu_vls_printf (messages , "No filter for %s\n" , bu_file_mime_str (in_type ));
396396 if (!out_filter )
397- bu_vls_printf (messages , "No filter for %s\n" , bu_file_mime_str (out_type , BU_MIME_AUTO ));
397+ bu_vls_printf (messages , "No filter for %s\n" , bu_file_mime_str (out_type ));
398398 if (!in_filter || !out_filter )
399399 return 0 ;
400400
@@ -435,8 +435,8 @@ main(int ac, const char **av)
435435 int fmt = 0 ;
436436 int ret = 0 ;
437437
438- static bu_mime_context_t in_type = BU_MIME_MODEL_UNKNOWN ;
439- static bu_mime_context_t out_type = BU_MIME_MODEL_UNKNOWN ;
438+ static bu_mime_t in_type = BU_MIME_MODEL_UNKNOWN ;
439+ static bu_mime_t out_type = BU_MIME_MODEL_UNKNOWN ;
440440
441441 static struct fmt_opts in_only_opts ;
442442 static struct fmt_opts out_only_opts ;
@@ -630,13 +630,13 @@ main(int ac, const char **av)
630630 /* Find out what input file type we are dealing with */
631631 if (in_type == BU_MIME_MODEL_UNKNOWN ) {
632632 fmt = parse_model_string (& in_format , & slog , in_fmt , bu_vls_addr (& in_path_raw ));
633- in_type = (fmt < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_context_t )fmt ;
633+ in_type = (fmt < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_t )fmt ;
634634 in_fmt = NULL ;
635635 }
636636 /* Identify output file type */
637637 if (out_type == BU_MIME_MODEL_UNKNOWN ) {
638638 fmt = parse_model_string (& out_format , & slog , out_fmt , bu_vls_addr (& out_path_raw ));
639- out_type = (fmt < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_context_t )fmt ;
639+ out_type = (fmt < 0 ) ? BU_MIME_MODEL_UNKNOWN : (bu_mime_t )fmt ;
640640 out_fmt = NULL ;
641641 }
642642
@@ -663,8 +663,8 @@ main(int ac, const char **av)
663663 /* If we've gotten this far, we know enough to try to convert. Until we
664664 * hook in conversion calls to libgcv, print a summary of the option
665665 * parsing results for debugging. */
666- in_fmt = bu_file_mime_str ((int )in_type , BU_MIME_AUTO );
667- out_fmt = bu_file_mime_str ((int )out_type , BU_MIME_AUTO );
666+ in_fmt = bu_file_mime_str ((int )in_type );
667+ out_fmt = bu_file_mime_str ((int )out_type );
668668 if (in_fmt ) {
669669 bu_log ("Input file format: %s\n" , in_fmt );
670670 } else {
0 commit comments