Source: classlib/include/usclslib.h
|
|
|
|
/***************************************************************************
usclslib.h - include principale per la class library
Questo files puo' essere incluso ove e' necessario
utilizzare la class library.
Utilizzando convenientemente i define (vedi sotto)
vengono inclusi opportunamente i .h relativi.
-------------------
begin : ven dic 7 17:40:01 CET 2001
copyright : (C) 2001 by Nicola De Nisco
email : nicola@winada.it
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _USCLSLIB_H
#define _USCLSLIB_H
#ifdef _DEBUG
#define __TRACE
#define __WARN
// attiva le macro PRECONDITION (__DEBUG >= 1)
// e CHECK (__DEBUG >= 2 )
#define __DEBUG 2
#endif
// sempre inclusi incondizionatamente
#include <_defs.h>
#include
#include
#define MAKEWORD(low, high) ( ((low) & 0xFF) + (((high) & 0xFF) << 8) )
#define MAKESHORT(low, high) ( ((low) & 0xFF) + (((high) & 0xFF) << 8) )
#define MAKEDWORD(low, high) ( ((low) & 0xFFFF) + (((high) & 0xFFFF) << 16) )
#define MAKELONG(low, high) ( ((low) & 0xFFFF) + (((high) & 0xFFFF) << 16) )
#define HIBYTE(val) ( ((val) & 0xFF00) >> 8 )
#define LOBYTE(val) ( ((val) & 0x00FF) )
#define HIWORD(val) ( ((val) & 0xFFFF0000) >> 16 )
#define LOWORD(val) ( ((val) & 0x0000FFFF) )
#ifdef __cplusplus
// funzioni globali di utilita' generale
extern "C" unsigned stringHash(const char *s);
extern "C" unsigned stringHashNocase(const char *s);
extern "C" char* strupr(char* s);
extern "C" char* strlwr(char* s);
extern "C" char* trim(char* s);
extern "C" char strcharnospace(const char *s);
extern "C" int isonlyspace(const char* s);
extern "C" char* substchr(char* s, int c1, int c2);
extern "C" char* substnchr(char* s, int n, int c1, int c2);
extern "C" long filelength(int handle);
// disabilita la generazione di min max: in conflitto con macro ?
// #define __MINMAX_DEFINED
#include
#include
#ifdef _Use_Bags
#include
#endif
#ifdef _Use_Arrays
#include
#endif
#ifdef _Use_Stacks
#include
#endif
#ifdef _Use_Queues
#include
#endif
#ifdef _Use_Deques
#include
#endif
#ifdef _Use_SQueues
#include
#endif
#ifdef _Use_Sets
#include
#endif
#ifdef _Use_HashTables
#include
#include
#endif
#ifdef _Use_Cache
#include
#endif
#ifdef _Use_StaticArray
#include
#endif
#ifdef _Use_MT
#include
#endif
#ifdef _Use_Variant
#include
#endif
#ifdef _Use_Exc
#include
#endif
#ifdef _Use_FixString
#include
#endif
#ifdef _Use_Math
#include
#endif
#ifdef _Use_Prop
#include
#endif
#ifdef _Use_Socket
#include
#endif
#else // __cplusplus
// funzioni globali di utilita' generale
unsigned stringHash(const char *s);
unsigned stringHashNocase(const char *s);
char* strupr(char* s);
char* strlwr(char* s);
char* trim(char* s);
char strcharnospace(const char *s);
int isonlyspace(const char* s);
char* substchr(char* s, int c1, int c2);
char* substnchr(char* s, int n, int c1, int c2);
long filelength(int handle);
#endif // __cplusplus
#ifdef _Use_Getopt
#include
#endif
#ifdef _Use_Variant
#include
#endif
#ifndef stricmp
#define stricmp strcasecmp
#endif
#ifndef strnicmp
#define strnicmp strncasecmp
#endif
#endif // _USCLSLIB_H
Generated by: nicola on gulliver.wadahome.it on Sun May 25 13:54:34 2003, using kdoc 2.0a53. |