shithub: 3dee

Download patch

ref: 313b109b27c9290783c38f1806f437fd2f033f3e
parent: cc6fd02b8a99876a09c9d31f3e5297fc9ea27168
author: rodri <rgl@antares-labs.eu>
date: Sun Jun 22 14:39:43 EDT 2025

obj,toobj: do not use libthread

this fixes the error i was getting earlier in toobj. the cause was
that objexport(2) uses an internal 8KB buffer that overflows the
default libthread stack, but we don't need to use libthread, so
replace threadmain with main and be done with it.

--- a/TODO.md
+++ b/TODO.md
@@ -6,7 +6,7 @@
 	- [ ] Tools to modify existing geometry
 	- [ ] Tools to create geometry parametrically
 	- [ ] CSG tools (?)
-- [ ] CAD tools
+- [ ] CAD/CAM tools
 - [ ] FEA tools
 - [ ] CFD tools
 
--- a/obj.c
+++ b/obj.c
@@ -325,7 +325,7 @@
 }
 
 void
-threadmain(int argc, char *argv[])
+main(int argc, char *argv[])
 {
 	Model *m;
 	char *infile, *dstdir;
--- a/toobj.c
+++ b/toobj.c
@@ -179,7 +179,7 @@
 }
 
 void
-threadmain(int argc, char *argv[])
+main(int argc, char *argv[])
 {
 	Model *m;
 	OBJ *obj;
--