1 /* akbox_fn.c - Application Black (K) Box hash function
2 * Copyright (c) 2006,2012 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved.
3 * This is confidential unpublished proprietary source code of the author.
4 * NO WARRANTY, not even implied warranties. Contains trade secrets.
5 * Distribution prohibited unless authorized in writing. See file COPYING.
6 * Special grant: akbox.h may be used with zxid open source project under
7 * same licensing terms as zxid itself.
8 * $Id$
9 *
10 * 15.4.2006, created over Easter holiday --Sampo
11 * 16.8.2012, modified license grant to allow use with ZXID.org --Sampo
12 */
13
14 #include <string.h>
15
16 /* This redefinition of sizeof(x) is deliberate and is meant to cause the
17 * AKBOX_FN macro, see akbox.h, to expand in this function such that it uses
18 * runtime string length rather than compile time sizeof. */
19 #define sizeof(x) (siz)
20 #include "akbox.h"
21
akbox_fn(const char * fn)22 int akbox_fn(const char* fn)
23 {
24 int siz = strlen(fn)+1;
25 return AKBOX_FN(fn);
26 }
27
28 /* EOF - akbox_fn.c */
29