summaryrefslogtreecommitdiffstats
path: root/lib/symtab.c
diff options
context:
space:
mode:
authorChris Hall (GMCH) <chris.hall@highwayman.com>2009-11-24 19:54:30 +0000
committerChris Hall (GMCH) <chris.hall@highwayman.com>2009-11-24 19:54:30 +0000
commit5d41cec800dc6100b8181b95a08f7803dac6eeb9 (patch)
tree963aab0f9ce07c91a3a47c5bcb866ed3b2a163c3 /lib/symtab.c
parent9964fcfc2282c8f3468b3b7355c5dea3089f0f14 (diff)
downloadquagga-5d41cec800dc6100b8181b95a08f7803dac6eeb9.tar.bz2
quagga-5d41cec800dc6100b8181b95a08f7803dac6eeb9.tar.xz
Upgrade lib/vector.c & .h
This upgrade maintains the existing vector operations, but changes the underlying mechanisms. It then adds a number of new functions, extending the operations on vectors. The "struct vector" is redefined, which affects only some code in lib/command.c -- which pokes around inside what should be treated as a private data structure. Pro tem this is supported by a macro. The constant VECTOR_MIN_SIZE has been removed -- if there is a minimum size that should be enforced by the vector code. New functions include: vector_insert_item -- insert item, moving existing items vector_move_item -- move item from place to place in vector vector_delete_item -- delete item and close up gap vector_reverse -- reverse order of vector vector_push_item -- simple push vector_pop_item -- simple pop vector_insert -- insert 1 or more NULL items, moving existing items vector_delete -- delete 1 or more items and close up gap vector_bsearch -- perform binary search on vector vector_sort -- qsort vector vector_copy_here -- make copy of body of vector vector_move_here -- move body of vector vector_copy_append -- append copy of vector to end of another vector_move_append -- move body of vector to the end of another vector_copy_extract -- copy part of one vector to another vector_move_extract -- move part of one vector to another vector_copy_splice -- copy part of one vector to replace part of another, taking a copy of the replaced part vector_move_splice -- move part of one vector to replace part of another, taking a copy of the replaced part vector_copy_replace -- copy part of one vector to replace part of another vector_move_replace -- move part of one vector to replace part of another vector_discard -- discard body of vector vector_chop -- discard any unused memory in body of vector vector_decant -- decant vector to new body Other files affected: command.c: -- removal of VECTOR_MIN_SIZE -- use of vector_sort() -- use of VECTOR_INDEX to poke around inside vector (removing this is TODO) memtypes.c & memory.c -- updating names and comments for vectors vty.c -- removal of VECTOR_MIN_SIZE memory.h -- added SIZE(t,n) macro -- (sizeof(t) * (n))
Diffstat (limited to 'lib/symtab.c')
0 files changed, 0 insertions, 0 deletions