X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=include%2Fmisc.h;fp=include%2Fmisc.h;h=0000000000000000000000000000000000000000;hb=472b70e710ac48afb0d2831c00d26043b1843047;hp=2a16e51f28b2a268d92eca2dc742fc5c7ddcc270;hpb=833e1c7c90e13ceaba3dde8e7a36fcc8dfb1db3c;p=gnokii.git diff --git a/include/misc.h b/include/misc.h deleted file mode 100644 index 2a16e51..0000000 --- a/include/misc.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - - G N O K I I - - A Linux/Unix toolset and driver for Nokia mobile phones. - - Released under the terms of the GNU GPL, see file COPYING for more details. - - Header file for miscellaneous defines, typedefs etc. - -*/ - -#ifndef __misc_h -#define __misc_h - -#include -#include - -#ifndef VC6 - #include "config.h" - - /* Use gsprintf instead of sprintf and sprintf */ - #ifdef HAVE_SNPRINTF - # define gsprintf(a, b, c...) snprintf(a, b, c) - #else - # define gsprintf(a, b, c...) sprintf(a, c) - #endif - -#endif - -/* Some general defines. */ - -#ifndef false - #define false (0) -#endif - -#ifndef true - #define true (!false) -#endif - -#ifndef bool - #define bool int -#endif - -/* This one is for NLS. */ - -#ifdef USE_NLS - - #ifndef VC6 - #include - #define _(x) gettext(x) - #else - #define _(x) (x) - #endif - -#else - #define _(x) (x) -#endif /* USE_NLS */ - -/* Definitions for u8, u16, u32 and u64, borrowed from - /usr/src/linux/include/asm-i38/types.h */ - -#ifndef u8 - typedef unsigned char u8; -#endif - -#ifndef u16 - typedef unsigned short u16; -#endif - -#ifndef u32 - typedef unsigned int u32; -#endif - -#ifndef s32 - typedef int s32; -#endif - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) - #ifndef u64 - typedef unsigned long long u64; - #endif - - #ifndef s64 - typedef signed long long s64; - #endif -#endif - -/* This one is for FreeBSD and similar systems without __ptr_t_ */ -/* FIXME: autoconf should take care of this. */ - -#ifndef __ptr_t - typedef void * __ptr_t; -#endif /* __ptr_t */ - - -/* Add here any timer operations which are not supported by libc5 */ - -#ifndef HAVE_TIMEOPS -#include - -#ifndef timersub -#define timersub(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ - if ((result)->tv_usec < 0) { \ - --(result)->tv_sec; \ - (result)->tv_usec += 1000000; \ - } \ - } while (0) -#endif - -#endif /* HAVE_TIMEOPS */ - -#include - -extern int GetLine(FILE *File, char *Line, int count); - -int mem_to_int(const char str[], int len); - -void hexdump(u16 MessageLength, u8 *MessageBuffer); -void txhexdump(u16 MessageLength, u8 *MessageBuffer); - -#endif /* __misc_h */