home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / TCL / BLT / _BLT.TAR / usr / lib / blt / applications / extloader / ext.man < prev    next >
Encoding:
Text File  |  1994-04-22  |  3.6 KB  |  100 lines

  1. '\"
  2. '\" Copyright 1994 by AT&T Bell Laboratories.
  3. '\"
  4. '\" Permission to use, copy, modify, and distribute this software
  5. '\" and its documentation for any purpose and without fee is hereby
  6. '\" granted, provided that the above copyright notice appear in all
  7. '\" copies and that both that the copyright notice and warranty
  8. '\" disclaimer appear in supporting documentation, and that the
  9. '\" names of AT&T Bell Laboratories any of their entities not be used
  10. '\" in advertising or publicity pertaining to distribution of the
  11. '\" software without specific, written prior permission.
  12. '\"
  13. '\" AT&T disclaims all warranties with regard to this software, including
  14. '\" all implied warranties of merchantability and fitness.  In no event
  15. '\" shall AT&T be liable for any special, indirect or consequential
  16. '\" damages or any damages whatsoever resulting from loss of use, data
  17. '\" or profits, whether in an action of contract, negligence or other
  18. '\" tortuous action, arising out of or in connection with the use or
  19. '\" performance of this software.
  20. '\"
  21. '\"
  22. .so man.macros
  23. .HS extension cmds
  24. .BS
  25. '\" Note:  do not modify the .SH NAME line immediately below!
  26. .SH NAME
  27. extension \- dynamically load extensions as shared libraries
  28. .SH SYNOPSIS
  29. .sp
  30. \fBextension add \fIname\fR ?\fIname\fR...?
  31. .sp
  32. \fBextension libs\fR
  33. .sp
  34. \fBextension lload \fIlibrary\fR
  35. .sp
  36. \fBextension linit \fIinitProc\fR
  37. .BE
  38. .SH DESCRIPTION
  39. .PP
  40. The \fBextension\fR command allows one to load extensions as shared
  41. libraries for Tcl. 
  42. .SH COMMAND OPTIONS
  43. The following options are available for the \fBextension\fR command:
  44. .TP
  45. \fBextension add\fR ?\fIname\fR?...
  46. Adds the extension \fIname\fR to the current process.  \fIName\fR.
  47. must be an entry in the global associative array \fBtcl_extensions\fR.
  48. If an entry for \fIname\fR doesn't exist or the variable \fBtcl_extensions\fR
  49. doesn't exist, an error message is returned.
  50. This command returns the empty string.  
  51. .TP
  52. \fBextension libs\fR
  53. Lists the pathnames of the libraries currently loaded.
  54. .TP
  55. \fBextension linit \fIinitProc\fR
  56. Calls the C function \fIinitProc\fR to initialize an extension.
  57. \fIInitProc\fR must be a valid entry point in a library that
  58. has already been loaded (see the \fBlload\fR option).
  59. This command returns the empty string.
  60. .TP
  61. \fBextension lload \fIlibrary\fR 
  62. Loads the shared library \fIlibrary\fR into the current process.
  63. If the library has already been loaded, it will not be loaded again.
  64. This command returns the empty string.
  65. .SH EXTENSIONS FILE
  66. The first time the \fBextension\fR command is run it tries to source 
  67. the file "[tcl library]/extensions.tcl".  This file can be used to 
  68. specify the extensions available and their respective libraries.
  69. You can always use the low-level commands to load a library too.
  70. .PP
  71. This file sets two global variables which the \fBextension\fR command 
  72. uses to find shared libraries.
  73. .PP
  74. The first is an associative array \fCtcl_extensions\fR.  This array
  75. maps an extension name (such as "blt") with the proper initialization
  76. routine and shared libraries.
  77. .DS
  78. \fCset tcl_extensions(blt) { Blt_Init libBLT.so.1.7 }\fR
  79. .DE
  80. The second variable is \fCtcl_extloadpath\fR.  This variable is a list
  81. of directories to search for the library.  
  82. .DS
  83. \fCset tcl_extloadpath { 
  84.     /usr/local/tcl/extensions/lib 
  85.     /usr/local/lib 
  86. }\fR
  87. .DE
  88. .PP
  89. By default, the "extension" command looks for the file 
  90. "[tcl library]/extensions.tcl".  But you can override this by 
  91. setting the environment variable \fCTCL_EXTMAP\fR.  
  92. .DS
  93. \fCset env(TCL_EXTMAP) /u/mydir/my_extensions.tcl\fR
  94. .DE
  95. .SH SYSTEMS
  96. The \fBextension\fR command has been tested on HP-UX, SunOS 4.x, and
  97. SunOS 5.x.  It should work also on ISIX 5.x, OSF1.
  98. .SH KEYWORDS
  99. extension
  100.