texlive[42080] Build/source/texk: ChkTeX 1.7.6

commits+kakuto at tug.org commits+kakuto at tug.org
Fri Sep 16 01:02:10 CEST 2016


Revision: 42080
          http://tug.org/svn/texlive?view=revision&revision=42080
Author:   kakuto
Date:     2016-09-16 01:02:10 +0200 (Fri, 16 Sep 2016)
Log Message:
-----------
ChkTeX 1.7.6

Modified Paths:
--------------
    trunk/Build/source/texk/README
    trunk/Build/source/texk/chktex/ChangeLog
    trunk/Build/source/texk/chktex/ChkTeX.pdf
    trunk/Build/source/texk/chktex/ChkTeX.tex
    trunk/Build/source/texk/chktex/chktex-PATCHES/ChangeLog
    trunk/Build/source/texk/chktex/chktex-PATCHES/TL-Changes
    trunk/Build/source/texk/chktex/chktex-src/ChkTeX.c
    trunk/Build/source/texk/chktex/chktex-src/ChkTeX.h
    trunk/Build/source/texk/chktex/chktex-src/ChkTeX.tex.in
    trunk/Build/source/texk/chktex/chktex-src/FindErrs.c
    trunk/Build/source/texk/chktex/chktex-src/FindErrs.h
    trunk/Build/source/texk/chktex/chktex-src/Makefile.in
    trunk/Build/source/texk/chktex/chktex-src/NEWS
    trunk/Build/source/texk/chktex/chktex-src/Test.nore.out
    trunk/Build/source/texk/chktex/chktex-src/Test.pcre.out
    trunk/Build/source/texk/chktex/chktex-src/Test.posix-ere.out
    trunk/Build/source/texk/chktex/chktex-src/Test.tex
    trunk/Build/source/texk/chktex/chktex-src/Utility.c
    trunk/Build/source/texk/chktex/chktex-src/chktexrc
    trunk/Build/source/texk/chktex/chktex-src/configure.in
    trunk/Build/source/texk/chktex/chktex-src/deweb.in
    trunk/Build/source/texk/chktex/configure
    trunk/Build/source/texk/chktex/version.ac

Removed Paths:
-------------
    trunk/Build/source/texk/chktex/chktex-PATCHES/patch-03-late-decl

Modified: trunk/Build/source/texk/README
===================================================================
--- trunk/Build/source/texk/README	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/README	2016-09-15 23:02:10 UTC (rev 42080)
@@ -27,7 +27,7 @@
   bibtexu
     http://omega.enstb.org/yannis/bibtexu/
 
-chktex 1.7.4 - checked 12apr15
+chktex 1.7.6 - checked 15sep16
   http://mirror.ctan.org/support/chktex/
   http://download.savannah.gnu.org/releases/chktex/
 

Modified: trunk/Build/source/texk/chktex/ChangeLog
===================================================================
--- trunk/Build/source/texk/chktex/ChangeLog	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/ChangeLog	2016-09-15 23:02:10 UTC (rev 42080)
@@ -1,3 +1,9 @@
+2016-09-15  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	* Import ChkTeX 1.7.6.
+	* version.ac: adapted.
+	* ChkTeX.tex, ChkTeX.pdf: updated.
+
 2016-02-23  Akira Kakuto  <kakuto at kakuto.fuk.kindai.ac.jp>
 
 	* Makefile.am, configure.ac: New convention.

Modified: trunk/Build/source/texk/chktex/ChkTeX.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/texk/chktex/ChkTeX.tex
===================================================================
--- trunk/Build/source/texk/chktex/ChkTeX.tex	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/ChkTeX.tex	2016-09-15 23:02:10 UTC (rev 42080)
@@ -1,5 +1,5 @@
 %%
-%%  ChkTeX v1.7.4, LaTeX documentation for ChkTeX program.
+%%  ChkTeX v1.7.6, LaTeX documentation for ChkTeX program.
 %%  Copyright (C) 1995-96 Jens T. Berger Thielemann
 %%
 %%  This program is free software; you can redistribute it and/or modify
@@ -82,7 +82,7 @@
 %endlatex
 
 
-\title{\chktex\ v1.7.4}
+\title{\chktex\ v1.7.6}
 \author{Jens~T. Berger~Thielemann}
 \date{\today}
 
@@ -1145,7 +1145,7 @@
   \end{errexam}
 \end{errdesc}
 
-\begin{errdesc}{You should use "'" (ASCII 39)  instead  of
+\begin{errdesc*}{You should use "'" (ASCII 39)  instead  of
     "'" (ASCII 180).} On some keyboards you might get the wrong quote.
   This quote looks, IMHO, \emph{ugly} compared to the standard
   quotes, it doesn't even come out as a quote!  Just see in the
@@ -1160,7 +1160,7 @@
     \verb@``There's quotes and there's quotes''@ \\*
     ``There's quotes and there's quotes'' \\*
   \end{errexam}
-\end{errdesc}
+\end{errdesc*}
 
 \Keyword{UserWarn}
 \begin{errdesc}{User-specified pattern found: \%s.}
@@ -1547,6 +1547,21 @@
   \end{errexam}
 \end{errdesc}
 
+\begin{errdesc}{Use \textbackslash[ ... \textbackslash] instead of \$\$ ... \$\$.}
+
+  In \LaTeX\ documents, using \verb+\[...\]+ is strongly preferred over \verb+$$...$$+.
+  This is because using \verb+$$+ will change the vertical spacing in the
+  equations making them inconsistent.
+
+\end{errdesc}
+
+\begin{errdesc*}{Use \textbackslash( ... \textbackslash) instead of \$ ... \$.}
+
+  In \LaTeX\ documents using \verb+\(...\)+ is slightly preferred over \verb+$...$+.
+  Some error messages might be clearer with \verb+\(...\)+.
+
+\end{errdesc*}
+
 \section{Future plans}
 
 In a somewhat prioritized sequence, this is what I'd like to put into the

Modified: trunk/Build/source/texk/chktex/chktex-PATCHES/ChangeLog
===================================================================
--- trunk/Build/source/texk/chktex/chktex-PATCHES/ChangeLog	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-PATCHES/ChangeLog	2016-09-15 23:02:10 UTC (rev 42080)
@@ -1,3 +1,8 @@
+2016-09-15  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	* Import chktex-1.7.6.
+	* patch-03-late-decl: remove, since now applied.
+
 2015-04-12  Karl Berry  <karl at tug.org>
 
 	* Import chktex-1.7.4.

Modified: trunk/Build/source/texk/chktex/chktex-PATCHES/TL-Changes
===================================================================
--- trunk/Build/source/texk/chktex/chktex-PATCHES/TL-Changes	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-PATCHES/TL-Changes	2016-09-15 23:02:10 UTC (rev 42080)
@@ -1,6 +1,6 @@
-Changes applied to the chktex-1.7.4 tree as obtained from:
+Changes applied to the chktex-1.7.6 tree as obtained from:
 	http://mirror.ctan.org/support/chktex/
-	http://download.savannah.gnu.org/releases/chktex/chktex-1.7.4.tar.gz
+	http://download.savannah.gnu.org/releases/chktex/chktex-1.7.6.tar.gz
 
 Remove:
 	aclocal.m4
@@ -11,4 +11,3 @@
 
 Rename:
 	chkweb -> chkweb.sh
-

Deleted: trunk/Build/source/texk/chktex/chktex-PATCHES/patch-03-late-decl
===================================================================
--- trunk/Build/source/texk/chktex/chktex-PATCHES/patch-03-late-decl	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-PATCHES/patch-03-late-decl	2016-09-15 23:02:10 UTC (rev 42080)
@@ -1,13 +0,0 @@
-diff -ur chktex-1.7.4.orig/FindErrs.c chktex-1.7.4/FindErrs.c
---- chktex-1.7.4.orig/FindErrs.c	2015-04-11 20:37:49.000000000 +0200
-+++ chktex-1.7.4/FindErrs.c	2015-04-12 03:17:11.000000000 +0200
-@@ -1059,8 +1059,8 @@
-                     {
-                         if ( *e == '-' && 0 == strncmp( BufPtr, e, strlen(e) ) )
-                         {
--                            TmpPtr = BufPtr;
-                             char *f = e;
-+                            TmpPtr = BufPtr;
-                             while ( f > exception && *(--f) == *(--TmpPtr) )
-                             {
-                                 /* Nothing */

Modified: trunk/Build/source/texk/chktex/chktex-src/ChkTeX.c
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/ChkTeX.c	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/ChkTeX.c	2016-09-15 23:02:10 UTC (rev 42080)
@@ -96,8 +96,9 @@
     "ChkTeX comes with ABSOLUTELY NO WARRANTY; details on this and\n"
     "distribution conditions in the GNU General Public License file.\n"
     "Type \"ChkTeX -h\" for help, \"ChkTeX -i\" for distribution info.\n"
-    "Author: Jens Berger, Spektrumvn. 4, N-0666 Oslo, Norway.\n"
-    "E-mail: <jensthi at ifi.uio.no>\n"
+    "Author: Jens Berger.\n"
+    "Bug reports: https://savannah.nongnu.org/bugs/?group=chktex\n"
+    "             or darthandrus at gmail.com\n"
     "Press " STDIN_BREAK " to terminate stdin input.\n";
 
 static const char *Distrib =
@@ -337,7 +338,7 @@
 
 int main(int argc, char **argv)
 {
-    int retval = EXIT_FAILURE, CurArg;
+    int retval = EXIT_FAILURE, ret, CurArg;
     unsigned long Count;
     int StdInUse = FALSE;
     long Tab = 8;
@@ -380,6 +381,7 @@
 
     if ((CurArg = ParseArgs((unsigned long) argc, argv)))
     {
+        retval = EXIT_SUCCESS;
         if (CmdLine.Stack.Used)
         {
             ParseArgs(CmdLine.Stack.Used, (char **) CmdLine.Stack.Data);
@@ -491,11 +493,13 @@
                             strcpy(ReadBuffer, TmpBuffer);
 
                             strcat(ReadBuffer, " ");
-                            FindErr(ReadBuffer, CurStkLine(&InputStack));
+                            ret = FindErr(ReadBuffer, CurStkLine(&InputStack));
+                            if ( ret != EXIT_SUCCESS ) {
+                                retval = ret;
+                            }
                         }
 
                         PrintStatus(CurStkLine(&InputStack));
-                        retval = EXIT_SUCCESS;
                     }
                 }
             }

Modified: trunk/Build/source/texk/chktex/chktex-src/ChkTeX.h
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/ChkTeX.h	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/ChkTeX.h	2016-09-15 23:02:10 UTC (rev 42080)
@@ -104,6 +104,10 @@
 #if defined(__unix__) || defined(__unix) || defined(unix)
 #undef __unix__
 #define __unix__ 1
+#elif defined(__APPLE__) && defined(__MACH__)
+/* OS X should be considered a UNIX */
+#undef __unix__
+#define __unix__ 1
 #elif defined(MSDOS) || defined(__MSDOS__) || defined(__msdos__)
 #undef __MSDOS__
 #define __MSDOS__ 1
@@ -272,8 +276,8 @@
 struct ErrInfo
 {
     char *Data;
-    const char *LineBuf;
-    const char *File;
+    char *LineBuf;
+    char *File;
     unsigned long Line, Column, ErrLen;
     enum
     {

Modified: trunk/Build/source/texk/chktex/chktex-src/ChkTeX.tex.in
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/ChkTeX.tex.in	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/ChkTeX.tex.in	2016-09-15 23:02:10 UTC (rev 42080)
@@ -1145,7 +1145,7 @@
   \end{errexam}
 \end{errdesc}
 
-\begin{errdesc}{You should use "'" (ASCII 39)  instead  of
+\begin{errdesc*}{You should use "'" (ASCII 39)  instead  of
     "'" (ASCII 180).} On some keyboards you might get the wrong quote.
   This quote looks, IMHO, \emph{ugly} compared to the standard
   quotes, it doesn't even come out as a quote!  Just see in the
@@ -1160,7 +1160,7 @@
     \verb@``There's quotes and there's quotes''@ \\*
     ``There's quotes and there's quotes'' \\*
   \end{errexam}
-\end{errdesc}
+\end{errdesc*}
 
 \Keyword{UserWarn}
 \begin{errdesc}{User-specified pattern found: \%s.}
@@ -1547,6 +1547,21 @@
   \end{errexam}
 \end{errdesc}
 
+\begin{errdesc}{Use \textbackslash[ ... \textbackslash] instead of \$\$ ... \$\$.}
+
+  In \LaTeX\ documents, using \verb+\[...\]+ is strongly preferred over \verb+$$...$$+.
+  This is because using \verb+$$+ will change the vertical spacing in the
+  equations making them inconsistent.
+
+\end{errdesc}
+
+\begin{errdesc*}{Use \textbackslash( ... \textbackslash) instead of \$ ... \$.}
+
+  In \LaTeX\ documents using \verb+\(...\)+ is slightly preferred over \verb+$...$+.
+  Some error messages might be clearer with \verb+\(...\)+.
+
+\end{errdesc*}
+
 \section{Future plans}
 
 In a somewhat prioritized sequence, this is what I'd like to put into the

Modified: trunk/Build/source/texk/chktex/chktex-src/FindErrs.c
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/FindErrs.c	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/FindErrs.c	2016-09-15 23:02:10 UTC (rev 42080)
@@ -51,6 +51,10 @@
 
 #endif
 
+int FoundErr = EXIT_SUCCESS;
+int LastWasComment = FALSE;
+int SeenSpace = FALSE;
+
 /***************************** ERROR MESSAGES ***************************/
 
 #undef MSG
@@ -148,7 +152,6 @@
 static unsigned long Line;
 
 static const char *RealBuf;
-static char *LineCpy = NULL;
 static char *BufPtr;
 
 static int ItFlag = efNone;
@@ -292,17 +295,6 @@
 }
 
 
-static char *MakeCpy(void)
-{
-    if (!LineCpy)
-        LineCpy = strdup(RealBuf);
-
-    if (!LineCpy)
-        PrintPrgErr(pmStrDupErr);
-
-    return (LineCpy);
-}
-
 static char *PreProcess(void)
 {
     char *TmpPtr;
@@ -317,6 +309,7 @@
 
     TmpPtr = Buf;
 
+    LastWasComment = FALSE;
     while ((TmpPtr = strchr(TmpPtr, '%')))
     {
         char *EscapePtr = TmpPtr;
@@ -330,6 +323,7 @@
         /* If there is an even number of backslashes, then it's a comment. */
         if ((NumBackSlashes % 2) == 0)
         {
+            LastWasComment = TRUE;
             PSERR(TmpPtr - Buf, 1, emComment);
             *TmpPtr = 0;
             /* Check for line suppressions */
@@ -668,7 +662,7 @@
             if (CmdBuffer[1] == 'b')
             {
                 if (!(PushErr(ArgBuffer, Line, CmdPtr - Buf,
-                              CmdLen, MakeCpy(), &EnvStack)))
+                              CmdLen, RealBuf, &EnvStack)))
                     PrintPrgErr(pmNoStackMem);
             }
             else
@@ -703,7 +697,7 @@
         {
             TmpPtr = CmdBuffer + 6;
             if (!(PushErr(TmpPtr, Line, CmdPtr - Buf + 6,
-                          CmdLen - 6, MakeCpy(), &EnvStack)))
+                          CmdLen - 6, RealBuf, &EnvStack)))
                 PrintPrgErr(pmNoStackMem);
         }
         else
@@ -851,12 +845,15 @@
                     {
                         CommentEnd = strchr(pattern, ')');
                         /* TODO: check for PCRE/POSIX only regexes */
-                        *CommentEnd = '\0';
-                        /* We're leaking a little here, but this was never freed until exit anyway... */
-                        UserWarnRegex.Stack.Data[NumRegexes] = pattern+3;
+                        if ( CommentEnd != NULL )
+                        {
+                            *CommentEnd = '\0';
+                            /* We're leaking a little here, but this was never freed until exit anyway... */
+                            UserWarnRegex.Stack.Data[NumRegexes] = pattern+3;
 
-                        /* Compile past the end of the comment so that it works with POSIX too. */
-                        pattern = CommentEnd + 1;
+                            /* Compile past the end of the comment so that it works with POSIX too. */
+                            pattern = CommentEnd + 1;
+                        }
                     }
 
                     /* Ignore PCRE and POSIX specific regexes.
@@ -958,7 +955,17 @@
                                (int)(MATCH.rm_eo - MATCH.rm_so),
                                TmpBuffer + offset + MATCH.rm_so);
                     }
-                    offset += MATCH.rm_eo;
+                    if ( MATCH.rm_eo == 0 )
+                    {
+                        /* Break out of loop if the match was empty.
+                         * This avoids an infinite loop when the match
+                         * is empty, e.g $ */
+                        offset = len;
+                    }
+                    else
+                    {
+                        offset += MATCH.rm_eo;
+                    }
 #undef MATCH
                 }
             }
@@ -1164,7 +1171,7 @@
         else                    /* Opening bracket of some sort  */
         {
             if ((ei = PushChar(Char, Line, BufPtr - Buf - 1,
-                               &CharStack, MakeCpy())))
+                               &CharStack, RealBuf)))
             {
                 if (Char == '{')
                 {
@@ -1309,15 +1316,33 @@
 
     enum DotLevel dotlev;
 
+    FoundErr = EXIT_SUCCESS;
+
     if (_RealBuf)
     {
         RealBuf = _RealBuf;
         Line = _Line;
 
+        if (!LastWasComment)
+        {
+            SeenSpace = TRUE;
+        }
         BufPtr = PreProcess();
 
         BufPtr = SkipVerb();
 
+        /* Skip past leading whitespace which is insignificant in TeX to avoid
+         * spurious warnings (Delete this space to maintain correct
+         * pagereferences).  If we have seen a space we don't _need_ to skip
+         * past, and doing so misses Message 30 (Multiple spaces detected).  We
+         * can miss some of Message 30 in the "not SeenSpace" case too, but I
+         * think it's less important, since Message 30 is for newbies.
+         */
+        if (!SeenSpace && BufPtr)
+        {
+            SKIP_AHEAD(BufPtr, TmpC, LATEX_SPACE(TmpC));
+        }
+
         while (BufPtr && *BufPtr)
         {
             PrePtr = BufPtr - 1;
@@ -1623,12 +1648,18 @@
             case '\\':         /* Command encountered  */
                 BufPtr = GetLTXToken(--BufPtr, CmdBuffer);
 
-                if (LATEX_SPACE(*PrePtr))
+                if (SeenSpace)
                 {
+                    /* We must be careful to not point to the "previous space"
+                     * when it was actually on the previous line.  This could
+                     * cause us to write into someone else's memory (inside of
+                     * PrintError). */
                     if (HasWord(CmdBuffer, &Linker))
-                        PSERR(PrePtr - Buf, 1, emNBSpace);
+                        PSERR( (PrePtr > Buf) ? (PrePtr - Buf) : 0,
+                               1, emNBSpace);
                     if (HasWord(CmdBuffer, &PostLink))
-                        PSERR(PrePtr - Buf, 1, emFalsePage);
+                        PSERR( (PrePtr > Buf) ? (PrePtr - Buf) : 0,
+                               1, emFalsePage);
                 }
 
                 if (LATEX_SPACE(*BufPtr) && !MathMode &&
@@ -1683,12 +1714,25 @@
                 if (*PrePtr != '\\')
                 {
                     if (*BufPtr == '$')
+                    {
                         BufPtr++;
+                        TmpPtr = BufPtr;
+                        SKIP_AHEAD(TmpPtr, TmpC, (TmpC != '$' && TmpC != '\0'));
+                        PSERR(BufPtr - Buf - 2, TmpPtr-BufPtr+4, emDisplayMath);
+                    }
+                    else
+                    {
+                        TmpPtr = BufPtr;
+                        SKIP_AHEAD(TmpPtr, TmpC, (TmpC != '$' && TmpC != '\0'));
+                        PSERR(BufPtr - Buf - 1, TmpPtr-BufPtr+2, emInlineMath);
+                    }
                     MathMode ^= TRUE;
                 }
 
                 break;
             }
+
+            SeenSpace = LATEX_SPACE(Char);
         }
 
         if (!VerbMode)
@@ -1698,13 +1742,7 @@
 
     }
 
-    /* Free and reset LineCpy if it was used */
-    if ( LineCpy != NULL )
-    {
-        free(LineCpy);
-        LineCpy = NULL;
-    }
-    return (TRUE);
+    return FoundErr;
 }
 
 /*
@@ -1834,6 +1872,7 @@
             }
             else
             {
+                FoundErr = EXIT_FAILURE;
                 Context = LaTeXMsgs[Error].Context;
 
                 if (!HeadErrOut)

Modified: trunk/Build/source/texk/chktex/chktex-src/FindErrs.h
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/FindErrs.h	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/FindErrs.h	2016-09-15 23:02:10 UTC (rev 42080)
@@ -124,7 +124,11 @@
  MSG(emNoCharMean, etWarn, iuOK, ctNone,\
      "`%s' is normally not followed by `%c'.")\
  MSG(emUserWarnRegex, etWarn, iuOK, ctNone,\
-     "User Regex: %.*s.")
+     "User Regex: %.*s.") \
+ MSG(emDisplayMath, etWarn, iuOK, ctOutMath,\
+     "Use \\[ ... \\] instead of $$ ... $$.")\
+ MSG(emInlineMath, etWarn, iuNotSys, ctOutMath,\
+     "Use \\( ... \\) instead of $ ... $.")
 
 #undef MSG
 #define MSG(num, type, inuse, ctxt, text) num,

Modified: trunk/Build/source/texk/chktex/chktex-src/Makefile.in
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Makefile.in	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/Makefile.in	2016-09-15 23:02:10 UTC (rev 42080)
@@ -124,7 +124,7 @@
 
 OBJS= ChkTeX.o FindErrs.o OpSys.o Resource.o Utility.o
 
-MAKETEST= (builddir=`pwd` ; cd $(srcdir) ; $${builddir}/chktex -mall -r -g0 -lchktexrc -v5 Test.tex)
+MAKETEST= (builddir=`pwd` ; cd $(srcdir) ; $${builddir}/chktex -mall -r -g0 -lchktexrc -v5 Test.tex || :)
 
 # We can't grep the output of chtex because it might not be built yet
 TestOutFile := $(shell sed -n 's/.*HAVE_\(.*RE\) 1.*/\1/p' config.h | tr "A-Z_" "a-z-")
@@ -321,3 +321,6 @@
 	-./chktex -w30 Test.tex
 	-./chktex -g --localrc=.testrc -d2 Test.tex
 	for file in $(CSOURCES); do gcov $(GCOVOPTS) $$file; done
+
+valgrind: chktex
+	valgrind --tool=memcheck --leak-check=full chktex -mall -r -g0 -lchktexrc -v5 Test.tex | grep ^[-=][-=]

Modified: trunk/Build/source/texk/chktex/chktex-src/NEWS
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/NEWS	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/NEWS	2016-09-15 23:02:10 UTC (rev 42080)
@@ -1,6 +1,25 @@
 Development of ChkTeX is now in a maintainance mode.  All versions
 1.6.x are essentially bug fixes.  Version 1.7 added some new features.
 
+1.7.6 (2016-09-09), released by Ivan Andrus <darthandrus at gmail.com>
+
+  * Properly copy and free strings.  This caused incorrect file
+      reporting in some cases #49000
+  * Add "verbatim" commands and environments from tipa #46734
+  * Avoid infinite loop when a regex matches an empty string
+  * Fix crash on invalid regular expression
+  * Add warnings for $$...$$ and $...$ #47044
+  * Update the banner to reflect current bug reporting contacts
+
+1.7.5 (2015-12-07), released by Ivan Andrus <darthandrus at gmail.com>
+
+  * Track whether the previous line ended in a comment #45980
+  * Add a few source code environments to VerbEnvir
+  * Don't show long line warning if the last line doesn't have a newline #46539
+  * Fix deweb's handling of file names #46043,#46042
+  * Use the exit status to indicate warnings were found #45979
+  * Consider OS X a UNIX
+
 1.7.4 (2015-04-11), released by Ivan Andrus <darthandrus at gmail.com>
 
   * Fixed undefined behavior (patch from TeXLive)

Modified: trunk/Build/source/texk/chktex/chktex-src/Test.nore.out
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Test.nore.out	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/Test.nore.out	2016-09-15 23:02:10 UTC (rev 42080)
@@ -14,6 +14,12 @@
 \foo This is an error.  
     ^
 Message 1 in Test.tex: Command terminated with space.
+So is this \foo  
+               ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+\smallskip This is a not. $\foo Neither$ is this.  
+                          ^^^^^^^^^^^^^^
+Message 1 in Test.tex: Command terminated with space.
 \stoptext  
          ^
 Message 9 in Test.tex: `section' expected, found `text'.
@@ -28,6 +34,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 3  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$[(ab)^{-1}]^{-2}$  is not beautiful  
+^^^^^^^^^^^^^^^^^^
 Message 3 in Test.tex: You should enclose the previous parenthesis with `{}'.
 $[(ab)^{-1}]^{-2}$  is not beautiful  
      ^
@@ -37,6 +46,9 @@
 Message 30 in Test.tex: Multiple spaces detected in input.
 $[(ab)^{-1}]^{-2}$  is not beautiful  
                   ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+${{[{(ab)}^{-1}]}}^{-2}$ is beautiful  
+^^^^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 4-6, 28  
 ^
@@ -88,9 +100,15 @@
 Message 7 in Test.tex: Accent command `\'' needs use of `\i'.
 This \'is a test of $\hat{j}$ accents.  
      ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This \'is a test of $\hat{j}$ accents.  
+                    ^^^^^^^^^
 Message 7 in Test.tex: Accent command `\hat' needs use of `\jmath'.
 This \'is a test of $\hat{j}$ accents.  
                      ^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This \'{\i}s a test of $\hat{\jmath}$ accents.  
+                       ^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 8  
 ^
@@ -181,18 +199,42 @@
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
    ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+           ^^^^^^^^^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
               ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                      ^^^^^^^^^
 Message 11 in Test.tex: You should use \cdots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                          ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                                 ^^^^^^^^^^^^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                                     ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                                               ^^^^^^^^^^^^^^^^^^^^
 Message 11 in Test.tex: You should use \cdots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                                                       ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+              ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                            ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                                          ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                                                        ^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 12  
 ^
@@ -275,11 +317,26 @@
 Indexing text \index{text} is fun!  
              ^
 Message 22 in Test.tex: Comment displayed.
+Indexing text%  
+             ^
+Message 30 in Test.tex: Multiple spaces detected in input.
+     \index{text} is fun!  
+ ^^^^
+Message 24 in Test.tex: Delete this space to maintain correct pagereferences.
+     \index{text} is fun!  
+    ^
+Message 22 in Test.tex: Comment displayed.
 % Warning 25  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$5\cdot10^10$  
+^^^^^^^^^^^^^
 Message 25 in Test.tex: You might wish to put this between a pair of `{}'
 $5\cdot10^10$  
           ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$5\cdot10^{10}$  
+^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 26  
 ^
@@ -307,6 +364,9 @@
 Message 29 in Test.tex: $\times$ may look prettier here.
 The program opens a screen sized 640x200 pixels  
                                     ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+The program opens a screen sized $640\times200$ pixels  
+                                 ^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 30  
 ^
@@ -343,6 +403,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 35  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$sin^2 + cos^2 = 1$  
+^^^^^^^^^^^^^^^^^^^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 $sin^2 + cos^2 = 1$  
  ^^^
@@ -349,6 +412,9 @@
 Message 35 in Test.tex: You should perhaps use `\cos' instead.
 $sin^2 + cos^2 = 1$  
          ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\sin^2 + \cos^2 = 1$  
+^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 36-37  
 ^
@@ -394,12 +460,24 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 40  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\this,$ and $$this$$.  
+^^^^^^^^
 Message 40 in Test.tex: You should put punctuation outside inner math mode.
 $\this,$ and $$this$$.  
       ^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$\this,$ and $$this$$.  
+             ^^^^^^^^
 Message 40 in Test.tex: You should put punctuation inside display math mode.
 $\this,$ and $$this$$.  
                      ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\this$, and $$this.$$  
+^^^^^^^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$\this$, and $$this.$$  
+             ^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 41  
 ^
@@ -418,6 +496,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 43  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here is a mistake $\left{x\right}$.  
+                  ^^^^^^^^^^^^^^^^
 Message 43 in Test.tex: `\left' is normally not followed by `{'.
 Here is a mistake $\left{x\right}$.  
                    ^^^^^
@@ -424,6 +505,9 @@
 Message 43 in Test.tex: `\right' is normally not followed by `}'.
 Here is a mistake $\left{x\right}$.  
                           ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This one triggers warning 22 $\left\{x\right\}$.  
+                             ^^^^^^^^^^^^^^^^^^
 Message 21 in Test.tex: This command might not be intended.
 This one triggers warning 22 $\left\{x\right\}$.  
                                    ^^
@@ -430,6 +514,9 @@
 Message 21 in Test.tex: This command might not be intended.
 This one triggers warning 22 $\left\{x\right\}$.  
                                             ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here \chktex\ doesn't complain $\left\lbrace x\right\rbrace$.  
+                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 44 -- user regex -- default message  
 ^
@@ -436,6 +523,18 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 44 -- user regex -- user message  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\not|n$ you have an ugly prime which doesn't divide $n$.  
+          ^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\not|n$ you have an ugly prime which doesn't divide $n$.  
+                                                                ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
+          ^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
+                                                                ^^^
 Message 22 in Test.tex: Comment displayed.
 % Math mode check  
 ^
@@ -442,12 +541,21 @@
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 \ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
             ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+\ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
+                                                                    ^^^^^^^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 \ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
                                                                      ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
+      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Message 36 in Test.tex: You should put a space in front of parenthesis.
 Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
                           ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
+                                        ^^^^^^
 Message 22 in Test.tex: Comment displayed.
 This is\\% a comment. Nothing here should be checked(right)?  
          ^
@@ -457,6 +565,9 @@
 Message 22 in Test.tex: Comment displayed.
 Here(on this line only)is a warning $sin(x)$ suppressed. % chktex 36 chktex 35  
                                                          ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here(on this line only)is a warning $sin(x)$ suppressed. % chktex 36 chktex 35  
+                                    ^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
                                                          ^
@@ -466,6 +577,9 @@
 Message 36 in Test.tex: You should put a space after parenthesis.
 Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
                        ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
+                                    ^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 In section~\ref{sec:4} it is suppressed. % chktex -1  
                                          ^
@@ -484,6 +598,21 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 16,15  
 ^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$$(  
+^^^^^^^
+Message 22 in Test.tex: Comment displayed.
+% Local Variables:  
+^
+Message 22 in Test.tex: Comment displayed.
+% require-final-newline: nil  
+^
+Message 22 in Test.tex: Comment displayed.
+% End:  
+^
+Message 22 in Test.tex: Comment displayed.
+% There should be no newline at the end of this file to test bug #46539 
+^
 Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
 
 

Modified: trunk/Build/source/texk/chktex/chktex-src/Test.pcre.out
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Test.pcre.out	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/Test.pcre.out	2016-09-15 23:02:10 UTC (rev 42080)
@@ -13,6 +13,12 @@
 Message 1 in Test.tex: Command terminated with space.
 \foo This is an error.  
     ^
+Message 1 in Test.tex: Command terminated with space.
+So is this \foo  
+               ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+\smallskip This is a not. $\foo Neither$ is this.  
+                          ^^^^^^^^^^^^^^
 Message 9 in Test.tex: `section' expected, found `text'.
 \stoptext  
      ^^^^
@@ -25,6 +31,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 3  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$[(ab)^{-1}]^{-2}$  is not beautiful  
+^^^^^^^^^^^^^^^^^^
 Message 3 in Test.tex: You should enclose the previous parenthesis with `{}'.
 $[(ab)^{-1}]^{-2}$  is not beautiful  
      ^
@@ -34,6 +43,9 @@
 Message 30 in Test.tex: Multiple spaces detected in input.
 $[(ab)^{-1}]^{-2}$  is not beautiful  
                   ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+${{[{(ab)}^{-1}]}}^{-2}$ is beautiful  
+^^^^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 4-6, 28  
 ^
@@ -85,9 +97,15 @@
 Message 7 in Test.tex: Accent command `\'' needs use of `\i'.
 This \'is a test of $\hat{j}$ accents.  
      ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This \'is a test of $\hat{j}$ accents.  
+                    ^^^^^^^^^
 Message 7 in Test.tex: Accent command `\hat' needs use of `\jmath'.
 This \'is a test of $\hat{j}$ accents.  
                      ^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This \'{\i}s a test of $\hat{\jmath}$ accents.  
+                       ^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 8  
 ^
@@ -178,18 +196,42 @@
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
    ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+           ^^^^^^^^^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
               ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                      ^^^^^^^^^
 Message 11 in Test.tex: You should use \cdots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                          ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                                 ^^^^^^^^^^^^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                                     ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                                               ^^^^^^^^^^^^^^^^^^^^
 Message 11 in Test.tex: You should use \cdots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                                                       ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+              ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                            ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                                          ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                                                        ^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 12  
 ^
@@ -272,11 +314,26 @@
 Indexing text \index{text} is fun!  
              ^
 Message 22 in Test.tex: Comment displayed.
+Indexing text%  
+             ^
+Message 30 in Test.tex: Multiple spaces detected in input.
+     \index{text} is fun!  
+ ^^^^
+Message 24 in Test.tex: Delete this space to maintain correct pagereferences.
+     \index{text} is fun!  
+    ^
+Message 22 in Test.tex: Comment displayed.
 % Warning 25  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$5\cdot10^10$  
+^^^^^^^^^^^^^
 Message 25 in Test.tex: You might wish to put this between a pair of `{}'
 $5\cdot10^10$  
           ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$5\cdot10^{10}$  
+^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 26  
 ^
@@ -304,6 +361,9 @@
 Message 29 in Test.tex: $\times$ may look prettier here.
 The program opens a screen sized 640x200 pixels  
                                     ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+The program opens a screen sized $640\times200$ pixels  
+                                 ^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 30  
 ^
@@ -340,6 +400,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 35  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$sin^2 + cos^2 = 1$  
+^^^^^^^^^^^^^^^^^^^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 $sin^2 + cos^2 = 1$  
  ^^^
@@ -346,6 +409,9 @@
 Message 35 in Test.tex: You should perhaps use `\cos' instead.
 $sin^2 + cos^2 = 1$  
          ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\sin^2 + \cos^2 = 1$  
+^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 36-37  
 ^
@@ -391,12 +457,24 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 40  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\this,$ and $$this$$.  
+^^^^^^^^
 Message 40 in Test.tex: You should put punctuation outside inner math mode.
 $\this,$ and $$this$$.  
       ^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$\this,$ and $$this$$.  
+             ^^^^^^^^
 Message 40 in Test.tex: You should put punctuation inside display math mode.
 $\this,$ and $$this$$.  
                      ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\this$, and $$this.$$  
+^^^^^^^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$\this$, and $$this.$$  
+             ^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 41  
 ^
@@ -415,6 +493,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 43  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here is a mistake $\left{x\right}$.  
+                  ^^^^^^^^^^^^^^^^
 Message 43 in Test.tex: `\left' is normally not followed by `{'.
 Here is a mistake $\left{x\right}$.  
                    ^^^^^
@@ -421,6 +502,9 @@
 Message 43 in Test.tex: `\right' is normally not followed by `}'.
 Here is a mistake $\left{x\right}$.  
                           ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This one triggers warning 22 $\left\{x\right\}$.  
+                             ^^^^^^^^^^^^^^^^^^
 Message 21 in Test.tex: This command might not be intended.
 This one triggers warning 22 $\left\{x\right\}$.  
                                    ^^
@@ -427,6 +511,9 @@
 Message 21 in Test.tex: This command might not be intended.
 This one triggers warning 22 $\left\{x\right\}$.  
                                             ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here \chktex\ doesn't complain $\left\lbrace x\right\rbrace$.  
+                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 44 -- user regex -- default message  
 ^
@@ -433,9 +520,21 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 44 -- user regex -- user message  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\not|n$ you have an ugly prime which doesn't divide $n$.  
+          ^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\not|n$ you have an ugly prime which doesn't divide $n$.  
+                                                                ^^^
 Message 44 in Test.tex: User Regex: Always use \nmid.
 For every $p\not|n$ you have an ugly prime which doesn't divide $n$.  
             ^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
+          ^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
+                                                                ^^^
 Message 22 in Test.tex: Comment displayed.
 % Math mode check  
 ^
@@ -442,12 +541,21 @@
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 \ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
             ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+\ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
+                                                                    ^^^^^^^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 \ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
                                                                      ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
+      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Message 36 in Test.tex: You should put a space in front of parenthesis.
 Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
                           ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
+                                        ^^^^^^
 Message 22 in Test.tex: Comment displayed.
 This is\\% a comment. Nothing here should be checked(right)?  
          ^
@@ -457,6 +565,9 @@
 Message 22 in Test.tex: Comment displayed.
 Here(on this line only)is a warning $sin(x)$ suppressed. % chktex 36 chktex 35  
                                                          ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here(on this line only)is a warning $sin(x)$ suppressed. % chktex 36 chktex 35  
+                                    ^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
                                                          ^
@@ -466,6 +577,9 @@
 Message 36 in Test.tex: You should put a space after parenthesis.
 Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
                        ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
+                                    ^^^^^^^^
 Message 44 in Test.tex: User Regex: -1:Capitalize before references.
 In section~\ref{sec:3} we have a warning.  
    ^^^^^^^^^^^^
@@ -493,6 +607,21 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 16,15  
 ^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$$(  
+^^^^^^^
+Message 22 in Test.tex: Comment displayed.
+% Local Variables:  
+^
+Message 22 in Test.tex: Comment displayed.
+% require-final-newline: nil  
+^
+Message 22 in Test.tex: Comment displayed.
+% End:  
+^
+Message 22 in Test.tex: Comment displayed.
+% There should be no newline at the end of this file to test bug #46539 
+^
 Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
 
 

Modified: trunk/Build/source/texk/chktex/chktex-src/Test.posix-ere.out
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Test.posix-ere.out	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/Test.posix-ere.out	2016-09-15 23:02:10 UTC (rev 42080)
@@ -13,6 +13,12 @@
 Message 1 in Test.tex: Command terminated with space.
 \foo This is an error.  
     ^
+Message 1 in Test.tex: Command terminated with space.
+So is this \foo  
+               ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+\smallskip This is a not. $\foo Neither$ is this.  
+                          ^^^^^^^^^^^^^^
 Message 9 in Test.tex: `section' expected, found `text'.
 \stoptext  
      ^^^^
@@ -25,6 +31,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 3  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$[(ab)^{-1}]^{-2}$  is not beautiful  
+^^^^^^^^^^^^^^^^^^
 Message 3 in Test.tex: You should enclose the previous parenthesis with `{}'.
 $[(ab)^{-1}]^{-2}$  is not beautiful  
      ^
@@ -34,6 +43,9 @@
 Message 30 in Test.tex: Multiple spaces detected in input.
 $[(ab)^{-1}]^{-2}$  is not beautiful  
                   ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+${{[{(ab)}^{-1}]}}^{-2}$ is beautiful  
+^^^^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 4-6, 28  
 ^
@@ -85,9 +97,15 @@
 Message 7 in Test.tex: Accent command `\'' needs use of `\i'.
 This \'is a test of $\hat{j}$ accents.  
      ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This \'is a test of $\hat{j}$ accents.  
+                    ^^^^^^^^^
 Message 7 in Test.tex: Accent command `\hat' needs use of `\jmath'.
 This \'is a test of $\hat{j}$ accents.  
                      ^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This \'{\i}s a test of $\hat{\jmath}$ accents.  
+                       ^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 8  
 ^
@@ -178,18 +196,42 @@
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
    ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+           ^^^^^^^^^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
               ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                      ^^^^^^^^^
 Message 11 in Test.tex: You should use \cdots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                          ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                                 ^^^^^^^^^^^^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                                     ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
+                                               ^^^^^^^^^^^^^^^^^^^^
 Message 11 in Test.tex: You should use \cdots to achieve an ellipsis.
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.  
                                                       ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+              ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                            ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                                          ^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. $1\cdot\cdots\cdot3$.  
+                                                        ^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 12  
 ^
@@ -272,11 +314,26 @@
 Indexing text \index{text} is fun!  
              ^
 Message 22 in Test.tex: Comment displayed.
+Indexing text%  
+             ^
+Message 30 in Test.tex: Multiple spaces detected in input.
+     \index{text} is fun!  
+ ^^^^
+Message 24 in Test.tex: Delete this space to maintain correct pagereferences.
+     \index{text} is fun!  
+    ^
+Message 22 in Test.tex: Comment displayed.
 % Warning 25  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$5\cdot10^10$  
+^^^^^^^^^^^^^
 Message 25 in Test.tex: You might wish to put this between a pair of `{}'
 $5\cdot10^10$  
           ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$5\cdot10^{10}$  
+^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 26  
 ^
@@ -304,6 +361,9 @@
 Message 29 in Test.tex: $\times$ may look prettier here.
 The program opens a screen sized 640x200 pixels  
                                     ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+The program opens a screen sized $640\times200$ pixels  
+                                 ^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 30  
 ^
@@ -340,6 +400,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 35  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$sin^2 + cos^2 = 1$  
+^^^^^^^^^^^^^^^^^^^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 $sin^2 + cos^2 = 1$  
  ^^^
@@ -346,6 +409,9 @@
 Message 35 in Test.tex: You should perhaps use `\cos' instead.
 $sin^2 + cos^2 = 1$  
          ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\sin^2 + \cos^2 = 1$  
+^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 36-37  
 ^
@@ -391,12 +457,24 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 40  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\this,$ and $$this$$.  
+^^^^^^^^
 Message 40 in Test.tex: You should put punctuation outside inner math mode.
 $\this,$ and $$this$$.  
       ^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$\this,$ and $$this$$.  
+             ^^^^^^^^
 Message 40 in Test.tex: You should put punctuation inside display math mode.
 $\this,$ and $$this$$.  
                      ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+$\this$, and $$this.$$  
+^^^^^^^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$\this$, and $$this.$$  
+             ^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 41  
 ^
@@ -415,6 +493,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 43  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here is a mistake $\left{x\right}$.  
+                  ^^^^^^^^^^^^^^^^
 Message 43 in Test.tex: `\left' is normally not followed by `{'.
 Here is a mistake $\left{x\right}$.  
                    ^^^^^
@@ -421,6 +502,9 @@
 Message 43 in Test.tex: `\right' is normally not followed by `}'.
 Here is a mistake $\left{x\right}$.  
                           ^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+This one triggers warning 22 $\left\{x\right\}$.  
+                             ^^^^^^^^^^^^^^^^^^
 Message 21 in Test.tex: This command might not be intended.
 This one triggers warning 22 $\left\{x\right\}$.  
                                    ^^
@@ -427,6 +511,9 @@
 Message 21 in Test.tex: This command might not be intended.
 This one triggers warning 22 $\left\{x\right\}$.  
                                             ^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here \chktex\ doesn't complain $\left\lbrace x\right\rbrace$.  
+                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 44 -- user regex -- default message  
 ^
@@ -433,9 +520,21 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 44 -- user regex -- user message  
 ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\not|n$ you have an ugly prime which doesn't divide $n$.  
+          ^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\not|n$ you have an ugly prime which doesn't divide $n$.  
+                                                                ^^^
 Message 44 in Test.tex: User Regex: Always use \nmid.
 For every $p\not|n$ you have an ugly prime which doesn't divide $n$.  
             ^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
+          ^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
+                                                                ^^^
 Message 22 in Test.tex: Comment displayed.
 % Math mode check  
 ^
@@ -442,12 +541,21 @@
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 \ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
             ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+\ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
+                                                                    ^^^^^^^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
 \ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}  
                                                                      ^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
+      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Message 36 in Test.tex: You should put a space in front of parenthesis.
 Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
                           ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
+                                        ^^^^^^
 Message 22 in Test.tex: Comment displayed.
 This is\\% a comment. Nothing here should be checked(right)?  
          ^
@@ -457,6 +565,9 @@
 Message 22 in Test.tex: Comment displayed.
 Here(on this line only)is a warning $sin(x)$ suppressed. % chktex 36 chktex 35  
                                                          ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here(on this line only)is a warning $sin(x)$ suppressed. % chktex 36 chktex 35  
+                                    ^^^^^^^^
 Message 22 in Test.tex: Comment displayed.
 Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
                                                          ^
@@ -466,6 +577,9 @@
 Message 36 in Test.tex: You should put a space after parenthesis.
 Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
                        ^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Here(on this line only)is a warning $sin(x)$ suppressed. % CHKTEX 35 36  
+                                    ^^^^^^^^
 Message 44 in Test.tex: User Regex: 1:Capitalize before references.
 In section~\ref{sec:3} we have a warning.  
   ^^^^^^^^^^^^^
@@ -493,6 +607,21 @@
 Message 22 in Test.tex: Comment displayed.
 % Warning 16,15  
 ^
+Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
+$$(  
+^^^^^^^
+Message 22 in Test.tex: Comment displayed.
+% Local Variables:  
+^
+Message 22 in Test.tex: Comment displayed.
+% require-final-newline: nil  
+^
+Message 22 in Test.tex: Comment displayed.
+% End:  
+^
+Message 22 in Test.tex: Comment displayed.
+% There should be no newline at the end of this file to test bug #46539 
+^
 Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
 
 

Modified: trunk/Build/source/texk/chktex/chktex-src/Test.tex
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Test.tex	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/Test.tex	2016-09-15 23:02:10 UTC (rev 42080)
@@ -10,6 +10,7 @@
 % Warning 1
 
 \foo This is an error.
+So is this \foo
 \smallskip This is a not. $\foo Neither$ is this.
 
 \startsection[title={Testing ConTeXt}]
@@ -113,6 +114,10 @@
 
 Indexing text \index{text} is fun!
 Indexing text\index{text} is fun!
+Indexing text%
+     \index{text} is fun!
+Indexing text
+     \index{text} is fun!
 
 % Warning 25
 
@@ -225,3 +230,8 @@
 % Warning 16,15
 
 $$(
+
+% Local Variables:
+% require-final-newline: nil
+% End:
+% There should be no newline at the end of this file to test bug #46539
\ No newline at end of file

Modified: trunk/Build/source/texk/chktex/chktex-src/Utility.c
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Utility.c	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/Utility.c	2016-09-15 23:02:10 UTC (rev 42080)
@@ -727,6 +727,7 @@
     static short HasSeenLong = 0;
     struct FileNode *fn;
     char *Retval = NULL;
+    size_t Retlen = 0;
 
     if ((fn = StkTop(stack)))
     {
@@ -734,12 +735,14 @@
         {
             Retval = fgets(Dest, (int)len, fn->fh);
             if (Retval) {
-                if (Retval[strlen(Retval)-1] == '\n')
+                Retlen = strlen(Retval);
+
+                if (Retval[Retlen-1] == '\n' || Retlen < len-1)
                     fn->Line++;
                 /* We only want the long lines warning once per file */
                 else if (!HasSeenLong)
                 {
-                    PrintPrgErr(pmLongLines, BUFSIZ);
+                    PrintPrgErr(pmLongLines, len-2);
                     HasSeenLong = 1;
                 }
                 break;
@@ -833,15 +836,29 @@
     {
         if ((ci->Data = strdup(Data)))
         {
-            ci->File = CurStkName(&InputStack);
-            ci->Line = Line;
-            ci->ErrLen = ErrLen;
-            ci->Column = Column;
-            ci->LineBuf = LineCpy;
-            ci->Flags = efNone;
+            if ((ci->File = strdup(CurStkName(&InputStack))))
+            {
+                if ((ci->LineBuf = strdup(LineCpy)))
+                {
+                    ci->Line = Line;
+                    ci->ErrLen = ErrLen;
+                    ci->Column = Column;
+                    ci->Flags = efNone;
 
-            if (StkPush(ci, Stk))
-                return (ci);
+                    if (StkPush(ci, Stk))
+                        return (ci);
+
+                    free(ci->LineBuf);
+                }
+                else
+                    PrintPrgErr(pmStrDupErr);
+
+                free(ci->File);
+            }
+            else
+                PrintPrgErr(pmStrDupErr);
+
+            free(ci->Data);
         }
         else
             PrintPrgErr(pmStrDupErr);
@@ -906,6 +923,10 @@
     {
         if (ei->Data)
             free(ei->Data);
+        if (ei->File)
+            free(ei->File);
+        if (ei->LineBuf)
+            free(ei->LineBuf);
 
         free(ei);
     }

Modified: trunk/Build/source/texk/chktex/chktex-src/chktexrc
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/chktexrc	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/chktexrc	2016-09-15 23:02:10 UTC (rev 42080)
@@ -493,6 +493,8 @@
     \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{}
     \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{}
     \citetext:{} \citeyear:*{} \citeyearpar:{}
+    # tipa which uses "
+    \textipa:{}
 }
 
 #####################################################################
@@ -545,7 +547,7 @@
 VerbEnvir
 {
     verbatim comment listing verbatimtab rawhtml errexam picture texdraw
-    filecontents pgfpicture tikzpicture
+    filecontents pgfpicture tikzpicture minted lstlisting IPA
 }
 
 #####################################################################

Modified: trunk/Build/source/texk/chktex/chktex-src/configure.in
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/configure.in	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/configure.in	2016-09-15 23:02:10 UTC (rev 42080)
@@ -27,7 +27,7 @@
 
 
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ChkTeX, 1.7.4)
+AC_INIT(ChkTeX, 1.7.6)
 AC_SUBST(SCRIPTS)
 AC_SUBST(BUILT_SCRIPTS)
 AC_SUBST(CLEAN)

Modified: trunk/Build/source/texk/chktex/chktex-src/deweb.in
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/deweb.in	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/chktex-src/deweb.in	2016-09-15 23:02:10 UTC (rev 42080)
@@ -26,93 +26,104 @@
 #
 #
 
-print STDERR "DeWEB v1.2 - Copyright 1996 Jens T. Berger Thielemann\n";
+print STDERR "DeWEB v1.3 - Copyright 1996 Jens T. Berger Thielemann\n";
 
 undef $/;
-$texmode = 1;
-$_ = <>;
+my @FILES = @ARGV;
+FILE:
+while( my $file = shift @FILES ) {
 
-while(/\@/)
-{
-    &out($`);
-    $_ = $';
-
-    if(/^@/) {
-	$_ = $';
-	&out('@');
-       	next;
+    my $success = open my $fh, '<', "$file";
+    if ( ! $success ) {
+        print STDERR "Couldn't open file '$file'\n";
+        next FILE;
     }
 
-    if(/^([\s\n])/) {
-	$_ = $';
-	print "\n" if $1 eq "\n";
-	$texmode = 1;
-	next;
-    }
+    $texmode = 1;
+    $_ = <$fh>;
 
-    if(/^[cpd]/i) {
-	$_ = $';
-	$texmode = 0;
-	next;
-    }
+    while (/\@/) {
+        &out($`);
+        $_ = $';
 
-    if(/^\,/i) {
-	$_ = $';
-        print '\,';
-	next;
-    }
+        if (/^@/) {
+            $_ = $';
+            &out('@');
+            next;
+        }
 
-    if(m!^/!) {
-	$_ = $';
-        print '\\\\';
-	next;
-    }
+        if (/^([\s\n])/) {
+            $_ = $';
+            print "\n" if $1 eq "\n";
+            $texmode = 1;
+            next;
+        }
 
-    if(/^[h\&\|\;\#\+]/i || /^i.*/i) {
-	$_ = $';
-	next;
-    }
+        if (/^[cpd]/i) {
+            $_ = $';
+            $texmode = 0;
+            next;
+        }
 
-    if(/^\*[0-9\*]?((.|\n)*?\.)/) {
-	$_ = $';
-	print $1;
-	$texmode = 1;
-	next;
-    }
+        if (/^\,/i) {
+            $_ = $';
+            print '\,';
+            next;
+        }
 
-    if(/^[<(^.t!]((.|\n)*?)\@\>/i) {
-	$_ = $';
-	print '{'.$1.'}';
-	$texmode = 0;
-	next;
-    }
+        if (m!^/!) {
+            $_ = $';
+            print '\\\\';
+            next;
+        }
 
-    if(/^[=]((.|\n)*?)\@\>/) {
-	$_ = $';
-	print &printnl($1);
-	next;
-    }
+        if (/^[h\&\|\;\#\+]/i || /^i.*/i) {
+            $_ = $';
+            next;
+        }
 
-    if(/^[fsl](\s+\S+\s+\S+)|^\'(.|\n)*?\'|^\[((.|\n)*?)\@\]/i) {
-	$_ = $';
-	print &printnl($+);
-	next;
+        if (/^\*[0-9\*]?((.|\n)*?\.)/) {
+            $_ = $';
+            print $1;
+            $texmode = 1;
+            next;
+        }
+
+        if (/^[<(^.t!]((.|\n)*?)\@\>/i) {
+            $_ = $';
+            print '{'.$1.'}';
+            $texmode = 0;
+            next;
+        }
+
+        if (/^[=]((.|\n)*?)\@\>/) {
+            $_ = $';
+            print &printnl($1);
+            next;
+        }
+
+        if (/^[fsl](\s+\S+\s+\S+)|^\'(.|\n)*?\'|^\[((.|\n)*?)\@\]/i) {
+            $_ = $';
+            print &printnl($+);
+            next;
+        }
+
+        @line = split(/\n/, $_, 2);
+        print STDERR "Unknown opcode, ignored. Buffer:\n$line[0]\n";
+
     }
 
-    @line = split(/\n/, $_, 2);
-    print STDERR "Unknown opcode, ignored. Buffer:\n$line[0]\n";
+    print $_;
 
 }
 
-print $_;
-
 sub printnl {
     my($foo);
-    if(defined $_[0]) {
-	$foo = $_[0];
-	$foo =~ s/.//g;
+    if (defined $_[0]) {
+        $foo = $_[0];
+        $foo =~ s/.//g;
     } else {
-	$foo = "";
+        $foo = "";
     }
     $foo;
 }

Modified: trunk/Build/source/texk/chktex/configure
===================================================================
--- trunk/Build/source/texk/chktex/configure	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/configure	2016-09-15 23:02:10 UTC (rev 42080)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ChkTeX (TeX Live) 1.7.4.
+# Generated by GNU Autoconf 2.69 for ChkTeX (TeX Live) 1.7.6.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='ChkTeX (TeX Live)'
 PACKAGE_TARNAME='chktex--tex-live-'
-PACKAGE_VERSION='1.7.4'
-PACKAGE_STRING='ChkTeX (TeX Live) 1.7.4'
+PACKAGE_VERSION='1.7.6'
+PACKAGE_STRING='ChkTeX (TeX Live) 1.7.6'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1340,7 +1340,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ChkTeX (TeX Live) 1.7.4 to adapt to many kinds of systems.
+\`configure' configures ChkTeX (TeX Live) 1.7.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1411,7 +1411,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ChkTeX (TeX Live) 1.7.4:";;
+     short | recursive ) echo "Configuration of ChkTeX (TeX Live) 1.7.6:";;
    esac
   cat <<\_ACEOF
 
@@ -1531,7 +1531,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ChkTeX (TeX Live) configure 1.7.4
+ChkTeX (TeX Live) configure 1.7.6
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2187,7 +2187,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ChkTeX (TeX Live) $as_me 1.7.4, which was
+It was created by ChkTeX (TeX Live) $as_me 1.7.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -7872,7 +7872,7 @@
 
 # Define the identity of the package.
  PACKAGE='chktex--tex-live-'
- VERSION='1.7.4'
+ VERSION='1.7.6'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14205,7 +14205,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-ChkTeX (TeX Live) config.lt 1.7.4
+ChkTeX (TeX Live) config.lt 1.7.6
 configured by $0, generated by GNU Autoconf 2.69.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -15802,7 +15802,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ChkTeX (TeX Live) $as_me 1.7.4, which was
+This file was extended by ChkTeX (TeX Live) $as_me 1.7.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15868,7 +15868,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ChkTeX (TeX Live) config.status 1.7.4
+ChkTeX (TeX Live) config.status 1.7.6
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/texk/chktex/version.ac
===================================================================
--- trunk/Build/source/texk/chktex/version.ac	2016-09-15 21:18:30 UTC (rev 42079)
+++ trunk/Build/source/texk/chktex/version.ac	2016-09-15 23:02:10 UTC (rev 42080)
@@ -8,4 +8,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current chktex version
-m4_define([chktex_version], [1.7.4])
+m4_define([chktex_version], [1.7.6])



More information about the tex-live-commits mailing list