Skip to content

Commit

Permalink
website: news updates for next release; use Tcl 8.5 source.htm; notes…
Browse files Browse the repository at this point in the history
… on jtcl -encoding; document resource:/
  • Loading branch information
tpoindex committed Aug 1, 2013
1 parent 6173960 commit 0bc9e4c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/site/apt/docs/index.apt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Packages included in the JTcl distribution

* <<JTcl>> (current version) \
<Note - this package provides the JTcl version, if needed.>
<Note - this is an information package, which provides the JTcl version.>

* {{{./tcl8.4.19/html/TclCmd/dict.htm} dict}} 8.5 \
<Note - this package is provided as a compatibility measure for Tcl 8.4 code using the backported 'dict' package. The 'dict' command is available without requiring this package.>
Expand Down
12 changes: 11 additions & 1 deletion src/site/apt/docs/jtcldifferences.apt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ JTcl Differences from Tcl 8.4
on exit.


[]

* JTcl allows file path names to be prefixed with <<resource:/>> for <open> and <source> commands.
which allow opening or sourcing files that are included on the Java CLASSPATH, or within any
jar file on the CLASSPATH. Resource files may only be opened in read only mode. Note that use of
resource:/ is not supported by the <file> command.


[]

JTcl also includes the following backported 8.5 commands:
Expand All @@ -134,5 +142,7 @@ JTcl Differences from Tcl 8.4

* <<lreverse>>

* <<source -encoding name>> and the <<-encoding>> shell command line option
* <<source -encoding name>> and the <<-encoding>> shell command line option
(e.g., <jtcl -encoding enc-name source.tcl>, where enc-name is a valid JTcl
character encoding.)

18 changes: 14 additions & 4 deletions src/site/apt/news.apt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@
JTcl News
----

July 30, 2013
August 4, 2013

JTcl 2.6.0 has been released. This is primarily a bug fix release.

* Fixed a regression bug where trying to invoke an unknown method with the <<java>>
package caused an exception.
* Fixed a regression bug where trying to invoke an unknown object
method with the <<java>> package caused an exception.

* Added <<JTcl>> as a dummy package, which provides the JTcl version when needed.
* Fixed a bug when trying to decode an invalid Unicode character, could
cause an infinite loop.

* Fixed a bug where <<file normalize>> should not try to resolve last path
component if it is a link.

* Added <<source -encoding encname>> option, as well as
<<jtcl -encoding encname>> option when starting the JTcl command line shell.

* Added <<JTcl>> as a informational package, which provides the JTcl version
when required, <<package require JTcl>>.


Please report bugs and other unexpected behaviors at the JTcl project
Expand Down
48 changes: 28 additions & 20 deletions src/site/resources/docs/tcl8.4.19/html/TclCmd/source.htm
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<HTML><HEAD><TITLE>Built-In Commands - source manual page</TITLE></HEAD><BODY>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><TITLE>source manual page - Built-In Commands</TITLE>
<link rel="stylesheet" href="../docs.css" type="text/css" media="all">
</HEAD>
<BODY><H2><a href="../contents.htm">Tcl8.5.9 Documentation</a> <small>&gt;</small> <a href="contents.htm">TclCmd</a> <small>&gt;</small> source</H2>
<H3><A HREF="../UserCmd/contents.htm">Tcl Applications</A> | <A HREF="../TclCmd/contents.htm">Tcl Commands</A> | <A HREF="../TclLib/contents.htm">Tcl Library</A></H3>
<H3><A NAME="M2">NAME</A></H3>
source - Evaluate a file or resource as a Tcl script
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>source </B><I>fileName</I><BR>
<B>source</B> <B>-rsrc </B><I>resourceName </I>?<I>fileName</I>?<BR>
<B>source</B> <B>-rsrcid </B><I>resourceId </I>?<I>fileName</I>?<BR>
<B>source</B> <B>-encoding </B><I>encodingName fileName</I><BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command takes the contents of the specified file or resource
and passes it to the Tcl interpreter as a text script. The return
Expand All @@ -15,21 +20,24 @@ <H3><A NAME="M4">DESCRIPTION</A></H3>
remainder of the file will be skipped and the <B>source</B> command
will return normally with the result from the <B><A HREF="../TclCmd/return.htm">return</A></B> command.
<P>
The end-of-file character for files is '&#92;32' (^Z) for all platforms.
The end-of-file character for files is
&#8220;&#92;32&#8221;
(^Z) for all platforms.
The source command will read files up to this character. This
restriction does not exist for the <B><A HREF="../TclCmd/read.htm">read</A></B> or <B><A HREF="../TclCmd/gets.htm">gets</A></B> commands,
allowing for files containing code and data segments (scripted documents).
If you require a ``^Z'' in code for string comparison, you can use
``&#92;032'' or ``&#92;u001a'', which will be safely substituted by the Tcl
interpreter into ``^Z''.
If you require a
&#8220;^Z&#8221;
in code for string comparison, you can use
&#8220;&#92;032&#8221;
or
&#8220;&#92;u001a&#8221;,
which will be safely substituted by the Tcl interpreter into
&#8220;^Z&#8221;.
<P>
The <I>-rsrc</I> and <I>-rsrcid</I> forms of this command are only
available on Macintosh computers. These versions of the command
allow you to source a script from a <B>TEXT</B> resource. You may specify
what <B>TEXT</B> resource to source by either name or id. By default Tcl
searches all open resource files, which include the current
application and any loaded C extensions. Alternatively, you may
specify the <I>fileName</I> where the <B>TEXT</B> resource can be found.
The <B>-encoding</B> option is used to specify the encoding of
the data stored in <I>fileName</I>. When the <B>-encoding</B> option
is omitted, the system encoding is assumed.
<H3><A NAME="M5">EXAMPLE</A></H3>
Run the script in the file <B>foo.tcl</B> and then the script in the
file <B>bar.tcl</B>:
Expand All @@ -40,12 +48,12 @@ <H3><A NAME="M5">EXAMPLE</A></H3>
<B>source</B> $scriptFile
}</PRE>
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TclCmd/file.htm">file</A></B>, <B><A HREF="../TclCmd/cd.htm">cd</A></B>, <B><A HREF="../TclCmd/info.htm">info</A></B>
<B><A HREF="../TclCmd/file.htm">file</A></B>, <B><A HREF="../TclCmd/cd.htm">cd</A></B>, <B><A HREF="../TclCmd/encoding.htm">encoding</A></B>, <B><A HREF="../TclCmd/info.htm">info</A></B>
<H3><A NAME="M7">KEYWORDS</A></H3>
<A href="../Keywords/F.htm#file">file</A>, <A href="../Keywords/S.htm#script">script</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 2000 Scriptics Corporation.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
<div class="copy">Copyright &copy; 1995-1997 Roger E. Critchlow Jr.
Copyright &copy; 1993 The Regents of the University of California.
Copyright &copy; 1994-1996 Sun Microsystems, Inc.
Copyright &copy; 2000 Scriptics Corporation.
</div>
</BODY></HTML>

0 comments on commit 0bc9e4c

Please sign in to comment.