## Tcl9.0.3/Tk9.0.3 Documentation > Tcl C API > Init

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

  NAME
    Tcl_Init — 初期化記述譜の捜索と利用　 find and source initialization script
  SYNOPSIS
    #include <tcl.h>
    int
    Tcl_Init(interp)
    const char *
    Tcl_SetPreInitScript(scriptPtr)
  引数 ARGUMENTS
    Tcl_Interp *interp (入力in)
    const char *scriptPtr (入力in)
  説明 DESCRIPTION
  SEE ALSO
  KEYWORDS

### NAME

Tcl_Init — 初期化記述譜の捜索と利用　 find and source initialization script

### SYNOPSIS

#include <tcl.h>
int
Tcl_Init(interp)
const char *
Tcl_SetPreInitScript(scriptPtr)

### 引数 ARGUMENTS

Tcl_Interp *interp (入力in)
  初期化するための解釈実行機能｡ Interpreter to initialize.

const char *scriptPtr (入力in)
  初期化記述譜の番地｡ Address of the initialization script.

### 説明 DESCRIPTION

Tcl_Init は､Tcl 外部関数経路上の何処かにある筈の初期化tcl 記述譜 init.tcl を捜索し､評価(source)する補助手続き函数である｡ Tcl_Init is a helper procedure that finds and sources the init.tcl script, which should exist somewhere on the Tcl library path.

Tcl_Init は典型定期には Tcl_AppInit 手続き函数から呼出される｡ Tcl_Init is typically called from Tcl_AppInit procedures.

Tcl_SetPreInitScriptは事前-初期化記述譜を登録し､以前の記述譜(今は､置換された)の指示子を返す｡ NULLの値は､どの記述譜も登録されない為に渡されるかもしれない｡[訳註:訳が…??] 事前-初期化記述譜はファイル系に接続する前にTcl_Initにより実行される｡ 目的は､典型的には､ 捜索の前に活性化されるべき誂えファイル系(埋込まれたzip-fileの如く)を準備すること｡ Tcl_SetPreInitScript registers the pre-initialization script and returns the former (now replaced) script pointer. A value of NULL may be passed to not register any script. The pre-initialization script is executed by Tcl_Init before accessing the file system. The purpose is to typically prepare a custom file system (like an embedded zip-file) to be activated before the search.

応答模擬-有効化の埋込譜内で使われる時､模擬応答表は､Tcl_InitSubsystemsかTcl_SetPanicProcかTcl_FindExecutableかTclZipfs_AppHookの内の一つを使って､Tcl_SetPreInitScriptが呼ばれる前に最初に初期化せねばならない｡ When used in stub-enabled embedders, the stubs table must be first initialized using one of Tcl_InitSubsystems, Tcl_SetPanicProc, Tcl_FindExecutable or TclZipfs_AppHook before Tcl_SetPreInitScript may be called.

### SEE ALSO

Tcl_AppInit, Tcl_Main

### KEYWORDS

application, initialization, interpreter
Copyright © 1998-2000 Scriptics Corporation.