Archive-Unzip-Burst
view release on metacpan or search on metacpan
unzip-6.0/wince/wince.h view on Meta::CPAN
//******************************************************************************
#ifndef __WINCE_H__
#define __WINCE_H__
#ifdef __cplusplus
extern "C" {
#endif
//******************************************************************************
//***** For all platforms - Our debug output function
//******************************************************************************
// If we are building for debug, we implement the DebugOut() function. If we are
// building for release, then we turn all calls to DebugOut() into no-ops. The
// Microsoft compiler (and hopefully others) will not generate any code at all
// for the retail version of DebugOut() defined here. This works much better
// than trying to create a variable argument macro - something C/C++ does not
// support cleanly.
#ifdef DEBUG
void DebugOut(LPCTSTR szFormat, ...);
#else
__inline void DebugOut(LPCTSTR szFormat, ...) {}
#endif
//******************************************************************************
//***** Windows NT Native
//******************************************************************************
#if !defined(_WIN32_WCE)
#ifndef UNICODE
#include <stdio.h>
#endif
#include <io.h>
#include <time.h>
#include <fcntl.h>
#include <sys\stat.h>
#endif
//******************************************************************************
//***** Windows CE Native
//******************************************************************************
#if defined(_WIN32_WCE)
#if defined(__WINCE_CPP)
// internal, suppress "import linkage" specifier
# define ZCRTIMP
#else
// do not use import linkage specifier either; symbols are provided locally
# define ZCRTIMP
#endif
#ifndef ZeroMemory
#define ZeroMemory(Destination,Length) memset(Destination, 0, Length)
#endif
#ifdef _MBCS
// WinCE C RTL does not provide the setlocale function
# define setlocale(category, locale)
#endif
// A few forgotten defines in Windows CE's TCHAR.H
#ifndef _stprintf
#define _stprintf wsprintf
#endif
#if _WIN32_WCE < 211 //sr551b functions in stdlib CE300
#ifndef _vsntprintf
#define _vsntprintf(d,c,f,a) wvsprintf(d,f,a)
#endif
#ifndef _vsnwprintf
#define _vsnwprintf(d,c,f,a) wvsprintf(d,f,a)
#endif
#endif //end sr551b
//******************************************************************************
//***** SYS\TYPES.H functions
//******************************************************************************
#ifndef _OFF_T_DEFINED
typedef long _off_t;
#define _OFF_T_DEFINED
#endif
#ifndef _TIME_T_DEFINED
typedef long time_t;
#define _TIME_T_DEFINED
#endif
//******************************************************************************
//***** CTYPE.H functions
//******************************************************************************
#if _WIN32_WCE < 300
ZCRTIMP int __cdecl isupper(int);
#endif
_CRTIMP int __cdecl tolower(int);
// This is a coarse approximation to ASCII isalpha(), it returns TRUE not only
// on all ASCII letters but also on punctuation chars in the range of 0x40-0x7F
#ifndef isalpha
#define isalpha(c) (((c) & 0xC0) == 0xC0)
#endif
//******************************************************************************
//***** FCNTL.H functions
//******************************************************************************
#ifndef _O_RDONLY // do not redefine existing FCNTL.H constants
#define _O_RDONLY 0x0000 // open for reading only
#define _O_WRONLY 0x0001 // open for writing only
#define _O_RDWR 0x0002 // open for reading and writing
#define _O_APPEND 0x0008 // writes done at eof
#define _O_CREAT 0x0100 // create and open file
#define _O_TRUNC 0x0200 // open and truncate
#define _O_EXCL 0x0400 // open only if file doesn't already exist
//# define _O_TEXT 0x4000 // file mode is text (translated)
#define _O_BINARY 0x8000 // file mode is binary (untranslated)
( run in 0.857 second using v1.01-cache-2.11-cpan-364913b4093 )