[Tcladdressbook-commits] Source TclAddressBook.c,1.21,1.22
Status: Alpha
Brought to you by:
bdesgraupes
|
From: <bde...@us...> - 2003-12-22 06:41:55
|
Update of /cvsroot/tcladdressbook/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv9229/Source
Modified Files:
TclAddressBook.c
Log Message:
gMacRomanEnc global token
Index: TclAddressBook.c
===================================================================
RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- TclAddressBook.c 16 Dec 2003 07:37:05 -0000 1.21
+++ TclAddressBook.c 22 Dec 2003 06:41:48 -0000 1.22
@@ -52,6 +52,9 @@
int Addressbook_Init(Tcl_Interp *interp);
#pragma export off
+// Global variable for the macRoman Tcl_Encoding token
+Tcl_Encoding gMacRomanEnc;
+
/*
*----------------------------------------------------------------------
@@ -89,6 +92,14 @@
if (Tcl_PkgProvide(interp, "addressbook", vstr) != TCL_OK) {
return TCL_ERROR;
}
+
+ // Store a global token for the macRoman encoding. If NULL is returned,
+ // an error message is left by Tcl_GetEncoding in interp's result.
+ gMacRomanEnc = Tcl_GetEncoding(interp,"macRoman");
+ if (gMacRomanEnc == NULL) {
+ return TCL_ERROR;
+ }
+
return TCL_OK;
}
|