texlive[43725] Master/texmf-dist: texosquery

commits+karl at tug.org commits+karl at tug.org
Mon Apr 10 00:40:46 CEST 2017


Revision: 43725
          http://tug.org/svn/texlive?view=revision&revision=43725
Author:   karl
Date:     2017-04-10 00:40:45 +0200 (Mon, 10 Apr 2017)
Log Message:
-----------
texosquery

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/support/texosquery/CHANGES
    trunk/Master/texmf-dist/doc/support/texosquery/texosquery.pdf
    trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.jar
    trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.jar
    trunk/Master/texmf-dist/scripts/texosquery/texosquery.jar
    trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java
    trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQueryJRE8.java
    trunk/Master/texmf-dist/source/support/texosquery/texosquery-jre5.batch
    trunk/Master/texmf-dist/source/support/texosquery/texosquery-jre8.batch
    trunk/Master/texmf-dist/source/support/texosquery/texosquery.batch
    trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx
    trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty
    trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex

Modified: trunk/Master/texmf-dist/doc/support/texosquery/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/support/texosquery/CHANGES	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/doc/support/texosquery/CHANGES	2017-04-09 22:40:45 UTC (rev 43725)
@@ -1,3 +1,13 @@
+1.3 (2017/03/31):
+
+ * If 'openin_any' hasn't been set, the fallback value for
+   texosquery.jar and texosquery-jre5.jar is now 'a'
+   (instead of 'p'). Fallback value for texosquery-jre8.jar
+   is still 'p'.
+
+  * Fixed spaces in path issue for the Windows .bat files.
+    (https://github.com/nlct/texosquery/issues/2)
+
 1.2.1 (2017/03/28):
 
  * Minor bug fix in texosquery.tex (fixed decimal separator

Modified: trunk/Master/texmf-dist/doc/support/texosquery/texosquery.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.jar
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.jar
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery.jar
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java	2017-04-09 22:40:45 UTC (rev 43725)
@@ -280,6 +280,15 @@
    }
 
     /**
+     * Fallback for openin_any if not found.
+     * @since 1.2.2
+     */
+   public char openinFallbackValue()
+   {
+      return OPENIN_A;
+   }
+
+    /**
      * Queries if the given file may be read according to
      * openin_any. Since the user may not require any of the file
      * access functions, the openin variable is only set the first
@@ -287,7 +296,9 @@
      * kpsewhich is used to lookup the value of openin_any, which
      * may have one of the following values: a (any), r (restricted,
      * no hidden files) or p (paranoid, as restricted and no parent
-     * directories and no absolute paths except under $TEXMFOUTPUT)
+     * directories and no absolute paths except under $TEXMFOUTPUT).
+     * Apparently with MikTeX, this variable isn't available, so we
+     * need a fallback for that case.
      * @param file The file to be checked
      * @return true if read-access allowed
      * @since 1.2
@@ -325,10 +336,12 @@
                }
                else
                {
-                  // This shouldn't occur, but just in case...
-                  debug(String.format("Invalid openin_any value: %s",
-                     result));
-                  openin = OPENIN_P;
+                  // openin_any variable hasn't been set, use the
+                  // fallback value.
+                  openin = openinFallbackValue();
+                  debug(String.format(
+                     "Invalid openin_any value: %s%nUsing fallback value: %s",
+                     result, openin));
                }
             }
             catch (Exception e)
@@ -4299,8 +4312,8 @@
     
    public static final int DEFAULT_COMPATIBLE=2;
 
-   private static final String VERSION_NUMBER = "1.2.1";
-   private static final String VERSION_DATE = "2017-03-28";
+   private static final String VERSION_NUMBER = "1.3";
+   private static final String VERSION_DATE = "2017-03-31";
    private static final char BACKSLASH = '\\';
    private static final long ZERO = 0L;
 
@@ -4313,10 +4326,10 @@
    /**
     * openin_any settings
     */
-   private static final char OPENIN_UNSET=0; // unset
-   private static final char OPENIN_A='a'; // any
-   private static final char OPENIN_R='r'; // restricted
-   private static final char OPENIN_P='p'; // paranoid
+   protected static final char OPENIN_UNSET=0; // unset
+   protected static final char OPENIN_A='a'; // any
+   protected static final char OPENIN_R='r'; // restricted
+   protected static final char OPENIN_P='p'; // paranoid
 
    private char openin = OPENIN_UNSET;
 

Modified: trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQueryJRE8.java
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQueryJRE8.java	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQueryJRE8.java	2017-04-09 22:40:45 UTC (rev 43725)
@@ -33,6 +33,16 @@
       super("texosquery-jre8");
    }
 
+    /**
+     * Fallback for openin_any if not found.
+     * @since 1.2.2
+     * @Override
+     */
+   public char openinFallbackValue()
+   {
+      return OPENIN_P;
+   }
+
    /**
     * Converts the given directory to a canonical path
     * and checks to make sure it has a parent directory.

Modified: trunk/Master/texmf-dist/source/support/texosquery/texosquery-jre5.batch
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/texosquery-jre5.batch	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/source/support/texosquery/texosquery-jre5.batch	2017-04-09 22:40:45 UTC (rev 43725)
@@ -1,4 +1,4 @@
 
 @ECHO OFF
-FOR /F %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar') DO SET JARPATH=%%I
+FOR /F "tokens=*" %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar') DO SET JARPATH=%%I
 java -jar "%JARPATH%" %*

Modified: trunk/Master/texmf-dist/source/support/texosquery/texosquery-jre8.batch
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/texosquery-jre8.batch	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/source/support/texosquery/texosquery-jre8.batch	2017-04-09 22:40:45 UTC (rev 43725)
@@ -1,4 +1,4 @@
 
 @ECHO OFF
-FOR /F %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar') DO SET JARPATH=%%I
+FOR /F "tokens=*" %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar') DO SET JARPATH=%%I
 java -Djava.locale.providers=CLDR,JRE -jar "%JARPATH%" %*

Modified: trunk/Master/texmf-dist/source/support/texosquery/texosquery.batch
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/texosquery.batch	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/source/support/texosquery/texosquery.batch	2017-04-09 22:40:45 UTC (rev 43725)
@@ -1,4 +1,4 @@
 
 @ECHO OFF
-FOR /F %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar') DO SET JARPATH=%%I
+FOR /F "tokens=*" %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar') DO SET JARPATH=%%I
 java -jar "%JARPATH%" %*

Modified: trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx	2017-04-09 22:40:45 UTC (rev 43725)
@@ -123,7 +123,7 @@
 %\author{Nicola L. C. Talbot\\
 %\href{http://www.dickimaw-books.com/}{\nolinkurl{dickimaw-books.com}}
 %\and Paulo Cereda}
-%\date{2017-03-28 (v1.2.1)}
+%\date{2017-03-31 (v1.3)}
 %\maketitle
 %
 %\begin{abstract}
@@ -595,6 +595,17 @@
 %absolute path that isn't under \texttt{\$TEXMFOUTPUT} (assuming
 %that environment variable hasn't been set to \file{/tmp}).
 %
+%\subsection{MikTeX}
+%Apparently MikTeX doesn't support the \texttt{openin\_any}
+%variable, so if this is unset, \file{texosquery.jar} and
+%\file{texosquery-jre5.jar} will fallback on \qt{\texttt{a}}, but
+%the stricter \file{texosquery-jre8.jar} will fallback on
+%\qt{\texttt{p}}.
+%
+%Note that MiKTeX disables piped input by default for security
+%reasons. Since \cs{TeXOSQuery} relies on piped input, you'll need
+%to enable it with \texttt{-{}-enable-pipes} when you run \TeX.
+%
 %\subsection{Return Values}
 %\label{sec:returnvalues}
 %The return values may include literal text where special characters
@@ -2582,7 +2593,7 @@
 %    \end{macrocode}
 % Version info.
 %    \begin{macrocode}
-\expandafter\def\csname ver at texosquery.tex\endcsname{2017/03/28 v1.2.1 (NLCT)}
+\expandafter\def\csname ver at texosquery.tex\endcsname{2017/03/31 v1.3 (NLCT)}
 %    \end{macrocode}
 %
 %\begin{macro}{\@texosquery at warn}
@@ -7565,7 +7576,7 @@
 %Identify package:
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{texosquery}[2017/03/28 v1.2.1 (NLCT)]
+\ProvidesPackage{texosquery}[2017/03/31 v1.3 (NLCT)]
 %    \end{macrocode}
 %Load \file{texosquery.tex}:
 %    \begin{macrocode}
@@ -7677,7 +7688,7 @@
 %\subsubsection{\file{texosquery.bat}}
 %    \begin{macrocode}
 @ECHO OFF
-FOR /F %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar') DO SET JARPATH=%%I
+FOR /F "tokens=*" %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar') DO SET JARPATH=%%I
 java -jar "%JARPATH%" %*
 %    \end{macrocode}
 %\iffalse
@@ -7694,7 +7705,7 @@
 %\subsubsection{\file{texosquery-jre8.bat}}
 %    \begin{macrocode}
 @ECHO OFF
-FOR /F %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar') DO SET JARPATH=%%I
+FOR /F "tokens=*" %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar') DO SET JARPATH=%%I
 java -Djava.locale.providers=CLDR,JRE -jar "%JARPATH%" %*
 %    \end{macrocode}
 %\iffalse
@@ -7711,7 +7722,7 @@
 %\subsubsection{\file{texosquery-jre5.bat}}
 %    \begin{macrocode}
 @ECHO OFF
-FOR /F %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar') DO SET JARPATH=%%I
+FOR /F "tokens=*" %%I IN ('kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar') DO SET JARPATH=%%I
 java -jar "%JARPATH%" %*
 %    \end{macrocode}
 %\iffalse

Modified: trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty	2017-04-09 22:40:45 UTC (rev 43725)
@@ -43,7 +43,7 @@
 %%   Right brace   \}     Tilde         \~}
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{texosquery}[2017/03/28 v1.2.1 (NLCT)]
+\ProvidesPackage{texosquery}[2017/03/31 v1.3 (NLCT)]
 \input{texosquery}
 \endinput
 %%

Modified: trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex	2017-04-09 22:40:10 UTC (rev 43724)
+++ trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex	2017-04-09 22:40:45 UTC (rev 43725)
@@ -54,7 +54,7 @@
   \@texosquery at restore@at
   \expandafter\endinput
 \fi
-\expandafter\def\csname ver at texosquery.tex\endcsname{2017/03/28 v1.2.1 (NLCT)}
+\expandafter\def\csname ver at texosquery.tex\endcsname{2017/03/31 v1.3 (NLCT)}
 \ifx\@tracklang at pkgwarn\undefined
   \ifx\PackageWarning\undefined
     \def\@texosquery at warn#1{%



More information about the tex-live-commits mailing list