summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/synctexdir
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/synctexdir')
-rw-r--r--Build/source/texk/web2c/synctexdir/ChangeLog24
-rw-r--r--Build/source/texk/web2c/synctexdir/am/synctex.am38
-rwxr-xr-xBuild/source/texk/web2c/synctexdir/synctex-convert.sh18
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-e-mem.ch025
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.c8
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.h3
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_main.c22
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_utils.c2
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_utils.h2
9 files changed, 69 insertions, 73 deletions
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog
index 167d063da97..ed8c5d75b3c 100644
--- a/Build/source/texk/web2c/synctexdir/ChangeLog
+++ b/Build/source/texk/web2c/synctexdir/ChangeLog
@@ -1,3 +1,27 @@
+2009-10-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ synctex-e-mem.ch0 (just_reverse): Drop unused label found.
+
+2009-09-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex.c (synctex_suffix*): Constify strings.
+ Add #include "synctex.h" for prototypes.
+ * synctex.h (synctexabort): Add prototype.
+ * synctex_main.c (synctex_help*): Constify string params.
+ (synctex_edit_proceed): Add a prototype (was a duplicate for
+ synctex_view_proceed). Drop cast.
+ * synctex_parser_utils.[ch] (_synctex_error): Constify string
+ param.
+
+2009-09-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: Prepare compiler warnings.
+
+2009-08-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/synctex.am: SyncTeX now integrated into ../texmfmp.h.
+ * synctex-convert.sh (removed): Obsolete.
+
2009-07-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* synctex_main.c: re-#include "web2c/c-auto.h", needed for AIX.
diff --git a/Build/source/texk/web2c/synctexdir/am/synctex.am b/Build/source/texk/web2c/synctexdir/am/synctex.am
index 93f90ca2661..730f4b27edd 100644
--- a/Build/source/texk/web2c/synctexdir/am/synctex.am
+++ b/Build/source/texk/web2c/synctexdir/am/synctex.am
@@ -16,10 +16,11 @@ synctex_SOURCES = \
synctexdir/synctex_parser_utils.c
synctex_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER
+synctex_CFLAGS = # $(WARNING_CFLAGS)
synctex_LDADD = $(ZLIB_LIBS)
-synctex_DEPENDENCIES = $(ZLIB_DEPEND)
+$(synctex_OBJECTS): $(ZLIB_DEPEND)
dist_man_MANS += synctexdir/man1/synctex.1 synctexdir/man5/synctex.5
@@ -34,7 +35,6 @@ EXTRA_DIST += \
EXTRA_DIST += \
synctexdir/synctex-common.h \
- synctexdir/synctex-convert.sh \
synctexdir/synctex.c \
synctexdir/synctex.defines \
synctexdir/synctex.h
@@ -46,6 +46,7 @@ if TEX_SYNCTEX
tex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
tex_LDADD += $(ZLIB_LIBS)
+tex_prereq += $(ZLIB_DEPEND)
tex_ch_synctex = \
synctexdir/synctex-mem.ch0 \
@@ -63,13 +64,9 @@ dist_tex_SOURCES = \
nodist_tex_SOURCES += \
synctex.c
-synctex_convert_tex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh tex
+tex_CPPFLAGS += -D__SyncTeX__
-else !TEX_SYNCTEX
-
-synctex_convert_tex = && echo "warning: SyncTeX for TeX is NOT enabled"
-
-endif !TEX_SYNCTEX
+endif TEX_SYNCTEX
synctex.c: texd.h synctexdir/synctex.c $(dist_tex_SOURCES)
sed s/TEX-OR-MF-OR-MP/tex/ $(srcdir)/synctexdir/synctex.c >$@
@@ -89,6 +86,7 @@ if ETEX_SYNCTEX
etex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
etex_LDADD += $(ZLIB_LIBS)
+etex_prereq += $(ZLIB_DEPEND)
etex_ch_synctex = \
synctexdir/synctex-mem.ch0 \
@@ -108,13 +106,9 @@ dist_etex_SOURCES = \
nodist_etex_SOURCES += \
synctex-e.c
-synctex_convert_etex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh etex
-
-else !ETEX_SYNCTEX
-
-synctex_convert_etex = && echo "warning: SyncTeX for e-TeX is NOT enabled"
+etex_CPPFLAGS += -D__SyncTeX__
-endif !ETEX_SYNCTEX
+endif ETEX_SYNCTEX
synctex-e.c: etexd.h synctexdir/synctex.c $(dist_etex_SOURCES)
sed s/TEX-OR-MF-OR-MP/etex/ $(srcdir)/synctexdir/synctex.c >$@
@@ -150,13 +144,9 @@ dist_pdftex_SOURCES = \
nodist_pdftex_SOURCES += \
synctex-pdf.c
-synctex_convert_pdftex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh pdftex
+pdftex_CPPFLAGS += -D__SyncTeX__
-else !PDFTEX_SYNCTEX
-
-synctex_convert_pdftex = && echo "warning: SyncTeX for pdfTeX is NOT enabled"
-
-endif !PDFTEX_SYNCTEX
+endif PDFTEX_SYNCTEX
synctex-pdf.c: pdftexd.h synctexdir/synctex.c $(dist_pdftex_SOURCES)
sed s/TEX-OR-MF-OR-MP/pdftex/ $(srcdir)/synctexdir/synctex.c >$@
@@ -190,13 +180,9 @@ dist_xetex_SOURCES = \
nodist_xetex_SOURCES += \
synctex-xe.c
-synctex_convert_xetex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh xetex
-
-else !XETEX_SYNCTEX
-
-synctex_convert_xetex = && echo "warning: SyncTeX for XeTeX is NOT enabled"
+xetex_CPPFLAGS += -D__SyncTeX__
-endif !XETEX_SYNCTEX
+endif XETEX_SYNCTEX
synctex-xe.c: xetexd.h synctexdir/synctex.c $(dist_xetex_SOURCES)
sed s/TEX-OR-MF-OR-MP/xetex/ $(srcdir)/synctexdir/synctex.c >$@
diff --git a/Build/source/texk/web2c/synctexdir/synctex-convert.sh b/Build/source/texk/web2c/synctexdir/synctex-convert.sh
deleted file mode 100755
index 2b611f15b94..00000000000
--- a/Build/source/texk/web2c/synctexdir/synctex-convert.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh
-
-tex=$1
-
-if test -z "`grep __SyncTeX__ ${tex}d.h`"; then
- echo "Enabling SyncTeX Support for $tex."
- sed -e 's|^#include "texmfmp.h"$|&\
-/* Start of SyncTeX Section */\
-#define __SyncTeX__\
-#include "synctexdir/synctex-common.h"\
-/* End of SyncTeX Section */|g' ${tex}d.h >synctex_${tex}d.h
- if test -z "`grep __SyncTeX__ synctex_${tex}d.h`"; then
- echo "warning: SyncTeX activation for $tex FAILED"
- exit 1
- fi
- mv synctex_${tex}d.h ${tex}d.h
- echo "warning: SyncTeX for $tex is enabled"
-fi
diff --git a/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch0 b/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch0
index 7644e0c6987..a4629bbd681 100644
--- a/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch0
+++ b/Build/source/texk/web2c/synctexdir/synctex-e-mem.ch0
@@ -118,14 +118,21 @@ end
end;
@z
+@x etex.ch l.4211 - Drop unused label
+procedure just_reverse(@!p:pointer);
+label found,done;
+@y
+procedure just_reverse(@!p:pointer);
+label done;
+@z
+
@x etex.ch l.4234
found:width(t):=width(p); link(t):=q; free_node(p,small_node_size);
-done:link(temp_head):=l;
-end;
+@y
+width(t):=width(p); link(t):=q; free_node(p,small_node_size);
+@z
-@ @<Adjust \(t)the LR stack for the |j...@>=
-if end_LR(p) then
- if info(LR_ptr)<>end_LR_type(p) then
+@x etex.ch l.4241
begin type(p):=kern_node; incr(LR_problems);
end
else begin pop_LR;
@@ -144,14 +151,6 @@ else begin push_LR(p);
end;
end
@y
-found:width(t):=width(p); link(t):=q; free_node(p,small_node_size);
- {{\sl Sync\TeX}: Unused label, see below}
-done:link(temp_head):=l;
-end;
-
-@ @<Adjust \(t)the LR stack for the |j...@>=
-if end_LR(p) then
- if info(LR_ptr)<>end_LR_type(p) then
begin type(p):=kern_node; incr(LR_problems);
{{\sl Sync\TeX} node size watch point: |math_node| size == |kern_node| size}
end
diff --git a/Build/source/texk/web2c/synctexdir/synctex.c b/Build/source/texk/web2c/synctexdir/synctex.c
index d8731911231..b40f2195cc3 100644
--- a/Build/source/texk/web2c/synctexdir/synctex.c
+++ b/Build/source/texk/web2c/synctexdir/synctex.c
@@ -250,6 +250,8 @@ EXTERN char *gettexstring(int n);
# include "synctex-TEX-OR-MF-OR-MP.h"
+# include "synctex.h"
+
# if defined(__SyncTeX__)
# include <stdio.h>
@@ -357,9 +359,9 @@ void synctexabort(boolean log_opened)
static inline int synctex_record_preamble(void);
static inline int synctex_record_input(integer tag, char *name);
-static char *synctex_suffix = ".synctex";
-static char *synctex_suffix_gz = ".gz";
-static char *synctex_suffix_busy = "(busy)";
+static const char *synctex_suffix = ".synctex";
+static const char *synctex_suffix_gz = ".gz";
+static const char *synctex_suffix_busy = "(busy)";
/* synctex_dot_open ensures that the foo.synctex file is open.
* In case of problem, it definitely disables synchronization.
diff --git a/Build/source/texk/web2c/synctexdir/synctex.h b/Build/source/texk/web2c/synctexdir/synctex.h
index 4e52b1b3a39..96e03c84cd9 100644
--- a/Build/source/texk/web2c/synctexdir/synctex.h
+++ b/Build/source/texk/web2c/synctexdir/synctex.h
@@ -45,6 +45,9 @@ Latest Revision: Wed Jul 1 08:17:50 UTC 2009
#include "synctex-common.h"
+/* Free all memory used, close and remove the file if any. */
+void synctexabort(boolean log_opened);
+
/* Send this message when starting a new input. */
extern void synctexstartinput(void);
diff --git a/Build/source/texk/web2c/synctexdir/synctex_main.c b/Build/source/texk/web2c/synctexdir/synctex_main.c
index a572d568381..e8436943b1d 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_main.c
+++ b/Build/source/texk/web2c/synctexdir/synctex_main.c
@@ -88,10 +88,10 @@ inline static double my_fmax(double x, double y) { return (x < y) ? y : x; }
int main(int argc, char *argv[]);
-void synctex_help(char * error,...);
-void synctex_help_view(char * error,...);
-void synctex_help_edit(char * error,...);
-void synctex_help_update(char * error,...);
+void synctex_help(const char * error,...);
+void synctex_help_view(const char * error,...);
+void synctex_help_edit(const char * error,...);
+void synctex_help_update(const char * error,...);
int synctex_view(int argc, char *argv[]);
int synctex_edit(int argc, char *argv[]);
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
return 0;
}
-void synctex_usage(char * error,va_list ap) {
+static void synctex_usage(const char * error,va_list ap) {
if(error) {
fprintf(stderr,"SyncTeX ERROR: ");
vfprintf(stderr,error,ap);
@@ -148,7 +148,7 @@ void synctex_usage(char * error,va_list ap) {
return;
}
-void synctex_help(char * error,...) {
+void synctex_help(const char * error,...) {
va_list v;
va_start(v, error);
synctex_usage(error, v);
@@ -165,7 +165,7 @@ void synctex_help(char * error,...) {
return;
}
-void synctex_help_view(char * error,...) {
+void synctex_help_view(const char * error,...) {
va_list v;
va_start(v, error);
synctex_usage(error, v);
@@ -486,7 +486,7 @@ int synctex_view_proceed(synctex_view_params_t * Ps) {
return 0;
}
-void synctex_help_edit(char * error,...) {
+void synctex_help_edit(const char * error,...) {
va_list v;
va_start(v, error);
synctex_usage(error, v);
@@ -548,7 +548,7 @@ typedef struct {
char * context;
} synctex_edit_params_t;
-int synctex_view_proceed(synctex_view_params_t * paramsRef);
+int synctex_edit_proceed(synctex_edit_params_t * Ps);
/* "usage: synctex edit -o page:x:y:output [-d directory] [-x editor-command] [-h offset:context]\n" */
int synctex_edit(int argc, char *argv[]) {
@@ -652,7 +652,7 @@ int synctex_edit_proceed(synctex_edit_params_t * Ps) {
synctex_node_t node = NULL;
const char * input = NULL;
if(NULL != (node = synctex_next_result(scanner))
- && NULL != (input = (char *)synctex_scanner_get_name(scanner,synctex_node_tag(node)))) {
+ && NULL != (input = synctex_scanner_get_name(scanner,synctex_node_tag(node)))) {
/* filtering the command */
if(Ps->editor && strlen(Ps->editor)) {
size_t size = 0;
@@ -745,7 +745,7 @@ int synctex_edit_proceed(synctex_edit_params_t * Ps) {
return 0;
}
-void synctex_help_update(char * error,...) {
+void synctex_help_update(const char * error,...) {
va_list v;
va_start(v, error);
synctex_usage(error, v);
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
index f3b8eff2514..884b00412bb 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
@@ -69,7 +69,7 @@ void *_synctex_malloc(size_t size) {
return (void *)ptr;
}
-int _synctex_error(char * reason,...) {
+int _synctex_error(const char * reason,...) {
va_list arg;
int result;
va_start (arg, reason);
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
index 362e0755d44..5999f72d6e3 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
@@ -68,7 +68,7 @@ void *_synctex_malloc(size_t size);
/* This is used to log some informational message to the standard error stream.
* On Windows, the stderr stream is not exposed and another method is used.
* The return value is the number of characters printed. */
-int _synctex_error(char * reason,...);
+int _synctex_error(const char * reason,...);
/* strip the last extension of the given string, this string is modified!
* This function depends on the OS because the path separator may differ.