Ticket Change Details
Overview

Artifact ID: 35d9e3908540656db94286348d4d01be3e7c4b3a
Ticket: 127ac40147407d703ee7ccd70c865c6a87c53c56
Output C89 data from dir2c.tcl
User & Date: anonymous on 2020-05-11 16:33:18
Changes

  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"