<div>Dear Sean,</div><div><br you for great C-VFS. I am trying to get it working by little steps.</div><div>There might be a wiki recipe on success for the medium programmer of this wizard program.<br a note. TCL and Metakit is normally C89 clean. The output of dir2c.tcl is not, as it uses this style of initialization:</div><div><br struct cvfs_data cvfs_tcl_data[] = {<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Index 0 cannot be used because we use the value 0 to represent failure */<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .name&nbsp; = NULL,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .index = 0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .type&nbsp; = 0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .size&nbsp; = 0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .data&nbsp; = NULL,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .free&nbsp; = 0,<br />&nbsp;&nbsp;&nbsp; C89 does not allow to name the structure items.</div><div>The patch below transforms this output into:</div><div><br struct cvfs_data cvfs_tcl_data[] = {<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Index 0 cannot be used because we use the value 0 to represent failure */<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* name&nbsp; */ NULL,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* index */ 0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* type&nbsp; */ 0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* size&nbsp; */ 0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* data&nbsp; */ NULL,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* free&nbsp; */ 0,<br />&nbsp;&nbsp;&nbsp; },<br is the patch:</div><div><br Wed Jan 22 20:53:52 2020<br />+++ Fri Apr 17 10:20:20 2020<br />@@ -306,20 +306,20 @@<br />&nbsp;<br />&nbsp;#&nbsp; endif /* !LOADED_CVFS_COMMON */}<br />&nbsp;puts ""<br />&nbsp;<br />&nbsp;puts "static struct cvfs_data = {"<br />&nbsp;puts "\t{"<br />&nbsp;puts Index 0 cannot be used because we use the value 0 to represent failure */"<br />-puts = NULL,"<br />-puts = 0,"<br />-puts = 0,"<br />-puts = 0,"<br />-puts = NULL,"<br />-puts = 0,"<br />+puts name&nbsp; */ NULL,"<br />+puts index */ 0,"<br />+puts type&nbsp; */ 0,"<br />+puts size&nbsp; */ 0,"<br />+puts data&nbsp; */ NULL,"<br />+puts free&nbsp; */ 0,"<br />&nbsp;puts "\t},"<br />&nbsp;for {set idx 1} {$idx &lt; [llength $files]} {incr idx} {<br />&nbsp;&nbsp;&nbsp;&nbsp; set file [lindex $files $idx]<br />&nbsp;&nbsp;&nbsp;&nbsp; set shortfile [shorten_file $startdir $file]<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; unset -nocomplain finfo type<br />&nbsp;&nbsp;&nbsp;&nbsp; file stat $file finfo<br />@@ -345,20 +345,20 @@<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; set type "CVFS_FILETYPE_DIR"<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; set data "NULL"<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; set size 0<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; puts "\t{"<br />-&nbsp;&nbsp;&nbsp; puts = />-&nbsp;&nbsp;&nbsp; puts = $idx,"<br />-&nbsp;&nbsp;&nbsp; puts = $type,"<br />-&nbsp;&nbsp;&nbsp; puts = $size,"<br />-&nbsp;&nbsp;&nbsp; puts = $data,"<br />-&nbsp;&nbsp;&nbsp; puts = 0,"<br />+&nbsp;&nbsp;&nbsp; puts name&nbsp; */ />+&nbsp;&nbsp;&nbsp; puts index */ $idx,"<br />+&nbsp;&nbsp;&nbsp; puts type&nbsp; */ $type,"<br />+&nbsp;&nbsp;&nbsp; puts size&nbsp; */ $size,"<br />+&nbsp;&nbsp;&nbsp; puts data&nbsp; */ $data,"<br />+&nbsp;&nbsp;&nbsp; puts free&nbsp; */ 0,"<br />&nbsp;&nbsp;&nbsp;&nbsp; puts "\t},"<br />&nbsp;}<br />&nbsp;puts "};"<br />&nbsp;puts ""<br />&nbsp;<br />&nbsp;puts "static unsigned long ${code_tag}_lookup_index(const char *path) {"<br />&nbsp;puts "\tswitch (cvfs_hash((unsigned char *) path)) {"&lt;/verbatim&gt;<br you and best regards,</div><div>Harald<br