summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/alephdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-10 10:27:09 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-10 10:27:09 +0000
commit5e8e9500102800e68c9e7fcac9e85c1668b71a36 (patch)
tree81d79ac70ffbb127e8063f18c8f55475ca169ee1 /Build/source/texk/web2c/alephdir
parente6a9c88ada2f11dd61e4c4e39dff84944bed5787 (diff)
towards TL2010: texk/web2c
git-svn-id: svn://tug.org/texlive/trunk@15964 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/alephdir')
-rw-r--r--Build/source/texk/web2c/alephdir/ChangeLog42
-rw-r--r--Build/source/texk/web2c/alephdir/aleph.c17
-rw-r--r--Build/source/texk/web2c/alephdir/alephbis.c2
-rw-r--r--Build/source/texk/web2c/alephdir/alephmem.h46
-rw-r--r--Build/source/texk/web2c/alephdir/am/aleph.am34
-rw-r--r--Build/source/texk/web2c/alephdir/com16bit.ch33
-rw-r--r--Build/source/texk/web2c/alephdir/eo16bit.ch2
-rw-r--r--Build/source/texk/web2c/alephdir/eomem.ch5
-rw-r--r--Build/source/texk/web2c/alephdir/om16bit.ch2
9 files changed, 117 insertions, 66 deletions
diff --git a/Build/source/texk/web2c/alephdir/ChangeLog b/Build/source/texk/web2c/alephdir/ChangeLog
index 94121282c0b..e8ae9ad705b 100644
--- a/Build/source/texk/web2c/alephdir/ChangeLog
+++ b/Build/source/texk/web2c/alephdir/ChangeLog
@@ -1,3 +1,45 @@
+2009-11-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * com16bit.ch: Check for allowed filename before opening the
+ output file. Better diagnostic when input file not found.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+2009-10-24 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * com16bit.ch: Use kpse_{in,out}_name_ok(), now in Kpathsea,
+ instead of open_{in,out}_name_ok().
+
+2009-10-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/aleph.am: Enable compiler warnings.
+
+ Avoid many (--enable-...=max) compiler warnings.
+ * aleph.c (getc_two_LE, ungetc_two_LE): Declare as static.
+ (createeqtbptr): Comment out unused function.
+ (zpnewinputln, ziniteqtbentry): Drop extern decls; instead use
+ pnewinputln and initeqtbentry as defined in alephcoerce.h.
+ * alephbis.c (runexternalocp): Declare in_file_fd, out_file_fd
+ only when used (HAVE_MKSTEMP).
+ * alephmem.h: ANSI C function prototypes.
+ * com16bit.ch (bound_name, months): Declare as const_cstring.
+ (get_strings_started, open_log_file): Drop unused variables.
+ * eo16bit.ch (show_sa): Drop unused variable.
+ * eomem.ch (box_end): Drop unused variable.
+ * om16bit.ch (set_math_char): Drop unused variables.
+
+2009-09-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/aleph.am: Adapt to new makecpool with one argument,
+ obsoleting aleph-pool.h.
+
+2009-08-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/aleph.am: Adapt to tangle-sh and web2c-sh.
+
+2009-08-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * am/aleph.am (aleph_c_h): avoid to split the C code.
+
2009-06-23 Peter Breitenlohner <peb@mppmu.mpg.de>
* aleph.c, alephbis.c: drop P?C, P?H, use ANSI C function
diff --git a/Build/source/texk/web2c/alephdir/aleph.c b/Build/source/texk/web2c/alephdir/aleph.c
index 88bd9ca85fe..6a19be3884c 100644
--- a/Build/source/texk/web2c/alephdir/aleph.c
+++ b/Build/source/texk/web2c/alephdir/aleph.c
@@ -94,7 +94,7 @@ getfilemode (FILE *f, int def)
return m;
}
-int
+static int
getc_two_LE (FILE *f)
{
register int i,j;
@@ -105,7 +105,7 @@ getc_two_LE (FILE *f)
return ((j<<8)|i);
}
-void
+static void
ungetc_two_LE (int c, FILE *f)
{
ungetc((c>>8), f);
@@ -130,15 +130,10 @@ ungetc_two (int c, FILE *f)
ungetc((c>>8), f);
}
-extern boolean zpnewinputln ();
-
boolean
newinputln (FILE *f, halfword themode, halfword translation, boolean bypass)
{
- return zpnewinputln((alphafile)f,
- (halfword)themode,
- (halfword)translation,
- (boolean) bypass);
+ return pnewinputln(f, themode, translation, bypass);
}
boolean
@@ -192,8 +187,6 @@ new_input_line (FILE *f, halfword themode)
return true;
}
-extern memoryword ziniteqtbentry () ;
-
hashword hashtable[HASHTABLESIZE];
void
@@ -216,12 +209,13 @@ createeqtbpos (int p)
if (runner->p == p) return runner;
}
runner->p = p;
- runner->mw = ziniteqtbentry(p);
+ runner->mw = initeqtbentry(p);
runner->ptr = (hashword *) xmalloc(sizeof(hashword));
(runner->ptr)->p = -1;
return runner;
}
+#if 0 /* unused */
memoryword *
createeqtbptr (int p)
{
@@ -237,6 +231,7 @@ createeqtbptr (int p)
(runner->ptr)->p = -1;
return (&(runner->mw));
}
+#endif
hashword *
createxeqlevel (int p)
diff --git a/Build/source/texk/web2c/alephdir/alephbis.c b/Build/source/texk/web2c/alephdir/alephbis.c
index f2398bbf291..0f9ce9df7eb 100644
--- a/Build/source/texk/web2c/alephdir/alephbis.c
+++ b/Build/source/texk/web2c/alephdir/alephbis.c
@@ -39,8 +39,10 @@ runexternalocp (string external_ocp_name)
char *out_file_name;
FILE *in_file;
FILE *out_file;
+#if HAVE_MKSTEMP
int in_file_fd;
int out_file_fd;
+#endif
char command_line[400];
int i;
unsigned c;
diff --git a/Build/source/texk/web2c/alephdir/alephmem.h b/Build/source/texk/web2c/alephdir/alephmem.h
index 901ab0aa9f3..a0331224f14 100644
--- a/Build/source/texk/web2c/alephdir/alephmem.h
+++ b/Build/source/texk/web2c/alephdir/alephmem.h
@@ -21,11 +21,11 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-extern boolean new_input_line ();
-extern boolean newinputln ();
-extern int getc_two ();
-extern int getfilemode ();
-extern void ungetc_two ();
+extern boolean new_input_line (FILE *, halfword);
+extern boolean newinputln (FILE *, halfword, halfword, boolean);
+extern int getc_two (FILE *);
+extern int getfilemode (FILE *, int);
+extern void ungetc_two (int, FILE *);
extern int ocptemp;
#define newinputline(stream, mode, flag) new_input_line (stream, mode)
@@ -42,24 +42,24 @@ typedef struct hashw
} hashword;
extern hashword hashtable[];
-extern hashword *createhashpos();
-extern hashword *createeqtbpos();
-extern hashword *createxeqlevel();
-extern void inithhashtable();
-extern void dumphhashtable();
-extern void undumphhashtable();
-extern void allocatefonttable();
-extern void dumpfonttable();
-extern void undumpfonttable();
-extern void allocatefontsorttable();
-extern void dumpfontsorttable();
-extern void undumpfontsorttable();
-extern void allocateocptable();
-extern void dumpocptable();
-extern void undumpocptable();
-extern void odateandtime();
-extern void btestin();
-extern void runexternalocp();
+extern hashword *createhashpos(int);
+extern hashword *createeqtbpos(int);
+extern hashword *createxeqlevel(int);
+extern void inithhashtable(void);
+extern void dumphhashtable(void);
+extern void undumphhashtable(void);
+extern void allocatefonttable(int, int);
+extern void dumpfonttable(int, int);
+extern void undumpfonttable(int);
+extern void allocatefontsorttable(int, int);
+extern void dumpfontsorttable(int, int);
+extern void undumpfontsorttable(int);
+extern void allocateocptable(int, int);
+extern void dumpocptable(int);
+extern void undumpocptable(int);
+extern void odateandtime(int, int, int, int);
+extern void btestin(void);
+extern void runexternalocp(string);
#define initeqtbtable() inithhashtable();
#define dumpeqtbtable() dumphhashtable();
diff --git a/Build/source/texk/web2c/alephdir/am/aleph.am b/Build/source/texk/web2c/alephdir/am/aleph.am
index ee967d7d4c1..20006b68f13 100644
--- a/Build/source/texk/web2c/alephdir/am/aleph.am
+++ b/Build/source/texk/web2c/alephdir/am/aleph.am
@@ -10,42 +10,40 @@ bin_PROGRAMS += aleph
endif ALEPH
EXTRA_PROGRAMS += aleph
-## With --enable-ipc, Aleph may need to link with -lsocket.
+# With --enable-ipc, Aleph may need to link with -lsocket.
aleph_LDADD = $(LDADD) $(ipc_socketlibs)
aleph_CPPFLAGS = -I$(srcdir)/alephdir $(AM_CPPFLAGS)
+aleph_CFLAGS = $(WARNING_CFLAGS)
-## Aleph C sources
-aleph_c_h = alephini.c aleph0.c aleph1.c aleph2.c aleph3.c alephcoerce.h alephd.h
+# Aleph C sources
+aleph_c_h = alephini.c aleph0.c alephcoerce.h alephd.h
nodist_aleph_SOURCES = $(aleph_c_h) aleph-pool.c alephextra.c
aleph_SOURCES = \
alephdir/aleph.c \
alephdir/alephbis.c \
alephdir/alephextra.h \
- alephdir/alephmem.h \
- alephdir/aleph-pool.h
+ alephdir/alephmem.h
# We must create alephd.h before building the aleph_OBJECTS.
$(aleph_OBJECTS): alephd.h
$(aleph_c_h): aleph-web2c
+ @$(web2c) aleph
aleph-web2c: aleph.p $(web2c_texmf) alephdir/aleph.defines
- $(web2c) aleph
- echo timestamp >$@
- touch $(aleph_c_h)
-aleph-pool.c: aleph.pool $(makecpool_stamp) alephdir/aleph-pool.h
- $(makecpool) aleph.pool $(srcdir)/alephdir/aleph-pool.h >$@ || rm -f $@
+ @$(web2c) aleph
+aleph-pool.c: aleph.pool alephd.h $(makecpool_stamp)
+ $(makecpool) aleph >$@ || rm -f $@
alephextra.c: lib/texmfmp.c alephdir/alephextra.h alephd.h
sed s/TEX-OR-MF-OR-MP/aleph/ $(srcdir)/lib/texmfmp.c >$@
-## Tangling Aleph
+# Tangling Aleph
aleph.p aleph.pool: aleph-tangle
-aleph-tangle: otangle$(EXEEXT) aleph.web aleph.ch
- $(otangle) aleph aleph
- echo timestamp >$@
- touch aleph.p aleph.pool
+ @$(o_tangle) aleph aleph
+aleph-tangle: otangle$(EXEEXT) aleph.web aleph.ch tangle-sh
+ @$(o_tangle) aleph aleph
-## Generate aleph.web
+# Generate aleph.web
aleph_web_srcs = \
tex.web \
alephdir/om16bit.ch \
@@ -73,7 +71,7 @@ aleph_web_srcs = \
aleph.web: tie$(EXEEXT) $(aleph_web_srcs)
$(tie) -m aleph.web $(aleph_web_srcs)
-## Generate aleph.ch
+# Generate aleph.ch
aleph_ch_srcs = \
alephdir/com16bit.ch \
alephdir/comstr.ch \
@@ -110,5 +108,5 @@ EXTRA_DIST += \
## Eventually delete these files
##
-EXTRA_DIST += alephdir/aleph.mk
+EXTRA_DIST += alephdir/aleph-pool.h alephdir/aleph.mk
diff --git a/Build/source/texk/web2c/alephdir/com16bit.ch b/Build/source/texk/web2c/alephdir/com16bit.ch
index 42e4faa3f0c..fea714b8777 100644
--- a/Build/source/texk/web2c/alephdir/com16bit.ch
+++ b/Build/source/texk/web2c/alephdir/com16bit.ch
@@ -271,7 +271,7 @@ if ini_version then
% [3.26] name_of_file is no longer an array. And change the destination
% type to text_char, which fixes:
-%
+%
% Date: 19 Sep 1994 10:38:24 +0200
% From: thorinn@diku.dk (Lars Mathiesen)
% When echoed to the screen and in the log, character codes
@@ -420,7 +420,7 @@ We define |input_ln| in C, for efficiency.
tini@/
@#
@!bound_default:integer; {temporary for setup}
-@!bound_name:^char; {temporary for setup}
+@!bound_name:const_cstring; {temporary for setup}
@#
@!main_memory:integer; {total memory words allocated in initex}
@!extra_mem_bot:integer; {|mem_min:=mem_bot-extra_mem_bot| except in \.{INITEX}}
@@ -578,6 +578,16 @@ if last > first then
@!init function get_strings_started:boolean; {initializes the string pool,
@z
+@x - unused variables.
+var k,@!l:0..biggest_char; {small indices or counters}
+@!m,@!n:text_char; {characters input from |pool_file|}
+@!g:str_number; {garbage}
+@!a:integer; {accumulator for check sum}
+@!c:boolean; {check sum has been checked}
+@y
+var g:str_number; {garbage}
+@z
+
@x
@ @d bad_pool(#)==begin wake_up_terminal; write_ln(term_out,#);
a_close(pool_file); get_strings_started:=false; return;
@@ -1403,10 +1413,10 @@ var k:0..buf_size; {index into |buffer|}
if e=".tex" then show_context;
@y
if (e=".tex") or (e="") then show_context;
-print_ln; print("(Type <return> to retry, or <eof> to exit");
+print_ln; print_c_string(prompt_file_name_help_msg);
if (e<>"") then
begin
- print(" Default file extension is `"); print(e); print("'");
+ print("; default file extension is `"); print(e); print("'");
end;
print(")"); print_ln;
@z
@@ -1443,8 +1453,7 @@ ship out a box of stuff, we shall use the macro |ensure_dvi_open|.
@x [29.534] l.10285 - Adjust for C string conventions.
@!months:packed array [1..36] of char; {abbreviations of month names}
@y
-@!months:^char;
-j:integer;
+@!months:const_cstring;
@z
@x [29.534] l. - Send the job_name to the file recorder.
@@ -1491,7 +1500,7 @@ pack_cur_name;
loop@+ begin begin_file_reading; {set up |cur_file| and new level of input}
tex_input_type := 1; {Tell |open_input| we are \.{\\input}.}
{Kpathsea tries all the various ways to get the file.}
- if open_in_name_ok(name_of_file+1)
+ if kpse_in_name_ok(name_of_file+1)
and a_open_in(cur_file, kpse_tex_format) then
goto done;
@z
@@ -1658,7 +1667,7 @@ if abs(intcast(fit_class)-intcast(fitness(r)))>1 then d:=d+adj_demerits;
@y
@!trie_pointer=0..ssup_trie_size; {an index into |trie|}
@z
-
+
@x [42.921] l.18075 - bigtrie: allow larger hyphenation tries.
@!trie:array[trie_pointer] of two_halves; {|trie_link|, |trie_char|, |trie_op|}
@y
@@ -2011,7 +2020,7 @@ else kpse_make_tex_discard_errors := 0;
@y
pack_cur_name;
tex_input_type:=0; {Tell |open_input| we are \.{\\openin}.}
- if open_in_name_ok(name_of_file+1)
+ if kpse_in_name_ok(name_of_file+1)
and a_open_in(read_file[n], kpse_tex_format) then
read_open[n]:=just_open;
@z
@@ -2139,7 +2148,7 @@ if x<>mem_bot then goto bad_fmt;
undump_int(mem_top); format_debug ('mem_top')(mem_top);
if mem_bot+1100>mem_top then goto bad_fmt;
-
+
head:=contrib_head; tail:=contrib_head;
page_tail:=page_head; {page initialization}
@@ -2658,8 +2667,8 @@ var j:small_number; {write stream number}
prompt_file_name("output file name",".tex");
write_open[j]:=true;
@y
- while not a_open_out(write_file[j])
- or not open_out_name_ok(name_of_file+1) do
+ while not kpse_out_name_ok(name_of_file+1)
+ or not a_open_out(write_file[j]) do
prompt_file_name("output file name",".tex");
write_open[j]:=true;
{If on first line of input, log file is not ready yet, so don't log.}
diff --git a/Build/source/texk/web2c/alephdir/eo16bit.ch b/Build/source/texk/web2c/alephdir/eo16bit.ch
index 87872aa2d3e..d3749c3aff5 100644
--- a/Build/source/texk/web2c/alephdir/eo16bit.ch
+++ b/Build/source/texk/web2c/alephdir/eo16bit.ch
@@ -547,7 +547,7 @@ the |eqtb| array.
@<Declare \eTeX\ procedures for tr...@>=
@!stat procedure show_sa(@!p:pointer;@!s:str_number);
-var t:small_number; {the type of element}
+{|var t:small_number;|} {the type of element}
begin begin_diagnostic; print_char("{"); print(s); print_char(" ");
{
|if p=null then print_char("?")| {this can't happen}
diff --git a/Build/source/texk/web2c/alephdir/eomem.ch b/Build/source/texk/web2c/alephdir/eomem.ch
index dd91d3128be..82b69ceacb2 100644
--- a/Build/source/texk/web2c/alephdir/eomem.ch
+++ b/Build/source/texk/web2c/alephdir/eomem.ch
@@ -77,6 +77,11 @@ cur_val_level:=m;
@d ship_out_flag==(max_global_box_flag+1) {context code for `\.{\\shipout}'}
@z
%----------------------------------------
+@x
+@!a:small_number; {global prefix}
+@y
+@z
+%----------------------------------------
@x eobase.ch l.2309
begin if box_context<global_box_flag then
begin cur_val:=box_context-box_flag; a:=0;
diff --git a/Build/source/texk/web2c/alephdir/om16bit.ch b/Build/source/texk/web2c/alephdir/om16bit.ch
index bca2c95fb1b..9017f677d10 100644
--- a/Build/source/texk/web2c/alephdir/om16bit.ch
+++ b/Build/source/texk/web2c/alephdir/om16bit.ch
@@ -2125,7 +2125,7 @@ else begin p:=new_noad; math_type(nucleus(p)):=math_char;
end;
@y
procedure set_math_char(@!c:integer);
-var p,q,r:pointer; {the new noad}
+var p:pointer; {the new noad}
begin if c>=@"8000000 then
@<Treat |cur_chr|...@>
else begin p:=new_noad; math_type(nucleus(p)):=math_char;