xref: /illumos-gate/usr/src/lib/krb5/dyn/dyn_size.c (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 /*
2  * This file is part of libdyn.a, the C Dynamic Object library.  It
3  * contains the source code for the function DynSize().
4  *
5  * There are no restrictions on this code; however, if you make any
6  * changes, I request that you document them so that I do not get
7  * credit or blame for your modifications.
8  *
9  * Written by Barr3y Jaspan, Student Information Processing Board (SIPB)
10  * and MIT-Project Athena, 1989.
11  */
12 
13 #include <stdio.h>
14 
15 #include "dynP.h"
16 
DynSize(obj)17 int DynSize(obj)
18    DynObjectP obj;
19 {
20      if (obj->debug)
21 	  fprintf(stderr, "dyn: size: returning size %d.\n", obj->num_el);
22 
23      return obj->num_el;
24 }
25 
DynCapacity(obj)26 int DynCapacity(obj)
27    DynObjectP obj;
28 {
29      if (obj->debug)
30 	  fprintf(stderr, "dyn: capacity: returning cap of %d.\n", obj->size);
31 
32      return obj->size;
33 }
34