Differences From Artifact [4a88bcbca8]:
- Executable file
kitdll/buildsrc/kitdll-0.0/dir2c.tcl
— part of check-in
[424322801f]
at
2010-09-26 04:51:16
on branch trunk
— Got KitDLL storage into workable state
Renamed some files for consistency
Added basic Makefile (user: rkeene, size: 7733) [annotate] [blame] [check-ins using]
To Artifact [28f9b94a91]:
- Executable file kitdll/buildsrc/kitdll-0.0/dir2c.tcl — part of check-in [e4de9a2934] at 2010-09-26 04:51:35 on branch trunk — Updated to create loadable filesystem by including C-Tcl interface when creating C version of directory tree (dir2c) (user: rkeene, size: 9091) [annotate] [blame] [check-ins using] [more...]
- File kitsh/buildsrc/kitsh-0.0/dir2c.tcl — part of check-in [55cb9f600a] at 2011-05-20 05:50:13 on branch merge-kitdll-kitsh-common — First set of merges from KitDLL to KitSH (user: rkeene, size: 9091) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | # Insert dummy entry cooresponding to C dummy entry set files [linsert $files 0 "__DUMMY__"] # Produce C89 compatible header set cpp_tag "KITDLL_[string toupper $hashkey]" set code_tag "kitdll_[string tolower $hashkey]" puts "#ifndef $cpp_tag" puts "# define $cpp_tag 1" puts { # ifdef HAVE_STDC # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H 1 | > | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | # Insert dummy entry cooresponding to C dummy entry set files [linsert $files 0 "__DUMMY__"] # Produce C89 compatible header set cpp_tag "KITDLL_[string toupper $hashkey]" set code_tag "kitdll_[string tolower $hashkey]" set hashkey [string tolower $hashkey] puts "#ifndef $cpp_tag" puts "# define $cpp_tag 1" puts { # ifdef HAVE_STDC # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H 1 |
︙ | ︙ | |||
346 347 348 349 350 351 352 353 | puts "\t}" puts "" puts "\treturn(num_children);" puts "}" puts "" puts "#endif /* !$cpp_tag */" | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | puts "\t}" puts "" puts "\treturn(num_children);" puts "}" puts "" puts "# ifdef KITDLL_MAKE_LOADABLE" set fd [open "vfs_kitdll_data.c"] puts [read $fd] close $fd puts "static cmd_getData_t *getCmdData(const char *hashkey) {" puts "\treturn(${code_tag}_getData);" puts "}" puts "" puts "static cmd_getChildren_t *getCmdChildren(const char *hashkey) {" puts "\treturn(${code_tag}_getChildren);" puts "}" puts "" puts "int Vfs_kitdll_data_${hashkey}_Init(Tcl_Interp *interp) {" puts "\tTcl_Command tclCreatComm_ret;" puts "\tint tclPkgProv_ret;" puts "" puts "\ttclCreatComm_ret = Tcl_CreateObjCommand(interp, \"::vfs::kitdll::data::${hashkey}::getMetadata\", getMetadata, NULL, NULL);" puts "\tif (!tclCreatComm_ret) {" puts "\t\treturn(TCL_ERROR);" puts "\t}" puts "" puts "\ttclCreatComm_ret = Tcl_CreateObjCommand(interp, \"::vfs::kitdll::data::${hashkey}::getData\", getData, NULL, NULL);" puts "\tif (!tclCreatComm_ret) {" puts "\t\treturn(TCL_ERROR);" puts "\t}" puts "" puts "\ttclCreatComm_ret = Tcl_CreateObjCommand(interp, \"::vfs::kitdll::data::${hashkey}::getChildren\", getChildren, NULL, NULL);" puts "\tif (!tclCreatComm_ret) {" puts "\t\treturn(TCL_ERROR);" puts "\t}" puts "" puts "\ttclPkgProv_ret = Tcl_PkgProvide(interp, \"vfs::kitdll::data::${hashkey}\", \"1.0\");" puts "" puts "\treturn(tclPkgProv_ret);" puts "\t}" puts "# endif /* KITDLL_MAKE_LOADABLE */" puts "#endif /* !$cpp_tag */" |