home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
docbatch.tcl
< prev
next >
Wrap
Text File
|
1996-12-06
|
2KB
|
83 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1995
#
# File: @(#)docbatch.tcl /main/hindenburg/2
# Author: voyager
# Description: do some docwriter actions as batch job
#---------------------------------------------------------------------------
# SccsId = @(#)docbatch.tcl /main/hindenburg/2 6 Dec 1996 Copyright 1994 Westmount Technology
source [m4_path_name tcl libocl.tcl]
source [m4_path_name tcl platform.tcl]
proc read_require_file {file} {
if [catch {set name [m4_path_name tcl $file]}] {
set name $file
}
source $name
}
require procs.tcl
require messagehdl.tcl
require config.tcl
require docgenerat.tcl
require docprocs.tcl
require docstructp.tcl
require doctool.tcl
proc wmtkmessage {msg} {
puts $msg
}
proc wmtkfatal {msg} {
wmtkerror $msg
exit
}
global classCount
set classCount 0
sourceOptional u_docbatch
global docToolObjectHdlr
set docToolObjectHdlr [CustObjHandler new]
$docToolObjectHdlr setCurrentContext
if {[llength $argv] != 4} {
error "Usage: otprint docbatch.tcl -- <command> \
<configVersion> <systemVersion> <file>"
exit
}
set cmd [lindex $argv 0]
set cv [lindex $argv 1]
set sv [lindex $argv 2]
set file [lindex $argv 3]
# make a Document
set document [Document new $sv]
$document initialize [ConfigVersion new $cv]
# cd to the docdir
set crntPath [pwd]
cd [$document directory]
# make the doctool
DocTool new docTool $document
# the component and section generator
DocGenerator new generator
if [catch {set returnValue [docTool startCommand $cmd $file]} msg] {
puts $msg
global errorInfo
if {[info exists errorInfo]} {
puts $errorInfo
}
set returnValue 0
}
# cd back
cd $crntPath
wmtkmessage Done
exit $returnValue