diff options
author | green <green@FreeBSD.org> | 2000-02-06 14:32:33 +0800 |
---|---|---|
committer | green <green@FreeBSD.org> | 2000-02-06 14:32:33 +0800 |
commit | 6489f5849bf3d9470d6de93c023091856c4c4487 (patch) | |
tree | 32c687158aafbe182897a9a0efb22fb274a87db0 | |
parent | 2cb7c1291e1f062881142c581ebb7b9fd2828fd2 (diff) | |
download | freebsd-ports-gnome-6489f5849bf3d9470d6de93c023091856c4c4487.tar.gz freebsd-ports-gnome-6489f5849bf3d9470d6de93c023091856c4c4487.tar.zst freebsd-ports-gnome-6489f5849bf3d9470d6de93c023091856c4c4487.zip |
Fix some bugs that I guess I helped in :)
o Make the Makefile respect CC, and respect CFLAGS when linking, too.
o Make a comparison for fputs() success "retval >= 0". Our manual says
fputs() returns 0 on success, but K&R says that it can return any non-
negative int on success. I might as well support either!
o Fix an improper bounds check. It was a simple case of a variable being
mixed up, and this prevents "calc really long arg list (REALLY LONG)"
from crashing calc.
This is just cleaning up the changes I effected earlier with the
maintainer's permission.
-rw-r--r-- | math/calc/files/patch-ab | 27 | ||||
-rw-r--r-- | math/calc/files/patch-ac | 2 | ||||
-rw-r--r-- | math/calc/files/patch-ad | 11 |
3 files changed, 34 insertions, 6 deletions
diff --git a/math/calc/files/patch-ab b/math/calc/files/patch-ab index 08dbcc97e352..51a9e80bac82 100644 --- a/math/calc/files/patch-ab +++ b/math/calc/files/patch-ab @@ -1,11 +1,28 @@ ---- Makefile.orig Sun Dec 19 01:48:45 1999 -+++ Makefile Sun Dec 19 01:49:31 1999 -@@ -623,7 +623,7 @@ - # - CCWARN= -Wall -Wno-implicit -Wno-comment +--- Makefile.orig Sat Dec 18 22:20:02 1999 ++++ Makefile Sun Feb 6 00:16:45 2000 +@@ -625,14 +625,14 @@ CCOPT= ${DEBUG} ${NO_SHARED} CCMISC= # -CFLAGS= ${CCWARN} ${CCOPT} ${CCMISC} +CFLAGS+= ${CCWARN} ${CCOPT} ${CCMISC} ICFLAGS= ${CCWARN} ${CCMISC} + # + LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED} + ILDFLAGS= + # + LCC= gcc +-CC= ${PURIFY} ${LCC} ++CC?= ${PURIFY} ${LCC} + # + ### + # +@@ -1073,7 +1073,7 @@ + all: .hsrc ${TARGETS} + + calc: .hsrc ${CALC_LIBS} ${CALCOBJS} +- ${CC} ${LDFLAGS} ${CALCOBJS} ${CALC_LIBS} ${LD_DEBUG} ${READLINE_LIB} -o calc ++ ${CC} ${CFLAGS} ${LDFLAGS} ${CALCOBJS} ${CALC_LIBS} ${LD_DEBUG} ${READLINE_LIB} -o calc + + libcalc.a: ${LIBOBJS} ${MAKE_FILE} + -rm -f libcalc.a diff --git a/math/calc/files/patch-ac b/math/calc/files/patch-ac index d22cadb9b7bc..7ea12c3ca0af 100644 --- a/math/calc/files/patch-ac +++ b/math/calc/files/patch-ac @@ -5,7 +5,7 @@ * write the line to pager, if possible */ - } while(fputs(buf, cmd) > 0); -+ } while (fputs(buf, cmd) == 0); ++ } while (fputs(buf, cmd) >= 0); /* * all done, EOF or error, so just clean up diff --git a/math/calc/files/patch-ad b/math/calc/files/patch-ad new file mode 100644 index 000000000000..0f8af0eaf01d --- /dev/null +++ b/math/calc/files/patch-ad @@ -0,0 +1,11 @@ +--- calc.c.orig Sun Feb 6 00:53:48 2000 ++++ calc.c Sun Feb 6 00:57:01 2000 +@@ -233,7 +233,7 @@ + /* argument + space separator */ + cmdlen += strlen(argv[i]) + 1; + } +- if (i > MAXCMD) { ++ if (cmdlen > MAXCMD) { + /* + * we are too early in processing to call + * libcalc_call_me_last() - nothing to cleanup |