signed-unsigned comparison fixes and removed unused parameter.
[gnutls.git] / lib / gnutls_num.h
blobe7632ef656cea257ca5bd9f26717907afc296605
1 /*
2 * Copyright (C) 2000-2012 Free Software Foundation, Inc.
4 * Author: Nikos Mavrogiannopoulos
6 * This file is part of GnuTLS.
8 * The GnuTLS is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>
23 #ifndef GNUTLS_NUM_H
24 #define GNUTLS_NUM_H
26 #include <gnutls_int.h>
28 #include <minmax.h>
30 uint32_t _gnutls_uint24touint32 (uint24 num);
31 uint24 _gnutls_uint32touint24 (uint32_t num);
32 uint64_t _gnutls_read_uint48 (const uint8_t * data);
33 uint32_t _gnutls_read_uint32 (const uint8_t * data);
34 uint16_t _gnutls_read_uint16 (const uint8_t * data);
35 uint32_t _gnutls_conv_uint32 (uint32_t data);
36 uint16_t _gnutls_conv_uint16 (uint16_t data);
37 uint32_t _gnutls_read_uint24 (const uint8_t * data);
38 void _gnutls_write_uint64 (uint64_t num, uint8_t * data);
39 void _gnutls_write_uint24 (uint32_t num, uint8_t * data);
40 void _gnutls_write_uint32 (uint32_t num, uint8_t * data);
41 void _gnutls_write_uint16 (uint16_t num, uint8_t * data);
42 uint32_t _gnutls_uint64touint32 (const uint64 *);
44 int _gnutls_uint64pp (uint64 *);
45 int _gnutls_uint48pp (uint64 *);
47 # define UINT64DATA(x) ((x).i)
49 #endif /* GNUTLS_NUM_H */