Overview
| Comment: | Renamed getInfo to getStat, for clarity |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
daf25f5222d4b77e9619355caf8d3090 |
| User & Date: | rkeene on 2019-05-03 22:42:43.714 |
| Other Links: | manifest | tags |
Context
|
2019-05-06
| ||
| 16:30 | Updated ignores check-in: 0309511136 user: rkeene tags: trunk | |
|
2019-05-03
| ||
| 22:42 | Renamed getInfo to getStat, for clarity check-in: daf25f5222 user: rkeene tags: trunk | |
| 22:38 | Ensure consistent UTF-8 encoding is applied throughout the file handling process check-in: d99958bdd3 user: rkeene tags: trunk | |
Changes
Modified xvfs-core.c
from [7a51ec83d4]
to [adae00d4d2].
| ︙ | ︙ | |||
56 57 58 59 60 61 62 |
static int xvfs_tclfs_stat(Tcl_Obj *path, Tcl_StatBuf *statBuf, struct xvfs_tclfs_instance_info *instanceInfo) {
const char *pathStr;
int retval;
pathStr = xvfs_relativePath(path, instanceInfo);
| | | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
static int xvfs_tclfs_stat(Tcl_Obj *path, Tcl_StatBuf *statBuf, struct xvfs_tclfs_instance_info *instanceInfo) {
const char *pathStr;
int retval;
pathStr = xvfs_relativePath(path, instanceInfo);
retval = instanceInfo->fsInfo->getStatProc(pathStr, statBuf);
return(retval);
}
static Tcl_Obj *xvfs_tclfs_listVolumes(struct xvfs_tclfs_instance_info *instanceInfo) {
return(NULL);
}
|
| ︙ | ︙ |
Modified xvfs-core.h
from [51b24fa92d]
to [490b145452].
1 2 3 4 5 6 7 8 9 | #ifndef XVFS_CORE_H_1B4B28D60EBAA11D5FF85642FA7CA22C29E8E817 #define XVFS_CORE_H_1B4B28D60EBAA11D5FF85642FA7CA22C29E8E817 1 #include <tcl.h> #define XVFS_PROTOCOL_VERSION 1 typedef const char **(*xvfs_proc_getChildren_t)(const char *path, Tcl_WideInt *count); typedef const unsigned char *(*xvfs_proc_getData_t)(const char *path, Tcl_WideInt start, Tcl_WideInt *length); | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
#ifndef XVFS_CORE_H_1B4B28D60EBAA11D5FF85642FA7CA22C29E8E817
#define XVFS_CORE_H_1B4B28D60EBAA11D5FF85642FA7CA22C29E8E817 1
#include <tcl.h>
#define XVFS_PROTOCOL_VERSION 1
typedef const char **(*xvfs_proc_getChildren_t)(const char *path, Tcl_WideInt *count);
typedef const unsigned char *(*xvfs_proc_getData_t)(const char *path, Tcl_WideInt start, Tcl_WideInt *length);
typedef int (*xvfs_proc_getStat_t)(const char *path, Tcl_StatBuf *statBuf);
struct Xvfs_FSInfo {
int protocolVersion;
const char *name;
xvfs_proc_getChildren_t getChildrenProc;
xvfs_proc_getData_t getDataProc;
xvfs_proc_getStat_t getStatProc;
};
#define XVFS_REGISTER_INTERFACE(name) int name(Tcl_Interp *interp, struct Xvfs_FSInfo *fsInfo);
#if defined(XVFS_MODE_STANDALONE)
/*
* In standalone mode, we just redefine calls to
|
| ︙ | ︙ |
Modified xvfs.c.rvt
from [83b306157f]
to [2829fbeb0b].
| ︙ | ︙ | |||
152 153 154 155 156 157 158 | /* * Return the data */ return(fileInfo->data.fileContents + start); } | | | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
/*
* Return the data
*/
return(fileInfo->data.fileContents + start);
}
static int xvfs_<?= $::xvfs::fsName ?>_getStat(const char *path, Tcl_StatBuf *statBuf) {
struct xvfs_file_data *fileInfo;
long inode;
/*
* Validate input parameters
*/
if (!statBuf) {
|
| ︙ | ︙ | |||
204 205 206 207 208 209 210 |
static struct Xvfs_FSInfo xvfs_<?= $::xvfs::fsName ?>_fsInfo = {
.protocolVersion = XVFS_PROTOCOL_VERSION,
.name = "<?= $::xvfs::fsName ?>",
.getChildrenProc = xvfs_<?= $::xvfs::fsName ?>_getChildren,
.getDataProc = xvfs_<?= $::xvfs::fsName ?>_getData,
| | | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
static struct Xvfs_FSInfo xvfs_<?= $::xvfs::fsName ?>_fsInfo = {
.protocolVersion = XVFS_PROTOCOL_VERSION,
.name = "<?= $::xvfs::fsName ?>",
.getChildrenProc = xvfs_<?= $::xvfs::fsName ?>_getChildren,
.getDataProc = xvfs_<?= $::xvfs::fsName ?>_getData,
.getStatProc = xvfs_<?= $::xvfs::fsName ?>_getStat
};
int Xvfs_<?= $::xvfs::fsName ?>_Init(Tcl_Interp *interp) {
int register_ret;
#ifdef USE_TCL_STUBS
const char *tclInitStubs_ret;
|
| ︙ | ︙ |