加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
make-load-static-exts.tcl 900 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env tclsh
# Usage: make-load-static-exts extname ... >load-static-exts.c
# Creates load-static-exts.c based on the configured static extensions
# There are some dependencies on static extensions which require
# a certain load order. Do this by setting priorities and sorting.
array set pri {
stdlib 0
readdir 1
glob 2
oo 1
tree 2
pack 1
binary 2
}
foreach i $argv {
set p 1
if {[info exists pri($i)]} {
set p $pri($i)
}
lappend exts [list $p $i]
}
set exts [lsort $exts]
puts {
/* autogenerated - do not edit */
#include "jim.h"
#include "jimautoconf.h"
int Jim_InitStaticExtensions(Jim_Interp *interp)
}
puts \{
foreach e $exts {
set ext [lindex $e 1]
puts "\textern int Jim_${ext}Init(Jim_Interp *);"
}
foreach e $exts {
set ext [lindex $e 1]
puts "\tJim_${ext}Init(interp);"
}
puts "\treturn JIM_OK;"
puts \}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化