Overview
Comment: | Start of data/directory handling |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
32b55a907bc5d78337415004706c61d9 |
User & Date: | rkeene on 2019-05-02 19:58:27 |
Other Links: | manifest | tags |
Context
2019-05-02
| ||
21:08 | Minimal support to be loaded and not crash the process check-in: e5b6962adf user: rkeene tags: trunk | |
19:58 | Start of data/directory handling check-in: 32b55a907b user: rkeene tags: trunk | |
14:40 | Pass interp to the register command check-in: 69e476dcd5 user: rkeene tags: trunk | |
Changes
Modified lib/xvfs/xvfs.tcl from [5ab6120f9c] to [926dd90266].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | + + + + + + + + + + + + + + + + + + + + + | } set char }] ""] return $output } proc ::xvfs::sanitizeCStringList {list {prefix ""} {width 80}} { set lines [list] set row [list] foreach item $list { lappend row "\"[sanitizeCString $item]\"" set rowString [join $row {, }] set rowString "${prefix}${rowString}" if {[string length $rowString] > $width} { set row [list] lappend lines $rowString unset rowString } } if {[info exists rowString]} { lappend lines $rowString } return [join $lines "\n"] } proc ::xvfs::binaryToCHex {binary {prefix ""} {width 10}} { binary scan $binary H* binary set output [list] set width [expr {$width * 2}] set stopAt [expr {$width - 1}] |
︙ | |||
67 68 69 70 71 72 73 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | - + - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - - - - - - - - - | fconfigure $fd -encoding binary -translation binary -blocking true set data [read $fd] set size [string length $data] set data [string trimleft [binaryToCHex $data "\t\t\t"]] close $fd } "directory" { |
︙ | |||
186 187 188 189 190 191 192 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | - + | if {[llength $errors] != 0} { printHelp stderr $errors exit 1 } ## 3. Start processing directory and producing initial output |
Modified xvfs-core.c from [b20c01ceb7] to [1f3798f743].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + + + + + + + + + + + + - + + + + + | #include <xvfs-core.h> #include <tcl.h> /* * There are three (3) modes of operation for Xvfs_Register: * 1. standalone -- We register our own Tcl_Filesystem * and handle requests under `//xvfs:/<fsName>` * 2. client -- A single Tcl_Filesystem is registered for the * interp to handle requests under `//xvfs:/` which * then dispatches to the appropriate registered * handler * 3. flexible -- Attempts to find a core Xvfs instance for the * process at runtime, if found do #2, otherwise * fallback to #1 * */ |
Modified xvfs-core.h from [939655efee] to [ac0a17191f].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - - + + - + | #ifndef XVFS_COMMON_H_1B4B28D60EBAA11D5FF85642FA7CA22C29E8E817 #define XVFS_COMMON_H_1B4B28D60EBAA11D5FF85642FA7CA22C29E8E817 1 #include <tcl.h> #define XVFS_PROTOCOL_VERSION 1 |
Modified xvfs.c.rvt from [4c4e9cea0a] to [8333f0cfa8].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | + + + + + - + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | #include <xvfs-core.h> #include <unistd.h> #include <string.h> #include <tcl.h> #define XVFS_NAME_LOOKUP_ERROR (-1) #define MIN(a, b) (((a) < (b)) ? (a) : (b)) typedef enum { XVFS_FILE_TYPE_REG, XVFS_FILE_TYPE_DIR } xvfs_file_type_t; typedef Tcl_WideInt xvfs_size_t; struct xvfs_file_data { const char *name; xvfs_file_type_t type; xvfs_size_t size; union { |
︙ |