-/*===============================================================
- * Copyright (C) 1997 Transarc Corporation - All rights reserved
- *===============================================================*/
-
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
#include <afs/param.h>
* The supplied string 's' must be at least 12 bytes long.
* lb64_string in stds.h provides a typedef to get the length.
*/
+#ifdef AFS_64BIT_ENV
+char *int64_to_flipbase64(lb64_string_t s, afs_int64 a)
+#else
char *int64_to_flipbase64(lb64_string_t s, u_int64_t a)
+#endif
{
- int i, j;
- int64_t n;
+ int i;
+#ifdef AFS_64BIT_ENV
+ afs_int64 n;
+#else
+ u_int64_t n;
+#endif
i = 0;
if (a==0)
/* Mapping: +=0, ==1, 0-9 = 2-11, A-Z = 12-37, a-z = 38-63 */
+#ifdef AFS_64BIT_ENV
+afs_int64 flipbase64_to_int64(char *s)
+#else
int64_t flipbase64_to_int64(char *s)
+#endif
{
+#ifdef AFS_64BIT_ENV
+ afs_int64 n = 0;
+ afs_int64 result = 0;
+#else
int64_t n = 0;
int64_t result = 0;
+#endif
int shift;
for (shift = 0; *s; s++, shift += 6) {