diff options
author | Maho Nakata <maho@FreeBSD.org> | 2003-07-19 03:13:48 +0000 |
---|---|---|
committer | Maho Nakata <maho@FreeBSD.org> | 2003-07-19 03:13:48 +0000 |
commit | 43801110c646ef25f3baa85796b629a83c545120 (patch) | |
tree | 76e9f483a855c61a3d3be02455d23d486ffc43f7 /cad/spice/files/patch-src_lib_fte_dimens_c | |
parent | PR: (diff) |
1. REAL cleaning on this port. The files dir is now organized so the
port can be maintained: previously there were multifile patches and several
patches for the same file, now it is a lot cleaner.
2. I also merged a memory leak fix and some fixes from
spice3f5-spaghetti.
4. MFB and removed GNUREADLINE support
5. honor CFLAGS and CC.
6. Add documentation.
7. Maho didn't change the name of port spice to spice3.
because spice4 might :) appear in the future. version number
should be listed on *only* PORTVERSION.
8. drom maintainership
PR: 54603
Submitted by: "Pedro F. Giffuni" <giffunip@yahoo.com>
Diffstat (limited to 'cad/spice/files/patch-src_lib_fte_dimens_c')
-rw-r--r-- | cad/spice/files/patch-src_lib_fte_dimens_c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/cad/spice/files/patch-src_lib_fte_dimens_c b/cad/spice/files/patch-src_lib_fte_dimens_c new file mode 100644 index 000000000000..2e6e5157b5de --- /dev/null +++ b/cad/spice/files/patch-src_lib_fte_dimens_c @@ -0,0 +1,55 @@ +--- src/lib/fte/dimens.c.orig Sun Apr 25 18:03:19 1993 ++++ src/lib/fte/dimens.c Thu Sep 30 10:02:10 1999 +@@ -21,9 +21,21 @@ + { + int i; +- char buf[BSIZE_SP]; ++ char *buf; ++ if ( (buf = (char *) malloc(BSIZE_SP*sizeof(char))) == NULL) ++ { ++ fprintf(stderr,"lib:fte:dimns:dimstring: malloc failed\n"); ++ exit(1); ++ } + + if (!data || length < 1) + return NULL; + ++ if (length > BSIZE_SP) ++ { ++ fprintf(stderr,"WARNING, lib:fte:dimns:dimstring: length=%d > BSIZE_SP=%d\n", ++ length,BSIZE_SP); ++ length = BSIZE_SP; ++ } ++ + buf[0] = '\0'; + for (i=0; i < length; i++) { +@@ -31,5 +43,5 @@ + (i < length - 1) ? "," : ""); + } +- /* XXX Should I return a copy instead? */ ++ + return(buf); + } +@@ -44,8 +56,21 @@ + { + int i; +- char buf[BSIZE_SP]; ++ char *buf; ++ ++ if ( (buf = (char *) malloc(BSIZE_SP*sizeof(char))) == NULL) ++ { ++ fprintf(stderr,"lib:fte:dimns:indexstring: malloc failed\n"); ++ exit(1); ++ } + + if (!data || length < 1) + return NULL; ++ ++ if (length > BSIZE_SP) ++ { ++ fprintf(stderr,"WARNING, lib:fte:dimns:indexstring: length=%d > BSIZE_SP=%d\n", ++ length,BSIZE_SP); ++ length = BSIZE_SP; ++ } + + buf[0] = '\0'; |