Message-Id: Date: Wed, 16 Sep 98 16:26:32 MET DST From: Michel de Ruiter To: dj AT delorie DOT com cc: djgpp-workers AT delorie DOT com Subject: Some minor things to the latest alpha Precedence: bulk Hi, all, I have downloaded the last djlsr202 alpha (980907). I compared it to the djlsr on my own harddisk, and would like to propose some small changes. I hope it helps, I'm sorry if it doesn't. The following files can be left out of djlsr202.zip, to save some space: src/*/makefile.oi src/*/makefile.rf src/*/makefile.sub src/libm/math/targetdep.texi src/stub/stub.map src/libc/stubs/stub00??.s And (it might be a good idea to include it, though): src/debug/fsdb/expr.c I hope the diffs are OK, because I `reversed' them by hand after realizing too late that I had them backwards. ### First, the following patches may be useful to have `make clean' ### really clean things: diff -rTuP /djlsr202/src/debug/fsdb/makefile ./src/debug/fsdb/makefile --- /djlsr202/src/debug/fsdb/makefile Wed Aug 26 18:42:44 1998 +++ ./src/debug/fsdb/makefile Thu Jan 1 20:38:50 1998 @@ -21,3 +21,6 @@ $(BIN)/fsdb.exe : $C $(EOBJS) $(LIB)/libdbg.a $L $(LINK) $(EXE) + + clean :: + $(MISC) rm expr.c diff -rTuP /djlsr202/src/debug/makefile ./src/debug/makefile --- /djlsr202/src/debug/makefile Wed Aug 26 14:57:26 1998 +++ ./src/debug/makefile Thu Jan 1 20:38:50 1998 @@ -16,3 +16,4 @@ $(MAKE) -C fsdb clean $(MAKE) -C edebug clean $(MAKE) -C common clean + $(MISC) rm makefile.sub diff -rTuP /djlsr202/src/libc/makefile ./src/libc/makefile --- /djlsr202/src/libc/makefile Wed Aug 26 15:00:22 1998 +++ ./src/libc/makefile Thu Jan 1 20:38:50 1998 @@ -32,3 +32,4 @@ @$(MISC) rm libc2.tex @$(MAKE) -C stubs $@ @$(MAKE) -C crt0 $@ + @$(MISC) rm makefile.sub diff -rTuP /djlsr202/src/libemu/makefile ./src/libemu/makefile --- /djlsr202/src/libemu/makefile Wed Aug 26 15:47:00 1998 +++ ./src/libemu/makefile Sun Jul 12 17:11:14 1998 @@ -11,3 +11,6 @@ $(BIN)/emu387.dxe : src/emu387.o src/emudummy.o $(HOSTBIN)/dxegen.exe $(BIN)/emu387.dxe __emu_entry src/emu387.o id_emu.o src/emudummy.o -L../../lib $(LIBGCCA) -lc $(LIBGCCA) + + clean :: + $(MISC) rm makefile.sub diff -rTuP /djlsr202/src/libm/makefile ./src/libm/makefile --- /djlsr202/src/libm/makefile Wed Aug 26 15:47:16 1998 +++ ./src/libm/makefile Mon Jul 6 14:12:26 1998 @@ -5,3 +5,6 @@ LIBNAME=m include $(TOP)/../makefile.lib + + clean :: + $(MISC) rm makefile.sub diff -rTuP /djlsr202/src/libm/math/makefile ./src/libm/math/makefile --- /djlsr202/src/libm/math/makefile Wed Aug 26 16:54:52 1998 +++ ./src/libm/math/makefile Mon Jul 6 16:37:10 1998 @@ -199,7 +199,7 @@ $(GCC) -D_HAVE_STDC -O2 -o $@ $< clean :: - -$(MISC) rm *.def chew.exe + -$(MISC) rm *.def chew.exe targetdep.texi # Additional dependencies $(OBJS): fdlibm.h $(TOP)/../../include/libm/math.h diff -rTuP /djlsr202/src/makefile ./src/makefile --- /djlsr202/src/makefile Wed Aug 26 16:53:50 1998 +++ ./src/makefile Thu Jan 1 23:21:04 1998 @@ -51,4 +51,4 @@ $(MAKE) -C dxe clean $(MAKE) -C mkdoc clean $(MAKE) -C docs/kb clean - ./misc.exe rm makemake.exe copyrite.exe + ./misc.exe rm makemake.exe copyrite.exe misc.exe ### Then, I think dxegen.exe should be rebuilt if libc.a changed: diff -rTuP /djlsr202/src/dxe/makefile ./src/dxe/makefile --- /djlsr202/src/dxe/makefile Wed Aug 26 16:16:38 1998 +++ ./src/dxe/makefile Sun Jul 26 17:26:36 1998 @@ -12,7 +12,7 @@ $(HOSTBIN)/dxegen.exe \ $E - $(BIN)/dxegen.exe : dxegen.c + $(BIN)/dxegen.exe : dxegen.c $(L) $(XLGCC) -s dxegen.c -o $@ $(HOSTBIN)/dxegen.exe : dxegen.c ### After applying all patches posted to djgpp-workers AT delorie DOT com ### (mostly by Robert Hoehne), I miss the following changes in the ### latest alpha, which may or may not be necessary: diff -rTuP /djlsr202/src/libc/ansi/stdlib/malloc.c ./src/libc/ansi/stdlib/malloc.c --- /djlsr202/src/libc/ansi/stdlib/malloc.c Sat Aug 8 00:14:24 1998 +++ ./src/libc/ansi/stdlib/malloc.c Sun Jun 28 22:14:04 1998 @@ -279,9 +279,10 @@ free(void *ptr) { int b; - BLOCK *block = (BLOCK *)((char *)ptr-4); + BLOCK *block; if (ptr == 0) return; + block = (BLOCK *)((char *)ptr-4); #if NUMSMALL if (block->size < SMALL) @@ -326,19 +327,20 @@ void * realloc(void *ptr, size_t size) { - BLOCK *b = (BLOCK *)((char *)ptr-4); + BLOCK *b; char *newptr; int copysize; if (ptr == 0) return malloc(size); - copysize = b->size; - if (size <= b->size) + b = (BLOCK *)((char *)ptr-4); + copysize = b->size & ~1; + if (size <= copysize) { #if 0 - if (b->size < 2*MIN_SAVE_EXTRA - || (size >= b->size-512 && size >= b->size/2)) + if (copysize < 2*MIN_SAVE_EXTRA + || (size >= copysize-512 && size >= copysize/2)) #endif return ptr; copysize = size; @@ -347,7 +349,7 @@ newptr = (char *)malloc(size); #if DEBUG printf("realloc %d %d/%08x %08x->%08, %d\n", - size, b->size, b, ptr, newptr, copysize); + size, b->size & ~1, b, ptr, newptr, copysize); #endif memcpy(newptr, ptr, copysize); free(ptr); ### Also, JFYI, Robert posted the following patch to crt1.c: diff -rTuP /djlsr202/src/libc/crt0/crt1.c ./src/libc/crt0/crt1.c --- /djlsr202/src/libc/crt0/crt1.c Wed Aug 26 13:39:58 1998 +++ ./src/libc/crt0/crt1.c Sun Jun 28 23:30:22 1998 @@ -148,7 +148,7 @@ } prog_name = (char *)calloc(1, strlen(fc) + 1); - strncpy(prog_name, fc, 16); + strcpy(prog_name, fc); } extern void __main(void); ### I think this is a typo: diff -rTuP /djlsr202/src/stub/exe2coff.c ./src/stub/exe2coff.c --- /djlsr202/src/stub/exe2coff.c Wed Aug 26 16:33:20 1998 +++ ./src/stub/exe2coff.c Sun Aug 16 11:23:06 1998 @@ -24,7 +24,7 @@ || tolower(dot[2]) != 'x' || tolower(dot[3]) != 'e') { - fprintf(stderr, "Arguments MUST end with a .exe extension\n", fname); + fprintf(stderr, "`%s': Arguments MUST end with a .exe extension\n", fname); return; } ### I want to propose the following to make coff2exe.exe a symlink ### instead of coff2exe.bat (advantages: pass all parameters, don't ### have to use `call' when used from a batch-file): diff -rTuP /djlsr202/src/stub/makefile ./src/stub/makefile --- /djlsr202/src/stub/makefile Wed Aug 26 16:10:52 1998 +++ ./src/stub/makefile Thu Jan 1 21:14:26 1998 @@ -13,6 +13,7 @@ $(BIN)/go32-v2.exe \ $(BIN)/stubedit.exe \ $(BIN)/stubify.exe \ + $(BIN)/coff2exe.exe \ $(BIN)/exe2coff.exe \ $(INC)/stubinfo.h \ $E @@ -48,6 +49,10 @@ $(EXE) stubify.o: stubify.c stub.h + + $(BIN)/coff2exe.exe : $(HOSTBIN)/stubify.exe + $< -g $@ + $(HOSTBIN)/stubedit.exe $@ runfile=stubify $(BIN)/exe2coff.exe : exe2coff.o ### To silence warnings from gcc 2.8.x, I had to make the following ### minor changes: diff -rTuP /djlsr202/src/utils/djtar/epunzip.c ./src/utils/djtar/epunzip.c --- /djlsr202/src/utils/djtar/epunzip.c Wed Aug 26 16:50:32 1998 +++ ./src/utils/djtar/epunzip.c Thu Jan 1 16:35:50 1998 @@ -160,12 +160,14 @@ O_WRONLY | O_BINARY | O_CREAT | O_EXCL, S_IWRITE | S_IREAD); if(epoutfile < 0) + { if(change(changed_name, "Cannot exclusively open file", 0)) goto open_file; else epoutfile = open("/dev/null", O_WRONLY | O_BINARY | O_CREAT | O_EXCL, S_IWRITE | S_IREAD); + } real_file = 1; } else diff -rTuP /djlsr202/src/utils/djtar/untar.c ./src/utils/djtar/untar.c --- /djlsr202/src/utils/djtar/untar.c Wed Aug 26 16:50:42 1998 +++ ./src/utils/djtar/untar.c Thu Jan 1 16:35:50 1998 @@ -193,6 +193,7 @@ r = open(changed_name, O_WRONLY | O_BINARY | O_CREAT | O_EXCL, S_IWRITE | S_IREAD); if (r < 0) + { if (change(changed_name, "Cannot exclusively open file", 0)) goto open_file; else @@ -200,6 +201,7 @@ skipping = (size+511) & ~511; continue; } + } } else { diff -rTuP /djlsr202/src/utils/texi2ps/ifset.c ./src/utils/texi2ps/ifset.c --- /djlsr202/src/utils/texi2ps/ifset.c Wed Aug 26 16:47:52 1998 +++ ./src/utils/texi2ps/ifset.c Sun Oct 8 16:34:18 1995 @@ -216,7 +216,7 @@ char *p = arg; int quote = 0; - while (quote || *p && *p != ' ' && *p != '\t') + while (quote || (*p && *p != ' ' && *p != '\t')) { if (quote == 0 && (*p == '"' || *p == '\'')) quote = *p; diff -rTuP /djlsr202/src/utils/texi2ps/word.c ./src/utils/texi2ps/word.c --- /djlsr202/src/utils/texi2ps/word.c Wed Aug 26 16:47:28 1998 +++ ./src/utils/texi2ps/word.c Sun Oct 8 16:37:46 1995 @@ -79,7 +79,6 @@ static int pending_whitespace = 0; static int ps_col = 0; static int saw_indent = 0; - static int symbol_font = 0; static int wp = 0; int prevailing_indent = 0; @@ -159,7 +158,6 @@ static void check_eop() { - int i; WordCache *wc; Word *we, *wet; if (y < 0 || page_flushing) @@ -236,7 +234,6 @@ { WordCache *wc; Word *we; - char psbuf[100]; float width = 0; int i; bol_size = 0; @@ -274,9 +271,14 @@ we->x = x+MARGIN; we->y = y+MARGIN + baseline_offset; + /* + { + char psbuf[100]; + psputw(s); - /* psputw(s); sprintf(psbuf, "%d %d m", x+MARGIN, y+MARGIN); + psprintf(psbuf); + } + */ - psprintf(psbuf); */ need_lb = 1; bol_size = 0; ### Also, I changed all functions in texi2ps.c without a return-type ### to void, because they return nothing: diff -rTuP /djlsr202/src/utils/texi2ps/texi2ps.c ./src/utils/texi2ps/texi2ps.c --- /djlsr202/src/utils/texi2ps/texi2ps.c Wed Aug 26 16:44:56 1998 +++ ./src/utils/texi2ps/texi2ps.c Sun Oct 8 16:33:54 1995 @@ -39,7 +39,7 @@ static int eat_skips = 0; static int fill_mode; - typedef int FUNCTION (); /* So I can say FUNCTION *foo; */ + typedef void FUNCTION (); /* So I can say FUNCTION *foo; */ /* The list of commands that we hack in texinfo. Each one has an associated function. When the command is encountered in the @@ -148,10 +148,10 @@ #define BRACE_WORD_ARGS 4 #define SELF_ARGS 5 - int cm_example(); - int cm_samp(); + void cm_example(); + void cm_samp(); - big_font(int se, char *arg, int szup) + void big_font(int se, char *arg, int szup) { if (se == START) { @@ -170,7 +170,7 @@ } } - cm_TeX(int se) + void cm_TeX(int se) { if (se == START && !suspend_output) { @@ -188,24 +188,24 @@ } } - cm_appendix(int se, char *arg) + void cm_appendix(int se, char *arg) { if (se == START) page_flush(); big_font(se, arg, 8); } - cm_appendixsec(int se, char *arg) { big_font(se, arg, 6); } - cm_appendixsubsec(int se, char *arg) { big_font(se, arg, 4); } - cm_appendixsubsubsec(int se, char *arg) { big_font(se, arg, 2); } - cm_asis(){} + void cm_appendixsec(int se, char *arg) { big_font(se, arg, 6); } + void cm_appendixsubsec(int se, char *arg) { big_font(se, arg, 4); } + void cm_appendixsubsubsec(int se, char *arg) { big_font(se, arg, 2); } + void cm_asis(){} - cm_asterisk() + void cm_asterisk() { line_break(); } - cm_author(int se, char *args) + void cm_author(int se, char *args) { if (suspend_output) return; @@ -222,7 +222,7 @@ } } - cm_bold(int se) + void cm_bold(int se) { if (se == START) psf_pushset(PSF_bold); @@ -230,13 +230,13 @@ psf_pop(); } - cm_br(int se) + void cm_br(int se) { if (se == START) para_close(); } - cm_bullet(int se) + void cm_bullet(int se) { if (se == START) { @@ -245,30 +245,30 @@ } } - cm_bye() + void cm_bye() { page_flush(); bye = 1; } - cm_cartouche(int se, char *arg) { cm_example(se, arg); } - cm_center(){} - cm_chapheading(int se, char *arg) + void cm_cartouche(int se, char *arg) { cm_example(se, arg); } + void cm_center(){} + void cm_chapheading(int se, char *arg) { big_font(se, arg, 8); } - cm_chapter(int se, char *arg) + void cm_chapter(int se, char *arg) { if (se == START) page_flush(); big_font(se, arg, 8); } - cm_cindex(){} - cm_cite(){} + void cm_cindex(){} + void cm_cite(){} - cm_clear(int se, char *arg) + void cm_clear(int se, char *arg) { char *p; @@ -291,7 +291,7 @@ clear_flag(arg); } - cm_code(int se) + void cm_code(int se) { if (se == START) psf_pushfont(PSF_courier); @@ -299,7 +299,7 @@ psf_pop(); } - cm_copyright(int se) + void cm_copyright(int se) { if (suspend_output) return; @@ -307,7 +307,7 @@ word_symbol(0323); } - cm_ctrl(int se, char *args) + void cm_ctrl(int se, char *args) { if (suspend_output) return; @@ -322,17 +322,17 @@ } } - cm_defcodeindex(){} - cm_defindex(){} - cm_defun(){} - cm_dfn(){} - cm_display(){} + void cm_defcodeindex(){} + void cm_defindex(){} + void cm_defun(){} + void cm_dfn(){} + void cm_display(){} - cm_do_cond(int se) + void cm_do_cond(int se) { } - cm_dots(int se) + void cm_dots(int se) { if (suspend_output) return; @@ -340,7 +340,7 @@ word_symbol(0274); } - cm_emph(int se, char *args) + void cm_emph(int se, char *args) { if (se == START) { @@ -352,14 +352,14 @@ } } - cm_end(int se, char *w) + void cm_end(int se, char *w) { FUNCTION *cmd = lookup_command(w); if (cmd) cmd(END); } - helper_enumerate(int se) + void helper_enumerate(int se) { if (suspend_output) return; @@ -377,7 +377,7 @@ } } - cm_enumerate(int se, char *arg) + void cm_enumerate(int se, char *arg) { if (se == START) { @@ -402,7 +402,7 @@ } } - cm_equiv(int se) + void cm_equiv(int se) { if (suspend_output) return; @@ -410,7 +410,7 @@ word_symbol(0272); } - cm_error(int se) + void cm_error(int se) { if (suspend_output) return; @@ -421,7 +421,7 @@ } } - cm_example(int se) + void cm_example(int se) { if (se == START) { @@ -439,13 +439,13 @@ } } - cm_exdent(int se) + void cm_exdent(int se) { if (se == START) para_set_indent(-prevailing_indent); } - cm_expansion(int se) + void cm_expansion(int se) { if (suspend_output) return; @@ -453,25 +453,25 @@ word_symbol(0336); } - cm_file(int se, char *args) + void cm_file(int se, char *args) { cm_samp(se, args); } - cm_findex(){} - cm_flushleft(){} - cm_flushright(){} + void cm_findex(){} + void cm_flushleft(){} + void cm_flushright(){} - int cm_italic(); - cm_footnote(int se) + void cm_italic(); + void cm_footnote(int se) { cm_italic(se); } - cm_footnotestyle(){} - cm_force_abbreviated_whitespace(){} + void cm_footnotestyle(){} + void cm_force_abbreviated_whitespace(){} - cm_format(int se, char *args) + void cm_format(int se, char *args) { if (se == 0) { @@ -486,17 +486,17 @@ } } - int cm_table(); - cm_ftable(int se, char *arg) + void cm_table(); + void cm_ftable(int se, char *arg) { cm_table(se, arg); } - cm_group(){} - cm_heading(int se, char *arg) { big_font(se, arg, 6); } + void cm_group(){} + void cm_heading(int se, char *arg) { big_font(se, arg, 6); } static int set_level, clear_level; - cm_ifclear(int se, char *arg) + void cm_ifclear(int se, char *arg) { if (se == START) { @@ -516,7 +516,7 @@ } } - cm_ifset(int se, char *arg) + void cm_ifset(int se, char *arg) { if (se == START) { @@ -536,7 +536,7 @@ } } - cm_ignore_cond(int se) + void cm_ignore_cond(int se) { if (se == START) suspend_output ++; @@ -546,9 +546,9 @@ fprintf(stderr, "\nunmatched @end XXX at %s", fileio_where()); } - cm_ignore_line(){} + void cm_ignore_line(){} - cm_ignore_sentence_ender(int se, char *arg) + void cm_ignore_sentence_ender(int se, char *arg) { if (suspend_output) return; @@ -556,11 +556,11 @@ word_add_quoted(arg[0]); } - cm_include(int se, char *args) { fileio_include(args); } - cm_infoinclude(int se, char *args) { fileio_include(args); } - cm_inforef(){} + void cm_include(int se, char *args) { fileio_include(args); } + void cm_infoinclude(int se, char *args) { fileio_include(args); } + void cm_inforef(){} - cm_italic(int se) + void cm_italic(int se) { if (se == START) psf_pushset(PSF_italic); @@ -568,7 +568,7 @@ psf_pop(); } - cm_item(int se, char *s) + void cm_item(int se, char *s) { if (table_stack) { @@ -588,7 +588,7 @@ fprintf(stderr, "\n AT item without table_stack at %s\n", fileio_where()); } - cm_itemize(int se, char *arg) + void cm_itemize(int se, char *arg) { if (se == START) { @@ -602,32 +602,32 @@ } } - cm_itemx(int se, char *arg) + void cm_itemx(int se, char *arg) { cm_item(se, arg); } - cm_kbd(int se) + void cm_kbd(int se) { if (se == START) psf_pushfont(PSF_helvetica); else psf_pop(); } - cm_key(int se) { cm_kbd(se); } - cm_kindex(){} - cm_lisp(){} - cm_lowersections(){} - cm_macro(){} + void cm_key(int se) { cm_kbd(se); } + void cm_kindex(){} + void cm_lisp(){} + void cm_lowersections(){} + void cm_macro(){} - cm_majorheading(int se, char *arg) + void cm_majorheading(int se, char *arg) { big_font(se, arg, 8); } - cm_math(){} + void cm_math(){} - cm_menu(int se) + void cm_menu(int se) { if (se == START) { @@ -643,7 +643,7 @@ } } - cm_minus(int se) + void cm_minus(int se) { if (suspend_output) return; @@ -651,35 +651,35 @@ word_symbol(0055); } - cm_node(int se, char *args) + void cm_node(int se, char *args) { sscanf(args, "%[^,\n]", args); screenio_note("%3d %s", current_page, args); } - cm_noindent(){} + void cm_noindent(){} - cm_page(int se) + void cm_page(int se) { if (se == START) page_flush(); } - cm_paragraphindent(){} - cm_pindex(){} - cm_point(){} - cm_print(){} - cm_printindex(){} - int cm_xref(); - cm_pxref(int se, char *a) + void cm_paragraphindent(){} + void cm_pindex(){} + void cm_point(){} + void cm_print(){} + void cm_printindex(){} + void cm_xref(); + void cm_pxref(int se, char *a) { cm_xref(se, a); } - cm_quotation(){} - cm_raisesections(){} - cm_refill(){} + void cm_quotation(){} + void cm_raisesections(){} + void cm_refill(){} - cm_result(int se) + void cm_result(int se) { if (suspend_output) return; @@ -687,7 +687,7 @@ word_symbol(0336); } - cm_roman(int se, char *arg) + void cm_roman(int se, char *arg) { if (se == START) psf_pushfont(PSF_times); @@ -695,12 +695,12 @@ psf_pop(); } - cm_samp(int se) + void cm_samp(int se) { cm_code(se); } - cm_sc(int se) + void cm_sc(int se) { if (se == START) { @@ -714,9 +714,9 @@ } } - cm_section(int se, char *arg) { big_font(se, arg, 6); } + void cm_section(int se, char *arg) { big_font(se, arg, 6); } - cm_set(int se, char *arg) + void cm_set(int se, char *arg) { char *p; @@ -749,16 +749,16 @@ set_flag(arg, p); } - cm_setfilename(){} + void cm_setfilename(){} - cm_smallexample(int se) + void cm_smallexample(int se) { cm_example(se); } - cm_smalllisp(){} + void cm_smalllisp(){} - cm_sp(int se, char *a) + void cm_sp(int se, char *a) { if (se == START) { @@ -770,7 +770,7 @@ } } - cm_strong(int se) + void cm_strong(int se) { if (se == START) psf_pushset(PSF_bold); @@ -778,14 +778,14 @@ psf_pop(); } - cm_subheading(int se, char *arg) { big_font(se, arg, 4); } - cm_subsection(int se, char *arg) { big_font(se, arg, 4); } - cm_subsubheading(int se, char *arg) { big_font(se, arg, 2); } - cm_subsubsection(int se, char *arg) { big_font(se, arg, 2); } - cm_subtitle(int se, char *a) { big_font(se, a, 10); } - cm_synindex(){} + void cm_subheading(int se, char *arg) { big_font(se, arg, 4); } + void cm_subsection(int se, char *arg) { big_font(se, arg, 4); } + void cm_subsubheading(int se, char *arg) { big_font(se, arg, 2); } + void cm_subsubsection(int se, char *arg) { big_font(se, arg, 2); } + void cm_subtitle(int se, char *a) { big_font(se, a, 10); } + void cm_synindex(){} - cm_table(int se, char *arg) + void cm_table(int se, char *arg) { if (se == START) { @@ -800,9 +800,9 @@ } } - cm_tindex(){} + void cm_tindex(){} - cm_title(int se, char *arg) + void cm_title(int se, char *arg) { if (se == START) { @@ -828,7 +828,7 @@ } } - cm_titlefont(int se) + void cm_titlefont(int se) { if (se == START) psf_pushscale(ps_fontsize * 2 + 18); @@ -839,7 +839,7 @@ } } - cm_titlepage(int se) + void cm_titlepage(int se) { if (se == START) remember_brace_args(cm_titlepage, "titlepage"); @@ -847,7 +847,7 @@ page_flush(); } - cm_today(int se) + void cm_today(int se) { if (suspend_output) return; @@ -863,21 +863,21 @@ } } - cm_top(){} - cm_unmacro(){} + void cm_top(){} + void cm_unmacro(){} - cm_unnumbered(int se, char *arg) + void cm_unnumbered(int se, char *arg) { if (se == START) page_flush(); big_font(se, arg, 8); } - cm_unnumberedsec(int se, char *arg) { big_font(se, arg, 6); } - cm_unnumberedsubsec(int se, char *arg) { big_font(se, arg, 4); } - cm_unnumberedsubsubsec(int se, char *arg) { big_font(se, arg, 2); } + void cm_unnumberedsec(int se, char *arg) { big_font(se, arg, 6); } + void cm_unnumberedsubsec(int se, char *arg) { big_font(se, arg, 4); } + void cm_unnumberedsubsubsec(int se, char *arg) { big_font(se, arg, 2); } - cm_value(int se, char *flag) + void cm_value(int se, char *flag) { if (suspend_output) return; @@ -900,22 +900,22 @@ fprintf(stderr, "\ncm_value(END, %s) at %s", flag, fileio_where()); } - cm_var(){} - cm_vindex(){} + void cm_var(){} + void cm_vindex(){} - cm_vskip() + void cm_vskip() { vskip_enabled = 1; } - cm_vtable(int se, char *arg) + void cm_vtable(int se, char *arg) { cm_table(se, arg); } - cm_w(){} + void cm_w(){} - cm_xref(int se, char *a) + void cm_xref(int se, char *a) { if (suspend_output) return; @@ -928,10 +928,10 @@ } } - command_name_condition(){} - do_nothing(){} + void command_name_condition(){} + void do_nothing(){} - insert_self(int se, char *a) + void insert_self(int se, char *a) { if (suspend_output) return; @@ -1312,7 +1312,7 @@ } } - static int + static void usage(void) { printf("usage: texi2ps [-f size] [-I dir] [-Idir] [-v] [-m pts] [-Dname[=val]] [-Uname] [file...]\n"); ### Because 4DOS (an alternative to COMMAND.COM) has a ### NOCLOBBER-option like Bash has, it is necessary to first delete a ### file before writing to it (an alternative would be to force ### COMMAND.COM to be used): diff -rTuP /djlsr202/src/utils/texi2ps/getmet1.bat ./src/utils/texi2ps/getmet1.bat --- /djlsr202/src/utils/texi2ps/getmet1.bat Sat Aug 8 15:03:22 1998 +++ ./src/utils/texi2ps/getmet1.bat Mon Sep 7 20:19:48 1998 @@ -1,7 +1,7 @@ @echo off echo %1 %2 %3 + del %2 echo float %3[] = { > %2 echo 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 >> %2 gs.exe -q -sDEVICE=pcx16 -sthe_font=%1 metrics.psc >> %2 ### Finally, I saw some hardcoded paths in (old?) scripts in utils/, ### and changed them to something more probable (hopefully): diff -rTuP /djlsr202/utils/hdr.pl ./utils/hdr.pl --- /djlsr202/utils/hdr.pl Wed Aug 26 19:25:46 1998 +++ ./utils/hdr.pl Sat Sep 21 10:14:20 1996 @@ -1,10 +1,10 @@ #!/bin/perl # -*- perl -*- - $inc = "d:/v2/include"; + $inc = "$ENV{'DJDIR'}/include"; - $pattern = shift; + $pattern = shift || exit; print "\n"; @@ -34,7 +34,7 @@ sub scan_file { local($file) = @_; - open(F, "$inc/$file"); + open(F, "$inc/$file") || return; $tag = '?'; while () { if (/$pattern/io) { diff -rTuP /djlsr202/utils/whatin.sh ./utils/whatin.sh --- /djlsr202/utils/whatin.sh Wed Aug 26 19:30:58 1998 +++ ./utils/whatin.sh Mon Mar 20 04:35:36 1995 @@ -1,6 +1,6 @@ #!/bin/ksh - cd d:/posix/include + cd ${DJDIR}/include if [ x"$1" = x"" ] then -- *Groeten, Michel*. _http://www.cs.vu.nl/~mdruiter_ ____________ \ /====\ / "You know, Beavis, you need things that suck, \/ \/ to have things that are cool", Butt-Head.