[latex3-commits] [latex3/latex2e] sockets: documentation updates (bf41a95c)

github at latex-project.org github at latex-project.org
Sat Aug 5 13:57:27 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : sockets
Link       : https://github.com/latex3/latex2e/commit/bf41a95c874ea61108d52a27e16280cfb6e68d14

>---------------------------------------------------------------

commit bf41a95c874ea61108d52a27e16280cfb6e68d14
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sat Aug 5 13:57:27 2023 +0200

    documentation updates


>---------------------------------------------------------------

bf41a95c874ea61108d52a27e16280cfb6e68d14
 base/changes.txt      |  5 +++++
 base/doc/ltnews38.tex |  7 +++++++
 base/ltsockets.dtx    | 52 +++++++++++++++++++++++++++++++--------------------
 3 files changed, 44 insertions(+), 20 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 24e63cf1..31f0b3c4 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2023-08-05  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltsockets.dtx:
+	First implementation of the sockets module.
+
 2023-07-10 Marcel Krüger  <marcel.krueger at latex-project.org>
 
 	* ltluatex.dtx
diff --git a/base/doc/ltnews38.tex b/base/doc/ltnews38.tex
index c527c8e4..893d78aa 100644
--- a/base/doc/ltnews38.tex
+++ b/base/doc/ltnews38.tex
@@ -142,6 +142,13 @@
 \section{Introduction}
 
 
+\section{Sockets and plugs}
+
+\emph{write}
+
+For documentation see \texttt{texdoc ltsockets-doc} for now.
+
+
 \section{New or improved commands}
 
 %
diff --git a/base/ltsockets.dtx b/base/ltsockets.dtx
index 55e8cdd2..d4078e51 100644
--- a/base/ltsockets.dtx
+++ b/base/ltsockets.dtx
@@ -626,11 +626,12 @@
 % \end{function}
 %
 % 
-% \begin{function}{\DebugSocketsOn,\DebugSocketsOff}
+% \begin{function}{\DebugSocketsOn,\DebugSocketsOff,
+%                  \socket_debug_on:,\socket_debug_off:}
 % \begin{syntax}
 % \cs{DebugSocketsOn} \ldots\ \cs{DebugSocketsOff}
 % \end{syntax}
-%   Turns debugging of sockets on or off.\fmi{implement}
+%   Turns debugging of sockets on or off.
 % \end{function}
 %
 % \subsubsection{Rationale for error handling}
@@ -657,10 +658,10 @@
 %
 % \section{The Implementation}
 %
-%    The implementation of the socket mechanism should be redone and we
-%    should probably store the different code chunks in a property
-%    list so that we can have a decent \cs{ShowSocket} command the shows
-%    the available alternatives.
+%    The implementation of the socket mechanism should be (partially)
+%    redone and we should probably store the different code chunks in
+%    a property list so that we can have a decent \cs{ShowSocket}
+%    command the shows the available alternatives.\fmi{implement?}
 %
 %    \begin{macrocode}
 %<*2ekernel|latexrelease>
@@ -702,9 +703,14 @@
 %  \begin{macro}{\socket_debug_on:,\socket_debug_off:}
 %  \begin{macro}{\@@_debug:n, \@@_debug_term:n}
 %  \begin{macro}{\@@_debug_gset:}
-%    Turns debugging on and off by redefining \cs{@@_debug:n}.
+%    Turns debugging on and off by redefining \cs{@@_debug:n} and
+%    \cs{@@_debug_term:n}. By default they do nothing.
 %    \begin{macrocode}
 \cs_new_eq:NN \@@_debug:n \use_none:n
+\cs_new_eq:NN \@@_debug_term:n \use_none:n
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \cs_new_protected:Npn \socket_debug_on:
   {
     \bool_gset_true:N \g_@@_debug_bool
@@ -780,16 +786,21 @@
   \typeout{ Socket~ #1:}
   \str_if_exist:cTF { l_@@_#1_plug_str }
       {
-        \typeout{ \@spaces number~ of~ arguments~ =~ \int_use:c { c_@@_#1_args_int } }
+        \typeout{ \@spaces number~ of~ arguments~ =~
+                  \int_use:c { c_@@_#1_args_int } }
         \typeout{ \@spaces available~plugs~ =~
-                     \seq_use:cnnn { l_@@_#1_plugs_seq }{,~}{,~}{,~} }
-        \typeout{ \@spaces current~ plug~ =~ \str_use:c { l_@@_#1_plug_str } }
+                  \seq_use:cnnn { l_@@_#1_plugs_seq }{,~}{,~}{,~} }
+        \typeout{ \@spaces current~ plug~ =~
+                  \str_use:c { l_@@_#1_plug_str } }
         \typeout{ \@spaces definition~ =~
-          \exp_args:Nc \cs_meaning:N 
-                       { _@@_#1_plug_ \str_use:c { l_@@_#1_plug_str } :w } }
+                  \exp_args:Nc \cs_meaning:N 
+                    { _@@_#1_plug_ \str_use:c { l_@@_#1_plug_str } :w } }
         \typeout{}
       }
       {
+%    \end{macrocode}
+%    If we are showing a socket it is not an error if it doesn't exist.
+%    \begin{macrocode}
         \typeout { Socket~ is~ not~ declared! }
       }
 }
@@ -906,7 +917,8 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \socket_use:nw #1 {
   \@@_debug_term:n
-    { Socket~ '#1'~containing~ plug~ '\str_use:c { l_@@_#1_plug_str }'~ used. }
+     { Socket~ '#1'~containing~ plug~
+       '\str_use:c { l_@@_#1_plug_str }'~ used. }
   \use:c { _@@_#1_plug_ \str_use:c { l_@@_#1_plug_str } :w }
 }
 %    \end{macrocode}
@@ -939,8 +951,8 @@
 %    \begin{macrocode}
 \msg_new:nnnn { socket } { already-declared }
     { Socket~ '#1'~ already~ declared! }
-    { A~ socket~ can~ only~ be~ declared~ once.~ The~ name~ '#1'~ is~ already~
-      taken.~ Use~ \ShowSocket{#1}~ to~ see~ its~ definition. }
+    { A~ socket~ can~ only~ be~ declared~ once.~ The~ name~ '#1'~ is~
+      already~ taken.~ Use~ \ShowSocket{#1}~ to~ see~ its~ definition. }
       
 \msg_new:nnnn { socket } { undeclared }
     { Socket~ '#1'~ undeclared! }
@@ -955,14 +967,14 @@
 %    \begin{macrocode}
 \msg_new:nnnn { socket } { plug-already-declared }
     { Plug~ '#2'~ for~ socket~ '#1'~ already~ declared! }
-    { You~ can't~ change~ an~ existing~ plug~ with~ \NewSocketPlug~ and~ it~ is~ 
-      normally~ not~ sensible~ to~ do~ so.~ Use~ the~ L3~ programming~ layer~ 
-      function~ \socket_set_plug:nnn~ if~ you~ really~ have~ to. }
+    { You~ can't~ change~ an~ existing~ plug~ with~ \NewSocketPlug~ and~ it~
+      is~  normally~ not~ sensible~ to~ do~ so.~ Use~ the~ L3~ programming~
+      layer~  function~ \socket_set_plug:nnn~ if~ you~ really~ have~ to. }
     
 \msg_new:nnnn { socket } { plug-undeclared }
     { Plug~ '#2'~ for~ socket~ '#1'~ undeclared! }
-    { The~ plug~ name~ is~ unknown.~ Is~ the~ name~ misspelled~ or~ did~ you~ intend~ 
-      to~ assign~ it~ to~ a~ different~ socket? }
+    { The~ plug~ name~ is~ unknown.~ Is~ the~ name~ misspelled~ or~ did~ you~
+      intend~  to~ assign~ it~ to~ a~ different~ socket? }
 %    \end{macrocode}
 %    
 %    \begin{macrocode}





More information about the latex3-commits mailing list.