|
// Misc.h: interface for the CMisc class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MISC_H__886ED6AD_5EEC_4593_8333_9EB77699295F__INCLUDED_)
#define AFX_MISC_H__886ED6AD_5EEC_4593_8333_9EB77699295F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "common.h"
#define MAX_INT ((int)(0x7FFFFFFF))
#define MIN_INT ((int)(0x80000000))
#define MAX_CHAR ((char)(0x7F))
#define MIN_CHAR ((char)(0x80))
#define MAX_SHORT ((short)(0x7FFF))
#define MIN_SHORT ((short)(0x8000))
class CMisc
{
public:
static int div_overflow(DWORD a,DWORD b);
static int div_overflow(int a,int b);
static int mult(long op1, long op2, long *prod_hi, long *prod_lo);
static QWORD hex2dec_64(char *shex);
static int add_overflow(DWORD a,DWORD b);
static int add_overflow(int a,int b);
static int hex2dec_32(char *shex);
static int multi_overflow(DWORD a, DWORD b);
static int multi_overflow(int a,int b);
static int sub_overflow(BYTE a,BYTE b);
static int sub_overflow(DWORD a, DWORD b);
static int sub_overflow(char a,char b);
static int sub_overflow(int a,int b);
static int sub_overflow(short a,short b);
static int sub_overflow(WORD a,WORD b);
static int wild_cmp(char *wild,char *string);
};
#endif // !defined(AFX_MISC_H__886ED6AD_5EEC_4593_8333_9EB77699295F__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.