Tcl 8.7/Tk8.7a5 Documentation > Tcl C API > Init

Tcl/Tk Applications | Tcl Commands | Tk Commands | Tcl C API | Tk C API

NAME
Tcl_Init — find and source initialization script
SYNOPSIS
#include <tcl.h>
int
Tcl_Init(interp)
const char *
Tcl_SetPreInitScript(scriptPtr)
ARGUMENTS
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 is a helper procedure that finds and sources the init.tcl script, which should exist somewhere on the Tcl library path.

Tcl_Init is typically called from Tcl_AppInit procedures.

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.

SEE ALSO

Tcl_AppInit, Tcl_Main

KEYWORDS

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