# check that all the glossed terms have been defined
foreach name [array names currentGlossArray] {
- if {[lindex $currentGlossArray($name) 1] != "defined"} {
- set glossString [lindex $currentGlossArray($name) 2]
- UserError "No glossary definition for \"$glossString\"" no
- }
+ if {[info exists currentGlossArray($name)]} {
+ if {[lindex $currentGlossArray($name) 1] != "defined"} {
+ set glossString [lindex $currentGlossArray($name) 2]
+ UserError "No glossary definition for \"$glossString\"" no
+ }
+ }
}
# delete this glossary array
pArgv = argv[1];
stringLength = (2 * strlen(pArgv)) + 3;
- string = malloc(stringLength);
+ string = Tcl_Alloc(stringLength);
memset(string, 0, stringLength);
pString = string;
/* put the string to the output */
retCode = Tcl_VarEval(interpreter, "puts -nonewline ", string, 0);
-
- free(string);
+ Tcl_Free(string);
/* and ripple up any error code we got from the "puts" */
return retCode;