Revision: 76102
http://sourceforge.net/p/brlcad/code/76102
Author: starseeker
Date: 2020-06-10 17:40:33 +0000 (Wed, 10 Jun 2020)
Log Message:
-----------
Untested, but hook up the read functions into the commands
Modified Paths:
--------------
brlcad/branches/bioh/src/burst2/burst.cpp
brlcad/branches/bioh/src/burst2/burst.h
Modified: brlcad/branches/bioh/src/burst2/burst.cpp
===================================================================
--- brlcad/branches/bioh/src/burst2/burst.cpp 2020-06-10 16:05:36 UTC (rev
76101)
+++ brlcad/branches/bioh/src/burst2/burst.cpp 2020-06-10 17:40:33 UTC (rev
76102)
@@ -248,20 +248,14 @@
return BRLCAD_ERROR;
}
- FILE *critfp = fopen(argv[1], "rb");
- if (!critfp) {
- printf("failed to open critical component file: %s\n", argv[1]);
+ printf("Reading critical component idents...\n");
+
+ if (!readIdents(&s->critids, argv[1])) {
+ printf("failed to open critical component file: %s\n", argv[1]);
return BRLCAD_ERROR;
}
- // TODO logCMd
-
- printf("Reading critical component idents...\n");
-
- // TODO readIdents
-
printf("Reading critical component idents... done.\n");
- fclose(critfp);
return ret;
}
@@ -631,20 +625,14 @@
return BRLCAD_ERROR;
}
- FILE *airfp = fopen(argv[1], "rb");
- if (!airfp) {
- printf("failed to open burst air file: %s\n", argv[1]);
+ printf("Reading burst air idents...\n");
+
+ if (!readIdents(&s->airids, argv[1])) {
+ printf("failed to open burst air idents file: %s\n", argv[1]);
return BRLCAD_ERROR;
}
- // TODO logCMd
-
- printf("Reading burst air idents...\n");
-
- // TODO readIdents
-
printf("Reading burst air idents... done.\n");
- fclose(airfp);
return ret;
}
@@ -997,20 +985,14 @@
return BRLCAD_ERROR;
}
- FILE *armorfp = fopen(argv[1], "rb");
- if (!armorfp) {
- printf("failed to open burst armor file: %s\n", argv[1]);
+ printf("Reading burst armor idents...\n");
+
+ if (!readIdents(&s->armorids, argv[1])) {
+ printf("failed to open burst air idents file: %s\n", argv[1]);
return BRLCAD_ERROR;
}
- // TODO logCMd
-
- printf("Reading burst armor idents...\n");
-
- // TODO readIdents
-
printf("Reading burst armor idents... done.\n");
- fclose(armorfp);
return ret;
}
@@ -1468,23 +1450,15 @@
if (!s || !argc || !argv) return BRLCAD_ERROR;
+ printf("Reading ident-to-color mappings...\n");
- FILE *colorfp = fopen(argv[1], "rb");
- if (!colorfp) {
- printf("failed to open ident-to-color mapping file: %s\n", argv[1]);
+ if (!readColors(&s->colorids, argv[1])) {
+ printf("failed to open ident to color mappings file: %s\n", argv[1]);
return BRLCAD_ERROR;
}
- // TODO logCMd
-
- printf("Reading ident-to-color mappings...\n");
-
- // TODO readColors
-
printf("Reading ident-to-color mappings... done.\n");
- fclose(colorfp);
-
return ret;
}
Modified: brlcad/branches/bioh/src/burst2/burst.h
===================================================================
--- brlcad/branches/bioh/src/burst2/burst.h 2020-06-10 16:05:36 UTC (rev
76101)
+++ brlcad/branches/bioh/src/burst2/burst.h 2020-06-10 17:40:33 UTC (rev
76102)
@@ -204,6 +204,9 @@
void burst_state_init(struct burst_state *s);
+int readIdents(struct bu_ptbl *idlist, const char *fname);
+int readColors(struct bu_ptbl *idlist, const char *fname);
+
#endif /* BURST_BURST_H */
/*
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits