I am uploading a NMU to DELAYED/10 in order to fix this.
Please find the debdiff attached.
diff -Nru lookup-1.08b/Makefile lookup-1.08b/Makefile
--- lookup-1.08b/Makefile 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/Makefile 1997-02-13 09:12:46.000000000 +0000
@@ -16,7 +16,7 @@
CC_TRAD=$(CC) -traditional
## set to "gcc1", "gcc2" or leave blank
-gcc=gcc2
+gcc=gcc1
## selecte exactly "0" (no) or "1" (yes) for the following
optimize=0
@@ -34,7 +34,7 @@
## it out if that's the case and you don't have a traditional compiler
## around.
##
-#COMPILE_WITH_TRAD=termset_trad.o
+COMPILE_WITH_TRAD=termset_trad.o
RANLIB=/usr/bin/ranlib
@@ -154,22 +154,19 @@
echo '/* this file generated by Makefile */' > tmp;
-echo '#ifndef __SYSTEM_H__ /*file wrapper*/' >> tmp;
-echo '#define __SYSTEM_H__' >> tmp;
- if echo '#include <strings.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ if [ -f /usr/include/strings.h ]; then\
echo '#define _HAVE_STRINGS_H_' >> tmp; \
else true; fi
- if echo '#include <sys/termio.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ if [ -f /usr/include/sys/termio.h ]; then\
echo '#define _HAVE_SYS_TERMIO_H_' >> tmp; \
else true; fi
- if echo '#include <termio.h>' | $(CC) -E - >/dev/null 2>&1; then\
- echo '#define _HAVE_TERMIO_H_' >> tmp; \
- else true; fi
- if echo '#include <sys/stdtypes.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ if [ -f /usr/include/sys/stdtypes.h ]; then\
echo '#define _HAVE_SYS_STDTYPES_H_' >> tmp; \
else true; fi
- if echo '#include <sys/fcntl.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ if [ -f /usr/include/sys/fcntl.h ]; then\
echo '#define _HAVE_SYS_FCNTL_H_' >> tmp; \
else true; fi
- if echo '#include <fcntl.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ if [ -f /usr/include/fcntl.h ]; then\
echo '#define _HAVE_FCNTL_H_' >> tmp; \
else true; fi
-echo '#endif /* file wrapper */' >> tmp;
diff -Nru lookup-1.08b/commands.c lookup-1.08b/commands.c
--- lookup-1.08b/commands.c 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/commands.c 1997-01-23 03:53:14.000000000 +0000
@@ -262,7 +262,7 @@
if (is_xterm == unchecked)
{
- /* extern const char *getenv(const char *); */
+ extern const char *getenv(const char *);
String *term = (String *)getenv("TERM");
if (term && (strNcmp(term, "kterm", 5) == 0 ||
strNcmp(term, "xterm", 5) == 0 ||
diff -Nru lookup-1.08b/debian/changelog lookup-1.08b/debian/changelog
--- lookup-1.08b/debian/changelog 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/debian/changelog 2024-02-21 14:17:29.000000000 +0000
@@ -1,3 +1,11 @@
+lookup (1.08b-13.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Convert to source format 3.0. Closes: #1007286
+ * d/copyright: Convert to machine-readable format.
+
+ -- Bastian Germann <[email protected]> Wed, 21 Feb 2024 14:17:29 +0000
+
lookup (1.08b-13) unstable; urgency=medium
* Fix future glibc FTBFS. Closes: #967989
diff -Nru lookup-1.08b/debian/copyright lookup-1.08b/debian/copyright
--- lookup-1.08b/debian/copyright 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/debian/copyright 2024-02-21 14:17:29.000000000 +0000
@@ -1,21 +1,20 @@
-This package was debianized by Hayao Nakahara <[email protected]> on
-Tue, 19 Oct 1999 00:24:21 +0900.
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Comment:
+ This package was debianized by Hayao Nakahara <[email protected]> on
+ Tue, 19 Oct 1999 00:24:21 +0900.
+Source:
+ ftp://ftp.cc.monash.edu.au/pub/nihongo/
+Upstream-Contact:
+ Jeffrey Friedl <[email protected]>
-It was downloaded from
- ftp://ftp.cc.monash.edu.au/pub/nihongo/
-
-Upstream Author: Jeffrey Friedl <[email protected]>
-
-Copyright: Each source file has the following copyright notice:
-
-/*
+Files: *
+Copyright:
* [email protected]
*
* This work is placed under the terms of the GNU General Purpose Licence
* (the "GNU Copyleft").
*
* December 1993.
- */
-
-On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
+License: GPL
+ On Debian GNU/Linux systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL'.
diff -Nru lookup-1.08b/debian/patches/debian.patch
lookup-1.08b/debian/patches/debian.patch
--- lookup-1.08b/debian/patches/debian.patch 1970-01-01 00:00:00.000000000
+0000
+++ lookup-1.08b/debian/patches/debian.patch 2024-02-21 14:17:29.000000000
+0000
@@ -0,0 +1,327 @@
+--- lookup-1.08b.orig/Makefile
++++ lookup-1.08b/Makefile
+@@ -16,7 +16,7 @@ CC=gcc
+ CC_TRAD=$(CC) -traditional
+
+ ## set to "gcc1", "gcc2" or leave blank
+-gcc=gcc1
++gcc=gcc2
+
+ ## selecte exactly "0" (no) or "1" (yes) for the following
+ optimize=0
+@@ -34,7 +34,7 @@ md=0
+ ## it out if that's the case and you don't have a traditional compiler
+ ## around.
+ ##
+-COMPILE_WITH_TRAD=termset_trad.o
++#COMPILE_WITH_TRAD=termset_trad.o
+
+ RANLIB=/usr/bin/ranlib
+
+@@ -154,19 +154,22 @@ lib/system.h: Makefile
+ echo '/* this file generated by Makefile */' > tmp;
+ -echo '#ifndef __SYSTEM_H__ /*file wrapper*/' >> tmp;
+ -echo '#define __SYSTEM_H__' >> tmp;
+- if [ -f /usr/include/strings.h ]; then\
++ if echo '#include <strings.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ echo '#define _HAVE_STRINGS_H_' >> tmp; \
+ else true; fi
+- if [ -f /usr/include/sys/termio.h ]; then\
++ if echo '#include <sys/termio.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ echo '#define _HAVE_SYS_TERMIO_H_' >> tmp; \
+ else true; fi
+- if [ -f /usr/include/sys/stdtypes.h ]; then\
++ if echo '#include <termio.h>' | $(CC) -E - >/dev/null 2>&1; then\
++ echo '#define _HAVE_TERMIO_H_' >> tmp; \
++ else true; fi
++ if echo '#include <sys/stdtypes.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ echo '#define _HAVE_SYS_STDTYPES_H_' >> tmp; \
+ else true; fi
+- if [ -f /usr/include/sys/fcntl.h ]; then\
++ if echo '#include <sys/fcntl.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ echo '#define _HAVE_SYS_FCNTL_H_' >> tmp; \
+ else true; fi
+- if [ -f /usr/include/fcntl.h ]; then\
++ if echo '#include <fcntl.h>' | $(CC) -E - >/dev/null 2>&1; then\
+ echo '#define _HAVE_FCNTL_H_' >> tmp; \
+ else true; fi
+ -echo '#endif /* file wrapper */' >> tmp;
+--- lookup-1.08b.orig/commands.c
++++ lookup-1.08b/commands.c
+@@ -262,7 +262,7 @@ static int cmd_clear(void)
+
+ if (is_xterm == unchecked)
+ {
+- extern const char *getenv(const char *);
++ /* extern const char *getenv(const char *); */
+ String *term = (String *)getenv("TERM");
+ if (term && (strNcmp(term, "kterm", 5) == 0 ||
+ strNcmp(term, "xterm", 5) == 0 ||
+--- lookup-1.08b.orig/lib/config.h
++++ lookup-1.08b/lib/config.h
+@@ -1,5 +1,10 @@
+ #ifndef __CONFIG_H__ /* file wrapper */
+ #define __CONFIG_H__
++
++#include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
++
+ /*
+ * Jeffrey Friedl
+ * Omron Corporation オムロン(株)
+--- lookup-1.08b.orig/lib/input.c
++++ lookup-1.08b/lib/input.c
+@@ -24,8 +24,6 @@
+ #include "assert.h"
+ #include "output.h"
+ #include "input.h"
+-extern int errno;
+-
+
+ static unsigned char input_buffer[INPUT_BUF_SIZE];
+ #define eptr (&input_buffer[INPUT_BUF_SIZE])
+--- lookup-1.08b.orig/lib/jregex.c
++++ lookup-1.08b/lib/jregex.c
+@@ -1896,14 +1896,18 @@ nibble_from_pattern(const unsigned char
+ /* we construct a character class specifier
+ which is the same and use that... */
+ int inverted = isupper(PAT[1]);
+- unsigned char class[4];
+- class[0] = '\\';
+- class[1] = inverted ? tolower(PAT[1]) : PAT[1];
+- class[2] = ']';
+- class[3] = '\0';
++ unsigned char class[5];
++ int i = 0;
++ if (inverted) {
++ class[i++] = '^';
++ }
++ class[i++] = '\\';
++ class[i++] = inverted ? tolower(PAT[1]) : PAT[1];
++ class[i++] = ']';
++ class[i++] = '\0';
+ if (nab_class(new, class) == 0)
+ return 0;
+- new->u.class->inverted = inverted;
++ /* new->u.class->inverted = inverted; */
+ new->min_match_len = 1;
+ PAT += 2; /* skip past \d, etc. */
+ goto allow_starplus; /* can have a +, *, or ? appended */
+@@ -4049,7 +4053,10 @@ regexec(const regex_t *r, const unsigned
+ }
+ #endif
+
++#ifndef FAST_REGEXE
++/*
+ FASTDEBUGSTUFF(
++*/
+ if (special_debug) {
+ outputf("popping state #%ld (total %ld): [%.*s|%s] regex
%d.\n",
+ state_count(),
+@@ -4077,7 +4084,11 @@ regexec(const regex_t *r, const unsigned
+ #else
+ -1
+ #endif
+- );)
++ );
++/*
++)
++*/
++#endif
+ }
+ else
+ {
+--- lookup-1.08b.orig/lib/output.c
++++ lookup-1.08b/lib/output.c
+@@ -12,6 +12,8 @@
+ #include "assert.h"
+ #include <stdarg.h>
+ #include <ctype.h>
++#include <errno.h>
++#include <stdio.h>
+ #include "input.h"
+ #include "output.h"
+
+@@ -29,7 +31,7 @@ static unsigned char *nextout = &outbuf[
+ #define THREE_BYTE_HI 143
+ #define HALF_WIDTH_KATA_HI 142
+
+-unsigned const char *jis_start_208 = (unsigned const char *)"\33$@";
++unsigned const char *jis_start_208 = (unsigned const char *)"\33$B";
+ unsigned const char *jis_start_212 = (unsigned const char *)"\33$(D";
+ unsigned const char *jis_start_ASCII = (unsigned const char *)"\33(B";
+ unsigned const char *jis_start_kana = (unsigned const char *)"\33(I";
+@@ -754,8 +756,6 @@ vfcnprintf(unsigned (*function)(unsigned
+ case 'n': /* errno string */
+ case 'N': /* errno string */
+ {
+- extern char *sys_errlist[];
+- extern int errno, sys_nerr;
+ char temp_error_buff[20];
+ const char *str;
+
+@@ -769,13 +769,7 @@ vfcnprintf(unsigned (*function)(unsigned
+ else
+ errval = errno;
+
+- if (errval >= 0 && errval < sys_nerr)
+- str = sys_errlist[errval];
+- else
+- {
+- sprintf(temp_error_buff, "#%d", errval);
+- str = temp_error_buff;
+- }
++ str = strerror(errval);
+ }
+
+ if (format[-2] == '%')
+@@ -899,7 +893,7 @@ __volatile__ void die(const char *fmt, .
+
+
+ #if PROVIDE_PAGER
+-static unsigned (*_real_output_char_function)(unsigned char) = 0;
++unsigned (*_real_output_char_function)(unsigned char) = 0;
+
+ /*
+ * output_pager_status(0) turns off and reports previous state.
+--- lookup-1.08b.orig/lib/termset.c
++++ lookup-1.08b/lib/termset.c
+@@ -39,8 +39,13 @@
+ # ifdef _HAVE_SYS_TERMIO_H_
+ # include <sys/termio.h>
+ # else
+-# include <sgtty.h>
+-# endif
++# ifdef _HAVE_TERMIO_H_
++# include <termio.h>
++# define _HAVE_SYS_TERMIO_H_
++# else
++# include <sgtty.h>
++# endif /* _HAVE_TERMIO_H */
++# endif /* _HAVE_SYS_TERMIO_H */
+ #endif
+
+ /*
+@@ -49,6 +54,8 @@
+ * of the header files. This is all very non-portable, but the best
+ * I can think of to automate this stuff....
+ */
++#ifndef __alpha__
++/* DEBIAN: these tests will make gcc 3.3 fail on alpha/gnu linux */
+ #ifndef NO_COMPILE
+ # ifdef __STDC__
+ # ifdef _IO
+@@ -66,6 +73,8 @@
+ # endif /* __STDC__ */
+ #endif
+
++#endif
++
+ #ifndef NO_COMPILE
+ # ifdef __STDC__
+ # define NO_ARGS void
+--- lookup-1.08b.orig/lib/xmalloc.c
++++ lookup-1.08b/lib/xmalloc.c
+@@ -1,18 +1,19 @@
+ #include "xmalloc.h"
+
+-#undef xmalloc
++#include <stdio.h>
++#include <stdlib.h>
+
+ /*
+ * like malloc(), but dies if memory not available.
+ */
+-void *xmalloc(unsigned len)
++void *xmalloc(unsigned int len)
+ {
+ void *ptr;
+- if (ptr = (void *)malloc(len), ptr == 0)
++ ptr = malloc(len);
++ if (ptr == NULL)
+ {
+- #define MSG "<out of memory in malloc>\n"
+- write(2, MSG, sizeof(MSG)-1);
+- exit(3);
++ fprintf(stderr, "<out of memory in malloc>\n");
++ exit(3);
+ }
+ return ptr;
+ }
+--- lookup-1.08b.orig/lookup.c
++++ lookup-1.08b/lookup.c
+@@ -32,7 +32,7 @@ int UseNoMemIndex = 0;
+
+ const char *expand_filename_tilde(const char *filename)
+ {
+- extern const char *getenv(const char *);
++ /* extern const char *getenv(const char *); */
+ String *home = (String*)getenv("HOME");
+ if (home == 0 || filename[0] != '~' || filename[1] != '/')
+ return filename;
+@@ -77,7 +77,7 @@ static int in_command;
+ * Getline: get a line of user input.
+ */
+ static __inline__ string *
+-getline(String *prompt)
++mygetline(String *prompt)
+ {
+ #ifdef NOREADLINE
+ static string linebuf[200];
+@@ -114,11 +114,17 @@ getline(String *prompt)
+
+ output_pager_reset_more();
+ line = readline(prompt); /* Get a line from the user. */
++#if 0
++fprintf(stdout, "OK readline:%s\n",line); /* nakahara */
++#endif
+ output_pager_reset_more();
+
+ #ifdef LOG_FILE_SUPPORT
+ if (current_log_file != 0) {
+ int normal_fd = set_normal_output_file(log_fd);
++#if 0
++fprintf(stdout, "OK outputf \n"); /* nakahara */
++#endif
+ outputf("%s%s\n", jreadline_last_prompt, line);
+ flush_output();
+ set_normal_output_file(normal_fd);
+@@ -265,6 +271,9 @@ check_commandline_status(string *line, s
+
+ if (in_command != old_in_command)
+ {
++#if 0
++fprintf(stdout, "OK mod \n"); /* nakahara */
++#endif
+ (void)jreadline_mod_prompt(gen_prompt(lookup.prompt_format, 0));
+ return 1;
+ }
+@@ -1464,6 +1473,7 @@ int main(int argc, const char *argv[])
+ GET_WINDOW_SIZE(0);
+ #endif
+
++fprintf(stdout, "start \n"); /* nakahara */
+ /* set some basic defaults */
+ lookup.flag.fuzz = 1;
+ lookup.flag.fold = 1;
+@@ -1499,7 +1509,7 @@ int main(int argc, const char *argv[])
+
+ in_command = 0;
+ kibishii_assert(prompt_format);
+- input = getline(gen_prompt(prompt_format, 1));
++ input = mygetline(gen_prompt(prompt_format, 1));
+
+ /* if they're pounding on the break key, let them eventually leave */
+ if (apply_regex_abort)
+--- lookup-1.08b.orig/lookup.h
++++ lookup-1.08b/lookup.h
+@@ -16,6 +16,8 @@
+ * close there, it's been stripped and you're screwed.
+ */
+
++#include <string.h>
++
+ #ifndef MAX_LOADED_FILES
+ # define MAX_LOADED_FILES 10
+ #endif
diff -Nru lookup-1.08b/debian/patches/series lookup-1.08b/debian/patches/series
--- lookup-1.08b/debian/patches/series 1970-01-01 00:00:00.000000000 +0000
+++ lookup-1.08b/debian/patches/series 2024-02-21 14:17:29.000000000 +0000
@@ -0,0 +1 @@
+debian.patch
diff -Nru lookup-1.08b/debian/source/format lookup-1.08b/debian/source/format
--- lookup-1.08b/debian/source/format 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/debian/source/format 2024-02-21 14:17:29.000000000 +0000
@@ -1 +1 @@
-1.0
+3.0 (quilt)
diff -Nru lookup-1.08b/lib/config.h lookup-1.08b/lib/config.h
--- lookup-1.08b/lib/config.h 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/lib/config.h 1996-07-18 16:43:44.000000000 +0000
@@ -1,10 +1,5 @@
#ifndef __CONFIG_H__ /* file wrapper */
#define __CONFIG_H__
-
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
/*
* Jeffrey Friedl
* Omron Corporation オムロン(株)
diff -Nru lookup-1.08b/lib/input.c lookup-1.08b/lib/input.c
--- lookup-1.08b/lib/input.c 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/lib/input.c 1996-07-18 16:44:09.000000000 +0000
@@ -24,6 +24,8 @@
#include "assert.h"
#include "output.h"
#include "input.h"
+extern int errno;
+
static unsigned char input_buffer[INPUT_BUF_SIZE];
#define eptr (&input_buffer[INPUT_BUF_SIZE])
diff -Nru lookup-1.08b/lib/jregex.c lookup-1.08b/lib/jregex.c
--- lookup-1.08b/lib/jregex.c 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/lib/jregex.c 1996-07-26 22:02:42.000000000 +0000
@@ -1896,18 +1896,14 @@
/* we construct a character class specifier
which is the same and use that... */
int inverted = isupper(PAT[1]);
- unsigned char class[5];
- int i = 0;
- if (inverted) {
- class[i++] = '^';
- }
- class[i++] = '\\';
- class[i++] = inverted ? tolower(PAT[1]) : PAT[1];
- class[i++] = ']';
- class[i++] = '\0';
+ unsigned char class[4];
+ class[0] = '\\';
+ class[1] = inverted ? tolower(PAT[1]) : PAT[1];
+ class[2] = ']';
+ class[3] = '\0';
if (nab_class(new, class) == 0)
return 0;
- /* new->u.class->inverted = inverted; */
+ new->u.class->inverted = inverted;
new->min_match_len = 1;
PAT += 2; /* skip past \d, etc. */
goto allow_starplus; /* can have a +, *, or ? appended */
@@ -4053,10 +4049,7 @@
}
#endif
-#ifndef FAST_REGEXE
-/*
FASTDEBUGSTUFF(
-*/
if (special_debug) {
outputf("popping state #%ld (total %ld): [%.*s|%s] regex
%d.\n",
state_count(),
@@ -4084,11 +4077,7 @@
#else
-1
#endif
- );
-/*
-)
-*/
-#endif
+ );)
}
else
{
diff -Nru lookup-1.08b/lib/output.c lookup-1.08b/lib/output.c
--- lookup-1.08b/lib/output.c 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/lib/output.c 1996-07-19 07:03:22.000000000 +0000
@@ -12,8 +12,6 @@
#include "assert.h"
#include <stdarg.h>
#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
#include "input.h"
#include "output.h"
@@ -31,7 +29,7 @@
#define THREE_BYTE_HI 143
#define HALF_WIDTH_KATA_HI 142
-unsigned const char *jis_start_208 = (unsigned const char *)"\33$B";
+unsigned const char *jis_start_208 = (unsigned const char *)"\33$@";
unsigned const char *jis_start_212 = (unsigned const char *)"\33$(D";
unsigned const char *jis_start_ASCII = (unsigned const char *)"\33(B";
unsigned const char *jis_start_kana = (unsigned const char *)"\33(I";
@@ -756,6 +754,8 @@
case 'n': /* errno string */
case 'N': /* errno string */
{
+ extern char *sys_errlist[];
+ extern int errno, sys_nerr;
char temp_error_buff[20];
const char *str;
@@ -769,7 +769,13 @@
else
errval = errno;
- str = strerror(errval);
+ if (errval >= 0 && errval < sys_nerr)
+ str = sys_errlist[errval];
+ else
+ {
+ sprintf(temp_error_buff, "#%d", errval);
+ str = temp_error_buff;
+ }
}
if (format[-2] == '%')
@@ -893,7 +899,7 @@
#if PROVIDE_PAGER
-unsigned (*_real_output_char_function)(unsigned char) = 0;
+static unsigned (*_real_output_char_function)(unsigned char) = 0;
/*
* output_pager_status(0) turns off and reports previous state.
diff -Nru lookup-1.08b/lib/termset.c lookup-1.08b/lib/termset.c
--- lookup-1.08b/lib/termset.c 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/lib/termset.c 1996-07-18 17:16:49.000000000 +0000
@@ -39,13 +39,8 @@
# ifdef _HAVE_SYS_TERMIO_H_
# include <sys/termio.h>
# else
-# ifdef _HAVE_TERMIO_H_
-# include <termio.h>
-# define _HAVE_SYS_TERMIO_H_
-# else
-# include <sgtty.h>
-# endif /* _HAVE_TERMIO_H */
-# endif /* _HAVE_SYS_TERMIO_H */
+# include <sgtty.h>
+# endif
#endif
/*
@@ -54,8 +49,6 @@
* of the header files. This is all very non-portable, but the best
* I can think of to automate this stuff....
*/
-#ifndef __alpha__
-/* DEBIAN: these tests will make gcc 3.3 fail on alpha/gnu linux */
#ifndef NO_COMPILE
# ifdef __STDC__
# ifdef _IO
@@ -73,8 +66,6 @@
# endif /* __STDC__ */
#endif
-#endif
-
#ifndef NO_COMPILE
# ifdef __STDC__
# define NO_ARGS void
diff -Nru lookup-1.08b/lib/xmalloc.c lookup-1.08b/lib/xmalloc.c
--- lookup-1.08b/lib/xmalloc.c 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/lib/xmalloc.c 1994-02-18 11:47:26.000000000 +0000
@@ -1,19 +1,18 @@
#include "xmalloc.h"
-#include <stdio.h>
-#include <stdlib.h>
+#undef xmalloc
/*
* like malloc(), but dies if memory not available.
*/
-void *xmalloc(unsigned int len)
+void *xmalloc(unsigned len)
{
void *ptr;
- ptr = malloc(len);
- if (ptr == NULL)
+ if (ptr = (void *)malloc(len), ptr == 0)
{
- fprintf(stderr, "<out of memory in malloc>\n");
- exit(3);
+ #define MSG "<out of memory in malloc>\n"
+ write(2, MSG, sizeof(MSG)-1);
+ exit(3);
}
return ptr;
}
diff -Nru lookup-1.08b/lookup.c lookup-1.08b/lookup.c
--- lookup-1.08b/lookup.c 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/lookup.c 1997-02-13 09:36:19.000000000 +0000
@@ -32,7 +32,7 @@
const char *expand_filename_tilde(const char *filename)
{
- /* extern const char *getenv(const char *); */
+ extern const char *getenv(const char *);
String *home = (String*)getenv("HOME");
if (home == 0 || filename[0] != '~' || filename[1] != '/')
return filename;
@@ -77,7 +77,7 @@
* Getline: get a line of user input.
*/
static __inline__ string *
-mygetline(String *prompt)
+getline(String *prompt)
{
#ifdef NOREADLINE
static string linebuf[200];
@@ -114,17 +114,11 @@
output_pager_reset_more();
line = readline(prompt); /* Get a line from the user. */
-#if 0
-fprintf(stdout, "OK readline:%s\n",line); /* nakahara */
-#endif
output_pager_reset_more();
#ifdef LOG_FILE_SUPPORT
if (current_log_file != 0) {
int normal_fd = set_normal_output_file(log_fd);
-#if 0
-fprintf(stdout, "OK outputf \n"); /* nakahara */
-#endif
outputf("%s%s\n", jreadline_last_prompt, line);
flush_output();
set_normal_output_file(normal_fd);
@@ -271,9 +265,6 @@
if (in_command != old_in_command)
{
-#if 0
-fprintf(stdout, "OK mod \n"); /* nakahara */
-#endif
(void)jreadline_mod_prompt(gen_prompt(lookup.prompt_format, 0));
return 1;
}
@@ -1473,7 +1464,6 @@
GET_WINDOW_SIZE(0);
#endif
-fprintf(stdout, "start \n"); /* nakahara */
/* set some basic defaults */
lookup.flag.fuzz = 1;
lookup.flag.fold = 1;
@@ -1509,7 +1499,7 @@
in_command = 0;
kibishii_assert(prompt_format);
- input = mygetline(gen_prompt(prompt_format, 1));
+ input = getline(gen_prompt(prompt_format, 1));
/* if they're pounding on the break key, let them eventually leave */
if (apply_regex_abort)
diff -Nru lookup-1.08b/lookup.h lookup-1.08b/lookup.h
--- lookup-1.08b/lookup.h 2024-02-21 14:26:13.000000000 +0000
+++ lookup-1.08b/lookup.h 1996-07-18 15:19:22.000000000 +0000
@@ -16,8 +16,6 @@
* close there, it's been stripped and you're screwed.
*/
-#include <string.h>
-
#ifndef MAX_LOADED_FILES
# define MAX_LOADED_FILES 10
#endif