129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
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
|
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
|
/*
* Return the data
*/
return(fileInfo->data.fileContents + start);
}
int Xvfs_<?= $::xvfs::fsName ?>_Init(Tcl_Interp *interp) {
struct Xvfs_FSInfo fsInfo = {
.protocolVersion = XVFS_PROTOCOL_VERSION,
.fsName = "<?= $::xvfs::fsName ?>",
.getChildrenProc = xvfs_<?= $::xvfs::fsName ?>_getChildren,
.getDataProc = xvfs_<?= $::xvfs::fsName ?>_getData
};
int register_ret;
/* XXX:TODO: Stubs */
register_ret = Xvfs_Register(interp, "<?= $::xvfs::fsName ?>", XVFS_PROTOCOL_VERSION, xvfs_<?= $::xvfs::fsName ?>_getChildren, xvfs_<?= $::xvfs::fsName ?>_getData);
#ifdef USE_TCL_STUBS
const char *tclInitStubs_ret;
/* Initialize Stubs */
tclInitStubs_ret = Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0);
if (!tclInitStubs_ret) {
return(TCL_ERROR);
}
#endif
register_ret = Xvfs_Register(interp, &fsInfo);
if (register_ret != TCL_OK) {
return(register_ret);
}
return(TCL_OK);
}
|