Artifact [7d5d92c98e]

Artifact 7d5d92c98e9680b19b4f7c0730fe7e6469ffc4a3:

Ticket change [7d5d92c98e] - New ticket [127ac40147] Output C89 data from dir2c.tcl. by anonymous on 2020-04-17 13:33:49.
D 2020-04-17T13:33:49.924
J comment <div>Dear\sSean,</div><div><br\s/></div><div>thank\syou\sfor\sgreat\sC-VFS.\sI\sam\strying\sto\sget\sit\sworking\sby\slittle\ssteps.</div><div>There\smight\sbe\sa\swiki\srecipe\son\ssuccess\sfor\sthe\smedium\sprogrammer\sof\sthis\swizard\sprogram.<br\s/></div><div><br\s/></div><div>Just\sa\snote.\sTCL\sand\sMetakit\sis\snormally\sC89\sclean.\sThe\soutput\sof\sdir2c.tcl\sis\snot,\sas\sit\suses\sthis\sstyle\sof\sinitialization:</div><div><br\s/></div><div>&lt;verbatim&gt;</div><div>static\sstruct\scvfs_data\scvfs_tcl_data[]\s=\s{<br\s/>&nbsp;&nbsp;&nbsp;\s{<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s/*\sIndex\s0\scannot\sbe\sused\sbecause\swe\suse\sthe\svalue\s0\sto\srepresent\sfailure\s*/<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s.name&nbsp;\s=\sNULL,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s.index\s=\s0,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s.type&nbsp;\s=\s0,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s.size&nbsp;\s=\s0,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s.data&nbsp;\s=\sNULL,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s.free&nbsp;\s=\s0,<br\s/>&nbsp;&nbsp;&nbsp;\s},</div><div>&lt;/verbatim&gt;<br\s/></div><div><br\s/></div><div>Unfortunately,\sC89\sdoes\snot\sallow\sto\sname\sthe\sstructure\sitems.</div><div>The\spatch\sbelow\stransforms\sthis\soutput\sinto:</div><div><br\s/></div><div>&lt;verbatim&gt;</div><div>static\sstruct\scvfs_data\scvfs_tcl_data[]\s=\s{<br\s/>&nbsp;&nbsp;&nbsp;\s{<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s/*\sIndex\s0\scannot\sbe\sused\sbecause\swe\suse\sthe\svalue\s0\sto\srepresent\sfailure\s*/<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s/*\sname&nbsp;\s*/\sNULL,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s/*\sindex\s*/\s0,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s/*\stype&nbsp;\s*/\s0,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s/*\ssize&nbsp;\s*/\s0,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s/*\sdata&nbsp;\s*/\sNULL,<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\s/*\sfree&nbsp;\s*/\s0,<br\s/>&nbsp;&nbsp;&nbsp;\s},<br\s/></div><div>&lt;/verbatim&gt;</div><div><br\s/></div><div>Here\sis\sthe\spatch:</div><div><br\s/></div><div>&lt;verbatim&gt;</div><div>---\sC:/oehhar/elmicron/projekte/el1005_scanlink_dll/source/c-vfs/dir2c_ori.tcl&nbsp;&nbsp;&nbsp;\sWed\sJan\s22\s20:53:52\s2020<br\s/>+++\sC:/oehhar/elmicron/projekte/el1005_scanlink_dll/source/c-vfs/dir2c.tcl&nbsp;&nbsp;&nbsp;\sFri\sApr\s17\s10:20:20\s2020<br\s/>@@\s-306,20\s+306,20\s@@<br\s/>&nbsp;<br\s/>&nbsp;#&nbsp;\sendif\s/*\s!LOADED_CVFS_COMMON\s*/}<br\s/>&nbsp;puts\s""<br\s/>&nbsp;<br\s/>&nbsp;puts\s"static\sstruct\scvfs_data\s${code_tag}_data\\[\\]\s=\s{"<br\s/>&nbsp;puts\s"\\t{"<br\s/>&nbsp;puts\s"\\t\\t/*\sIndex\s0\scannot\sbe\sused\sbecause\swe\suse\sthe\svalue\s0\sto\srepresent\sfailure\s*/"<br\s/>-puts\s"\\t\\t.name&nbsp;\s=\sNULL,"<br\s/>-puts\s"\\t\\t.index\s=\s0,"<br\s/>-puts\s"\\t\\t.type&nbsp;\s=\s0,"<br\s/>-puts\s"\\t\\t.size&nbsp;\s=\s0,"<br\s/>-puts\s"\\t\\t.data&nbsp;\s=\sNULL,"<br\s/>-puts\s"\\t\\t.free&nbsp;\s=\s0,"<br\s/>+puts\s"\\t\\t/*\sname&nbsp;\s*/\sNULL,"<br\s/>+puts\s"\\t\\t/*\sindex\s*/\s0,"<br\s/>+puts\s"\\t\\t/*\stype&nbsp;\s*/\s0,"<br\s/>+puts\s"\\t\\t/*\ssize&nbsp;\s*/\s0,"<br\s/>+puts\s"\\t\\t/*\sdata&nbsp;\s*/\sNULL,"<br\s/>+puts\s"\\t\\t/*\sfree&nbsp;\s*/\s0,"<br\s/>&nbsp;puts\s"\\t},"<br\s/>&nbsp;for\s{set\sidx\s1}\s{$idx\s&lt;\s[llength\s$files]}\s{incr\sidx}\s{<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\sset\sfile\s[lindex\s$files\s$idx]<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\sset\sshortfile\s[shorten_file\s$startdir\s$file]<br\s/>&nbsp;<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\sunset\s-nocomplain\sfinfo\stype<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\sfile\sstat\s$file\sfinfo<br\s/>@@\s-345,20\s+345,20\s@@<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\s&nbsp;&nbsp;&nbsp;\s&nbsp;&nbsp;&nbsp;\sset\stype\s"CVFS_FILETYPE_DIR"<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\s&nbsp;&nbsp;&nbsp;\s&nbsp;&nbsp;&nbsp;\sset\sdata\s"NULL"<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\s&nbsp;&nbsp;&nbsp;\s&nbsp;&nbsp;&nbsp;\sset\ssize\s0<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\s&nbsp;&nbsp;&nbsp;\s}<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\s}<br\s/>&nbsp;<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\sputs\s"\\t{"<br\s/>-&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t.name&nbsp;\s=\s\\"$shortfile\\","<br\s/>-&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t.index\s=\s$idx,"<br\s/>-&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t.type&nbsp;\s=\s$type,"<br\s/>-&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t.size&nbsp;\s=\s$size,"<br\s/>-&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t.data&nbsp;\s=\s$data,"<br\s/>-&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t.free&nbsp;\s=\s0,"<br\s/>+&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t/*\sname&nbsp;\s*/\s\\"$shortfile\\","<br\s/>+&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t/*\sindex\s*/\s$idx,"<br\s/>+&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t/*\stype&nbsp;\s*/\s$type,"<br\s/>+&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t/*\ssize&nbsp;\s*/\s$size,"<br\s/>+&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t/*\sdata&nbsp;\s*/\s$data,"<br\s/>+&nbsp;&nbsp;&nbsp;\sputs\s"\\t\\t/*\sfree&nbsp;\s*/\s0,"<br\s/>&nbsp;&nbsp;&nbsp;&nbsp;\sputs\s"\\t},"<br\s/>&nbsp;}<br\s/>&nbsp;puts\s"};"<br\s/>&nbsp;puts\s""<br\s/>&nbsp;<br\s/>&nbsp;puts\s"static\sunsigned\slong\s${code_tag}_lookup_index(const\schar\s*path)\s{"<br\s/>&nbsp;puts\s"\\tswitch\s(cvfs_hash((unsigned\schar\s*)\spath))\s{"&lt;/verbatim&gt;<br\s/></div><div><br\s/></div><div>Thank\syou\sand\sbest\sregards,</div><div>Harald<br\s/></div>
J login anonymous
J severity Critical
J status Open
J title Output\sC89\sdata\sfrom\sdir2c.tcl
J type Code\sDefect
K 127ac40147407d703ee7ccd70c865c6a87c53c56
U anonymous
Z 6127e5322bd86531aa3d86d47cf7d3bd