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