2 * Handling of 64-bit integers
4 * $Id: int-64bit.h,v 1.1 2001/11/22 03:07:06 hagbard Exp $
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 * Routines to convert between 64-bit integers, represented as
26 * arrays of 8 bytes in network byte order (bit-endian), and ASCII strings
27 * giving integer values in decimal or hexadecimal.
31 * Convert an unsigned 64-bit integer into a string, in decimal.
33 extern char *u64toa(const unsigned char *u64ptr);
36 * Convert a signed 64-bit integer into a string, in decimal.
38 extern char *i64toa(const unsigned char *i64ptr);
41 * Convert a string to an unsigned 64-bit integer.
43 unsigned char *atou64(const char *u64str, unsigned char *u64int);
46 * Convert a string to a signed 64-bit integer.
48 unsigned char *atoi64(const char *i64str, unsigned char *i64int);
51 * Convert an unsigned 64-bit integer to a string, in hex.
53 char *u64toh(const unsigned char *u64ptr);
56 * Convert a hex string to an unsigned 64-bit integer.
58 unsigned char *htou64(const char *u64str, unsigned char *u64int);