~ubuntu-branches/ubuntu/utopic/texlive-bin/utopic

« back to all changes in this revision

Viewing changes to utils/chktex/chktex-1.6.4-PATCHES/patch-03-texlive

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-04-10 10:16:01 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20120410101601-7mt8nyn280xrgza6
Tags: 2011.20120410-1
* new upstream checkout:
  - remove decls of popen and pclose (Closes: #64524) (!yow, 5 digit bug!)
  - do not declare getopt in C++, fixes FTBFS with g++ >= 4.7 
    (Closes: #667392)
* add patches (maybe to be included upstream) that allows inclusion of
  one config file in another for (x)dvipdfmx. This will be
  used by the paper code.
* fix description of libptexenc-dev package (Closes: #667694)
* remove xdvik patch, included upstream
* remove conflict with ptex-bin, we are building a transitional package now
* build with internal t1lib, as t1lib is going to disappear in
  wheezy (Closes: #667912) (no, dropping xdvi is not an option!)
  (add a lintian override otherwise this gives a lintian error)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -ur chktex-1.6.4.orig/ChkTeX.c chktex-1.6.4/ChkTeX.c
2
 
--- chktex-1.6.4.orig/ChkTeX.c  2010-05-02 22:03:42.000000000 +0200
3
 
+++ chktex-1.6.4/ChkTeX.c       2010-05-05 21:46:44.000000000 +0200
4
 
@@ -85,7 +85,7 @@
5
 
     "Type \"ChkTeX -h\" for help, \"ChkTeX -i\" for distribution info.\n"
6
 
     "Author: Jens Berger, Spektrumvn. 4, N-0666 Oslo, Norway.\n"
7
 
     "E-mail: <jensthi@ifi.uio.no>\n"
8
 
-    "Press " STDIN_BREAK " to abort stdin input.\n";
9
 
+    "Press " STDIN_BREAK " to terminate stdin input.\n";
10
 
 
11
 
 static const char *Distrib =
12
 
     "\n"
13
 
diff -ur chktex-1.6.4.orig/OpSys.c chktex-1.6.4/OpSys.c
14
 
--- chktex-1.6.4.orig/OpSys.c   2010-05-06 13:21:05.000000000 +0200
15
 
+++ chktex-1.6.4/OpSys.c        2010-05-06 13:59:06.701540401 +0200
16
 
@@ -216,12 +216,33 @@
17
 
 
18
 
             break;
19
 
         case liSysDir:         /* System dir for resource files */
20
 
+#ifdef TEX_LIVE
21
 
+            if ((Env = getenv("CHKTEX_CONFIG")))
22
 
+            {
23
 
+                strcpy(ConfigFile, Env);
24
 
+            }
25
 
+            else
26
 
+            {
27
 
+                FILE *f;
28
 
+                *ConfigFile = 0;
29
 
+                if ((f = popen("kpsewhich -expand-var='$TEXMFMAIN'", "r")))
30
 
+                {
31
 
+                    if (1 == fscanf(f, "%1024s", ConfigFile))
32
 
+                    {
33
 
+                        tackon(ConfigFile, "chktex");
34
 
+                        tackon(ConfigFile, RCBASENAME);
35
 
+                    }
36
 
+                    (void)pclose(f);
37
 
+                }
38
 
+            }
39
 
+#else /* TEX_LIVE */
40
 
 #if defined(__unix__) || defined(__MSDOS__)
41
 
             strcpy(ConfigFile, SYSCONFDIR);
42
 
             tackon(ConfigFile, RCBASENAME);
43
 
 #else
44
 
             *ConfigFile = 0;
45
 
 #endif
46
 
+#endif /* TEX_LIVE */
47
 
 
48
 
             break;
49
 
         case liNFound:
50
 
diff -ur chktex-1.6.4.orig/OpSys.h chktex-1.6.4/OpSys.h
51
 
--- chktex-1.6.4.orig/OpSys.h   2010-05-02 22:18:32.000000000 +0200
52
 
+++ chktex-1.6.4/OpSys.h        2010-05-06 14:21:57.972021240 +0200
53
 
@@ -101,6 +101,15 @@
54
 
  */
55
 
 
56
 
 
57
 
+#ifdef TEX_LIVE
58
 
+#if defined(__MSDOS__) || defined(WIN32)
59
 
+#  define SLASH   '\\'
60
 
+#  define DIRCHARS ":\\"
61
 
+#else
62
 
+#  define  SLASH  '/'
63
 
+#  define DIRCHARS "/"
64
 
+#endif
65
 
+#else /* TEX_LIVE */
66
 
 #if defined(__unix__)
67
 
 #  define  SLASH  '/'
68
 
 #elif defined(__MSDOS__)
69
 
@@ -112,6 +121,7 @@
70
 
 #elif defined(__MSDOS__)
71
 
 #  define DIRCHARS ":\\"
72
 
 #endif
73
 
+#endif /* TEX_LIVE */
74
 
 
75
 
 /*  -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=-  */
76