windows-64-bit-type-safety-20051105
[openafs.git] / src / WINNT / afsd / cm_dir.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #include <afs/param.h>
11 #include <afs/stds.h>
12
13 #ifndef DJGPP
14 #include <windows.h>
15 #endif /* !DJGPP */
16 #include <string.h>
17 #include <malloc.h>
18 #include <osi.h>
19 #include <rx/rx.h>
20
21 #include "afsd.h"
22
23 /* compute how many 32 byte entries an AFS 3 dir requires for storing
24  * the specified name.
25  */
26 long cm_NameEntries(char *namep, long *lenp)
27 {
28     long i;
29         
30     i = (long)strlen(namep);
31     if (lenp) *lenp = i;
32     return 1+((i+16)>>5);
33 }