home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: pefv700@hermes.chpc.utexas.edu (Christopher Phillips)
- Subject: v41i081: ddb - dynamic memory database library, Patch02
- Message-ID: <1994Jan10.033243.10732@sparky.sterling.com>
- X-Md4-Signature: 68a50b37f1dc1af64eee16eeaa5fe209
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: The University of Texas System - CHPC
- Date: Mon, 10 Jan 1994 03:32:43 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: pefv700@hermes.chpc.utexas.edu (Christopher Phillips)
- Posting-number: Volume 41, Issue 81
- Archive-name: ddb/patch02
- Environment: ANSI-C
- Patch-To: ddb: Volume 40, Issue 82
-
- This is patch02 for ddb, a library of dynamic memory database routines.
-
- There are a few changes:
-
- - DDB_TAIL didn't work right for DDB_INSERT and DDB_REPLACE
- - ddb_lnext return value fixed
- - ddb_new had a memory problem when data was NULL
-
- Thanks to Robert Allgeuer (fs_allge@aaf.alcatel.at) for pointing
- these out.
-
- Just cd to the source directory and unshar this file. Then type
-
- patch -p0 < Patch02
-
- Chris
- pefv700@utpe.pe.utexas.edu
- --------------------
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: Patch02
- # Wrapped by pefv700@hermes on Mon Dec 20 11:21:07 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Patch02' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Patch02'\"
- else
- echo shar: Extracting \"'Patch02'\" \(1163 characters\)
- sed "s/^X//" >'Patch02' <<'END_OF_FILE'
- X*** ../ddb.old/list.c Tue Nov 30 09:09:55 1993
- X--- list.c Mon Dec 20 09:47:48 1993
- X***************
- X*** 106,112 ****
- X if (mode & DDB_DUPLICATE) {
- X if (mode & DDB_TAIL)
- X (void)find(ld, NULL, cmp, &le_prev);
- X! } else if (le = find(ld, key, cmp, NULL))
- X if (mode & DDB_INSERT) {
- X errno = EEXIST;
- X return -1;
- X--- 106,112 ----
- X if (mode & DDB_DUPLICATE) {
- X if (mode & DDB_TAIL)
- X (void)find(ld, NULL, cmp, &le_prev);
- X! } else if (le = find(ld, key, cmp, &le_prev))
- X if (mode & DDB_INSERT) {
- X errno = EEXIST;
- X return -1;
- X***************
- X*** 274,280 ****
- X
- X if (le = lp->nextkey) {
- X lp->nextkey = lp->nextkey->next;
- X! return &le->data;
- X } else
- X return NULL;
- X }
- X--- 274,280 ----
- X
- X if (le = lp->nextkey) {
- X lp->nextkey = lp->nextkey->next;
- X! return &le->key;
- X } else
- X return NULL;
- X }
- X*** ../ddb.old/new.c Tue Nov 30 09:09:55 1993
- X--- new.c Mon Nov 29 13:00:10 1993
- X***************
- X*** 45,53 ****
- X if (data) {
- X (void)memcpy((*ptr)[1].addr, data->addr, data->size);
- X (*ptr)[1].size = data->size;
- X- } else {
- X- (*ptr)[1].addr = NULL;
- X- (*ptr)[1].size = 0;
- X }
- X
- X return ptr;
- X--- 45,50 ----
- END_OF_FILE
- if test 1163 -ne `wc -c <'Patch02'`; then
- echo shar: \"'Patch02'\" unpacked with wrong size!
- fi
- # end of 'Patch02'
- fi
- echo shar: End of shell archive.
- exit 0
-
- exit 0 # Just in case...
-