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