2N/A * This file is the collected implementation of libdyn.a, the C 2N/A * Dynamic Object library. It contains everything. 2N/A * There are no restrictions on this code; however, if you make any 2N/A * changes, I request that you document them so that I do not get 2N/A * credit or blame for your modifications. 2N/A * Written by Barr3y Jaspan, Student Information Processing Board (SIPB) 2N/A * and MIT-Project Athena, 1989. 2N/A * 2002-07-17 Collected full implementation into one source file for 2N/A * easy inclusion into the one library still dependent on 2N/A * libdyn. Assume memmove. Old ChangeLog appended. 2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the function DynAppend(). 2N/A * Made obsolete by DynInsert, now just a convenience function. 2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the functions DynCreate() and 2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the function DynDebug(). 2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the function DynDelete(). 2N/A * Checkers! Get away from that "hard disk erase" button! 2N/A * (Stupid dog. He almost did it to me again ...) 2N/A "dyn: delete: copying %d bytes from %p + %d to + %d.\n",
2N/A "dyn: delete: zeroing %d bytes from %p + %d\n",
2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the function DynInitZero(). 2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the function DynInsert(). 2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the function DynDebug(). 2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the functions DynGet() and DynAdd(). 2N/A * WARNING! There is a reason this function is not documented in the 2N/A * man page. If DynPut used to mutate already existing elements, 2N/A * everything will go fine. If it is used to add new elements 2N/A * directly, however, the state within the object (such as 2N/A * obj->num_el) will not be updated properly and many other functions 2N/A * in the library will lose. Have a nice day. 2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the internal function _DynRealloc(). 2N/A * Resize the array so that element req exists. 2N/A * Resize the array by num_incs units. If obj->inc is positive, this 2N/A * means make it obj->inc*num_incs elements larger. If obj->inc is 2N/A * negative, this means make the array num_incs elements long. 2N/A * Ideally, this function should not be called from outside the 2N/A * library. However, nothing will break if it is. 2N/A "dyn: alloc: Increasing object by %d bytes (%d incs).\n",
2N/A * This file is part of libdyn.a, the C Dynamic Object library. It 2N/A * contains the source code for the function DynSize(). 2N/A/* Old change log, as it relates to source code; build system stuff 2N/A2001-10-09 Ken Raeburn <raeburn@mit.edu> 2N/A2001-04-25 Ezra Peisach <epeisach@mit.edu> 2N/A and returns a valid pointer. Fix memory leak if malloc fails. 2N/AThu Nov 9 15:31:31 2000 Ezra Peisach <epeisach@mit.edu> 2N/A while playing with lclint. 2N/A2000-11-09 Ezra Peisach <epeisach@mit.edu> 2N/A * dynP.h: Provide full prototypes for _DynRealloc() and _DynResize(). 2N/A2000-06-29 Ezra Peisach <epeisach@mit.edu> 2N/A2000-06-28 Ezra Peisach <epeisach@mit.edu> 2N/A format for displaying pointers. 2N/A2000-06-26 Ezra Peisach <epeisach@mit.edu> 2N/ASat Dec 6 22:50:03 1997 Ezra Peisach <epeisach@mit.edu> 2N/AMon Jul 22 21:37:52 1996 Ezra Peisach <epeisach@mit.edu> 2N/A * dyn.h: If __STDC__ is not defined, generate prototypes implying 2N/A functions and not variables. 2N/AMon Jul 22 04:20:48 1996 Marc Horowitz <marc@mit.edu> 2N/A be #ifdef HAVE_MEMMOVE