summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--doc/Environment.336
-rw-r--r--doc/Macintosh.3111
-rw-r--r--unix/mkLinks24
4 files changed, 182 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 43918b2..2c788a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-04-04 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * unix/mkLinks: Updated to contain the new manpage.
+
+ * doc/Environment.3: New manpage, describes Tcl_PutEnv
+ [Bug #219171].
+
+ * doc/Macintosh.3: New manpage describing the macintosh specific
+ parts of the public API [Bug #219169].
+
2001-04-04 Jeff Hobbs <jeffh@ActiveState.com>
* unix/configure:
@@ -10,7 +20,7 @@
* generic/tclTest.c:
* tests/io.tests: TIP #10 followup correcting a problem with the
- original patch because of the lacck of 'testthread id' for a
+ original patch because of the lack of 'testthread id' for a
non-threaded compilation.
2001-04-04 Kevin Kenny <kennykb@acm.org>
diff --git a/doc/Environment.3 b/doc/Environment.3
new file mode 100644
index 0000000..5b7ff29
--- /dev/null
+++ b/doc/Environment.3
@@ -0,0 +1,36 @@
+'\"
+'\" Copyright (c) 1997-1998 Sun Microsystems, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: @(#) $Id: Environment.3,v 1.1 2001/04/04 21:32:18 andreas_kupries Exp $
+'\"
+.so man.macros
+.TH Tcl_PutEnv 3 "7.5" Tcl "Tcl Library Procedures"
+.BS
+.SH NAME
+Tcl_PutEnv \- procedures to manipulate the environment
+.SH SYNOPSIS
+.nf
+\fB#include <tcl.h>\fR
+.sp
+int
+\fBTcl_PutEnv\fR(\fIstring\fR)
+.SH ARGUMENTS
+.AP "CONST char" *string in
+Info about environment variable in the form NAME=value. The string is
+in native format.
+.BE
+
+.SH DESCRIPTION
+.PP
+\fBTcl_PutEnv\fR sets an environment variable. The information is
+passed in a single string of the form NAME=value. This procedure is
+intended to be a stand-in for the UNIX \fBputenv\fR system call. All
+tcl-based applications using \fBputenv\fR should redefine it to
+\fBTcl_PutEnv\fR so that they will interface properly to the Tcl
+runtime.
+
+.SH KEYWORDS
+environment, variable
diff --git a/doc/Macintosh.3 b/doc/Macintosh.3
new file mode 100644
index 0000000..83028ad
--- /dev/null
+++ b/doc/Macintosh.3
@@ -0,0 +1,111 @@
+'\"
+'\" Copyright (c) 1997-1998 Sun Microsystems, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: @(#) $Id: Macintosh.3,v 1.1 2001/04/04 21:32:18 andreas_kupries Exp $
+'\"
+.so man.macros
+.TH Tcl_MacSetEventProc 3 "8.1" Tcl "Tcl Library Procedures"
+.BS
+.SH NAME
+Tcl_MacSetEventProc, Tcl_MacConvertTextResource, Tcl_MacSetEventProc, Tcl_MacConvertTextResource, Tcl_MacEvalResource, Tcl_MacFindResource, Tcl_GetOSTypeFromObj, Tcl_SetOSTypeObj, Tcl_NewOSTypeObj \- procedures to handle Macintosh resources and other Macintosh specifics
+.SH SYNOPSIS
+.nf
+\fB#include <tcl.h>\fR
+.sp
+int
+\fBTcl_MacEvalResource\fR(\fIinterp, resourceName, resourceNumber, fileName\fR)
+.sp
+char*
+\fBTcl_MacConvertTextResource\fR(\fIresource\fR)
+.sp
+Handle
+\fBTcl_MacFindResource\fR(\fIinterp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt\fR)
+.sp
+Tcl_Obj*
+\fBTcl_NewOSTypeObj\fR(\fInewOSType\fR)
+.sp
+void
+\fBTcl_SetOSTypeObj\fR(\fIobjPtr, newOSType\fR)
+.sp
+int
+\fBTcl_GetOSTypeFromObj\fR(\fIinterp, objPtr, osTypePtr\fR)
+.sp
+void
+\fBTcl_MacSetEventProc\fR(\fIprocPtr\fR)
+.SH ARGUMENTS
+.AP Tcl_Interp *interp in
+Interpreter to use for error reporting, or NULL if no error reporting is
+desired.
+.AP char *resourceName in
+Name of TEXT resource to source, NULL if number should be used.
+.AP int resourceNumber in
+Resource id of source.
+.AP char *fileName in
+Name of file to process. NULL if application resource.
+.AP Handle resource in
+Handle to TEXT resource.
+.AP long resourceType in
+Type of resource to load.
+.AP char *resFileRef in
+Registered resource file reference, NULL if searching all open resource files.
+.AP int *releaseIt out
+Should we release this resource when done.
+.AP int newOSType in
+Int used to initialize the new object or set the object's value.
+.AP Tcl_Obj *objPtr in
+Object whose internal representation is to be set or retrieved.
+.AP osTypePtr out
+Place to store the resulting integer.
+.AP Tcl_MacConvertEventPtr procPtr in
+Reference to the new function to handle all incoming Mac events.
+
+.BE
+.SH INTRODUCTION
+.PP
+The described routines are used to implement the Macintosh specific
+\fBresource\fR command and the Mac specific notifier.. They manipulate
+or use Macintosh resources and provide administration for open
+resource file references.
+
+.SH DESCRIPTION
+.PP
+\fBTcl_MacEvalResource\fR extends the \fBsource\fR command to
+Macintosh resources. It sources Tcl code from a Text resource.
+Currently only sources the resource by name, file IDs may be supported
+at a later date.
+.PP
+\fBTcl_MacConvertTextResource\fR converts a TEXT resource into a Tcl
+suitable string. It mallocs the returned memory, converts '\r' to
+'\n', and appends a NULL. The caller has the responsibility for
+freeing the memory.
+.PP
+\fBTcl_MacFindResource\fR provides a higher level interface for
+loading resources. It is used by \fBresource read\fR.
+.PP
+\fBTcl_NewOSTypeObj\fR is used to create a new resource name type
+object. The object type is "ostype".
+.PP
+\fBTcl_SetOSTypeObj\fR modifies an object to be a resource type and to
+have the specified long value.
+.PP
+\fBTcl_GetOSTypeFromObj\fR attempts to return an int from the Tcl
+object "objPtr". If the object is not already an int, an attempt will
+be made to convert it to one.
+.PP
+\fBTcl_MacSetEventProc\fR sets the event handling procedure for the
+application. This function will be passed all incoming Mac events.
+This function usually controls the console or some other entity like
+Tk.
+
+.SH RESOURCE TYPES
+.PP
+Resource types are 4-byte values used by the macintosh resource
+facility to tag parts of the resource fork in a file so that the OS
+knows how to handle them. As all 4 bytes are restricted to printable
+characters such a type can be interpreted as a 4 character string too.
+
+.SH KEYWORDS
+macintosh, mac, resource, notifier
diff --git a/unix/mkLinks b/unix/mkLinks
index a5b4ed4..faf829f 100644
--- a/unix/mkLinks
+++ b/unix/mkLinks
@@ -372,6 +372,10 @@ if test -r Encoding.3; then
ln Encoding.3 Tcl_GetDefaultEncodingDir.3
ln Encoding.3 Tcl_SetDefaultEncodingDir.3
fi
+if test -r Environment.3; then
+ rm -f Tcl_PutEnv.3
+ ln Environment.3 Tcl_PutEnv.3
+fi
if test -r Eval.3; then
rm -f Tcl_EvalObjEx.3
rm -f Tcl_EvalFile.3
@@ -554,6 +558,26 @@ if test -r ListObj.3; then
ln ListObj.3 Tcl_ListObjIndex.3
ln ListObj.3 Tcl_ListObjReplace.3
fi
+if test -r Macintosh.3; then
+ rm -f Tcl_MacSetEventProc.3
+ rm -f Tcl_MacConvertTextResource.3
+ rm -f Tcl_MacSetEventProc.3
+ rm -f Tcl_MacConvertTextResource.3
+ rm -f Tcl_MacEvalResource.3
+ rm -f Tcl_MacFindResource.3
+ rm -f Tcl_GetOSTypeFromObj.3
+ rm -f Tcl_SetOSTypeObj.3
+ rm -f Tcl_NewOSTypeObj.3
+ ln Macintosh.3 Tcl_MacSetEventProc.3
+ ln Macintosh.3 Tcl_MacConvertTextResource.3
+ ln Macintosh.3 Tcl_MacSetEventProc.3
+ ln Macintosh.3 Tcl_MacConvertTextResource.3
+ ln Macintosh.3 Tcl_MacEvalResource.3
+ ln Macintosh.3 Tcl_MacFindResource.3
+ ln Macintosh.3 Tcl_GetOSTypeFromObj.3
+ ln Macintosh.3 Tcl_SetOSTypeObj.3
+ ln Macintosh.3 Tcl_NewOSTypeObj.3
+fi
if test -r Notifier.3; then
rm -f Tcl_CreateEventSource.3
rm -f Tcl_DeleteEventSource.3