History Of Ticket 127ac40147407d703ee7ccd70c865c6a87c53c56

Artifacts Associated With Ticket 127ac40147407d703ee7ccd70c865c6a87c53c56

  1. Ticket change [7d5d92c98e] (rid 2626) by anonymous on 2020-04-17 13:33:49:

    1. comment initialized to:
      <div>Dear Sean,</div><div><br /></div><div>thank 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 /></div><div><br /></div><div>Just 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 /></div><div>&lt;verbatim&gt;</div><div>static 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; },</div><div>&lt;/verbatim&gt;<br /></div><div><br /></div><div>Unfortunately, C89 does not allow to name the structure items.</div><div>The patch below transforms this output into:</div><div><br /></div><div>&lt;verbatim&gt;</div><div>static 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 /></div><div>&lt;/verbatim&gt;</div><div><br /></div><div>Here is the patch:</div><div><br /></div><div>&lt;verbatim&gt;</div><div>--- C:/oehhar/elmicron/projekte/el1005_scanlink_dll/source/c-vfs/dir2c_ori.tcl&nbsp;&nbsp;&nbsp; Wed Jan 22 20:53:52 2020<br />+++ C:/oehhar/elmicron/projekte/el1005_scanlink_dll/source/c-vfs/dir2c.tcl&nbsp;&nbsp;&nbsp; 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 ${code_tag}_data\[\] = {"<br />&nbsp;puts "\t{"<br />&nbsp;puts "\t\t/* Index 0 cannot be used because we use the value 0 to represent failure */"<br />-puts "\t\t.name&nbsp; = NULL,"<br />-puts "\t\t.index = 0,"<br />-puts "\t\t.type&nbsp; = 0,"<br />-puts "\t\t.size&nbsp; = 0,"<br />-puts "\t\t.data&nbsp; = NULL,"<br />-puts "\t\t.free&nbsp; = 0,"<br />+puts "\t\t/* name&nbsp; */ NULL,"<br />+puts "\t\t/* index */ 0,"<br />+puts "\t\t/* type&nbsp; */ 0,"<br />+puts "\t\t/* size&nbsp; */ 0,"<br />+puts "\t\t/* data&nbsp; */ NULL,"<br />+puts "\t\t/* 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 "\t\t.name&nbsp; = \"$shortfile\","<br />-&nbsp;&nbsp;&nbsp; puts "\t\t.index = $idx,"<br />-&nbsp;&nbsp;&nbsp; puts "\t\t.type&nbsp; = $type,"<br />-&nbsp;&nbsp;&nbsp; puts "\t\t.size&nbsp; = $size,"<br />-&nbsp;&nbsp;&nbsp; puts "\t\t.data&nbsp; = $data,"<br />-&nbsp;&nbsp;&nbsp; puts "\t\t.free&nbsp; = 0,"<br />+&nbsp;&nbsp;&nbsp; puts "\t\t/* name&nbsp; */ \"$shortfile\","<br />+&nbsp;&nbsp;&nbsp; puts "\t\t/* index */ $idx,"<br />+&nbsp;&nbsp;&nbsp; puts "\t\t/* type&nbsp; */ $type,"<br />+&nbsp;&nbsp;&nbsp; puts "\t\t/* size&nbsp; */ $size,"<br />+&nbsp;&nbsp;&nbsp; puts "\t\t/* data&nbsp; */ $data,"<br />+&nbsp;&nbsp;&nbsp; puts "\t\t/* 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 /></div><div><br /></div><div>Thank you and best regards,</div><div>Harald<br /></div>
      
    2. login: "anonymous"
    3. severity initialized to: "Critical"
    4. status initialized to: "Open"
    5. title initialized to: "Output C89 data from dir2c.tcl"
    6. type initialized to: "Code Defect"
  2. Ticket change [44e1f208cf] (rid 2627) by anonymous on 2020-04-17 13:34:37:

    1. foundin changed to: "trunk"
    2. login: "anonymous"
    3. mimetype: "text/x-fossil-plain"
    4. priority changed to: "Low"
    5. resolution changed to: "Open"
    6. severity changed to: "Minor"
    7. subsystem changed to: "KitDLL (The libTclkit Core)"
  3. Ticket change [35d9e39085] (rid 2633) by anonymous on 2020-05-11 16:33:18:

    1. icomment:
      Sorry, the patch has the issue, that the two members "type" and "size" are mixed up.
      Here is a corrected patch:
      
      <verbatim>
      
      --- C:/oehhar/elmicron/projekte/el1005_scanlink_dll/source/c-vfs/dir2c_ori.tcl    Wed Jan 22 20:53:52 2020
      +++ C:/oehhar/elmicron/projekte/el1005_scanlink_dll/source/c-vfs/dir2c.tcl    Fri Apr 17 10:20:20 2020
      @@ -306,20 +306,20 @@
       
       #  endif /* !LOADED_CVFS_COMMON */}
       puts ""
       
       puts "static struct cvfs_data ${code_tag}_data\[\] = {"
       puts "\t{"
       puts "\t\t/* Index 0 cannot be used because we use the value 0 to represent failure */"
      -puts "\t\t.name  = NULL,"
      -puts "\t\t.index = 0,"
      -puts "\t\t.type  = 0,"
      -puts "\t\t.size  = 0,"
      -puts "\t\t.data  = NULL,"
      -puts "\t\t.free  = 0,"
      +puts "\t\t/* name  */ NULL,"
      +puts "\t\t/* index */ 0,"
      +puts "\t\t/* size  */ 0,"
      +puts "\t\t/* type  */ 0,"
      +puts "\t\t/* data  */ NULL,"
      +puts "\t\t/* free  */ 0,"
       puts "\t},"
       for {set idx 1} {$idx < [llength $files]} {incr idx} {
           set file [lindex $files $idx]
           set shortfile [shorten_file $startdir $file]
       
           unset -nocomplain finfo type
           file stat $file finfo
      @@ -345,20 +345,20 @@
                   set type "CVFS_FILETYPE_DIR"
                   set data "NULL"
                   set size 0
               }
           }
       
           puts "\t{"
      -    puts "\t\t.name  = \"$shortfile\","
      -    puts "\t\t.index = $idx,"
      -    puts "\t\t.type  = $type,"
      -    puts "\t\t.size  = $size,"
      -    puts "\t\t.data  = $data,"
      -    puts "\t\t.free  = 0,"
      +    puts "\t\t/* name  */ \"$shortfile\","
      +    puts "\t\t/* index */ $idx,"
      +    puts "\t\t/* size  */ $size,"
      +    puts "\t\t/* type  */ $type,"
      +    puts "\t\t/* data  */ $data,"
      +    puts "\t\t/* free  */ 0,"
           puts "\t},"
       }
       puts "};"
       puts ""
       
       puts "static unsigned long ${code_tag}_lookup_index(const char *path) {"
       puts "\tswitch (cvfs_hash((unsigned char *) path)) {"
      
      </verbatim>
      
    2. login: "anonymous"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  4. Ticket change [05d50f4d10] (rid 2636) by rkeene on 2020-05-11 16:42:39:

    1. icomment:
      Thanks !  The replacement for C-VFS is called XVFS by the way:
      
      https://chiselapp.com/user/rkeene/repository/xvfs/
      
    2. login: "rkeene"
    3. mimetype: "text/x-fossil-plain"