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