mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-24 10:00:07 +08:00
dos2unix
This commit is contained in:
parent
6144d43321
commit
5556cf1565
@ -1,15 +1,15 @@
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// dll.c - Windows DLL example - dynamically linked part
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define DLL_EXPORT __declspec(dllexport)
|
||||
|
||||
|
||||
DLL_EXPORT void HelloWorld (void)
|
||||
{
|
||||
MessageBox (0, "Hello World!", "From DLL", MB_ICONINFORMATION);
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// dll.c - Windows DLL example - dynamically linked part
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define DLL_EXPORT __declspec(dllexport)
|
||||
|
||||
|
||||
DLL_EXPORT void HelloWorld (void)
|
||||
{
|
||||
MessageBox (0, "Hello World!", "From DLL", MB_ICONINFORMATION);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
; Windows DLL example - export definition for the DLL
|
||||
|
||||
LIBRARY dll.dll
|
||||
|
||||
EXPORTS
|
||||
HelloWorld
|
||||
; Windows DLL example - export definition for the DLL
|
||||
|
||||
LIBRARY dll.dll
|
||||
|
||||
EXPORTS
|
||||
HelloWorld
|
||||
|
@ -1,19 +1,19 @@
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// HELLO_DLL.C - Windows DLL example - main application part
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
void HelloWorld (void);
|
||||
|
||||
int WINAPI WinMain(
|
||||
HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
HelloWorld();
|
||||
return 0;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// HELLO_DLL.C - Windows DLL example - main application part
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
void HelloWorld (void);
|
||||
|
||||
int WINAPI WinMain(
|
||||
HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
HelloWorld();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,159 +1,159 @@
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// HELLO_WIN.C - Windows GUI 'Hello World!' Example
|
||||
//
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define APPNAME "HELLO_WIN"
|
||||
|
||||
char szAppName[] = APPNAME; // The name of this application
|
||||
char szTitle[] = APPNAME; // The title bar text
|
||||
char *pWindowText;
|
||||
|
||||
HINSTANCE g_hInst; // current instance
|
||||
|
||||
void CenterWindow(HWND hWnd);
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// Function: WndProc
|
||||
//
|
||||
// Synopsis: very unusual type of function - gets called by system to
|
||||
// process windows messages.
|
||||
//
|
||||
// Arguments: same as always.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
// ----------------------- first and last
|
||||
case WM_CREATE:
|
||||
CenterWindow(hwnd);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
|
||||
// ----------------------- get out of it...
|
||||
case WM_RBUTTONUP:
|
||||
DestroyWindow(hwnd);
|
||||
break;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
if (VK_ESCAPE == wParam)
|
||||
DestroyWindow(hwnd);
|
||||
break;
|
||||
|
||||
|
||||
// ----------------------- display our minimal info
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc;
|
||||
RECT rc;
|
||||
hdc = BeginPaint(hwnd, &ps);
|
||||
|
||||
GetClientRect(hwnd, &rc);
|
||||
SetTextColor(hdc, RGB(240,240,96));
|
||||
SetBkMode(hdc, TRANSPARENT);
|
||||
DrawText(hdc, pWindowText, -1, &rc, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
|
||||
|
||||
EndPaint(hwnd, &ps);
|
||||
break;
|
||||
}
|
||||
|
||||
// ----------------------- let windows do all other stuff
|
||||
default:
|
||||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// Function: WinMain
|
||||
//
|
||||
// Synopsis: standard entrypoint for GUI Win32 apps
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
int APIENTRY WinMain(
|
||||
HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
WNDCLASS wc;
|
||||
|
||||
HWND hwnd;
|
||||
|
||||
// Fill in window class structure with parameters that describe
|
||||
// the main window.
|
||||
|
||||
ZeroMemory(&wc, sizeof wc);
|
||||
wc.hInstance = hInstance;
|
||||
wc.lpszClassName = szAppName;
|
||||
wc.lpfnWndProc = (WNDPROC)WndProc;
|
||||
wc.style = CS_DBLCLKS|CS_VREDRAW|CS_HREDRAW;
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
|
||||
if (FALSE == RegisterClass(&wc)) return 0;
|
||||
|
||||
// create the browser
|
||||
hwnd = CreateWindow(
|
||||
szAppName,
|
||||
szTitle,
|
||||
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
360,//CW_USEDEFAULT,
|
||||
240,//CW_USEDEFAULT,
|
||||
0,
|
||||
0,
|
||||
g_hInst,
|
||||
0);
|
||||
|
||||
if (NULL == hwnd) return 0;
|
||||
|
||||
pWindowText = lpCmdLine[0] ? lpCmdLine : "Hello Windows!";
|
||||
|
||||
// Main message loop:
|
||||
while (GetMessage(&msg, NULL, 0, 0) > 0)
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
void CenterWindow(HWND hwnd_self)
|
||||
{
|
||||
RECT rw_self, rc_parent, rw_parent; HWND hwnd_parent;
|
||||
hwnd_parent = GetParent(hwnd_self);
|
||||
if (NULL==hwnd_parent) hwnd_parent = GetDesktopWindow();
|
||||
GetWindowRect(hwnd_parent, &rw_parent);
|
||||
GetClientRect(hwnd_parent, &rc_parent);
|
||||
GetWindowRect(hwnd_self, &rw_self);
|
||||
SetWindowPos(hwnd_self, NULL,
|
||||
rw_parent.left + (rc_parent.right + rw_self.left - rw_self.right) / 2,
|
||||
rw_parent.top + (rc_parent.bottom + rw_self.top - rw_self.bottom) / 2,
|
||||
0, 0,
|
||||
SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE
|
||||
);
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// HELLO_WIN.C - Windows GUI 'Hello World!' Example
|
||||
//
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define APPNAME "HELLO_WIN"
|
||||
|
||||
char szAppName[] = APPNAME; // The name of this application
|
||||
char szTitle[] = APPNAME; // The title bar text
|
||||
char *pWindowText;
|
||||
|
||||
HINSTANCE g_hInst; // current instance
|
||||
|
||||
void CenterWindow(HWND hWnd);
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// Function: WndProc
|
||||
//
|
||||
// Synopsis: very unusual type of function - gets called by system to
|
||||
// process windows messages.
|
||||
//
|
||||
// Arguments: same as always.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
// ----------------------- first and last
|
||||
case WM_CREATE:
|
||||
CenterWindow(hwnd);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
|
||||
// ----------------------- get out of it...
|
||||
case WM_RBUTTONUP:
|
||||
DestroyWindow(hwnd);
|
||||
break;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
if (VK_ESCAPE == wParam)
|
||||
DestroyWindow(hwnd);
|
||||
break;
|
||||
|
||||
|
||||
// ----------------------- display our minimal info
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc;
|
||||
RECT rc;
|
||||
hdc = BeginPaint(hwnd, &ps);
|
||||
|
||||
GetClientRect(hwnd, &rc);
|
||||
SetTextColor(hdc, RGB(240,240,96));
|
||||
SetBkMode(hdc, TRANSPARENT);
|
||||
DrawText(hdc, pWindowText, -1, &rc, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
|
||||
|
||||
EndPaint(hwnd, &ps);
|
||||
break;
|
||||
}
|
||||
|
||||
// ----------------------- let windows do all other stuff
|
||||
default:
|
||||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// Function: WinMain
|
||||
//
|
||||
// Synopsis: standard entrypoint for GUI Win32 apps
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
int APIENTRY WinMain(
|
||||
HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
WNDCLASS wc;
|
||||
|
||||
HWND hwnd;
|
||||
|
||||
// Fill in window class structure with parameters that describe
|
||||
// the main window.
|
||||
|
||||
ZeroMemory(&wc, sizeof wc);
|
||||
wc.hInstance = hInstance;
|
||||
wc.lpszClassName = szAppName;
|
||||
wc.lpfnWndProc = (WNDPROC)WndProc;
|
||||
wc.style = CS_DBLCLKS|CS_VREDRAW|CS_HREDRAW;
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
|
||||
if (FALSE == RegisterClass(&wc)) return 0;
|
||||
|
||||
// create the browser
|
||||
hwnd = CreateWindow(
|
||||
szAppName,
|
||||
szTitle,
|
||||
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
360,//CW_USEDEFAULT,
|
||||
240,//CW_USEDEFAULT,
|
||||
0,
|
||||
0,
|
||||
g_hInst,
|
||||
0);
|
||||
|
||||
if (NULL == hwnd) return 0;
|
||||
|
||||
pWindowText = lpCmdLine[0] ? lpCmdLine : "Hello Windows!";
|
||||
|
||||
// Main message loop:
|
||||
while (GetMessage(&msg, NULL, 0, 0) > 0)
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
void CenterWindow(HWND hwnd_self)
|
||||
{
|
||||
RECT rw_self, rc_parent, rw_parent; HWND hwnd_parent;
|
||||
hwnd_parent = GetParent(hwnd_self);
|
||||
if (NULL==hwnd_parent) hwnd_parent = GetDesktopWindow();
|
||||
GetWindowRect(hwnd_parent, &rw_parent);
|
||||
GetClientRect(hwnd_parent, &rc_parent);
|
||||
GetWindowRect(hwnd_self, &rw_self);
|
||||
SetWindowPos(hwnd_self, NULL,
|
||||
rw_parent.left + (rc_parent.right + rw_self.left - rw_self.right) / 2,
|
||||
rw_parent.top + (rc_parent.bottom + rw_self.top - rw_self.bottom) / 2,
|
||||
0, 0,
|
||||
SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE
|
||||
);
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
|
@ -1,71 +1,71 @@
|
||||
/*
|
||||
* assert.h
|
||||
*
|
||||
* Define the assert macro for debug output.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ASSERT_H_
|
||||
#define _ASSERT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
||||
/*
|
||||
* If not debugging, assert does nothing.
|
||||
*/
|
||||
#define assert(x) ((void)0)
|
||||
|
||||
#else /* debugging enabled */
|
||||
|
||||
/*
|
||||
* CRTDLL nicely supplies a function which does the actual output and
|
||||
* call to abort.
|
||||
*/
|
||||
void _assert (const char*, const char*, int)
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((noreturn))
|
||||
#endif
|
||||
;
|
||||
|
||||
/*
|
||||
* Definition of the assert macro.
|
||||
*/
|
||||
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
|
||||
#endif /* NDEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _ASSERT_H_ */
|
||||
|
||||
/*
|
||||
* assert.h
|
||||
*
|
||||
* Define the assert macro for debug output.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ASSERT_H_
|
||||
#define _ASSERT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
||||
/*
|
||||
* If not debugging, assert does nothing.
|
||||
*/
|
||||
#define assert(x) ((void)0)
|
||||
|
||||
#else /* debugging enabled */
|
||||
|
||||
/*
|
||||
* CRTDLL nicely supplies a function which does the actual output and
|
||||
* call to abort.
|
||||
*/
|
||||
void _assert (const char*, const char*, int)
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((noreturn))
|
||||
#endif
|
||||
;
|
||||
|
||||
/*
|
||||
* Definition of the assert macro.
|
||||
*/
|
||||
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
|
||||
#endif /* NDEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _ASSERT_H_ */
|
||||
|
||||
|
@ -1,159 +1,159 @@
|
||||
/* A conio implementation for Mingw/Dev-C++.
|
||||
*
|
||||
* Written by:
|
||||
* Hongli Lai <hongli@telekabel.nl>
|
||||
* tkorrovi <tkorrovi@altavista.net> on 2002/02/26.
|
||||
* Andrew Westcott <ajwestco@users.sourceforge.net>
|
||||
*
|
||||
* Offered for use in the public domain without any warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CONIO_H_
|
||||
#define _CONIO_H_
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BLINK 0
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BLACK,
|
||||
BLUE,
|
||||
GREEN,
|
||||
CYAN,
|
||||
RED,
|
||||
MAGENTA,
|
||||
BROWN,
|
||||
LIGHTGRAY,
|
||||
DARKGRAY,
|
||||
LIGHTBLUE,
|
||||
LIGHTGREEN,
|
||||
LIGHTCYAN,
|
||||
LIGHTRED,
|
||||
LIGHTMAGENTA,
|
||||
YELLOW,
|
||||
WHITE
|
||||
} COLORS;
|
||||
|
||||
|
||||
#define cgets _cgets
|
||||
#define cprintf _cprintf
|
||||
#define cputs _cputs
|
||||
#define cscanf _cscanf
|
||||
#define ScreenClear clrscr
|
||||
|
||||
/* blinkvideo */
|
||||
|
||||
void clreol (void);
|
||||
void clrscr (void);
|
||||
|
||||
int _conio_gettext (int left, int top, int right, int bottom,
|
||||
char *str);
|
||||
/* _conio_kbhit */
|
||||
|
||||
void delline (void);
|
||||
|
||||
/* gettextinfo */
|
||||
void gotoxy(int x, int y);
|
||||
/*
|
||||
highvideo
|
||||
insline
|
||||
intensevideo
|
||||
lowvideo
|
||||
movetext
|
||||
normvideo
|
||||
*/
|
||||
|
||||
void puttext (int left, int top, int right, int bottom, char *str);
|
||||
|
||||
// Screen Variables
|
||||
|
||||
/* ScreenCols
|
||||
ScreenGetChar
|
||||
ScreenGetCursor
|
||||
ScreenMode
|
||||
ScreenPutChar
|
||||
ScreenPutString
|
||||
ScreenRetrieve
|
||||
ScreenRows
|
||||
ScreenSetCursor
|
||||
ScreenUpdate
|
||||
ScreenUpdateLine
|
||||
ScreenVisualBell
|
||||
_set_screen_lines */
|
||||
|
||||
void _setcursortype (int type);
|
||||
|
||||
void textattr (int _attr);
|
||||
|
||||
void textbackground (int color);
|
||||
|
||||
void textcolor (int color);
|
||||
|
||||
/* textmode */
|
||||
|
||||
int wherex (void);
|
||||
|
||||
int wherey (void);
|
||||
|
||||
/* window */
|
||||
|
||||
|
||||
|
||||
/* The code below was part of Mingw's conio.h */
|
||||
/*
|
||||
* conio.h
|
||||
*
|
||||
* Low level console I/O functions. Pretty please try to use the ANSI
|
||||
* standard ones if you are writing new code.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
char* _cgets (char*);
|
||||
int _cprintf (const char*, ...);
|
||||
int _cputs (const char*);
|
||||
int _cscanf (char*, ...);
|
||||
|
||||
int _getch (void);
|
||||
int _getche (void);
|
||||
int _kbhit (void);
|
||||
int _putch (int);
|
||||
int _ungetch (int);
|
||||
|
||||
|
||||
int getch (void);
|
||||
int getche (void);
|
||||
int kbhit (void);
|
||||
int putch (int);
|
||||
int ungetch (int);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CONIO_H_ */
|
||||
/* A conio implementation for Mingw/Dev-C++.
|
||||
*
|
||||
* Written by:
|
||||
* Hongli Lai <hongli@telekabel.nl>
|
||||
* tkorrovi <tkorrovi@altavista.net> on 2002/02/26.
|
||||
* Andrew Westcott <ajwestco@users.sourceforge.net>
|
||||
*
|
||||
* Offered for use in the public domain without any warranty.
|
||||
*/
|
||||
|
||||
#ifndef _CONIO_H_
|
||||
#define _CONIO_H_
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BLINK 0
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BLACK,
|
||||
BLUE,
|
||||
GREEN,
|
||||
CYAN,
|
||||
RED,
|
||||
MAGENTA,
|
||||
BROWN,
|
||||
LIGHTGRAY,
|
||||
DARKGRAY,
|
||||
LIGHTBLUE,
|
||||
LIGHTGREEN,
|
||||
LIGHTCYAN,
|
||||
LIGHTRED,
|
||||
LIGHTMAGENTA,
|
||||
YELLOW,
|
||||
WHITE
|
||||
} COLORS;
|
||||
|
||||
|
||||
#define cgets _cgets
|
||||
#define cprintf _cprintf
|
||||
#define cputs _cputs
|
||||
#define cscanf _cscanf
|
||||
#define ScreenClear clrscr
|
||||
|
||||
/* blinkvideo */
|
||||
|
||||
void clreol (void);
|
||||
void clrscr (void);
|
||||
|
||||
int _conio_gettext (int left, int top, int right, int bottom,
|
||||
char *str);
|
||||
/* _conio_kbhit */
|
||||
|
||||
void delline (void);
|
||||
|
||||
/* gettextinfo */
|
||||
void gotoxy(int x, int y);
|
||||
/*
|
||||
highvideo
|
||||
insline
|
||||
intensevideo
|
||||
lowvideo
|
||||
movetext
|
||||
normvideo
|
||||
*/
|
||||
|
||||
void puttext (int left, int top, int right, int bottom, char *str);
|
||||
|
||||
// Screen Variables
|
||||
|
||||
/* ScreenCols
|
||||
ScreenGetChar
|
||||
ScreenGetCursor
|
||||
ScreenMode
|
||||
ScreenPutChar
|
||||
ScreenPutString
|
||||
ScreenRetrieve
|
||||
ScreenRows
|
||||
ScreenSetCursor
|
||||
ScreenUpdate
|
||||
ScreenUpdateLine
|
||||
ScreenVisualBell
|
||||
_set_screen_lines */
|
||||
|
||||
void _setcursortype (int type);
|
||||
|
||||
void textattr (int _attr);
|
||||
|
||||
void textbackground (int color);
|
||||
|
||||
void textcolor (int color);
|
||||
|
||||
/* textmode */
|
||||
|
||||
int wherex (void);
|
||||
|
||||
int wherey (void);
|
||||
|
||||
/* window */
|
||||
|
||||
|
||||
|
||||
/* The code below was part of Mingw's conio.h */
|
||||
/*
|
||||
* conio.h
|
||||
*
|
||||
* Low level console I/O functions. Pretty please try to use the ANSI
|
||||
* standard ones if you are writing new code.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
char* _cgets (char*);
|
||||
int _cprintf (const char*, ...);
|
||||
int _cputs (const char*);
|
||||
int _cscanf (char*, ...);
|
||||
|
||||
int _getch (void);
|
||||
int _getche (void);
|
||||
int _kbhit (void);
|
||||
int _putch (int);
|
||||
int _ungetch (int);
|
||||
|
||||
|
||||
int getch (void);
|
||||
int getche (void);
|
||||
int kbhit (void);
|
||||
int putch (int);
|
||||
int ungetch (int);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CONIO_H_ */
|
||||
|
@ -1,232 +1,232 @@
|
||||
/*
|
||||
* ctype.h
|
||||
*
|
||||
* Functions for testing character types and converting characters.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CTYPE_H_
|
||||
#define _CTYPE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
|
||||
/*
|
||||
* The following flags are used to tell iswctype and _isctype what character
|
||||
* types you are looking for.
|
||||
*/
|
||||
#define _UPPER 0x0001
|
||||
#define _LOWER 0x0002
|
||||
#define _DIGIT 0x0004
|
||||
#define _SPACE 0x0008 /* HT LF VT FF CR SP */
|
||||
#define _PUNCT 0x0010
|
||||
#define _CONTROL 0x0020
|
||||
#define _BLANK 0x0040 /* this is SP only, not SP and HT as in C99 */
|
||||
#define _HEX 0x0080
|
||||
#define _LEADBYTE 0x8000
|
||||
|
||||
#define _ALPHA 0x0103
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int isalnum(int);
|
||||
int isalpha(int);
|
||||
int iscntrl(int);
|
||||
int isdigit(int);
|
||||
int isgraph(int);
|
||||
int islower(int);
|
||||
int isprint(int);
|
||||
int ispunct(int);
|
||||
int isspace(int);
|
||||
int isupper(int);
|
||||
int isxdigit(int);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
int _isctype (int, int);
|
||||
#endif
|
||||
|
||||
/* These are the ANSI versions, with correct checking of argument */
|
||||
int tolower(int);
|
||||
int toupper(int);
|
||||
|
||||
/*
|
||||
* NOTE: The above are not old name type wrappers, but functions exported
|
||||
* explicitly by MSVCRT/CRTDLL. However, underscored versions are also
|
||||
* exported.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* These are the cheap non-std versions: The return values are undefined
|
||||
* if the argument is not ASCII char or is not of appropriate case
|
||||
*/
|
||||
int _tolower(int);
|
||||
int _toupper(int);
|
||||
#endif
|
||||
|
||||
/* Also defined in stdlib.h */
|
||||
#ifndef MB_CUR_MAX
|
||||
# ifdef __MSVCRT__
|
||||
# define MB_CUR_MAX __mb_cur_max
|
||||
__MINGW_IMPORT int __mb_cur_max;
|
||||
# else /* not __MSVCRT */
|
||||
# define MB_CUR_MAX __mb_cur_max_dll
|
||||
__MINGW_IMPORT int __mb_cur_max_dll;
|
||||
# endif /* not __MSVCRT */
|
||||
#endif /* MB_CUR_MAX */
|
||||
|
||||
__MINGW_IMPORT unsigned short _ctype[];
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned short* _pctype;
|
||||
#else /* CRTDLL */
|
||||
__MINGW_IMPORT unsigned short* _pctype_dll;
|
||||
#define _pctype _pctype_dll
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use inlines here rather than macros, because macros will upset
|
||||
* C++ usage (eg, ::isalnum), and so usually get undefined
|
||||
*
|
||||
* According to standard for SB chars, these function are defined only
|
||||
* for input values representable by unsigned char or EOF.
|
||||
* Thus, there is no range test.
|
||||
* This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
|
||||
*
|
||||
* If no MB char support is needed, these can be simplified even
|
||||
* more by command line define -DMB_CUR_MAX=1. The compiler will then
|
||||
* optimise away the constant condition.
|
||||
*/
|
||||
|
||||
|
||||
#if ! (defined (__NO_CTYPE_INLINES) || defined (__STRICT_ANSI__ ))
|
||||
/* use simple lookup if SB locale, else _isctype() */
|
||||
#define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
|
||||
extern __inline__ int isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
|
||||
extern __inline__ int isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
|
||||
extern __inline__ int iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
|
||||
extern __inline__ int isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
|
||||
extern __inline__ int isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int islower(int c) {return __ISCTYPE(c, _LOWER);}
|
||||
extern __inline__ int isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
|
||||
extern __inline__ int isspace(int c) {return __ISCTYPE(c, _SPACE);}
|
||||
extern __inline__ int isupper(int c) {return __ISCTYPE(c, _UPPER);}
|
||||
extern __inline__ int isxdigit(int c) {return __ISCTYPE(c, _HEX);}
|
||||
|
||||
/* these reproduce behaviour of lib underscored versions */
|
||||
extern __inline__ int _tolower(int c) {return ( c -'A'+'a');}
|
||||
extern __inline__ int _toupper(int c) {return ( c -'a'+'A');}
|
||||
|
||||
/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
|
||||
if we only want C-locale. */
|
||||
|
||||
#endif /* _NO_CTYPE_INLINES */
|
||||
|
||||
/* Wide character equivalents */
|
||||
|
||||
#ifndef WEOF
|
||||
#define WEOF (wchar_t)(0xFFFF)
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_T_DEFINED
|
||||
typedef wchar_t wctype_t;
|
||||
#define _WCTYPE_T_DEFINED
|
||||
#endif
|
||||
|
||||
int iswalnum(wint_t);
|
||||
int iswalpha(wint_t);
|
||||
int iswascii(wint_t);
|
||||
int iswcntrl(wint_t);
|
||||
int iswctype(wint_t, wctype_t);
|
||||
int is_wctype(wint_t, wctype_t); /* Obsolete! */
|
||||
int iswdigit(wint_t);
|
||||
int iswgraph(wint_t);
|
||||
int iswlower(wint_t);
|
||||
int iswprint(wint_t);
|
||||
int iswpunct(wint_t);
|
||||
int iswspace(wint_t);
|
||||
int iswupper(wint_t);
|
||||
int iswxdigit(wint_t);
|
||||
|
||||
wchar_t towlower(wchar_t);
|
||||
wchar_t towupper(wchar_t);
|
||||
|
||||
int isleadbyte (int);
|
||||
|
||||
/* Also in wctype.h */
|
||||
#if ! (defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
|
||||
#define __WCTYPE_INLINES_DEFINED
|
||||
extern __inline__ int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
|
||||
extern __inline__ int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
|
||||
extern __inline__ int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
|
||||
extern __inline__ int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
|
||||
extern __inline__ int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
|
||||
extern __inline__ int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
|
||||
extern __inline__ int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
|
||||
extern __inline__ int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
|
||||
extern __inline__ int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
|
||||
extern __inline__ int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
|
||||
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
int __isascii (int);
|
||||
int __toascii (int);
|
||||
int __iscsymf (int); /* Valid first character in C symbol */
|
||||
int __iscsym (int); /* Valid character in C symbol (after first) */
|
||||
|
||||
#ifndef __NO_CTYPE_INLINES
|
||||
extern __inline__ int __isascii(int c) {return (((unsigned)c & ~0x7F) == 0);}
|
||||
extern __inline__ int __toascii(int c) {return (c & 0x7F);}
|
||||
extern __inline__ int __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
|
||||
extern __inline__ int __iscsym(int c) {return (isalnum(c) || (c == '_'));}
|
||||
#endif /* __NO_CTYPE_INLINES */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int isascii (int);
|
||||
int toascii (int);
|
||||
int iscsymf (int);
|
||||
int iscsym (int);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _CTYPE_H_ */
|
||||
|
||||
/*
|
||||
* ctype.h
|
||||
*
|
||||
* Functions for testing character types and converting characters.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CTYPE_H_
|
||||
#define _CTYPE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
|
||||
/*
|
||||
* The following flags are used to tell iswctype and _isctype what character
|
||||
* types you are looking for.
|
||||
*/
|
||||
#define _UPPER 0x0001
|
||||
#define _LOWER 0x0002
|
||||
#define _DIGIT 0x0004
|
||||
#define _SPACE 0x0008 /* HT LF VT FF CR SP */
|
||||
#define _PUNCT 0x0010
|
||||
#define _CONTROL 0x0020
|
||||
#define _BLANK 0x0040 /* this is SP only, not SP and HT as in C99 */
|
||||
#define _HEX 0x0080
|
||||
#define _LEADBYTE 0x8000
|
||||
|
||||
#define _ALPHA 0x0103
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int isalnum(int);
|
||||
int isalpha(int);
|
||||
int iscntrl(int);
|
||||
int isdigit(int);
|
||||
int isgraph(int);
|
||||
int islower(int);
|
||||
int isprint(int);
|
||||
int ispunct(int);
|
||||
int isspace(int);
|
||||
int isupper(int);
|
||||
int isxdigit(int);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
int _isctype (int, int);
|
||||
#endif
|
||||
|
||||
/* These are the ANSI versions, with correct checking of argument */
|
||||
int tolower(int);
|
||||
int toupper(int);
|
||||
|
||||
/*
|
||||
* NOTE: The above are not old name type wrappers, but functions exported
|
||||
* explicitly by MSVCRT/CRTDLL. However, underscored versions are also
|
||||
* exported.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* These are the cheap non-std versions: The return values are undefined
|
||||
* if the argument is not ASCII char or is not of appropriate case
|
||||
*/
|
||||
int _tolower(int);
|
||||
int _toupper(int);
|
||||
#endif
|
||||
|
||||
/* Also defined in stdlib.h */
|
||||
#ifndef MB_CUR_MAX
|
||||
# ifdef __MSVCRT__
|
||||
# define MB_CUR_MAX __mb_cur_max
|
||||
__MINGW_IMPORT int __mb_cur_max;
|
||||
# else /* not __MSVCRT */
|
||||
# define MB_CUR_MAX __mb_cur_max_dll
|
||||
__MINGW_IMPORT int __mb_cur_max_dll;
|
||||
# endif /* not __MSVCRT */
|
||||
#endif /* MB_CUR_MAX */
|
||||
|
||||
__MINGW_IMPORT unsigned short _ctype[];
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned short* _pctype;
|
||||
#else /* CRTDLL */
|
||||
__MINGW_IMPORT unsigned short* _pctype_dll;
|
||||
#define _pctype _pctype_dll
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use inlines here rather than macros, because macros will upset
|
||||
* C++ usage (eg, ::isalnum), and so usually get undefined
|
||||
*
|
||||
* According to standard for SB chars, these function are defined only
|
||||
* for input values representable by unsigned char or EOF.
|
||||
* Thus, there is no range test.
|
||||
* This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
|
||||
*
|
||||
* If no MB char support is needed, these can be simplified even
|
||||
* more by command line define -DMB_CUR_MAX=1. The compiler will then
|
||||
* optimise away the constant condition.
|
||||
*/
|
||||
|
||||
|
||||
#if ! (defined (__NO_CTYPE_INLINES) || defined (__STRICT_ANSI__ ))
|
||||
/* use simple lookup if SB locale, else _isctype() */
|
||||
#define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
|
||||
extern __inline__ int isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
|
||||
extern __inline__ int isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
|
||||
extern __inline__ int iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
|
||||
extern __inline__ int isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
|
||||
extern __inline__ int isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int islower(int c) {return __ISCTYPE(c, _LOWER);}
|
||||
extern __inline__ int isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
|
||||
extern __inline__ int isspace(int c) {return __ISCTYPE(c, _SPACE);}
|
||||
extern __inline__ int isupper(int c) {return __ISCTYPE(c, _UPPER);}
|
||||
extern __inline__ int isxdigit(int c) {return __ISCTYPE(c, _HEX);}
|
||||
|
||||
/* these reproduce behaviour of lib underscored versions */
|
||||
extern __inline__ int _tolower(int c) {return ( c -'A'+'a');}
|
||||
extern __inline__ int _toupper(int c) {return ( c -'a'+'A');}
|
||||
|
||||
/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
|
||||
if we only want C-locale. */
|
||||
|
||||
#endif /* _NO_CTYPE_INLINES */
|
||||
|
||||
/* Wide character equivalents */
|
||||
|
||||
#ifndef WEOF
|
||||
#define WEOF (wchar_t)(0xFFFF)
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_T_DEFINED
|
||||
typedef wchar_t wctype_t;
|
||||
#define _WCTYPE_T_DEFINED
|
||||
#endif
|
||||
|
||||
int iswalnum(wint_t);
|
||||
int iswalpha(wint_t);
|
||||
int iswascii(wint_t);
|
||||
int iswcntrl(wint_t);
|
||||
int iswctype(wint_t, wctype_t);
|
||||
int is_wctype(wint_t, wctype_t); /* Obsolete! */
|
||||
int iswdigit(wint_t);
|
||||
int iswgraph(wint_t);
|
||||
int iswlower(wint_t);
|
||||
int iswprint(wint_t);
|
||||
int iswpunct(wint_t);
|
||||
int iswspace(wint_t);
|
||||
int iswupper(wint_t);
|
||||
int iswxdigit(wint_t);
|
||||
|
||||
wchar_t towlower(wchar_t);
|
||||
wchar_t towupper(wchar_t);
|
||||
|
||||
int isleadbyte (int);
|
||||
|
||||
/* Also in wctype.h */
|
||||
#if ! (defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
|
||||
#define __WCTYPE_INLINES_DEFINED
|
||||
extern __inline__ int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
|
||||
extern __inline__ int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
|
||||
extern __inline__ int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
|
||||
extern __inline__ int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
|
||||
extern __inline__ int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
|
||||
extern __inline__ int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern __inline__ int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
|
||||
extern __inline__ int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
|
||||
extern __inline__ int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
|
||||
extern __inline__ int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
|
||||
extern __inline__ int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
|
||||
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
int __isascii (int);
|
||||
int __toascii (int);
|
||||
int __iscsymf (int); /* Valid first character in C symbol */
|
||||
int __iscsym (int); /* Valid character in C symbol (after first) */
|
||||
|
||||
#ifndef __NO_CTYPE_INLINES
|
||||
extern __inline__ int __isascii(int c) {return (((unsigned)c & ~0x7F) == 0);}
|
||||
extern __inline__ int __toascii(int c) {return (c & 0x7F);}
|
||||
extern __inline__ int __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
|
||||
extern __inline__ int __iscsym(int c) {return (isalnum(c) || (c == '_'));}
|
||||
#endif /* __NO_CTYPE_INLINES */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int isascii (int);
|
||||
int toascii (int);
|
||||
int iscsymf (int);
|
||||
int iscsym (int);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _CTYPE_H_ */
|
||||
|
||||
|
@ -1,26 +1,26 @@
|
||||
/*
|
||||
* dir.h
|
||||
*
|
||||
* This file OBSOLESCENT and only provided for backward compatibility.
|
||||
* Please use io.h instead.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
* Mumit Khan <khan@xraylith.wisc.edu>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <io.h>
|
||||
|
||||
/*
|
||||
* dir.h
|
||||
*
|
||||
* This file OBSOLESCENT and only provided for backward compatibility.
|
||||
* Please use io.h instead.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
* Mumit Khan <khan@xraylith.wisc.edu>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <io.h>
|
||||
|
||||
|
@ -1,95 +1,95 @@
|
||||
/*
|
||||
* direct.h
|
||||
*
|
||||
* Functions for manipulating paths and directories (included from io.h)
|
||||
* plus functions for setting the current drive.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DIRECT_H_
|
||||
#define _DIRECT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _DISKFREE_T_DEFINED
|
||||
/* needed by _getdiskfree (also in dos.h) */
|
||||
struct _diskfree_t {
|
||||
unsigned total_clusters;
|
||||
unsigned avail_clusters;
|
||||
unsigned sectors_per_cluster;
|
||||
unsigned bytes_per_sector;
|
||||
};
|
||||
#define _DISKFREE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* You really shouldn't be using these. Use the Win32 API functions instead.
|
||||
* However, it does make it easier to port older code.
|
||||
*/
|
||||
int _getdrive (void);
|
||||
unsigned long _getdrives(void);
|
||||
int _chdrive (int);
|
||||
char* _getdcwd (int, char*, int);
|
||||
unsigned _getdiskfree (unsigned, struct _diskfree_t *);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
# define diskfree_t _diskfree_t
|
||||
#endif
|
||||
|
||||
#ifndef _WDIRECT_DEFINED
|
||||
/* wide character versions. Also in wchar.h */
|
||||
#ifdef __MSVCRT__
|
||||
int _wchdir(const wchar_t*);
|
||||
wchar_t* _wgetcwd(wchar_t*, int);
|
||||
wchar_t* _wgetdcwd(int, wchar_t*, int);
|
||||
int _wmkdir(const wchar_t*);
|
||||
int _wrmdir(const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WDIRECT_DEFINED
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DIRECT_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* direct.h
|
||||
*
|
||||
* Functions for manipulating paths and directories (included from io.h)
|
||||
* plus functions for setting the current drive.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DIRECT_H_
|
||||
#define _DIRECT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _DISKFREE_T_DEFINED
|
||||
/* needed by _getdiskfree (also in dos.h) */
|
||||
struct _diskfree_t {
|
||||
unsigned total_clusters;
|
||||
unsigned avail_clusters;
|
||||
unsigned sectors_per_cluster;
|
||||
unsigned bytes_per_sector;
|
||||
};
|
||||
#define _DISKFREE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* You really shouldn't be using these. Use the Win32 API functions instead.
|
||||
* However, it does make it easier to port older code.
|
||||
*/
|
||||
int _getdrive (void);
|
||||
unsigned long _getdrives(void);
|
||||
int _chdrive (int);
|
||||
char* _getdcwd (int, char*, int);
|
||||
unsigned _getdiskfree (unsigned, struct _diskfree_t *);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
# define diskfree_t _diskfree_t
|
||||
#endif
|
||||
|
||||
#ifndef _WDIRECT_DEFINED
|
||||
/* wide character versions. Also in wchar.h */
|
||||
#ifdef __MSVCRT__
|
||||
int _wchdir(const wchar_t*);
|
||||
wchar_t* _wgetcwd(wchar_t*, int);
|
||||
wchar_t* _wgetdcwd(int, wchar_t*, int);
|
||||
int _wmkdir(const wchar_t*);
|
||||
int _wrmdir(const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WDIRECT_DEFINED
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DIRECT_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,96 +1,96 @@
|
||||
/*
|
||||
* DIRENT.H (formerly DIRLIB.H)
|
||||
*
|
||||
* by M. J. Weinstein Released to public domain 1-Jan-89
|
||||
*
|
||||
* Because I have heard that this feature (opendir, readdir, closedir)
|
||||
* it so useful for programmers coming from UNIX or attempting to port
|
||||
* UNIX code, and because it is reasonably light weight, I have included
|
||||
* it in the Mingw32 package. I have also added an implementation of
|
||||
* rewinddir, seekdir and telldir.
|
||||
* - Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* This code is distributed in the hope that is will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includeds but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DIRENT_H_
|
||||
#define _DIRENT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dirent
|
||||
{
|
||||
long d_ino; /* Always zero. */
|
||||
unsigned short d_reclen; /* Always zero. */
|
||||
unsigned short d_namlen; /* Length of name in d_name. */
|
||||
char* d_name; /* File name. */
|
||||
/* NOTE: The name in the dirent structure points to the name in the
|
||||
* finddata_t structure in the DIR. */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is an internal data structure. Good programmers will not use it
|
||||
* except as an argument to one of the functions below.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* disk transfer area for this dir */
|
||||
struct _finddata_t dd_dta;
|
||||
|
||||
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||
* safe as long as only one thread uses a particular DIR struct at
|
||||
* a time) */
|
||||
struct dirent dd_dir;
|
||||
|
||||
/* _findnext handle */
|
||||
long dd_handle;
|
||||
|
||||
/*
|
||||
* Status of search:
|
||||
* 0 = not started yet (next entry to read is first entry)
|
||||
* -1 = off the end
|
||||
* positive = 0 based index of next entry
|
||||
*/
|
||||
short dd_stat;
|
||||
|
||||
/* given path for dir with search pattern (struct is extended) */
|
||||
char dd_name[1];
|
||||
} DIR;
|
||||
|
||||
|
||||
DIR* opendir (const char*);
|
||||
struct dirent* readdir (DIR*);
|
||||
int closedir (DIR*);
|
||||
void rewinddir (DIR*);
|
||||
long telldir (DIR*);
|
||||
void seekdir (DIR*, long);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DIRENT_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* DIRENT.H (formerly DIRLIB.H)
|
||||
*
|
||||
* by M. J. Weinstein Released to public domain 1-Jan-89
|
||||
*
|
||||
* Because I have heard that this feature (opendir, readdir, closedir)
|
||||
* it so useful for programmers coming from UNIX or attempting to port
|
||||
* UNIX code, and because it is reasonably light weight, I have included
|
||||
* it in the Mingw32 package. I have also added an implementation of
|
||||
* rewinddir, seekdir and telldir.
|
||||
* - Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* This code is distributed in the hope that is will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includeds but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DIRENT_H_
|
||||
#define _DIRENT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dirent
|
||||
{
|
||||
long d_ino; /* Always zero. */
|
||||
unsigned short d_reclen; /* Always zero. */
|
||||
unsigned short d_namlen; /* Length of name in d_name. */
|
||||
char* d_name; /* File name. */
|
||||
/* NOTE: The name in the dirent structure points to the name in the
|
||||
* finddata_t structure in the DIR. */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is an internal data structure. Good programmers will not use it
|
||||
* except as an argument to one of the functions below.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* disk transfer area for this dir */
|
||||
struct _finddata_t dd_dta;
|
||||
|
||||
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||
* safe as long as only one thread uses a particular DIR struct at
|
||||
* a time) */
|
||||
struct dirent dd_dir;
|
||||
|
||||
/* _findnext handle */
|
||||
long dd_handle;
|
||||
|
||||
/*
|
||||
* Status of search:
|
||||
* 0 = not started yet (next entry to read is first entry)
|
||||
* -1 = off the end
|
||||
* positive = 0 based index of next entry
|
||||
*/
|
||||
short dd_stat;
|
||||
|
||||
/* given path for dir with search pattern (struct is extended) */
|
||||
char dd_name[1];
|
||||
} DIR;
|
||||
|
||||
|
||||
DIR* opendir (const char*);
|
||||
struct dirent* readdir (DIR*);
|
||||
int closedir (DIR*);
|
||||
void rewinddir (DIR*);
|
||||
long telldir (DIR*);
|
||||
void seekdir (DIR*, long);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DIRENT_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,110 +1,110 @@
|
||||
/*
|
||||
* dos.h
|
||||
*
|
||||
* DOS-specific functions and structures.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DOS_H_
|
||||
#define _DOS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/* For DOS file attributes */
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern unsigned int *__imp__basemajor_dll;
|
||||
extern unsigned int *__imp__baseminor_dll;
|
||||
extern unsigned int *__imp__baseversion_dll;
|
||||
extern unsigned int *__imp__osmajor_dll;
|
||||
extern unsigned int *__imp__osminor_dll;
|
||||
extern unsigned int *__imp__osmode_dll;
|
||||
|
||||
#define _basemajor (*__imp__basemajor_dll)
|
||||
#define _baseminor (*__imp__baseminor_dll)
|
||||
#define _baseversion (*__imp__baseversion_dll)
|
||||
#define _osmajor (*__imp__osmajor_dll)
|
||||
#define _osminor (*__imp__osminor_dll)
|
||||
#define _osmode (*__imp__osmode_dll)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT unsigned int _basemajor_dll;
|
||||
__MINGW_IMPORT unsigned int _baseminor_dll;
|
||||
__MINGW_IMPORT unsigned int _baseversion_dll;
|
||||
__MINGW_IMPORT unsigned int _osmajor_dll;
|
||||
__MINGW_IMPORT unsigned int _osminor_dll;
|
||||
__MINGW_IMPORT unsigned int _osmode_dll;
|
||||
|
||||
#define _basemajor _basemajor_dll
|
||||
#define _baseminor _baseminor_dll
|
||||
#define _baseversion _baseversion_dll
|
||||
#define _osmajor _osmajor_dll
|
||||
#define _osminor _osminor_dll
|
||||
#define _osmode _osmode_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#ifndef _DISKFREE_T_DEFINED
|
||||
/* needed by _getdiskfree (also in direct.h) */
|
||||
struct _diskfree_t {
|
||||
unsigned total_clusters;
|
||||
unsigned avail_clusters;
|
||||
unsigned sectors_per_cluster;
|
||||
unsigned bytes_per_sector;
|
||||
};
|
||||
#define _DISKFREE_T_DEFINED
|
||||
#endif
|
||||
|
||||
unsigned _getdiskfree (unsigned, struct _diskfree_t *);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
# define diskfree_t _diskfree_t
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DOS_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* dos.h
|
||||
*
|
||||
* DOS-specific functions and structures.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _DOS_H_
|
||||
#define _DOS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/* For DOS file attributes */
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern unsigned int *__imp__basemajor_dll;
|
||||
extern unsigned int *__imp__baseminor_dll;
|
||||
extern unsigned int *__imp__baseversion_dll;
|
||||
extern unsigned int *__imp__osmajor_dll;
|
||||
extern unsigned int *__imp__osminor_dll;
|
||||
extern unsigned int *__imp__osmode_dll;
|
||||
|
||||
#define _basemajor (*__imp__basemajor_dll)
|
||||
#define _baseminor (*__imp__baseminor_dll)
|
||||
#define _baseversion (*__imp__baseversion_dll)
|
||||
#define _osmajor (*__imp__osmajor_dll)
|
||||
#define _osminor (*__imp__osminor_dll)
|
||||
#define _osmode (*__imp__osmode_dll)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT unsigned int _basemajor_dll;
|
||||
__MINGW_IMPORT unsigned int _baseminor_dll;
|
||||
__MINGW_IMPORT unsigned int _baseversion_dll;
|
||||
__MINGW_IMPORT unsigned int _osmajor_dll;
|
||||
__MINGW_IMPORT unsigned int _osminor_dll;
|
||||
__MINGW_IMPORT unsigned int _osmode_dll;
|
||||
|
||||
#define _basemajor _basemajor_dll
|
||||
#define _baseminor _baseminor_dll
|
||||
#define _baseversion _baseversion_dll
|
||||
#define _osmajor _osmajor_dll
|
||||
#define _osminor _osminor_dll
|
||||
#define _osmode _osmode_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#ifndef _DISKFREE_T_DEFINED
|
||||
/* needed by _getdiskfree (also in direct.h) */
|
||||
struct _diskfree_t {
|
||||
unsigned total_clusters;
|
||||
unsigned avail_clusters;
|
||||
unsigned sectors_per_cluster;
|
||||
unsigned bytes_per_sector;
|
||||
};
|
||||
#define _DISKFREE_T_DEFINED
|
||||
#endif
|
||||
|
||||
unsigned _getdiskfree (unsigned, struct _diskfree_t *);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
# define diskfree_t _diskfree_t
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DOS_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,117 +1,117 @@
|
||||
/*
|
||||
* errno.h
|
||||
*
|
||||
* Error numbers and access to error reporting.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ERRNO_H_
|
||||
#define _ERRNO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* Error numbers.
|
||||
* TODO: Can't be sure of some of these assignments, I guessed from the
|
||||
* names given by strerror and the defines in the Cygnus errno.h. A lot
|
||||
* of the names from the Cygnus errno.h are not represented, and a few
|
||||
* of the descriptions returned by strerror do not obviously match
|
||||
* their error naming.
|
||||
*/
|
||||
#define EPERM 1 /* Operation not permitted */
|
||||
#define ENOFILE 2 /* No such file or directory */
|
||||
#define ENOENT 2
|
||||
#define ESRCH 3 /* No such process */
|
||||
#define EINTR 4 /* Interrupted function call */
|
||||
#define EIO 5 /* Input/output error */
|
||||
#define ENXIO 6 /* No such device or address */
|
||||
#define E2BIG 7 /* Arg list too long */
|
||||
#define ENOEXEC 8 /* Exec format error */
|
||||
#define EBADF 9 /* Bad file descriptor */
|
||||
#define ECHILD 10 /* No child processes */
|
||||
#define EAGAIN 11 /* Resource temporarily unavailable */
|
||||
#define ENOMEM 12 /* Not enough space */
|
||||
#define EACCES 13 /* Permission denied */
|
||||
#define EFAULT 14 /* Bad address */
|
||||
/* 15 - Unknown Error */
|
||||
#define EBUSY 16 /* strerror reports "Resource device" */
|
||||
#define EEXIST 17 /* File exists */
|
||||
#define EXDEV 18 /* Improper link (cross-device link?) */
|
||||
#define ENODEV 19 /* No such device */
|
||||
#define ENOTDIR 20 /* Not a directory */
|
||||
#define EISDIR 21 /* Is a directory */
|
||||
#define EINVAL 22 /* Invalid argument */
|
||||
#define ENFILE 23 /* Too many open files in system */
|
||||
#define EMFILE 24 /* Too many open files */
|
||||
#define ENOTTY 25 /* Inappropriate I/O control operation */
|
||||
/* 26 - Unknown Error */
|
||||
#define EFBIG 27 /* File too large */
|
||||
#define ENOSPC 28 /* No space left on device */
|
||||
#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
|
||||
#define EROFS 30 /* Read-only file system */
|
||||
#define EMLINK 31 /* Too many links */
|
||||
#define EPIPE 32 /* Broken pipe */
|
||||
#define EDOM 33 /* Domain error (math functions) */
|
||||
#define ERANGE 34 /* Result too large (possibly too small) */
|
||||
/* 35 - Unknown Error */
|
||||
#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
|
||||
#define EDEADLK 36
|
||||
/* 37 - Unknown Error */
|
||||
#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
|
||||
#define ENOLCK 39 /* No locks available (46 in Cyg?) */
|
||||
#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
|
||||
#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
|
||||
#define EILSEQ 42 /* Illegal byte sequence */
|
||||
|
||||
/*
|
||||
* NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
|
||||
* sockets.h header provided with windows32api-0.1.2.
|
||||
* You should go and put an #if 0 ... #endif around the whole block
|
||||
* of errors (look at the comment above them).
|
||||
*/
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
|
||||
* stdlib.h.
|
||||
*/
|
||||
#ifdef _UWIN
|
||||
#undef errno
|
||||
extern int errno;
|
||||
#else
|
||||
int* _errno(void);
|
||||
#define errno (*_errno())
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _ERRNO_H_ */
|
||||
/*
|
||||
* errno.h
|
||||
*
|
||||
* Error numbers and access to error reporting.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ERRNO_H_
|
||||
#define _ERRNO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* Error numbers.
|
||||
* TODO: Can't be sure of some of these assignments, I guessed from the
|
||||
* names given by strerror and the defines in the Cygnus errno.h. A lot
|
||||
* of the names from the Cygnus errno.h are not represented, and a few
|
||||
* of the descriptions returned by strerror do not obviously match
|
||||
* their error naming.
|
||||
*/
|
||||
#define EPERM 1 /* Operation not permitted */
|
||||
#define ENOFILE 2 /* No such file or directory */
|
||||
#define ENOENT 2
|
||||
#define ESRCH 3 /* No such process */
|
||||
#define EINTR 4 /* Interrupted function call */
|
||||
#define EIO 5 /* Input/output error */
|
||||
#define ENXIO 6 /* No such device or address */
|
||||
#define E2BIG 7 /* Arg list too long */
|
||||
#define ENOEXEC 8 /* Exec format error */
|
||||
#define EBADF 9 /* Bad file descriptor */
|
||||
#define ECHILD 10 /* No child processes */
|
||||
#define EAGAIN 11 /* Resource temporarily unavailable */
|
||||
#define ENOMEM 12 /* Not enough space */
|
||||
#define EACCES 13 /* Permission denied */
|
||||
#define EFAULT 14 /* Bad address */
|
||||
/* 15 - Unknown Error */
|
||||
#define EBUSY 16 /* strerror reports "Resource device" */
|
||||
#define EEXIST 17 /* File exists */
|
||||
#define EXDEV 18 /* Improper link (cross-device link?) */
|
||||
#define ENODEV 19 /* No such device */
|
||||
#define ENOTDIR 20 /* Not a directory */
|
||||
#define EISDIR 21 /* Is a directory */
|
||||
#define EINVAL 22 /* Invalid argument */
|
||||
#define ENFILE 23 /* Too many open files in system */
|
||||
#define EMFILE 24 /* Too many open files */
|
||||
#define ENOTTY 25 /* Inappropriate I/O control operation */
|
||||
/* 26 - Unknown Error */
|
||||
#define EFBIG 27 /* File too large */
|
||||
#define ENOSPC 28 /* No space left on device */
|
||||
#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
|
||||
#define EROFS 30 /* Read-only file system */
|
||||
#define EMLINK 31 /* Too many links */
|
||||
#define EPIPE 32 /* Broken pipe */
|
||||
#define EDOM 33 /* Domain error (math functions) */
|
||||
#define ERANGE 34 /* Result too large (possibly too small) */
|
||||
/* 35 - Unknown Error */
|
||||
#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
|
||||
#define EDEADLK 36
|
||||
/* 37 - Unknown Error */
|
||||
#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
|
||||
#define ENOLCK 39 /* No locks available (46 in Cyg?) */
|
||||
#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
|
||||
#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
|
||||
#define EILSEQ 42 /* Illegal byte sequence */
|
||||
|
||||
/*
|
||||
* NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
|
||||
* sockets.h header provided with windows32api-0.1.2.
|
||||
* You should go and put an #if 0 ... #endif around the whole block
|
||||
* of errors (look at the comment above them).
|
||||
*/
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
|
||||
* stdlib.h.
|
||||
*/
|
||||
#ifdef _UWIN
|
||||
#undef errno
|
||||
extern int errno;
|
||||
#else
|
||||
int* _errno(void);
|
||||
#define errno (*_errno())
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _ERRNO_H_ */
|
||||
|
@ -1,20 +1,20 @@
|
||||
#ifndef _EXCPT_H
|
||||
#define _EXCPT_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
/* FIXME: This will make some code compile. The programs will most
|
||||
likely crash when an exception is raised, but at least they will
|
||||
compile. */
|
||||
#ifdef __GNUC__
|
||||
#define __try
|
||||
#define __except(x) if (0) /* don't execute handler */
|
||||
#define __finally
|
||||
|
||||
#define _try __try
|
||||
#define _except __except
|
||||
#define _finally __finally
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifndef _EXCPT_H
|
||||
#define _EXCPT_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
/* FIXME: This will make some code compile. The programs will most
|
||||
likely crash when an exception is raised, but at least they will
|
||||
compile. */
|
||||
#ifdef __GNUC__
|
||||
#define __try
|
||||
#define __except(x) if (0) /* don't execute handler */
|
||||
#define __finally
|
||||
|
||||
#define _try __try
|
||||
#define _except __except
|
||||
#define _finally __finally
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,135 +1,135 @@
|
||||
/*
|
||||
* fcntl.h
|
||||
*
|
||||
* Access constants for _open. Note that the permissions constants are
|
||||
* in sys/stat.h (ick).
|
||||
*
|
||||
* This code is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _FCNTL_H_
|
||||
#define _FCNTL_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* It appears that fcntl.h should include io.h for compatibility...
|
||||
*/
|
||||
#include <io.h>
|
||||
|
||||
/* Specifiy one of these flags to define the access mode. */
|
||||
#define _O_RDONLY 0
|
||||
#define _O_WRONLY 1
|
||||
#define _O_RDWR 2
|
||||
|
||||
/* Mask for access mode bits in the _open flags. */
|
||||
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
|
||||
|
||||
#define _O_APPEND 0x0008 /* Writes will add to the end of the file. */
|
||||
|
||||
#define _O_RANDOM 0x0010
|
||||
#define _O_SEQUENTIAL 0x0020
|
||||
#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
|
||||
* WARNING: Even if not created by _open! */
|
||||
#define _O_NOINHERIT 0x0080
|
||||
|
||||
#define _O_CREAT 0x0100 /* Create the file if it does not exist. */
|
||||
#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
|
||||
#define _O_EXCL 0x0400 /* Open only if the file does not exist. */
|
||||
|
||||
/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
|
||||
#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
|
||||
#define _O_BINARY 0x8000 /* Input and output is not translated. */
|
||||
#define _O_RAW _O_BINARY
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/* POSIX/Non-ANSI names for increased portability */
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
#define O_RDWR _O_RDWR
|
||||
#define O_ACCMODE _O_ACCMODE
|
||||
#define O_APPEND _O_APPEND
|
||||
#define O_CREAT _O_CREAT
|
||||
#define O_TRUNC _O_TRUNC
|
||||
#define O_EXCL _O_EXCL
|
||||
#define O_TEXT _O_TEXT
|
||||
#define O_BINARY _O_BINARY
|
||||
#define O_TEMPORARY _O_TEMPORARY
|
||||
#define O_NOINHERIT _O_NOINHERIT
|
||||
#define O_SEQENTIAL _O_SEQUENTIAL
|
||||
#define O_RANDOM _O_RANDOM
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* This variable determines the default file mode.
|
||||
* TODO: Which flags work?
|
||||
*/
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
extern unsigned int* __imp__fmode;
|
||||
#define _fmode (*__imp__fmode)
|
||||
#else
|
||||
/* CRTDLL */
|
||||
extern unsigned int* __imp__fmode_dll;
|
||||
#define _fmode (*__imp__fmode_dll)
|
||||
#endif
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned int _fmode;
|
||||
#else /* ! __MSVCRT__ */
|
||||
__MINGW_IMPORT unsigned int _fmode_dll;
|
||||
#define _fmode _fmode_dll
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _setmode (int, int);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int setmode (int, int);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _FCNTL_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* fcntl.h
|
||||
*
|
||||
* Access constants for _open. Note that the permissions constants are
|
||||
* in sys/stat.h (ick).
|
||||
*
|
||||
* This code is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _FCNTL_H_
|
||||
#define _FCNTL_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* It appears that fcntl.h should include io.h for compatibility...
|
||||
*/
|
||||
#include <io.h>
|
||||
|
||||
/* Specifiy one of these flags to define the access mode. */
|
||||
#define _O_RDONLY 0
|
||||
#define _O_WRONLY 1
|
||||
#define _O_RDWR 2
|
||||
|
||||
/* Mask for access mode bits in the _open flags. */
|
||||
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
|
||||
|
||||
#define _O_APPEND 0x0008 /* Writes will add to the end of the file. */
|
||||
|
||||
#define _O_RANDOM 0x0010
|
||||
#define _O_SEQUENTIAL 0x0020
|
||||
#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
|
||||
* WARNING: Even if not created by _open! */
|
||||
#define _O_NOINHERIT 0x0080
|
||||
|
||||
#define _O_CREAT 0x0100 /* Create the file if it does not exist. */
|
||||
#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
|
||||
#define _O_EXCL 0x0400 /* Open only if the file does not exist. */
|
||||
|
||||
/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
|
||||
#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
|
||||
#define _O_BINARY 0x8000 /* Input and output is not translated. */
|
||||
#define _O_RAW _O_BINARY
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/* POSIX/Non-ANSI names for increased portability */
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
#define O_RDWR _O_RDWR
|
||||
#define O_ACCMODE _O_ACCMODE
|
||||
#define O_APPEND _O_APPEND
|
||||
#define O_CREAT _O_CREAT
|
||||
#define O_TRUNC _O_TRUNC
|
||||
#define O_EXCL _O_EXCL
|
||||
#define O_TEXT _O_TEXT
|
||||
#define O_BINARY _O_BINARY
|
||||
#define O_TEMPORARY _O_TEMPORARY
|
||||
#define O_NOINHERIT _O_NOINHERIT
|
||||
#define O_SEQENTIAL _O_SEQUENTIAL
|
||||
#define O_RANDOM _O_RANDOM
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* This variable determines the default file mode.
|
||||
* TODO: Which flags work?
|
||||
*/
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
extern unsigned int* __imp__fmode;
|
||||
#define _fmode (*__imp__fmode)
|
||||
#else
|
||||
/* CRTDLL */
|
||||
extern unsigned int* __imp__fmode_dll;
|
||||
#define _fmode (*__imp__fmode_dll)
|
||||
#endif
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned int _fmode;
|
||||
#else /* ! __MSVCRT__ */
|
||||
__MINGW_IMPORT unsigned int _fmode_dll;
|
||||
#define _fmode _fmode_dll
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _setmode (int, int);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int setmode (int, int);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _FCNTL_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,85 +1,85 @@
|
||||
#ifndef _FENV_H
|
||||
#define _FENV_H
|
||||
|
||||
/*
|
||||
For now, support only for the basic abstraction of flags that are
|
||||
either set or clear. fexcept_t could be structure that holds more info
|
||||
about the fp environment.
|
||||
*/
|
||||
typedef unsigned short fexcept_t;
|
||||
|
||||
/* This 28-byte struct represents the entire floating point
|
||||
environment as stored by fnstenv or fstenv */
|
||||
typedef struct
|
||||
{
|
||||
unsigned short __control_word;
|
||||
unsigned short __unused0;
|
||||
unsigned short __status_word;
|
||||
unsigned short __unused1;
|
||||
unsigned short __tag_word;
|
||||
unsigned short __unused2;
|
||||
unsigned int __ip_offset; /* instruction pointer offset */
|
||||
unsigned short __ip_selector;
|
||||
unsigned short __opcode;
|
||||
unsigned int __data_offset;
|
||||
unsigned short __data_selector;
|
||||
unsigned short __unused3;
|
||||
} fenv_t;
|
||||
|
||||
|
||||
/* FPU status word exception flags */
|
||||
#define FE_INVALID 0x01
|
||||
#define FE_DENORMAL 0x02
|
||||
#define FE_DIVBYZERO 0x04
|
||||
#define FE_OVERFLOW 0x08
|
||||
#define FE_UNDERFLOW 0x10
|
||||
#define FE_INEXACT 0x20
|
||||
#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
|
||||
| FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
|
||||
|
||||
/* FPU control word rounding flags */
|
||||
#define FE_TONEAREST 0x0000
|
||||
#define FE_DOWNWARD 0x0400
|
||||
#define FE_UPWARD 0x0800
|
||||
#define FE_TOWARDZERO 0x0c00
|
||||
|
||||
|
||||
/* The default floating point environment */
|
||||
#define FE_DFL_ENV ((const fenv_t *)-1)
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*TODO: Some of these could be inlined */
|
||||
/* 7.6.2 Exception */
|
||||
|
||||
extern int feclearexcept (int);
|
||||
extern int fegetexceptflag (fexcept_t * flagp, int excepts);
|
||||
extern int feraiseexcept (int excepts );
|
||||
extern int fesetexceptflag (const fexcept_t *, int);
|
||||
extern int fetestexcept (int excepts);
|
||||
|
||||
|
||||
/* 7.6.3 Rounding */
|
||||
|
||||
extern int fegetround (void);
|
||||
extern int fesetround (int mode);
|
||||
|
||||
|
||||
/* 7.6.4 Environment */
|
||||
|
||||
extern int fegetenv (fenv_t * envp);
|
||||
extern int fesetenv (const fenv_t * );
|
||||
extern int feupdateenv (const fenv_t *);
|
||||
extern int feholdexcept (fenv_t *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* ndef _FENV_H */
|
||||
#ifndef _FENV_H
|
||||
#define _FENV_H
|
||||
|
||||
/*
|
||||
For now, support only for the basic abstraction of flags that are
|
||||
either set or clear. fexcept_t could be structure that holds more info
|
||||
about the fp environment.
|
||||
*/
|
||||
typedef unsigned short fexcept_t;
|
||||
|
||||
/* This 28-byte struct represents the entire floating point
|
||||
environment as stored by fnstenv or fstenv */
|
||||
typedef struct
|
||||
{
|
||||
unsigned short __control_word;
|
||||
unsigned short __unused0;
|
||||
unsigned short __status_word;
|
||||
unsigned short __unused1;
|
||||
unsigned short __tag_word;
|
||||
unsigned short __unused2;
|
||||
unsigned int __ip_offset; /* instruction pointer offset */
|
||||
unsigned short __ip_selector;
|
||||
unsigned short __opcode;
|
||||
unsigned int __data_offset;
|
||||
unsigned short __data_selector;
|
||||
unsigned short __unused3;
|
||||
} fenv_t;
|
||||
|
||||
|
||||
/* FPU status word exception flags */
|
||||
#define FE_INVALID 0x01
|
||||
#define FE_DENORMAL 0x02
|
||||
#define FE_DIVBYZERO 0x04
|
||||
#define FE_OVERFLOW 0x08
|
||||
#define FE_UNDERFLOW 0x10
|
||||
#define FE_INEXACT 0x20
|
||||
#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
|
||||
| FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
|
||||
|
||||
/* FPU control word rounding flags */
|
||||
#define FE_TONEAREST 0x0000
|
||||
#define FE_DOWNWARD 0x0400
|
||||
#define FE_UPWARD 0x0800
|
||||
#define FE_TOWARDZERO 0x0c00
|
||||
|
||||
|
||||
/* The default floating point environment */
|
||||
#define FE_DFL_ENV ((const fenv_t *)-1)
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*TODO: Some of these could be inlined */
|
||||
/* 7.6.2 Exception */
|
||||
|
||||
extern int feclearexcept (int);
|
||||
extern int fegetexceptflag (fexcept_t * flagp, int excepts);
|
||||
extern int feraiseexcept (int excepts );
|
||||
extern int fesetexceptflag (const fexcept_t *, int);
|
||||
extern int fetestexcept (int excepts);
|
||||
|
||||
|
||||
/* 7.6.3 Rounding */
|
||||
|
||||
extern int fegetround (void);
|
||||
extern int fesetround (int mode);
|
||||
|
||||
|
||||
/* 7.6.4 Environment */
|
||||
|
||||
extern int fegetenv (fenv_t * envp);
|
||||
extern int fesetenv (const fenv_t * );
|
||||
extern int feupdateenv (const fenv_t *);
|
||||
extern int feholdexcept (fenv_t *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* ndef _FENV_H */
|
||||
|
@ -1,224 +1,224 @@
|
||||
/*
|
||||
* float.h
|
||||
*
|
||||
* Constants related to floating point arithmetic.
|
||||
*
|
||||
* Also included here are some non-ANSI bits for accessing the floating
|
||||
* point controller.
|
||||
*
|
||||
* NOTE: GCC provides float.h, and it is probably more accurate than this,
|
||||
* but it doesn't include the non-standard stuff for accessing the
|
||||
* fp controller. (TODO: Move those bits elsewhere?) Thus it is
|
||||
* probably not a good idea to use the GCC supplied version instead
|
||||
* of this header.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define FLT_ROUNDS 1
|
||||
#define FLT_GUARD 1
|
||||
#define FLT_NORMALIZE 1
|
||||
|
||||
/*
|
||||
* The characteristics of float.
|
||||
*/
|
||||
|
||||
/* The radix for floating point representation. */
|
||||
#define FLT_RADIX 2
|
||||
|
||||
/* Decimal digits of precision. */
|
||||
#define FLT_DIG 6
|
||||
|
||||
/* Smallest number such that 1+x != 1 */
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
|
||||
/* The number of base FLT_RADIX digits in the mantissa. */
|
||||
#define FLT_MANT_DIG 24
|
||||
|
||||
/* The maximum floating point number. */
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
|
||||
/* Maximum n such that FLT_RADIX^n - 1 is representable. */
|
||||
#define FLT_MAX_EXP 128
|
||||
|
||||
/* Maximum n such that 10^n is representable. */
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Minimum normalized floating-point number. */
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
|
||||
/* Minimum n such that FLT_RADIX^n is a normalized number. */
|
||||
#define FLT_MIN_EXP (-125)
|
||||
|
||||
/* Minimum n such that 10^n is a normalized number. */
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
|
||||
|
||||
/*
|
||||
* The characteristics of double.
|
||||
*/
|
||||
#define DBL_DIG 15
|
||||
#define DBL_EPSILON 1.1102230246251568e-16
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
#define DBL_MAX_EXP 1024
|
||||
#define DBL_MAX_10_EXP 308
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
|
||||
|
||||
/*
|
||||
* The characteristics of long double.
|
||||
* NOTE: long double is the same as double.
|
||||
*/
|
||||
#define LDBL_DIG 15
|
||||
#define LDBL_EPSILON 1.1102230246251568e-16L
|
||||
#define LDBL_MANT_DIG 53
|
||||
#define LDBL_MAX 1.7976931348623157e+308L
|
||||
#define LDBL_MAX_EXP 1024
|
||||
#define LDBL_MAX_10_EXP 308
|
||||
#define LDBL_MIN 2.2250738585072014e-308L
|
||||
#define LDBL_MIN_EXP (-1021)
|
||||
#define LDBL_MIN_10_EXP (-307)
|
||||
|
||||
|
||||
/*
|
||||
* Functions and definitions for controlling the FPU.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
/* TODO: These constants are only valid for x86 machines */
|
||||
|
||||
/* Control word masks for unMask */
|
||||
#define _MCW_EM 0x0008001F /* Error masks */
|
||||
#define _MCW_IC 0x00040000 /* Infinity */
|
||||
#define _MCW_RC 0x00000300 /* Rounding */
|
||||
#define _MCW_PC 0x00030000 /* Precision */
|
||||
|
||||
/* Control word values for unNew (use with related unMask above) */
|
||||
#define _EM_INVALID 0x00000010
|
||||
#define _EM_DENORMAL 0x00080000
|
||||
#define _EM_ZERODIVIDE 0x00000008
|
||||
#define _EM_OVERFLOW 0x00000004
|
||||
#define _EM_UNDERFLOW 0x00000002
|
||||
#define _EM_INEXACT 0x00000001
|
||||
#define _IC_AFFINE 0x00040000
|
||||
#define _IC_PROJECTIVE 0x00000000
|
||||
#define _RC_CHOP 0x00000300
|
||||
#define _RC_UP 0x00000200
|
||||
#define _RC_DOWN 0x00000100
|
||||
#define _RC_NEAR 0x00000000
|
||||
#define _PC_24 0x00020000
|
||||
#define _PC_53 0x00010000
|
||||
#define _PC_64 0x00000000
|
||||
|
||||
/* These are also defined in Mingw math.h, needed to work around
|
||||
GCC build issues. */
|
||||
/* Return values for fpclass. */
|
||||
#ifndef __MINGW_FPCLASS_DEFINED
|
||||
#define __MINGW_FPCLASS_DEFINED 1
|
||||
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
|
||||
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
|
||||
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
|
||||
#define _FPCLASS_NN 0x0008 /* Negative Normal */
|
||||
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
|
||||
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
|
||||
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
|
||||
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
|
||||
#define _FPCLASS_PN 0x0100 /* Positive Normal */
|
||||
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
|
||||
#endif /* __MINGW_FPCLASS_DEFINED */
|
||||
|
||||
/* invalid subconditions (_SW_INVALID also set) */
|
||||
#define _SW_UNEMULATED 0x0040 /* unemulated instruction */
|
||||
#define _SW_SQRTNEG 0x0080 /* square root of a neg number */
|
||||
#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
|
||||
#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
|
||||
|
||||
/* Floating point error signals and return codes */
|
||||
#define _FPE_INVALID 0x81
|
||||
#define _FPE_DENORMAL 0x82
|
||||
#define _FPE_ZERODIVIDE 0x83
|
||||
#define _FPE_OVERFLOW 0x84
|
||||
#define _FPE_UNDERFLOW 0x85
|
||||
#define _FPE_INEXACT 0x86
|
||||
#define _FPE_UNEMULATED 0x87
|
||||
#define _FPE_SQRTNEG 0x88
|
||||
#define _FPE_STACKOVERFLOW 0x8a
|
||||
#define _FPE_STACKUNDERFLOW 0x8b
|
||||
#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
|
||||
* i.e. change the bits in unMask to have the values they have in unNew,
|
||||
* leaving other bits unchanged. */
|
||||
unsigned int _controlfp (unsigned int unNew, unsigned int unMask);
|
||||
unsigned int _control87 (unsigned int unNew, unsigned int unMask);
|
||||
|
||||
|
||||
unsigned int _clearfp (void); /* Clear the FPU status word */
|
||||
unsigned int _statusfp (void); /* Report the FPU status word */
|
||||
#define _clear87 _clearfp
|
||||
#define _status87 _statusfp
|
||||
|
||||
void _fpreset (void); /* Reset the FPU */
|
||||
void fpreset (void);
|
||||
|
||||
/* Global 'variable' for the current floating point error code. */
|
||||
int * __fpecode(void);
|
||||
#define _fpecode (*(__fpecode()))
|
||||
|
||||
/*
|
||||
* IEEE recommended functions
|
||||
*/
|
||||
|
||||
double _chgsign (double);
|
||||
double _copysign (double, double);
|
||||
double _logb (double);
|
||||
double _nextafter (double, double);
|
||||
double _scalb (double, long);
|
||||
|
||||
int _finite (double);
|
||||
int _fpclass (double);
|
||||
int _isnan (double);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
||||
|
||||
/*
|
||||
* float.h
|
||||
*
|
||||
* Constants related to floating point arithmetic.
|
||||
*
|
||||
* Also included here are some non-ANSI bits for accessing the floating
|
||||
* point controller.
|
||||
*
|
||||
* NOTE: GCC provides float.h, and it is probably more accurate than this,
|
||||
* but it doesn't include the non-standard stuff for accessing the
|
||||
* fp controller. (TODO: Move those bits elsewhere?) Thus it is
|
||||
* probably not a good idea to use the GCC supplied version instead
|
||||
* of this header.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _FLOAT_H_
|
||||
#define _FLOAT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define FLT_ROUNDS 1
|
||||
#define FLT_GUARD 1
|
||||
#define FLT_NORMALIZE 1
|
||||
|
||||
/*
|
||||
* The characteristics of float.
|
||||
*/
|
||||
|
||||
/* The radix for floating point representation. */
|
||||
#define FLT_RADIX 2
|
||||
|
||||
/* Decimal digits of precision. */
|
||||
#define FLT_DIG 6
|
||||
|
||||
/* Smallest number such that 1+x != 1 */
|
||||
#define FLT_EPSILON 1.19209290e-07F
|
||||
|
||||
/* The number of base FLT_RADIX digits in the mantissa. */
|
||||
#define FLT_MANT_DIG 24
|
||||
|
||||
/* The maximum floating point number. */
|
||||
#define FLT_MAX 3.40282347e+38F
|
||||
|
||||
/* Maximum n such that FLT_RADIX^n - 1 is representable. */
|
||||
#define FLT_MAX_EXP 128
|
||||
|
||||
/* Maximum n such that 10^n is representable. */
|
||||
#define FLT_MAX_10_EXP 38
|
||||
|
||||
/* Minimum normalized floating-point number. */
|
||||
#define FLT_MIN 1.17549435e-38F
|
||||
|
||||
/* Minimum n such that FLT_RADIX^n is a normalized number. */
|
||||
#define FLT_MIN_EXP (-125)
|
||||
|
||||
/* Minimum n such that 10^n is a normalized number. */
|
||||
#define FLT_MIN_10_EXP (-37)
|
||||
|
||||
|
||||
/*
|
||||
* The characteristics of double.
|
||||
*/
|
||||
#define DBL_DIG 15
|
||||
#define DBL_EPSILON 1.1102230246251568e-16
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
#define DBL_MAX_EXP 1024
|
||||
#define DBL_MAX_10_EXP 308
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
#define DBL_MIN_EXP (-1021)
|
||||
#define DBL_MIN_10_EXP (-307)
|
||||
|
||||
|
||||
/*
|
||||
* The characteristics of long double.
|
||||
* NOTE: long double is the same as double.
|
||||
*/
|
||||
#define LDBL_DIG 15
|
||||
#define LDBL_EPSILON 1.1102230246251568e-16L
|
||||
#define LDBL_MANT_DIG 53
|
||||
#define LDBL_MAX 1.7976931348623157e+308L
|
||||
#define LDBL_MAX_EXP 1024
|
||||
#define LDBL_MAX_10_EXP 308
|
||||
#define LDBL_MIN 2.2250738585072014e-308L
|
||||
#define LDBL_MIN_EXP (-1021)
|
||||
#define LDBL_MIN_10_EXP (-307)
|
||||
|
||||
|
||||
/*
|
||||
* Functions and definitions for controlling the FPU.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
/* TODO: These constants are only valid for x86 machines */
|
||||
|
||||
/* Control word masks for unMask */
|
||||
#define _MCW_EM 0x0008001F /* Error masks */
|
||||
#define _MCW_IC 0x00040000 /* Infinity */
|
||||
#define _MCW_RC 0x00000300 /* Rounding */
|
||||
#define _MCW_PC 0x00030000 /* Precision */
|
||||
|
||||
/* Control word values for unNew (use with related unMask above) */
|
||||
#define _EM_INVALID 0x00000010
|
||||
#define _EM_DENORMAL 0x00080000
|
||||
#define _EM_ZERODIVIDE 0x00000008
|
||||
#define _EM_OVERFLOW 0x00000004
|
||||
#define _EM_UNDERFLOW 0x00000002
|
||||
#define _EM_INEXACT 0x00000001
|
||||
#define _IC_AFFINE 0x00040000
|
||||
#define _IC_PROJECTIVE 0x00000000
|
||||
#define _RC_CHOP 0x00000300
|
||||
#define _RC_UP 0x00000200
|
||||
#define _RC_DOWN 0x00000100
|
||||
#define _RC_NEAR 0x00000000
|
||||
#define _PC_24 0x00020000
|
||||
#define _PC_53 0x00010000
|
||||
#define _PC_64 0x00000000
|
||||
|
||||
/* These are also defined in Mingw math.h, needed to work around
|
||||
GCC build issues. */
|
||||
/* Return values for fpclass. */
|
||||
#ifndef __MINGW_FPCLASS_DEFINED
|
||||
#define __MINGW_FPCLASS_DEFINED 1
|
||||
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
|
||||
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
|
||||
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
|
||||
#define _FPCLASS_NN 0x0008 /* Negative Normal */
|
||||
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
|
||||
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
|
||||
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
|
||||
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
|
||||
#define _FPCLASS_PN 0x0100 /* Positive Normal */
|
||||
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
|
||||
#endif /* __MINGW_FPCLASS_DEFINED */
|
||||
|
||||
/* invalid subconditions (_SW_INVALID also set) */
|
||||
#define _SW_UNEMULATED 0x0040 /* unemulated instruction */
|
||||
#define _SW_SQRTNEG 0x0080 /* square root of a neg number */
|
||||
#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
|
||||
#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
|
||||
|
||||
/* Floating point error signals and return codes */
|
||||
#define _FPE_INVALID 0x81
|
||||
#define _FPE_DENORMAL 0x82
|
||||
#define _FPE_ZERODIVIDE 0x83
|
||||
#define _FPE_OVERFLOW 0x84
|
||||
#define _FPE_UNDERFLOW 0x85
|
||||
#define _FPE_INEXACT 0x86
|
||||
#define _FPE_UNEMULATED 0x87
|
||||
#define _FPE_SQRTNEG 0x88
|
||||
#define _FPE_STACKOVERFLOW 0x8a
|
||||
#define _FPE_STACKUNDERFLOW 0x8b
|
||||
#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
|
||||
* i.e. change the bits in unMask to have the values they have in unNew,
|
||||
* leaving other bits unchanged. */
|
||||
unsigned int _controlfp (unsigned int unNew, unsigned int unMask);
|
||||
unsigned int _control87 (unsigned int unNew, unsigned int unMask);
|
||||
|
||||
|
||||
unsigned int _clearfp (void); /* Clear the FPU status word */
|
||||
unsigned int _statusfp (void); /* Report the FPU status word */
|
||||
#define _clear87 _clearfp
|
||||
#define _status87 _statusfp
|
||||
|
||||
void _fpreset (void); /* Reset the FPU */
|
||||
void fpreset (void);
|
||||
|
||||
/* Global 'variable' for the current floating point error code. */
|
||||
int * __fpecode(void);
|
||||
#define _fpecode (*(__fpecode()))
|
||||
|
||||
/*
|
||||
* IEEE recommended functions
|
||||
*/
|
||||
|
||||
double _chgsign (double);
|
||||
double _copysign (double, double);
|
||||
double _logb (double);
|
||||
double _nextafter (double, double);
|
||||
double _scalb (double, long);
|
||||
|
||||
int _finite (double);
|
||||
int _fpclass (double);
|
||||
int _isnan (double);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#endif /* _FLOAT_H_ */
|
||||
|
||||
|
@ -1,275 +1,275 @@
|
||||
/* 7.8 Format conversion of integer types <inttypes.h> */
|
||||
|
||||
#ifndef _INTTYPES_H
|
||||
#define _INTTYPES_H
|
||||
|
||||
#include <stdint.h>
|
||||
#define __need_wchar_t
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
intmax_t quot;
|
||||
intmax_t rem;
|
||||
} imaxdiv_t;
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
|
||||
|
||||
/* 7.8.1 Macros for format specifiers
|
||||
*
|
||||
* MS runtime does not yet understand C9x standard "ll"
|
||||
* length specifier. It appears to treat "ll" as "l".
|
||||
* The non-standard I64 length specifier causes warning in GCC,
|
||||
* but understood by MS runtime functions.
|
||||
*/
|
||||
|
||||
/* fprintf macros for signed types */
|
||||
#define PRId8 "d"
|
||||
#define PRId16 "d"
|
||||
#define PRId32 "d"
|
||||
#define PRId64 "I64d"
|
||||
|
||||
#define PRIdLEAST8 "d"
|
||||
#define PRIdLEAST16 "d"
|
||||
#define PRIdLEAST32 "d"
|
||||
#define PRIdLEAST64 "I64d"
|
||||
|
||||
#define PRIdFAST8 "d"
|
||||
#define PRIdFAST16 "d"
|
||||
#define PRIdFAST32 "d"
|
||||
#define PRIdFAST64 "I64d"
|
||||
|
||||
#define PRIdMAX "I64d"
|
||||
#define PRIdPTR "d"
|
||||
|
||||
#define PRIi8 "i"
|
||||
#define PRIi16 "i"
|
||||
#define PRIi32 "i"
|
||||
#define PRIi64 "I64i"
|
||||
|
||||
#define PRIiLEAST8 "i"
|
||||
#define PRIiLEAST16 "i"
|
||||
#define PRIiLEAST32 "i"
|
||||
#define PRIiLEAST64 "I64i"
|
||||
|
||||
#define PRIiFAST8 "i"
|
||||
#define PRIiFAST16 "i"
|
||||
#define PRIiFAST32 "i"
|
||||
#define PRIiFAST64 "I64i"
|
||||
|
||||
#define PRIiMAX "I64i"
|
||||
#define PRIiPTR "i"
|
||||
|
||||
#define PRIo8 "o"
|
||||
#define PRIo16 "o"
|
||||
#define PRIo32 "o"
|
||||
#define PRIo64 "I64o"
|
||||
|
||||
#define PRIoLEAST8 "o"
|
||||
#define PRIoLEAST16 "o"
|
||||
#define PRIoLEAST32 "o"
|
||||
#define PRIoLEAST64 "I64o"
|
||||
|
||||
#define PRIoFAST8 "o"
|
||||
#define PRIoFAST16 "o"
|
||||
#define PRIoFAST32 "o"
|
||||
#define PRIoFAST64 "I64o"
|
||||
|
||||
#define PRIoMAX "I64o"
|
||||
|
||||
#define PRIoPTR "o"
|
||||
|
||||
/* fprintf macros for unsigned types */
|
||||
#define PRIu8 "u"
|
||||
#define PRIu16 "u"
|
||||
#define PRIu32 "u"
|
||||
#define PRIu64 "I64u"
|
||||
|
||||
|
||||
#define PRIuLEAST8 "u"
|
||||
#define PRIuLEAST16 "u"
|
||||
#define PRIuLEAST32 "u"
|
||||
#define PRIuLEAST64 "I64u"
|
||||
|
||||
#define PRIuFAST8 "u"
|
||||
#define PRIuFAST16 "u"
|
||||
#define PRIuFAST32 "u"
|
||||
#define PRIuFAST64 "I64u"
|
||||
|
||||
#define PRIuMAX "I64u"
|
||||
#define PRIuPTR "u"
|
||||
|
||||
#define PRIx8 "x"
|
||||
#define PRIx16 "x"
|
||||
#define PRIx32 "x"
|
||||
#define PRIx64 "I64x"
|
||||
|
||||
#define PRIxLEAST8 "x"
|
||||
#define PRIxLEAST16 "x"
|
||||
#define PRIxLEAST32 "x"
|
||||
#define PRIxLEAST64 "I64x"
|
||||
|
||||
#define PRIxFAST8 "x"
|
||||
#define PRIxFAST16 "x"
|
||||
#define PRIxFAST32 "x"
|
||||
#define PRIxFAST64 "I64x"
|
||||
|
||||
#define PRIxMAX "I64x"
|
||||
#define PRIxPTR "x"
|
||||
|
||||
#define PRIX8 "X"
|
||||
#define PRIX16 "X"
|
||||
#define PRIX32 "X"
|
||||
#define PRIX64 "I64X"
|
||||
|
||||
#define PRIXLEAST8 "X"
|
||||
#define PRIXLEAST16 "X"
|
||||
#define PRIXLEAST32 "X"
|
||||
#define PRIXLEAST64 "I64X"
|
||||
|
||||
#define PRIXFAST8 "X"
|
||||
#define PRIXFAST16 "X"
|
||||
#define PRIXFAST32 "X"
|
||||
#define PRIXFAST64 "I64X"
|
||||
|
||||
#define PRIXMAX "I64X"
|
||||
#define PRIXPTR "X"
|
||||
|
||||
/*
|
||||
* fscanf macros for signed int types
|
||||
* NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
|
||||
* (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
|
||||
* no length identifiers
|
||||
*/
|
||||
|
||||
#define SCNd16 "hd"
|
||||
#define SCNd32 "d"
|
||||
#define SCNd64 "I64d"
|
||||
|
||||
#define SCNdLEAST16 "hd"
|
||||
#define SCNdLEAST32 "d"
|
||||
#define SCNdLEAST64 "I64d"
|
||||
|
||||
#define SCNdFAST16 "hd"
|
||||
#define SCNdFAST32 "d"
|
||||
#define SCNdFAST64 "I64d"
|
||||
|
||||
#define SCNdMAX "I64d"
|
||||
#define SCNdPTR "d"
|
||||
|
||||
#define SCNi16 "hi"
|
||||
#define SCNi32 "i"
|
||||
#define SCNi64 "I64i"
|
||||
|
||||
#define SCNiLEAST16 "hi"
|
||||
#define SCNiLEAST32 "i"
|
||||
#define SCNiLEAST64 "I64i"
|
||||
|
||||
#define SCNiFAST16 "hi"
|
||||
#define SCNiFAST32 "i"
|
||||
#define SCNiFAST64 "I64i"
|
||||
|
||||
#define SCNiMAX "I64i"
|
||||
#define SCNiPTR "i"
|
||||
|
||||
#define SCNo16 "ho"
|
||||
#define SCNo32 "o"
|
||||
#define SCNo64 "I64o"
|
||||
|
||||
#define SCNoLEAST16 "ho"
|
||||
#define SCNoLEAST32 "o"
|
||||
#define SCNoLEAST64 "I64o"
|
||||
|
||||
#define SCNoFAST16 "ho"
|
||||
#define SCNoFAST32 "o"
|
||||
#define SCNoFAST64 "I64o"
|
||||
|
||||
#define SCNoMAX "I64o"
|
||||
#define SCNoPTR "o"
|
||||
|
||||
#define SCNx16 "hx"
|
||||
#define SCNx32 "x"
|
||||
#define SCNx64 "I64x"
|
||||
|
||||
#define SCNxLEAST16 "hx"
|
||||
#define SCNxLEAST32 "x"
|
||||
#define SCNxLEAST64 "I64x"
|
||||
|
||||
#define SCNxFAST16 "hx"
|
||||
#define SCNxFAST32 "x"
|
||||
#define SCNxFAST64 "I64x"
|
||||
|
||||
#define SCNxMAX "I64x"
|
||||
#define SCNxPTR "x"
|
||||
|
||||
|
||||
/* fscanf macros for unsigned int types */
|
||||
|
||||
#define SCNu16 "hu"
|
||||
#define SCNu32 "u"
|
||||
#define SCNu64 "I64u"
|
||||
|
||||
#define SCNuLEAST16 "hu"
|
||||
#define SCNuLEAST32 "u"
|
||||
#define SCNuLEAST64 "I64u"
|
||||
|
||||
#define SCNuFAST16 "hu"
|
||||
#define SCNuFAST32 "u"
|
||||
#define SCNuFAST64 "I64u"
|
||||
|
||||
#define SCNuMAX "I64u"
|
||||
#define SCNuPTR "u"
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/*
|
||||
* no length modifier for char types prior to C9x
|
||||
* MS runtime scanf appears to treat "hh" as "h"
|
||||
*/
|
||||
|
||||
/* signed char */
|
||||
#define SCNd8 "hhd"
|
||||
#define SCNdLEAST8 "hhd"
|
||||
#define SCNdFAST8 "hhd"
|
||||
|
||||
#define SCNi8 "hhi"
|
||||
#define SCNiLEAST8 "hhi"
|
||||
#define SCNiFAST8 "hhi"
|
||||
|
||||
#define SCNo8 "hho"
|
||||
#define SCNoLEAST8 "hho"
|
||||
#define SCNoFAST8 "hho"
|
||||
|
||||
#define SCNx8 "hhx"
|
||||
#define SCNxLEAST8 "hhx"
|
||||
#define SCNxFAST8 "hhx"
|
||||
|
||||
/* unsigned char */
|
||||
#define SCNu8 "hhu"
|
||||
#define SCNuLEAST8 "hhu"
|
||||
#define SCNuFAST8 "hhu"
|
||||
#endif /* __STDC_VERSION__ >= 199901 */
|
||||
|
||||
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
|
||||
|
||||
extern inline intmax_t imaxabs (intmax_t j)
|
||||
{return (j >= 0 ? j : -j);}
|
||||
imaxdiv_t imaxdiv (intmax_t numer, intmax_t denom);
|
||||
|
||||
/* 7.8.2 Conversion functions for greatest-width integer types */
|
||||
|
||||
intmax_t strtoimax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
|
||||
uintmax_t strtoumax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
|
||||
|
||||
intmax_t wcstoimax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
|
||||
int base);
|
||||
uintmax_t wcstoumax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
|
||||
int base);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ndef _INTTYPES_H */
|
||||
/* 7.8 Format conversion of integer types <inttypes.h> */
|
||||
|
||||
#ifndef _INTTYPES_H
|
||||
#define _INTTYPES_H
|
||||
|
||||
#include <stdint.h>
|
||||
#define __need_wchar_t
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
intmax_t quot;
|
||||
intmax_t rem;
|
||||
} imaxdiv_t;
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
|
||||
|
||||
/* 7.8.1 Macros for format specifiers
|
||||
*
|
||||
* MS runtime does not yet understand C9x standard "ll"
|
||||
* length specifier. It appears to treat "ll" as "l".
|
||||
* The non-standard I64 length specifier causes warning in GCC,
|
||||
* but understood by MS runtime functions.
|
||||
*/
|
||||
|
||||
/* fprintf macros for signed types */
|
||||
#define PRId8 "d"
|
||||
#define PRId16 "d"
|
||||
#define PRId32 "d"
|
||||
#define PRId64 "I64d"
|
||||
|
||||
#define PRIdLEAST8 "d"
|
||||
#define PRIdLEAST16 "d"
|
||||
#define PRIdLEAST32 "d"
|
||||
#define PRIdLEAST64 "I64d"
|
||||
|
||||
#define PRIdFAST8 "d"
|
||||
#define PRIdFAST16 "d"
|
||||
#define PRIdFAST32 "d"
|
||||
#define PRIdFAST64 "I64d"
|
||||
|
||||
#define PRIdMAX "I64d"
|
||||
#define PRIdPTR "d"
|
||||
|
||||
#define PRIi8 "i"
|
||||
#define PRIi16 "i"
|
||||
#define PRIi32 "i"
|
||||
#define PRIi64 "I64i"
|
||||
|
||||
#define PRIiLEAST8 "i"
|
||||
#define PRIiLEAST16 "i"
|
||||
#define PRIiLEAST32 "i"
|
||||
#define PRIiLEAST64 "I64i"
|
||||
|
||||
#define PRIiFAST8 "i"
|
||||
#define PRIiFAST16 "i"
|
||||
#define PRIiFAST32 "i"
|
||||
#define PRIiFAST64 "I64i"
|
||||
|
||||
#define PRIiMAX "I64i"
|
||||
#define PRIiPTR "i"
|
||||
|
||||
#define PRIo8 "o"
|
||||
#define PRIo16 "o"
|
||||
#define PRIo32 "o"
|
||||
#define PRIo64 "I64o"
|
||||
|
||||
#define PRIoLEAST8 "o"
|
||||
#define PRIoLEAST16 "o"
|
||||
#define PRIoLEAST32 "o"
|
||||
#define PRIoLEAST64 "I64o"
|
||||
|
||||
#define PRIoFAST8 "o"
|
||||
#define PRIoFAST16 "o"
|
||||
#define PRIoFAST32 "o"
|
||||
#define PRIoFAST64 "I64o"
|
||||
|
||||
#define PRIoMAX "I64o"
|
||||
|
||||
#define PRIoPTR "o"
|
||||
|
||||
/* fprintf macros for unsigned types */
|
||||
#define PRIu8 "u"
|
||||
#define PRIu16 "u"
|
||||
#define PRIu32 "u"
|
||||
#define PRIu64 "I64u"
|
||||
|
||||
|
||||
#define PRIuLEAST8 "u"
|
||||
#define PRIuLEAST16 "u"
|
||||
#define PRIuLEAST32 "u"
|
||||
#define PRIuLEAST64 "I64u"
|
||||
|
||||
#define PRIuFAST8 "u"
|
||||
#define PRIuFAST16 "u"
|
||||
#define PRIuFAST32 "u"
|
||||
#define PRIuFAST64 "I64u"
|
||||
|
||||
#define PRIuMAX "I64u"
|
||||
#define PRIuPTR "u"
|
||||
|
||||
#define PRIx8 "x"
|
||||
#define PRIx16 "x"
|
||||
#define PRIx32 "x"
|
||||
#define PRIx64 "I64x"
|
||||
|
||||
#define PRIxLEAST8 "x"
|
||||
#define PRIxLEAST16 "x"
|
||||
#define PRIxLEAST32 "x"
|
||||
#define PRIxLEAST64 "I64x"
|
||||
|
||||
#define PRIxFAST8 "x"
|
||||
#define PRIxFAST16 "x"
|
||||
#define PRIxFAST32 "x"
|
||||
#define PRIxFAST64 "I64x"
|
||||
|
||||
#define PRIxMAX "I64x"
|
||||
#define PRIxPTR "x"
|
||||
|
||||
#define PRIX8 "X"
|
||||
#define PRIX16 "X"
|
||||
#define PRIX32 "X"
|
||||
#define PRIX64 "I64X"
|
||||
|
||||
#define PRIXLEAST8 "X"
|
||||
#define PRIXLEAST16 "X"
|
||||
#define PRIXLEAST32 "X"
|
||||
#define PRIXLEAST64 "I64X"
|
||||
|
||||
#define PRIXFAST8 "X"
|
||||
#define PRIXFAST16 "X"
|
||||
#define PRIXFAST32 "X"
|
||||
#define PRIXFAST64 "I64X"
|
||||
|
||||
#define PRIXMAX "I64X"
|
||||
#define PRIXPTR "X"
|
||||
|
||||
/*
|
||||
* fscanf macros for signed int types
|
||||
* NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
|
||||
* (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
|
||||
* no length identifiers
|
||||
*/
|
||||
|
||||
#define SCNd16 "hd"
|
||||
#define SCNd32 "d"
|
||||
#define SCNd64 "I64d"
|
||||
|
||||
#define SCNdLEAST16 "hd"
|
||||
#define SCNdLEAST32 "d"
|
||||
#define SCNdLEAST64 "I64d"
|
||||
|
||||
#define SCNdFAST16 "hd"
|
||||
#define SCNdFAST32 "d"
|
||||
#define SCNdFAST64 "I64d"
|
||||
|
||||
#define SCNdMAX "I64d"
|
||||
#define SCNdPTR "d"
|
||||
|
||||
#define SCNi16 "hi"
|
||||
#define SCNi32 "i"
|
||||
#define SCNi64 "I64i"
|
||||
|
||||
#define SCNiLEAST16 "hi"
|
||||
#define SCNiLEAST32 "i"
|
||||
#define SCNiLEAST64 "I64i"
|
||||
|
||||
#define SCNiFAST16 "hi"
|
||||
#define SCNiFAST32 "i"
|
||||
#define SCNiFAST64 "I64i"
|
||||
|
||||
#define SCNiMAX "I64i"
|
||||
#define SCNiPTR "i"
|
||||
|
||||
#define SCNo16 "ho"
|
||||
#define SCNo32 "o"
|
||||
#define SCNo64 "I64o"
|
||||
|
||||
#define SCNoLEAST16 "ho"
|
||||
#define SCNoLEAST32 "o"
|
||||
#define SCNoLEAST64 "I64o"
|
||||
|
||||
#define SCNoFAST16 "ho"
|
||||
#define SCNoFAST32 "o"
|
||||
#define SCNoFAST64 "I64o"
|
||||
|
||||
#define SCNoMAX "I64o"
|
||||
#define SCNoPTR "o"
|
||||
|
||||
#define SCNx16 "hx"
|
||||
#define SCNx32 "x"
|
||||
#define SCNx64 "I64x"
|
||||
|
||||
#define SCNxLEAST16 "hx"
|
||||
#define SCNxLEAST32 "x"
|
||||
#define SCNxLEAST64 "I64x"
|
||||
|
||||
#define SCNxFAST16 "hx"
|
||||
#define SCNxFAST32 "x"
|
||||
#define SCNxFAST64 "I64x"
|
||||
|
||||
#define SCNxMAX "I64x"
|
||||
#define SCNxPTR "x"
|
||||
|
||||
|
||||
/* fscanf macros for unsigned int types */
|
||||
|
||||
#define SCNu16 "hu"
|
||||
#define SCNu32 "u"
|
||||
#define SCNu64 "I64u"
|
||||
|
||||
#define SCNuLEAST16 "hu"
|
||||
#define SCNuLEAST32 "u"
|
||||
#define SCNuLEAST64 "I64u"
|
||||
|
||||
#define SCNuFAST16 "hu"
|
||||
#define SCNuFAST32 "u"
|
||||
#define SCNuFAST64 "I64u"
|
||||
|
||||
#define SCNuMAX "I64u"
|
||||
#define SCNuPTR "u"
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/*
|
||||
* no length modifier for char types prior to C9x
|
||||
* MS runtime scanf appears to treat "hh" as "h"
|
||||
*/
|
||||
|
||||
/* signed char */
|
||||
#define SCNd8 "hhd"
|
||||
#define SCNdLEAST8 "hhd"
|
||||
#define SCNdFAST8 "hhd"
|
||||
|
||||
#define SCNi8 "hhi"
|
||||
#define SCNiLEAST8 "hhi"
|
||||
#define SCNiFAST8 "hhi"
|
||||
|
||||
#define SCNo8 "hho"
|
||||
#define SCNoLEAST8 "hho"
|
||||
#define SCNoFAST8 "hho"
|
||||
|
||||
#define SCNx8 "hhx"
|
||||
#define SCNxLEAST8 "hhx"
|
||||
#define SCNxFAST8 "hhx"
|
||||
|
||||
/* unsigned char */
|
||||
#define SCNu8 "hhu"
|
||||
#define SCNuLEAST8 "hhu"
|
||||
#define SCNuFAST8 "hhu"
|
||||
#endif /* __STDC_VERSION__ >= 199901 */
|
||||
|
||||
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
|
||||
|
||||
extern inline intmax_t imaxabs (intmax_t j)
|
||||
{return (j >= 0 ? j : -j);}
|
||||
imaxdiv_t imaxdiv (intmax_t numer, intmax_t denom);
|
||||
|
||||
/* 7.8.2 Conversion functions for greatest-width integer types */
|
||||
|
||||
intmax_t strtoimax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
|
||||
uintmax_t strtoumax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
|
||||
|
||||
intmax_t wcstoimax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
|
||||
int base);
|
||||
uintmax_t wcstoumax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
|
||||
int base);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ndef _INTTYPES_H */
|
||||
|
@ -1,296 +1,296 @@
|
||||
/*
|
||||
* io.h
|
||||
*
|
||||
* System level I/O functions and types.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _IO_H_
|
||||
#define _IO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/* We need the definition of FILE anyway... */
|
||||
#include <stdio.h>
|
||||
|
||||
/* MSVC's io.h contains the stuff from dir.h, so I will too.
|
||||
* NOTE: This also defines off_t, the file offset type, through
|
||||
* an inclusion of sys/types.h */
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#include <sys/types.h> /* To get time_t. */
|
||||
|
||||
/*
|
||||
* Attributes of files as returned by _findfirst et al.
|
||||
*/
|
||||
#define _A_NORMAL 0x00000000
|
||||
#define _A_RDONLY 0x00000001
|
||||
#define _A_HIDDEN 0x00000002
|
||||
#define _A_SYSTEM 0x00000004
|
||||
#define _A_VOLID 0x00000008
|
||||
#define _A_SUBDIR 0x00000010
|
||||
#define _A_ARCH 0x00000020
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _FSIZE_T_DEFINED
|
||||
typedef unsigned long _fsize_t;
|
||||
#define _FSIZE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following structure is filled in by _findfirst or _findnext when
|
||||
* they succeed in finding a match.
|
||||
*/
|
||||
struct _finddata_t
|
||||
{
|
||||
unsigned attrib; /* Attributes, see constants above. */
|
||||
time_t time_create;
|
||||
time_t time_access; /* always midnight local time */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
char name[FILENAME_MAX]; /* may include spaces. */
|
||||
};
|
||||
|
||||
struct _finddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
char name[FILENAME_MAX];
|
||||
};
|
||||
|
||||
|
||||
#ifndef _WFINDDATA_T_DEFINED
|
||||
struct _wfinddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create; /* -1 for FAT file systems */
|
||||
time_t time_access; /* -1 for FAT file systems */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
wchar_t name[FILENAME_MAX]; /* may include spaces. */
|
||||
};
|
||||
struct _wfinddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[FILENAME_MAX];
|
||||
};
|
||||
|
||||
#define _WFINDDATA_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Functions for searching for files. _findfirst returns -1 if no match
|
||||
* is found. Otherwise it returns a handle to be used in _findnext and
|
||||
* _findclose calls. _findnext also returns -1 if no match could be found,
|
||||
* and 0 if a match was found. Call _findclose when you are finished.
|
||||
*/
|
||||
int _findfirst (const char*, struct _finddata_t*);
|
||||
int _findnext (int, struct _finddata_t*);
|
||||
int _findclose (int);
|
||||
|
||||
int _chdir (const char*);
|
||||
char* _getcwd (char*, int);
|
||||
int _mkdir (const char*);
|
||||
char* _mktemp (char*);
|
||||
int _rmdir (const char*);
|
||||
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__int64 _filelengthi64(int);
|
||||
long _findfirsti64(const char*, struct _finddatai64_t*);
|
||||
int _findnexti64(long, struct _finddatai64_t*);
|
||||
__int64 _lseeki64(int, __int64, int);
|
||||
__int64 _telli64(int);
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#ifndef _UWIN
|
||||
int chdir (const char*);
|
||||
char* getcwd (char*, int);
|
||||
int mkdir (const char*);
|
||||
char* mktemp (char*);
|
||||
int rmdir (const char*);
|
||||
#endif /* _UWIN */
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/* TODO: Maximum number of open handles has not been tested, I just set
|
||||
* it the same as FOPEN_MAX. */
|
||||
#define HANDLE_MAX FOPEN_MAX
|
||||
|
||||
|
||||
/* Some defines for _access nAccessMode (MS doesn't define them, but
|
||||
* it doesn't seem to hurt to add them). */
|
||||
#define F_OK 0 /* Check for file existence */
|
||||
#define X_OK 1 /* Check for execute permission. */
|
||||
#define W_OK 2 /* Check for write permission */
|
||||
#define R_OK 4 /* Check for read permission */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _access (const char*, int);
|
||||
int _chsize (int, long);
|
||||
int _close (int);
|
||||
int _commit(int);
|
||||
|
||||
/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
|
||||
* the "owner write permission" bit (on FAT). */
|
||||
int _creat (const char*, unsigned);
|
||||
|
||||
int _dup (int);
|
||||
int _dup2 (int, int);
|
||||
long _filelength (int);
|
||||
int _fileno (FILE*);
|
||||
long _get_osfhandle (int);
|
||||
int _isatty (int);
|
||||
|
||||
/* In a very odd turn of events this function is excluded from those
|
||||
* files which define _STREAM_COMPAT. This is required in order to
|
||||
* build GNU libio because of a conflict with _eof in streambuf.h
|
||||
* line 107. Actually I might just be able to change the name of
|
||||
* the enum member in streambuf.h... we'll see. TODO */
|
||||
#ifndef _STREAM_COMPAT
|
||||
int _eof (int);
|
||||
#endif
|
||||
|
||||
/* LK_... locking commands defined in sys/locking.h. */
|
||||
int _locking (int, int, long);
|
||||
|
||||
long _lseek (int, long, int);
|
||||
|
||||
/* Optional third argument is unsigned unPermissions. */
|
||||
int _open (const char*, int, ...);
|
||||
|
||||
int _open_osfhandle (long, int);
|
||||
int _pipe (int *, unsigned int, int);
|
||||
int _read (int, void*, unsigned int);
|
||||
|
||||
/* SH_... flags for nShFlags defined in share.h
|
||||
* Optional fourth argument is unsigned unPermissions */
|
||||
int _sopen (const char*, int, int, ...);
|
||||
|
||||
long _tell (int);
|
||||
/* Should umask be in sys/stat.h and/or sys/types.h instead? */
|
||||
int _umask (int);
|
||||
int _unlink (const char*);
|
||||
int _write (int, const void*, unsigned int);
|
||||
|
||||
/* Wide character versions. Also declared in wchar.h. */
|
||||
/* Not in crtdll.dll */
|
||||
#if !defined (_WIO_DEFINED)
|
||||
#if defined (__MSVCRT__)
|
||||
int _waccess(const wchar_t*, int);
|
||||
int _wchmod(const wchar_t*, int);
|
||||
int _wcreat(const wchar_t*, int);
|
||||
long _wfindfirst(wchar_t*, struct _wfinddata_t*);
|
||||
int _wfindnext(long, struct _wfinddata_t *);
|
||||
int _wunlink(const wchar_t*);
|
||||
int _wopen(const wchar_t*, int, ...);
|
||||
int _wsopen(const wchar_t*, int, int, ...);
|
||||
wchar_t * _wmktemp(wchar_t*);
|
||||
long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
|
||||
int _wfindnexti64(long, struct _wfinddatai64_t*);
|
||||
#endif /* defined (__MSVCRT__) */
|
||||
#define _WIO_DEFINED
|
||||
#endif /* _WIO_DEFINED */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* Non-underscored versions of non-ANSI functions to improve portability.
|
||||
* These functions live in libmoldname.a.
|
||||
*/
|
||||
|
||||
#ifndef _UWIN
|
||||
int access (const char*, int);
|
||||
int chsize (int, long );
|
||||
int close (int);
|
||||
int creat (const char*, int);
|
||||
int dup (int);
|
||||
int dup2 (int, int);
|
||||
int eof (int);
|
||||
long filelength (int);
|
||||
int fileno (FILE*);
|
||||
int isatty (int);
|
||||
long lseek (int, long, int);
|
||||
int open (const char*, int, ...);
|
||||
int read (int, void*, unsigned int);
|
||||
int sopen (const char*, int, int, ...);
|
||||
long tell (int);
|
||||
int umask (int);
|
||||
int unlink (const char*);
|
||||
int write (int, const void*, unsigned int);
|
||||
#endif /* _UWIN */
|
||||
|
||||
/* Wide character versions. Also declared in wchar.h. */
|
||||
/* Where do these live? Not in libmoldname.a nor in libmsvcrt.a */
|
||||
#if 0
|
||||
int waccess(const wchar_t *, int);
|
||||
int wchmod(const wchar_t *, int);
|
||||
int wcreat(const wchar_t *, int);
|
||||
long wfindfirst(wchar_t *, struct _wfinddata_t *);
|
||||
int wfindnext(long, struct _wfinddata_t *);
|
||||
int wunlink(const wchar_t *);
|
||||
int wrename(const wchar_t *, const wchar_t *);
|
||||
int wopen(const wchar_t *, int, ...);
|
||||
int wsopen(const wchar_t *, int, int, ...);
|
||||
wchar_t * wmktemp(wchar_t *);
|
||||
#endif
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _IO_H_ not defined */
|
||||
|
||||
#endif /* Not strict ANSI */
|
||||
|
||||
/*
|
||||
* io.h
|
||||
*
|
||||
* System level I/O functions and types.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _IO_H_
|
||||
#define _IO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/* We need the definition of FILE anyway... */
|
||||
#include <stdio.h>
|
||||
|
||||
/* MSVC's io.h contains the stuff from dir.h, so I will too.
|
||||
* NOTE: This also defines off_t, the file offset type, through
|
||||
* an inclusion of sys/types.h */
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#include <sys/types.h> /* To get time_t. */
|
||||
|
||||
/*
|
||||
* Attributes of files as returned by _findfirst et al.
|
||||
*/
|
||||
#define _A_NORMAL 0x00000000
|
||||
#define _A_RDONLY 0x00000001
|
||||
#define _A_HIDDEN 0x00000002
|
||||
#define _A_SYSTEM 0x00000004
|
||||
#define _A_VOLID 0x00000008
|
||||
#define _A_SUBDIR 0x00000010
|
||||
#define _A_ARCH 0x00000020
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _FSIZE_T_DEFINED
|
||||
typedef unsigned long _fsize_t;
|
||||
#define _FSIZE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following structure is filled in by _findfirst or _findnext when
|
||||
* they succeed in finding a match.
|
||||
*/
|
||||
struct _finddata_t
|
||||
{
|
||||
unsigned attrib; /* Attributes, see constants above. */
|
||||
time_t time_create;
|
||||
time_t time_access; /* always midnight local time */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
char name[FILENAME_MAX]; /* may include spaces. */
|
||||
};
|
||||
|
||||
struct _finddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
char name[FILENAME_MAX];
|
||||
};
|
||||
|
||||
|
||||
#ifndef _WFINDDATA_T_DEFINED
|
||||
struct _wfinddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create; /* -1 for FAT file systems */
|
||||
time_t time_access; /* -1 for FAT file systems */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
wchar_t name[FILENAME_MAX]; /* may include spaces. */
|
||||
};
|
||||
struct _wfinddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[FILENAME_MAX];
|
||||
};
|
||||
|
||||
#define _WFINDDATA_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Functions for searching for files. _findfirst returns -1 if no match
|
||||
* is found. Otherwise it returns a handle to be used in _findnext and
|
||||
* _findclose calls. _findnext also returns -1 if no match could be found,
|
||||
* and 0 if a match was found. Call _findclose when you are finished.
|
||||
*/
|
||||
int _findfirst (const char*, struct _finddata_t*);
|
||||
int _findnext (int, struct _finddata_t*);
|
||||
int _findclose (int);
|
||||
|
||||
int _chdir (const char*);
|
||||
char* _getcwd (char*, int);
|
||||
int _mkdir (const char*);
|
||||
char* _mktemp (char*);
|
||||
int _rmdir (const char*);
|
||||
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__int64 _filelengthi64(int);
|
||||
long _findfirsti64(const char*, struct _finddatai64_t*);
|
||||
int _findnexti64(long, struct _finddatai64_t*);
|
||||
__int64 _lseeki64(int, __int64, int);
|
||||
__int64 _telli64(int);
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#ifndef _UWIN
|
||||
int chdir (const char*);
|
||||
char* getcwd (char*, int);
|
||||
int mkdir (const char*);
|
||||
char* mktemp (char*);
|
||||
int rmdir (const char*);
|
||||
#endif /* _UWIN */
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/* TODO: Maximum number of open handles has not been tested, I just set
|
||||
* it the same as FOPEN_MAX. */
|
||||
#define HANDLE_MAX FOPEN_MAX
|
||||
|
||||
|
||||
/* Some defines for _access nAccessMode (MS doesn't define them, but
|
||||
* it doesn't seem to hurt to add them). */
|
||||
#define F_OK 0 /* Check for file existence */
|
||||
#define X_OK 1 /* Check for execute permission. */
|
||||
#define W_OK 2 /* Check for write permission */
|
||||
#define R_OK 4 /* Check for read permission */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _access (const char*, int);
|
||||
int _chsize (int, long);
|
||||
int _close (int);
|
||||
int _commit(int);
|
||||
|
||||
/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
|
||||
* the "owner write permission" bit (on FAT). */
|
||||
int _creat (const char*, unsigned);
|
||||
|
||||
int _dup (int);
|
||||
int _dup2 (int, int);
|
||||
long _filelength (int);
|
||||
int _fileno (FILE*);
|
||||
long _get_osfhandle (int);
|
||||
int _isatty (int);
|
||||
|
||||
/* In a very odd turn of events this function is excluded from those
|
||||
* files which define _STREAM_COMPAT. This is required in order to
|
||||
* build GNU libio because of a conflict with _eof in streambuf.h
|
||||
* line 107. Actually I might just be able to change the name of
|
||||
* the enum member in streambuf.h... we'll see. TODO */
|
||||
#ifndef _STREAM_COMPAT
|
||||
int _eof (int);
|
||||
#endif
|
||||
|
||||
/* LK_... locking commands defined in sys/locking.h. */
|
||||
int _locking (int, int, long);
|
||||
|
||||
long _lseek (int, long, int);
|
||||
|
||||
/* Optional third argument is unsigned unPermissions. */
|
||||
int _open (const char*, int, ...);
|
||||
|
||||
int _open_osfhandle (long, int);
|
||||
int _pipe (int *, unsigned int, int);
|
||||
int _read (int, void*, unsigned int);
|
||||
|
||||
/* SH_... flags for nShFlags defined in share.h
|
||||
* Optional fourth argument is unsigned unPermissions */
|
||||
int _sopen (const char*, int, int, ...);
|
||||
|
||||
long _tell (int);
|
||||
/* Should umask be in sys/stat.h and/or sys/types.h instead? */
|
||||
int _umask (int);
|
||||
int _unlink (const char*);
|
||||
int _write (int, const void*, unsigned int);
|
||||
|
||||
/* Wide character versions. Also declared in wchar.h. */
|
||||
/* Not in crtdll.dll */
|
||||
#if !defined (_WIO_DEFINED)
|
||||
#if defined (__MSVCRT__)
|
||||
int _waccess(const wchar_t*, int);
|
||||
int _wchmod(const wchar_t*, int);
|
||||
int _wcreat(const wchar_t*, int);
|
||||
long _wfindfirst(wchar_t*, struct _wfinddata_t*);
|
||||
int _wfindnext(long, struct _wfinddata_t *);
|
||||
int _wunlink(const wchar_t*);
|
||||
int _wopen(const wchar_t*, int, ...);
|
||||
int _wsopen(const wchar_t*, int, int, ...);
|
||||
wchar_t * _wmktemp(wchar_t*);
|
||||
long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
|
||||
int _wfindnexti64(long, struct _wfinddatai64_t*);
|
||||
#endif /* defined (__MSVCRT__) */
|
||||
#define _WIO_DEFINED
|
||||
#endif /* _WIO_DEFINED */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* Non-underscored versions of non-ANSI functions to improve portability.
|
||||
* These functions live in libmoldname.a.
|
||||
*/
|
||||
|
||||
#ifndef _UWIN
|
||||
int access (const char*, int);
|
||||
int chsize (int, long );
|
||||
int close (int);
|
||||
int creat (const char*, int);
|
||||
int dup (int);
|
||||
int dup2 (int, int);
|
||||
int eof (int);
|
||||
long filelength (int);
|
||||
int fileno (FILE*);
|
||||
int isatty (int);
|
||||
long lseek (int, long, int);
|
||||
int open (const char*, int, ...);
|
||||
int read (int, void*, unsigned int);
|
||||
int sopen (const char*, int, int, ...);
|
||||
long tell (int);
|
||||
int umask (int);
|
||||
int unlink (const char*);
|
||||
int write (int, const void*, unsigned int);
|
||||
#endif /* _UWIN */
|
||||
|
||||
/* Wide character versions. Also declared in wchar.h. */
|
||||
/* Where do these live? Not in libmoldname.a nor in libmsvcrt.a */
|
||||
#if 0
|
||||
int waccess(const wchar_t *, int);
|
||||
int wchmod(const wchar_t *, int);
|
||||
int wcreat(const wchar_t *, int);
|
||||
long wfindfirst(wchar_t *, struct _wfinddata_t *);
|
||||
int wfindnext(long, struct _wfinddata_t *);
|
||||
int wunlink(const wchar_t *);
|
||||
int wrename(const wchar_t *, const wchar_t *);
|
||||
int wopen(const wchar_t *, int, ...);
|
||||
int wsopen(const wchar_t *, int, int, ...);
|
||||
wchar_t * wmktemp(wchar_t *);
|
||||
#endif
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _IO_H_ not defined */
|
||||
|
||||
#endif /* Not strict ANSI */
|
||||
|
||||
|
@ -1,115 +1,115 @@
|
||||
/*
|
||||
* limits.h
|
||||
*
|
||||
* Defines constants for the sizes of integral types.
|
||||
*
|
||||
* NOTE: GCC should supply a version of this header and it should be safe to
|
||||
* use that version instead of this one (maybe safer).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LIMITS_H_
|
||||
#define _LIMITS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* File system limits
|
||||
*
|
||||
* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
|
||||
* same as FILENAME_MAX and FOPEN_MAX from stdio.h?
|
||||
* NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
|
||||
* required for the NUL. TODO: Test?
|
||||
*/
|
||||
#define PATH_MAX (259)
|
||||
|
||||
/*
|
||||
* Characteristics of the char data type.
|
||||
*
|
||||
* TODO: Is MB_LEN_MAX correct?
|
||||
*/
|
||||
#define CHAR_BIT 8
|
||||
#define MB_LEN_MAX 2
|
||||
|
||||
#define SCHAR_MIN (-128)
|
||||
#define SCHAR_MAX 127
|
||||
|
||||
#define UCHAR_MAX 255
|
||||
|
||||
/* TODO: Is this safe? I think it might just be testing the preprocessor,
|
||||
* not the compiler itself... */
|
||||
#if ('\x80' < 0)
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#else
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX UCHAR_MAX
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for ints.
|
||||
*/
|
||||
#define INT_MAX 2147483647
|
||||
#define INT_MIN (-INT_MAX-1)
|
||||
|
||||
#define UINT_MAX 0xffffffff
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for shorts.
|
||||
*/
|
||||
#define SHRT_MAX 32767
|
||||
#define SHRT_MIN (-SHRT_MAX-1)
|
||||
|
||||
#define USHRT_MAX 0xffff
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for longs and unsigned longs.
|
||||
*
|
||||
* TODO: This is not correct for Alphas, which have 64 bit longs.
|
||||
*/
|
||||
#define LONG_MAX 2147483647L
|
||||
|
||||
#define LONG_MIN (-LONG_MAX-1)
|
||||
|
||||
#define ULONG_MAX 0xffffffffUL
|
||||
|
||||
|
||||
/*
|
||||
* The GNU C compiler also allows 'long long int'
|
||||
*/
|
||||
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
|
||||
|
||||
#define LONG_LONG_MAX 9223372036854775807LL
|
||||
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
|
||||
|
||||
#define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)
|
||||
|
||||
/* ISO C9x macro names */
|
||||
#define LLONG_MAX LONG_LONG_MAX
|
||||
#define LLONG_MIN LONG_LONG_MIN
|
||||
#define ULLONG_MAX ULONG_LONG_MAX
|
||||
|
||||
#endif /* Not Strict ANSI and GNU C compiler */
|
||||
|
||||
|
||||
#endif /* not _LIMITS_H_ */
|
||||
/*
|
||||
* limits.h
|
||||
*
|
||||
* Defines constants for the sizes of integral types.
|
||||
*
|
||||
* NOTE: GCC should supply a version of this header and it should be safe to
|
||||
* use that version instead of this one (maybe safer).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LIMITS_H_
|
||||
#define _LIMITS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* File system limits
|
||||
*
|
||||
* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
|
||||
* same as FILENAME_MAX and FOPEN_MAX from stdio.h?
|
||||
* NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
|
||||
* required for the NUL. TODO: Test?
|
||||
*/
|
||||
#define PATH_MAX (259)
|
||||
|
||||
/*
|
||||
* Characteristics of the char data type.
|
||||
*
|
||||
* TODO: Is MB_LEN_MAX correct?
|
||||
*/
|
||||
#define CHAR_BIT 8
|
||||
#define MB_LEN_MAX 2
|
||||
|
||||
#define SCHAR_MIN (-128)
|
||||
#define SCHAR_MAX 127
|
||||
|
||||
#define UCHAR_MAX 255
|
||||
|
||||
/* TODO: Is this safe? I think it might just be testing the preprocessor,
|
||||
* not the compiler itself... */
|
||||
#if ('\x80' < 0)
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#else
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX UCHAR_MAX
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for ints.
|
||||
*/
|
||||
#define INT_MAX 2147483647
|
||||
#define INT_MIN (-INT_MAX-1)
|
||||
|
||||
#define UINT_MAX 0xffffffff
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for shorts.
|
||||
*/
|
||||
#define SHRT_MAX 32767
|
||||
#define SHRT_MIN (-SHRT_MAX-1)
|
||||
|
||||
#define USHRT_MAX 0xffff
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for longs and unsigned longs.
|
||||
*
|
||||
* TODO: This is not correct for Alphas, which have 64 bit longs.
|
||||
*/
|
||||
#define LONG_MAX 2147483647L
|
||||
|
||||
#define LONG_MIN (-LONG_MAX-1)
|
||||
|
||||
#define ULONG_MAX 0xffffffffUL
|
||||
|
||||
|
||||
/*
|
||||
* The GNU C compiler also allows 'long long int'
|
||||
*/
|
||||
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
|
||||
|
||||
#define LONG_LONG_MAX 9223372036854775807LL
|
||||
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
|
||||
|
||||
#define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)
|
||||
|
||||
/* ISO C9x macro names */
|
||||
#define LLONG_MAX LONG_LONG_MAX
|
||||
#define LLONG_MIN LONG_LONG_MIN
|
||||
#define ULLONG_MAX ULONG_LONG_MAX
|
||||
|
||||
#endif /* Not Strict ANSI and GNU C compiler */
|
||||
|
||||
|
||||
#endif /* not _LIMITS_H_ */
|
||||
|
@ -1,100 +1,100 @@
|
||||
/*
|
||||
* locale.h
|
||||
*
|
||||
* Functions and types for localization (ie. changing the appearance of
|
||||
* output based on the standards of a certain country).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LOCALE_H_
|
||||
#define _LOCALE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* NOTE: I have tried to test this, but I am limited by my knowledge of
|
||||
* locale issues. The structure does not bomb if you look at the
|
||||
* values, and 'decimal_point' even seems to be correct. But the
|
||||
* rest of the values are, by default, not particularly useful
|
||||
* (read meaningless and not related to the international settings
|
||||
* of the system).
|
||||
*/
|
||||
|
||||
#define LC_ALL 0
|
||||
#define LC_COLLATE 1
|
||||
#define LC_CTYPE 2
|
||||
#define LC_MONETARY 3
|
||||
#define LC_NUMERIC 4
|
||||
#define LC_TIME 5
|
||||
#define LC_MIN LC_ALL
|
||||
#define LC_MAX LC_TIME
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* The structure returned by 'localeconv'.
|
||||
*/
|
||||
struct lconv
|
||||
{
|
||||
char* decimal_point;
|
||||
char* thousands_sep;
|
||||
char* grouping;
|
||||
char* int_curr_symbol;
|
||||
char* currency_symbol;
|
||||
char* mon_decimal_point;
|
||||
char* mon_thousands_sep;
|
||||
char* mon_grouping;
|
||||
char* positive_sign;
|
||||
char* negative_sign;
|
||||
char int_frac_digits;
|
||||
char frac_digits;
|
||||
char p_cs_precedes;
|
||||
char p_sep_by_space;
|
||||
char n_cs_precedes;
|
||||
char n_sep_by_space;
|
||||
char p_sign_posn;
|
||||
char n_sign_posn;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
char* setlocale (int, const char*);
|
||||
struct lconv* localeconv (void);
|
||||
|
||||
#ifndef _WLOCALE_DEFINED /* also declared in wchar.h */
|
||||
# define __need_wchar_t
|
||||
# include <stddef.h>
|
||||
wchar_t* _wsetlocale(int, const wchar_t*);
|
||||
# define _WLOCALE_DEFINED
|
||||
#endif /* ndef _WLOCALE_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _LOCALE_H_ */
|
||||
|
||||
/*
|
||||
* locale.h
|
||||
*
|
||||
* Functions and types for localization (ie. changing the appearance of
|
||||
* output based on the standards of a certain country).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LOCALE_H_
|
||||
#define _LOCALE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* NOTE: I have tried to test this, but I am limited by my knowledge of
|
||||
* locale issues. The structure does not bomb if you look at the
|
||||
* values, and 'decimal_point' even seems to be correct. But the
|
||||
* rest of the values are, by default, not particularly useful
|
||||
* (read meaningless and not related to the international settings
|
||||
* of the system).
|
||||
*/
|
||||
|
||||
#define LC_ALL 0
|
||||
#define LC_COLLATE 1
|
||||
#define LC_CTYPE 2
|
||||
#define LC_MONETARY 3
|
||||
#define LC_NUMERIC 4
|
||||
#define LC_TIME 5
|
||||
#define LC_MIN LC_ALL
|
||||
#define LC_MAX LC_TIME
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* The structure returned by 'localeconv'.
|
||||
*/
|
||||
struct lconv
|
||||
{
|
||||
char* decimal_point;
|
||||
char* thousands_sep;
|
||||
char* grouping;
|
||||
char* int_curr_symbol;
|
||||
char* currency_symbol;
|
||||
char* mon_decimal_point;
|
||||
char* mon_thousands_sep;
|
||||
char* mon_grouping;
|
||||
char* positive_sign;
|
||||
char* negative_sign;
|
||||
char int_frac_digits;
|
||||
char frac_digits;
|
||||
char p_cs_precedes;
|
||||
char p_sep_by_space;
|
||||
char n_cs_precedes;
|
||||
char n_sep_by_space;
|
||||
char p_sign_posn;
|
||||
char n_sign_posn;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
char* setlocale (int, const char*);
|
||||
struct lconv* localeconv (void);
|
||||
|
||||
#ifndef _WLOCALE_DEFINED /* also declared in wchar.h */
|
||||
# define __need_wchar_t
|
||||
# include <stddef.h>
|
||||
wchar_t* _wsetlocale(int, const wchar_t*);
|
||||
# define _WLOCALE_DEFINED
|
||||
#endif /* ndef _WLOCALE_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _LOCALE_H_ */
|
||||
|
||||
|
@ -1,87 +1,87 @@
|
||||
/*
|
||||
* malloc.h
|
||||
*
|
||||
* Support for programs which want to use malloc.h to get memory management
|
||||
* functions. Unless you absolutely need some of these functions and they are
|
||||
* not in the ANSI headers you should use the ANSI standard header files
|
||||
* instead.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _MALLOC_H_
|
||||
#define _MALLOC_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* The structure used to walk through the heap with _heapwalk.
|
||||
*/
|
||||
typedef struct _heapinfo
|
||||
{
|
||||
int* _pentry;
|
||||
size_t _size;
|
||||
int _useflag;
|
||||
} _HEAPINFO;
|
||||
|
||||
/* Values for _heapinfo.useflag */
|
||||
#define _USEDENTRY 0
|
||||
#define _FREEENTRY 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
The _heap* memory allocation functions are supported on NT
|
||||
but not W9x. On latter, they always set errno to ENOSYS.
|
||||
*/
|
||||
int _heapwalk (_HEAPINFO*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int heapwalk (_HEAPINFO*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
int _heapchk (void); /* Verify heap integrety. */
|
||||
int _heapmin (void); /* Return unused heap to the OS. */
|
||||
int _heapset (unsigned int);
|
||||
|
||||
size_t _msize (void*);
|
||||
size_t _get_sbh_threshold (void);
|
||||
int _set_sbh_threshold (size_t);
|
||||
void * _expand (void*, size_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
#endif /* Not _MALLOC_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* malloc.h
|
||||
*
|
||||
* Support for programs which want to use malloc.h to get memory management
|
||||
* functions. Unless you absolutely need some of these functions and they are
|
||||
* not in the ANSI headers you should use the ANSI standard header files
|
||||
* instead.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _MALLOC_H_
|
||||
#define _MALLOC_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* The structure used to walk through the heap with _heapwalk.
|
||||
*/
|
||||
typedef struct _heapinfo
|
||||
{
|
||||
int* _pentry;
|
||||
size_t _size;
|
||||
int _useflag;
|
||||
} _HEAPINFO;
|
||||
|
||||
/* Values for _heapinfo.useflag */
|
||||
#define _USEDENTRY 0
|
||||
#define _FREEENTRY 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
The _heap* memory allocation functions are supported on NT
|
||||
but not W9x. On latter, they always set errno to ENOSYS.
|
||||
*/
|
||||
int _heapwalk (_HEAPINFO*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int heapwalk (_HEAPINFO*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
int _heapchk (void); /* Verify heap integrety. */
|
||||
int _heapmin (void); /* Return unused heap to the OS. */
|
||||
int _heapset (unsigned int);
|
||||
|
||||
size_t _msize (void*);
|
||||
size_t _get_sbh_threshold (void);
|
||||
int _set_sbh_threshold (size_t);
|
||||
void * _expand (void*, size_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
#endif /* Not _MALLOC_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,438 +1,438 @@
|
||||
/*
|
||||
* math.h
|
||||
*
|
||||
* Mathematical functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MATH_H_
|
||||
#define _MATH_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* Types for the _exception structure.
|
||||
*/
|
||||
|
||||
#define _DOMAIN 1 /* domain error in argument */
|
||||
#define _SING 2 /* singularity */
|
||||
#define _OVERFLOW 3 /* range overflow */
|
||||
#define _UNDERFLOW 4 /* range underflow */
|
||||
#define _TLOSS 5 /* total loss of precision */
|
||||
#define _PLOSS 6 /* partial loss of precision */
|
||||
|
||||
/*
|
||||
* Exception types with non-ANSI names for compatibility.
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#define DOMAIN _DOMAIN
|
||||
#define SING _SING
|
||||
#define OVERFLOW _OVERFLOW
|
||||
#define UNDERFLOW _UNDERFLOW
|
||||
#define TLOSS _TLOSS
|
||||
#define PLOSS _PLOSS
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
||||
/* These are also defined in Mingw float.h; needed here as well to work
|
||||
around GCC build issues. */
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef __MINGW_FPCLASS_DEFINED
|
||||
#define __MINGW_FPCLASS_DEFINED 1
|
||||
/* IEEE 754 classication */
|
||||
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
|
||||
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
|
||||
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
|
||||
#define _FPCLASS_NN 0x0008 /* Negative Normal */
|
||||
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
|
||||
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
|
||||
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
|
||||
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
|
||||
#define _FPCLASS_PN 0x0100 /* Positive Normal */
|
||||
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
|
||||
#endif /* __MINGW_FPCLASS_DEFINED */
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* HUGE_VAL is returned by strtod when the value would overflow the
|
||||
* representation of 'double'. There are other uses as well.
|
||||
*
|
||||
* __imp__HUGE is a pointer to the actual variable _HUGE in
|
||||
* MSVCRT.DLL. If we used _HUGE directly we would get a pointer
|
||||
* to a thunk function.
|
||||
*
|
||||
* NOTE: The CRTDLL version uses _HUGE_dll instead.
|
||||
*/
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
extern double* __imp__HUGE;
|
||||
#define HUGE_VAL (*__imp__HUGE)
|
||||
#else
|
||||
/* CRTDLL */
|
||||
extern double* __imp__HUGE_dll;
|
||||
#define HUGE_VAL (*__imp__HUGE_dll)
|
||||
#endif
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT double _HUGE;
|
||||
#define HUGE_VAL _HUGE
|
||||
#else
|
||||
/* CRTDLL */
|
||||
__MINGW_IMPORT double _HUGE_dll;
|
||||
#define HUGE_VAL _HUGE_dll
|
||||
#endif
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
struct _exception
|
||||
{
|
||||
int type;
|
||||
char *name;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double retval;
|
||||
};
|
||||
|
||||
|
||||
double sin (double);
|
||||
double cos (double);
|
||||
double tan (double);
|
||||
double sinh (double);
|
||||
double cosh (double);
|
||||
double tanh (double);
|
||||
double asin (double);
|
||||
double acos (double);
|
||||
double atan (double);
|
||||
double atan2 (double, double);
|
||||
double exp (double);
|
||||
double log (double);
|
||||
double log10 (double);
|
||||
double pow (double, double);
|
||||
double sqrt (double);
|
||||
double ceil (double);
|
||||
double floor (double);
|
||||
double fabs (double);
|
||||
double ldexp (double, int);
|
||||
double frexp (double, int*);
|
||||
double modf (double, double*);
|
||||
double fmod (double, double);
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
/* Complex number (for cabs) */
|
||||
struct _complex
|
||||
{
|
||||
double x; /* Real part */
|
||||
double y; /* Imaginary part */
|
||||
};
|
||||
|
||||
double _cabs (struct _complex);
|
||||
double _hypot (double, double);
|
||||
double _j0 (double);
|
||||
double _j1 (double);
|
||||
double _jn (int, double);
|
||||
double _y0 (double);
|
||||
double _y1 (double);
|
||||
double _yn (int, double);
|
||||
int _matherr (struct _exception *);
|
||||
|
||||
/* These are also declared in Mingw float.h; needed here as well to work
|
||||
around GCC build issues. */
|
||||
/* BEGIN FLOAT.H COPY */
|
||||
/*
|
||||
* IEEE recommended functions
|
||||
*/
|
||||
|
||||
double _chgsign (double);
|
||||
double _copysign (double, double);
|
||||
double _logb (double);
|
||||
double _nextafter (double, double);
|
||||
double _scalb (double, long);
|
||||
|
||||
int _finite (double);
|
||||
int _fpclass (double);
|
||||
int _isnan (double);
|
||||
|
||||
/* END FLOAT.H COPY */
|
||||
|
||||
#if !defined (_NO_OLDNAMES) \
|
||||
|| (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L )
|
||||
|
||||
/*
|
||||
* Non-underscored versions of non-ANSI functions. These reside in
|
||||
* liboldnames.a. They are now also ISO C99 standand names.
|
||||
* Provided for extra portability.
|
||||
*/
|
||||
|
||||
double cabs (struct _complex);
|
||||
double hypot (double, double);
|
||||
double j0 (double);
|
||||
double j1 (double);
|
||||
double jn (int, double);
|
||||
double y0 (double);
|
||||
double y1 (double);
|
||||
double yn (int, double);
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
|
||||
#ifndef __NO_ISOCEXT
|
||||
|
||||
#define INFINITY HUGE_VAL
|
||||
#define NAN (0.0F/0.0F)
|
||||
|
||||
/*
|
||||
Return values for fpclassify.
|
||||
These are based on Intel x87 fpu condition codes
|
||||
in the high byte of status word and differ from
|
||||
the return values for MS IEEE 754 extension _fpclass()
|
||||
*/
|
||||
#define FP_NAN 0x0100
|
||||
#define FP_NORMAL 0x0400
|
||||
#define FP_INFINITE (FP_NAN | FP_NORMAL)
|
||||
#define FP_ZERO 0x4000
|
||||
#define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
|
||||
/* 0x0200 is signbit mask */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
double nan(const char *tagp);
|
||||
float nanf(const char *tagp);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#define nan() nan("")
|
||||
#define nanf() nanf("")
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
We can't inline float, because we want to ensure truncation
|
||||
to semantic type before classification. If we extend to long
|
||||
double, we will also need to make double extern only.
|
||||
(A normal long double value might become subnormal when
|
||||
converted to double, and zero when converted to float.)
|
||||
*/
|
||||
extern __inline__ int __fpclassify (double x){
|
||||
unsigned short sw;
|
||||
__asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
|
||||
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
|
||||
}
|
||||
|
||||
extern int __fpclassifyf (float);
|
||||
|
||||
#define fpclassify(x) ((sizeof(x) == sizeof(float)) ? __fpclassifyf(x) \
|
||||
: __fpclassify(x))
|
||||
|
||||
/* We don't need to worry about trucation here:
|
||||
A NaN stays a NaN. */
|
||||
|
||||
extern __inline__ int __isnan (double _x)
|
||||
{
|
||||
unsigned short sw;
|
||||
__asm__ ("fxam;"
|
||||
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
||||
== FP_NAN;
|
||||
}
|
||||
|
||||
extern __inline__ int __isnanf (float _x)
|
||||
{
|
||||
unsigned short sw;
|
||||
__asm__ ("fxam;"
|
||||
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
||||
== FP_NAN;
|
||||
}
|
||||
|
||||
#define isnan(x) ((sizeof(x) == sizeof(float)) ? __isnanf(x) \
|
||||
: __isnan(x))
|
||||
|
||||
|
||||
#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
|
||||
#define isinf(x) (fpclassify(x) == FP_INFINITE)
|
||||
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
|
||||
|
||||
|
||||
extern __inline__ int __signbit (double x) {
|
||||
unsigned short stw;
|
||||
__asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
||||
return stw & 0x0200;
|
||||
}
|
||||
|
||||
extern __inline__ int __signbitf (float x) {
|
||||
unsigned short stw;
|
||||
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
||||
return stw & 0x0200;
|
||||
}
|
||||
|
||||
#define signbit(x) ((sizeof(x) == sizeof(float)) ? __signbitf(x) \
|
||||
: __signbit(x))
|
||||
/*
|
||||
* With these functions, comparisons involving quiet NaNs set the FP
|
||||
* condition code to "unordered". The IEEE floating-point spec
|
||||
* dictates that the result of floating-point comparisons should be
|
||||
* false whenever a NaN is involved, with the exception of the !=,
|
||||
* which always returns true.
|
||||
*/
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
|
||||
#define isgreater(x, y) __builtin_isgreater(x, y)
|
||||
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
|
||||
#define isless(x, y) __builtin_isless(x, y)
|
||||
#define islessequal(x, y) __builtin_islessequal(x, y)
|
||||
#define islessgreater(x, y) __builtin_islessgreater(x, y)
|
||||
#define isunordered(x, y) __builtin_isunordered(x, y)
|
||||
|
||||
#else
|
||||
/* helper */
|
||||
extern __inline__ int __fp_unordered_compare (double x, double y){
|
||||
unsigned short retval;
|
||||
__asm__ ("fucom %%st(1);"
|
||||
"fnstsw;": "=a" (retval) : "t" (x), "u" (y));
|
||||
return retval;
|
||||
}
|
||||
|
||||
#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& 0x4500) == 0)
|
||||
#define isless(x, y) ((__fp_unordered_compare (y, x) \
|
||||
& 0x4500) == 0)
|
||||
#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
|
||||
& FP_INFINITE) == 0)
|
||||
#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
|
||||
& FP_INFINITE) == 0)
|
||||
#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& FP_SUBNORMAL) == 0)
|
||||
#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& 0x4500) == 0x4500)
|
||||
|
||||
#endif
|
||||
|
||||
/* round, using fpu control word settings */
|
||||
extern __inline__ double rint (double x)
|
||||
{
|
||||
double retval;
|
||||
__asm__ ("frndint;": "=t" (retval) : "0" (x));
|
||||
return retval;
|
||||
}
|
||||
|
||||
extern __inline__ float rintf (float x)
|
||||
{
|
||||
float retval;
|
||||
__asm__ ("frndint;" : "=t" (retval) : "0" (x) );
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* round away from zero, regardless of fpu control word settings */
|
||||
extern double round (double);
|
||||
extern float roundf (float);
|
||||
|
||||
/* round towards zero, regardless of fpu control word settings */
|
||||
extern double trunc (double);
|
||||
extern float truncf (float);
|
||||
|
||||
|
||||
/* fmax and fmin.
|
||||
NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the
|
||||
these functions choose the numeric value.
|
||||
*/
|
||||
|
||||
extern double fmax (double, double);
|
||||
extern double fmin (double, double);
|
||||
extern float fmaxf (float, float);
|
||||
float fminf (float, float);
|
||||
|
||||
/* return x * y + z as a ternary op */
|
||||
extern double fma (double, double, double);
|
||||
extern float fmaf (float, float, float);
|
||||
|
||||
/* one lonely transcendental */
|
||||
extern double log2 (double _x);
|
||||
extern float log2f (float _x);
|
||||
|
||||
/* The underscored versions are in MSVCRT.dll.
|
||||
The stubs for these are in libmingwex.a */
|
||||
|
||||
double copysign (double, double);
|
||||
float copysignf (float, float);
|
||||
double logb (double);
|
||||
float logbf (float);
|
||||
double nextafter (double, double);
|
||||
float nextafterf (float, float);
|
||||
double scalb (double, long);
|
||||
float scalbf (float, long);
|
||||
|
||||
#if !defined (__STRICT_ANSI__) /* inline using non-ANSI functions */
|
||||
extern __inline__ double copysign (double x, double y)
|
||||
{ return _copysign(x, y); }
|
||||
extern __inline__ float copysignf (float x, float y)
|
||||
{ return _copysign(x, y); }
|
||||
extern __inline__ double logb (double x)
|
||||
{ return _logb(x); }
|
||||
extern __inline__ float logbf (float x)
|
||||
{ return _logb(x); }
|
||||
extern __inline__ double nextafter(double x, double y)
|
||||
{ return _nextafter(x, y); }
|
||||
extern __inline__ float nextafterf(float x, float y)
|
||||
{ return _nextafter(x, y); }
|
||||
extern __inline__ double scalb (double x, long i)
|
||||
{ return _scalb (x, i); }
|
||||
extern __inline__ float scalbf (float x, long i)
|
||||
{ return _scalb(x, i); }
|
||||
#endif /* (__STRICT_ANSI__) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
#endif /* Not _MATH_H_ */
|
||||
|
||||
/*
|
||||
* math.h
|
||||
*
|
||||
* Mathematical functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MATH_H_
|
||||
#define _MATH_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* Types for the _exception structure.
|
||||
*/
|
||||
|
||||
#define _DOMAIN 1 /* domain error in argument */
|
||||
#define _SING 2 /* singularity */
|
||||
#define _OVERFLOW 3 /* range overflow */
|
||||
#define _UNDERFLOW 4 /* range underflow */
|
||||
#define _TLOSS 5 /* total loss of precision */
|
||||
#define _PLOSS 6 /* partial loss of precision */
|
||||
|
||||
/*
|
||||
* Exception types with non-ANSI names for compatibility.
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#define DOMAIN _DOMAIN
|
||||
#define SING _SING
|
||||
#define OVERFLOW _OVERFLOW
|
||||
#define UNDERFLOW _UNDERFLOW
|
||||
#define TLOSS _TLOSS
|
||||
#define PLOSS _PLOSS
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
||||
/* These are also defined in Mingw float.h; needed here as well to work
|
||||
around GCC build issues. */
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef __MINGW_FPCLASS_DEFINED
|
||||
#define __MINGW_FPCLASS_DEFINED 1
|
||||
/* IEEE 754 classication */
|
||||
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
|
||||
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
|
||||
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
|
||||
#define _FPCLASS_NN 0x0008 /* Negative Normal */
|
||||
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
|
||||
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
|
||||
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
|
||||
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
|
||||
#define _FPCLASS_PN 0x0100 /* Positive Normal */
|
||||
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
|
||||
#endif /* __MINGW_FPCLASS_DEFINED */
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* HUGE_VAL is returned by strtod when the value would overflow the
|
||||
* representation of 'double'. There are other uses as well.
|
||||
*
|
||||
* __imp__HUGE is a pointer to the actual variable _HUGE in
|
||||
* MSVCRT.DLL. If we used _HUGE directly we would get a pointer
|
||||
* to a thunk function.
|
||||
*
|
||||
* NOTE: The CRTDLL version uses _HUGE_dll instead.
|
||||
*/
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
extern double* __imp__HUGE;
|
||||
#define HUGE_VAL (*__imp__HUGE)
|
||||
#else
|
||||
/* CRTDLL */
|
||||
extern double* __imp__HUGE_dll;
|
||||
#define HUGE_VAL (*__imp__HUGE_dll)
|
||||
#endif
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT double _HUGE;
|
||||
#define HUGE_VAL _HUGE
|
||||
#else
|
||||
/* CRTDLL */
|
||||
__MINGW_IMPORT double _HUGE_dll;
|
||||
#define HUGE_VAL _HUGE_dll
|
||||
#endif
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
struct _exception
|
||||
{
|
||||
int type;
|
||||
char *name;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double retval;
|
||||
};
|
||||
|
||||
|
||||
double sin (double);
|
||||
double cos (double);
|
||||
double tan (double);
|
||||
double sinh (double);
|
||||
double cosh (double);
|
||||
double tanh (double);
|
||||
double asin (double);
|
||||
double acos (double);
|
||||
double atan (double);
|
||||
double atan2 (double, double);
|
||||
double exp (double);
|
||||
double log (double);
|
||||
double log10 (double);
|
||||
double pow (double, double);
|
||||
double sqrt (double);
|
||||
double ceil (double);
|
||||
double floor (double);
|
||||
double fabs (double);
|
||||
double ldexp (double, int);
|
||||
double frexp (double, int*);
|
||||
double modf (double, double*);
|
||||
double fmod (double, double);
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
/* Complex number (for cabs) */
|
||||
struct _complex
|
||||
{
|
||||
double x; /* Real part */
|
||||
double y; /* Imaginary part */
|
||||
};
|
||||
|
||||
double _cabs (struct _complex);
|
||||
double _hypot (double, double);
|
||||
double _j0 (double);
|
||||
double _j1 (double);
|
||||
double _jn (int, double);
|
||||
double _y0 (double);
|
||||
double _y1 (double);
|
||||
double _yn (int, double);
|
||||
int _matherr (struct _exception *);
|
||||
|
||||
/* These are also declared in Mingw float.h; needed here as well to work
|
||||
around GCC build issues. */
|
||||
/* BEGIN FLOAT.H COPY */
|
||||
/*
|
||||
* IEEE recommended functions
|
||||
*/
|
||||
|
||||
double _chgsign (double);
|
||||
double _copysign (double, double);
|
||||
double _logb (double);
|
||||
double _nextafter (double, double);
|
||||
double _scalb (double, long);
|
||||
|
||||
int _finite (double);
|
||||
int _fpclass (double);
|
||||
int _isnan (double);
|
||||
|
||||
/* END FLOAT.H COPY */
|
||||
|
||||
#if !defined (_NO_OLDNAMES) \
|
||||
|| (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L )
|
||||
|
||||
/*
|
||||
* Non-underscored versions of non-ANSI functions. These reside in
|
||||
* liboldnames.a. They are now also ISO C99 standand names.
|
||||
* Provided for extra portability.
|
||||
*/
|
||||
|
||||
double cabs (struct _complex);
|
||||
double hypot (double, double);
|
||||
double j0 (double);
|
||||
double j1 (double);
|
||||
double jn (int, double);
|
||||
double y0 (double);
|
||||
double y1 (double);
|
||||
double yn (int, double);
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
|
||||
#ifndef __NO_ISOCEXT
|
||||
|
||||
#define INFINITY HUGE_VAL
|
||||
#define NAN (0.0F/0.0F)
|
||||
|
||||
/*
|
||||
Return values for fpclassify.
|
||||
These are based on Intel x87 fpu condition codes
|
||||
in the high byte of status word and differ from
|
||||
the return values for MS IEEE 754 extension _fpclass()
|
||||
*/
|
||||
#define FP_NAN 0x0100
|
||||
#define FP_NORMAL 0x0400
|
||||
#define FP_INFINITE (FP_NAN | FP_NORMAL)
|
||||
#define FP_ZERO 0x4000
|
||||
#define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
|
||||
/* 0x0200 is signbit mask */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
double nan(const char *tagp);
|
||||
float nanf(const char *tagp);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#define nan() nan("")
|
||||
#define nanf() nanf("")
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
We can't inline float, because we want to ensure truncation
|
||||
to semantic type before classification. If we extend to long
|
||||
double, we will also need to make double extern only.
|
||||
(A normal long double value might become subnormal when
|
||||
converted to double, and zero when converted to float.)
|
||||
*/
|
||||
extern __inline__ int __fpclassify (double x){
|
||||
unsigned short sw;
|
||||
__asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
|
||||
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
|
||||
}
|
||||
|
||||
extern int __fpclassifyf (float);
|
||||
|
||||
#define fpclassify(x) ((sizeof(x) == sizeof(float)) ? __fpclassifyf(x) \
|
||||
: __fpclassify(x))
|
||||
|
||||
/* We don't need to worry about trucation here:
|
||||
A NaN stays a NaN. */
|
||||
|
||||
extern __inline__ int __isnan (double _x)
|
||||
{
|
||||
unsigned short sw;
|
||||
__asm__ ("fxam;"
|
||||
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
||||
== FP_NAN;
|
||||
}
|
||||
|
||||
extern __inline__ int __isnanf (float _x)
|
||||
{
|
||||
unsigned short sw;
|
||||
__asm__ ("fxam;"
|
||||
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
||||
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
||||
== FP_NAN;
|
||||
}
|
||||
|
||||
#define isnan(x) ((sizeof(x) == sizeof(float)) ? __isnanf(x) \
|
||||
: __isnan(x))
|
||||
|
||||
|
||||
#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
|
||||
#define isinf(x) (fpclassify(x) == FP_INFINITE)
|
||||
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
|
||||
|
||||
|
||||
extern __inline__ int __signbit (double x) {
|
||||
unsigned short stw;
|
||||
__asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
||||
return stw & 0x0200;
|
||||
}
|
||||
|
||||
extern __inline__ int __signbitf (float x) {
|
||||
unsigned short stw;
|
||||
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
||||
return stw & 0x0200;
|
||||
}
|
||||
|
||||
#define signbit(x) ((sizeof(x) == sizeof(float)) ? __signbitf(x) \
|
||||
: __signbit(x))
|
||||
/*
|
||||
* With these functions, comparisons involving quiet NaNs set the FP
|
||||
* condition code to "unordered". The IEEE floating-point spec
|
||||
* dictates that the result of floating-point comparisons should be
|
||||
* false whenever a NaN is involved, with the exception of the !=,
|
||||
* which always returns true.
|
||||
*/
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
|
||||
#define isgreater(x, y) __builtin_isgreater(x, y)
|
||||
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
|
||||
#define isless(x, y) __builtin_isless(x, y)
|
||||
#define islessequal(x, y) __builtin_islessequal(x, y)
|
||||
#define islessgreater(x, y) __builtin_islessgreater(x, y)
|
||||
#define isunordered(x, y) __builtin_isunordered(x, y)
|
||||
|
||||
#else
|
||||
/* helper */
|
||||
extern __inline__ int __fp_unordered_compare (double x, double y){
|
||||
unsigned short retval;
|
||||
__asm__ ("fucom %%st(1);"
|
||||
"fnstsw;": "=a" (retval) : "t" (x), "u" (y));
|
||||
return retval;
|
||||
}
|
||||
|
||||
#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& 0x4500) == 0)
|
||||
#define isless(x, y) ((__fp_unordered_compare (y, x) \
|
||||
& 0x4500) == 0)
|
||||
#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
|
||||
& FP_INFINITE) == 0)
|
||||
#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
|
||||
& FP_INFINITE) == 0)
|
||||
#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& FP_SUBNORMAL) == 0)
|
||||
#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
|
||||
& 0x4500) == 0x4500)
|
||||
|
||||
#endif
|
||||
|
||||
/* round, using fpu control word settings */
|
||||
extern __inline__ double rint (double x)
|
||||
{
|
||||
double retval;
|
||||
__asm__ ("frndint;": "=t" (retval) : "0" (x));
|
||||
return retval;
|
||||
}
|
||||
|
||||
extern __inline__ float rintf (float x)
|
||||
{
|
||||
float retval;
|
||||
__asm__ ("frndint;" : "=t" (retval) : "0" (x) );
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* round away from zero, regardless of fpu control word settings */
|
||||
extern double round (double);
|
||||
extern float roundf (float);
|
||||
|
||||
/* round towards zero, regardless of fpu control word settings */
|
||||
extern double trunc (double);
|
||||
extern float truncf (float);
|
||||
|
||||
|
||||
/* fmax and fmin.
|
||||
NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the
|
||||
these functions choose the numeric value.
|
||||
*/
|
||||
|
||||
extern double fmax (double, double);
|
||||
extern double fmin (double, double);
|
||||
extern float fmaxf (float, float);
|
||||
float fminf (float, float);
|
||||
|
||||
/* return x * y + z as a ternary op */
|
||||
extern double fma (double, double, double);
|
||||
extern float fmaf (float, float, float);
|
||||
|
||||
/* one lonely transcendental */
|
||||
extern double log2 (double _x);
|
||||
extern float log2f (float _x);
|
||||
|
||||
/* The underscored versions are in MSVCRT.dll.
|
||||
The stubs for these are in libmingwex.a */
|
||||
|
||||
double copysign (double, double);
|
||||
float copysignf (float, float);
|
||||
double logb (double);
|
||||
float logbf (float);
|
||||
double nextafter (double, double);
|
||||
float nextafterf (float, float);
|
||||
double scalb (double, long);
|
||||
float scalbf (float, long);
|
||||
|
||||
#if !defined (__STRICT_ANSI__) /* inline using non-ANSI functions */
|
||||
extern __inline__ double copysign (double x, double y)
|
||||
{ return _copysign(x, y); }
|
||||
extern __inline__ float copysignf (float x, float y)
|
||||
{ return _copysign(x, y); }
|
||||
extern __inline__ double logb (double x)
|
||||
{ return _logb(x); }
|
||||
extern __inline__ float logbf (float x)
|
||||
{ return _logb(x); }
|
||||
extern __inline__ double nextafter(double x, double y)
|
||||
{ return _nextafter(x, y); }
|
||||
extern __inline__ float nextafterf(float x, float y)
|
||||
{ return _nextafter(x, y); }
|
||||
extern __inline__ double scalb (double x, long i)
|
||||
{ return _scalb (x, i); }
|
||||
extern __inline__ float scalbf (float x, long i)
|
||||
{ return _scalb(x, i); }
|
||||
#endif /* (__STRICT_ANSI__) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
#endif /* Not _MATH_H_ */
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* mem.h maps to string.h
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <string.h>
|
||||
#endif
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* mem.h maps to string.h
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* memory.h maps to the standard string.h header.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* memory.h maps to the standard string.h header.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
|
@ -1,158 +1,158 @@
|
||||
/*
|
||||
* process.h
|
||||
*
|
||||
* Function calls for spawning child processes.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _PROCESS_H_
|
||||
#define _PROCESS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/* Includes a definition of _pid_t and pid_t */
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Constants for cwait actions.
|
||||
* Obsolete for Win32.
|
||||
*/
|
||||
#define _WAIT_CHILD 0
|
||||
#define _WAIT_GRANDCHILD 1
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#define WAIT_CHILD _WAIT_CHILD
|
||||
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
/*
|
||||
* Mode constants for spawn functions.
|
||||
*/
|
||||
#define _P_WAIT 0
|
||||
#define _P_NOWAIT 1
|
||||
#define _P_OVERLAY 2
|
||||
#define _OLD_P_OVERLAY _P_OVERLAY
|
||||
#define _P_NOWAITO 3
|
||||
#define _P_DETACH 4
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#define P_WAIT _P_WAIT
|
||||
#define P_NOWAIT _P_NOWAIT
|
||||
#define P_OVERLAY _P_OVERLAY
|
||||
#define OLD_P_OVERLAY _OLD_P_OVERLAY
|
||||
#define P_NOWAITO _P_NOWAITO
|
||||
#define P_DETACH _P_DETACH
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void _cexit(void);
|
||||
void _c_exit(void);
|
||||
|
||||
int _cwait (int*, _pid_t, int);
|
||||
|
||||
_pid_t _getpid(void);
|
||||
|
||||
int _execl (const char*, const char*, ...);
|
||||
int _execle (const char*, const char*, ...);
|
||||
int _execlp (const char*, const char*, ...);
|
||||
int _execlpe (const char*, const char*, ...);
|
||||
int _execv (const char*, char* const*);
|
||||
int _execve (const char*, char* const*, char* const*);
|
||||
int _execvp (const char*, char* const*);
|
||||
int _execvpe (const char*, char* const*, char* const*);
|
||||
|
||||
int _spawnl (int, const char*, const char*, ...);
|
||||
int _spawnle (int, const char*, const char*, ...);
|
||||
int _spawnlp (int, const char*, const char*, ...);
|
||||
int _spawnlpe (int, const char*, const char*, ...);
|
||||
int _spawnv (int, const char*, char* const*);
|
||||
int _spawnve (int, const char*, char* const*, char* const*);
|
||||
int _spawnvp (int, const char*, char* const*);
|
||||
int _spawnvpe (int, const char*, char* const*, char* const*);
|
||||
|
||||
/*
|
||||
* The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
|
||||
* They are provided by MSVCRT.
|
||||
*
|
||||
* NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
|
||||
* making for race conditions if you are not careful. Basically you have to
|
||||
* make sure that no-one is going to do *anything* with the thread handle
|
||||
* after the thread calls _endthread or returns from the thread function.
|
||||
*
|
||||
* NOTE: No old names for these functions. Use the underscore.
|
||||
*/
|
||||
unsigned long
|
||||
_beginthread (void (*)(void *), unsigned, void*);
|
||||
void _endthread (void);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
unsigned long
|
||||
_beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
|
||||
void*, unsigned, unsigned*);
|
||||
void _endthreadex (unsigned);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* Functions without the leading underscore, for portability. These functions
|
||||
* live in liboldnames.a.
|
||||
*/
|
||||
int cwait (int*, pid_t, int);
|
||||
pid_t getpid (void);
|
||||
int execl (const char*, const char*, ...);
|
||||
int execle (const char*, const char*, ...);
|
||||
int execlp (const char*, const char*, ...);
|
||||
int execlpe (const char*, const char*, ...);
|
||||
int execv (const char*, char* const*);
|
||||
int execve (const char*, char* const*, char* const*);
|
||||
int execvp (const char*, char* const*);
|
||||
int execvpe (const char*, char* const*, char* const*);
|
||||
int spawnl (int, const char*, const char*, ...);
|
||||
int spawnle (int, const char*, const char*, ...);
|
||||
int spawnlp (int, const char*, const char*, ...);
|
||||
int spawnlpe (int, const char*, const char*, ...);
|
||||
int spawnv (int, const char*, char* const*);
|
||||
int spawnve (int, const char*, char* const*, char* const*);
|
||||
int spawnvp (int, const char*, char* const*);
|
||||
int spawnvpe (int, const char*, char* const*, char* const*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _PROCESS_H_ not defined */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* process.h
|
||||
*
|
||||
* Function calls for spawning child processes.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _PROCESS_H_
|
||||
#define _PROCESS_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/* Includes a definition of _pid_t and pid_t */
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Constants for cwait actions.
|
||||
* Obsolete for Win32.
|
||||
*/
|
||||
#define _WAIT_CHILD 0
|
||||
#define _WAIT_GRANDCHILD 1
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#define WAIT_CHILD _WAIT_CHILD
|
||||
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
/*
|
||||
* Mode constants for spawn functions.
|
||||
*/
|
||||
#define _P_WAIT 0
|
||||
#define _P_NOWAIT 1
|
||||
#define _P_OVERLAY 2
|
||||
#define _OLD_P_OVERLAY _P_OVERLAY
|
||||
#define _P_NOWAITO 3
|
||||
#define _P_DETACH 4
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
#define P_WAIT _P_WAIT
|
||||
#define P_NOWAIT _P_NOWAIT
|
||||
#define P_OVERLAY _P_OVERLAY
|
||||
#define OLD_P_OVERLAY _OLD_P_OVERLAY
|
||||
#define P_NOWAITO _P_NOWAITO
|
||||
#define P_DETACH _P_DETACH
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void _cexit(void);
|
||||
void _c_exit(void);
|
||||
|
||||
int _cwait (int*, _pid_t, int);
|
||||
|
||||
_pid_t _getpid(void);
|
||||
|
||||
int _execl (const char*, const char*, ...);
|
||||
int _execle (const char*, const char*, ...);
|
||||
int _execlp (const char*, const char*, ...);
|
||||
int _execlpe (const char*, const char*, ...);
|
||||
int _execv (const char*, char* const*);
|
||||
int _execve (const char*, char* const*, char* const*);
|
||||
int _execvp (const char*, char* const*);
|
||||
int _execvpe (const char*, char* const*, char* const*);
|
||||
|
||||
int _spawnl (int, const char*, const char*, ...);
|
||||
int _spawnle (int, const char*, const char*, ...);
|
||||
int _spawnlp (int, const char*, const char*, ...);
|
||||
int _spawnlpe (int, const char*, const char*, ...);
|
||||
int _spawnv (int, const char*, char* const*);
|
||||
int _spawnve (int, const char*, char* const*, char* const*);
|
||||
int _spawnvp (int, const char*, char* const*);
|
||||
int _spawnvpe (int, const char*, char* const*, char* const*);
|
||||
|
||||
/*
|
||||
* The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
|
||||
* They are provided by MSVCRT.
|
||||
*
|
||||
* NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
|
||||
* making for race conditions if you are not careful. Basically you have to
|
||||
* make sure that no-one is going to do *anything* with the thread handle
|
||||
* after the thread calls _endthread or returns from the thread function.
|
||||
*
|
||||
* NOTE: No old names for these functions. Use the underscore.
|
||||
*/
|
||||
unsigned long
|
||||
_beginthread (void (*)(void *), unsigned, void*);
|
||||
void _endthread (void);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
unsigned long
|
||||
_beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
|
||||
void*, unsigned, unsigned*);
|
||||
void _endthreadex (unsigned);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* Functions without the leading underscore, for portability. These functions
|
||||
* live in liboldnames.a.
|
||||
*/
|
||||
int cwait (int*, pid_t, int);
|
||||
pid_t getpid (void);
|
||||
int execl (const char*, const char*, ...);
|
||||
int execle (const char*, const char*, ...);
|
||||
int execlp (const char*, const char*, ...);
|
||||
int execlpe (const char*, const char*, ...);
|
||||
int execv (const char*, char* const*);
|
||||
int execve (const char*, char* const*, char* const*);
|
||||
int execvp (const char*, char* const*);
|
||||
int execvpe (const char*, char* const*, char* const*);
|
||||
int spawnl (int, const char*, const char*, ...);
|
||||
int spawnle (int, const char*, const char*, ...);
|
||||
int spawnlp (int, const char*, const char*, ...);
|
||||
int spawnlpe (int, const char*, const char*, ...);
|
||||
int spawnv (int, const char*, char* const*);
|
||||
int spawnve (int, const char*, char* const*, char* const*);
|
||||
int spawnvp (int, const char*, char* const*);
|
||||
int spawnvpe (int, const char*, char* const*, char* const*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _PROCESS_H_ not defined */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,72 +1,72 @@
|
||||
/*
|
||||
* setjmp.h
|
||||
*
|
||||
* Declarations supporting setjmp and longjump, a method for avoiding
|
||||
* the normal function call return sequence. (Bleah!)
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SETJMP_H_
|
||||
#define _SETJMP_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The buffer used by setjmp to store the information used by longjmp
|
||||
* to perform it's evil goto-like work. The size of this buffer was
|
||||
* determined through experimentation; it's contents are a mystery.
|
||||
* NOTE: This was determined on an i386 (actually a Pentium). The
|
||||
* contents could be different on an Alpha or something else.
|
||||
*/
|
||||
#define _JBLEN 16
|
||||
#define _JBTYPE int
|
||||
typedef _JBTYPE jmp_buf[_JBLEN];
|
||||
|
||||
/*
|
||||
* The function provided by CRTDLL which appears to do the actual work
|
||||
* of setjmp.
|
||||
*/
|
||||
int _setjmp (jmp_buf);
|
||||
|
||||
#define setjmp(x) _setjmp(x)
|
||||
|
||||
/*
|
||||
* Return to the last setjmp call and act as if setjmp had returned
|
||||
* nVal (which had better be non-zero!).
|
||||
*/
|
||||
void longjmp (jmp_buf, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _SETJMP_H_ */
|
||||
|
||||
/*
|
||||
* setjmp.h
|
||||
*
|
||||
* Declarations supporting setjmp and longjump, a method for avoiding
|
||||
* the normal function call return sequence. (Bleah!)
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SETJMP_H_
|
||||
#define _SETJMP_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The buffer used by setjmp to store the information used by longjmp
|
||||
* to perform it's evil goto-like work. The size of this buffer was
|
||||
* determined through experimentation; it's contents are a mystery.
|
||||
* NOTE: This was determined on an i386 (actually a Pentium). The
|
||||
* contents could be different on an Alpha or something else.
|
||||
*/
|
||||
#define _JBLEN 16
|
||||
#define _JBTYPE int
|
||||
typedef _JBTYPE jmp_buf[_JBLEN];
|
||||
|
||||
/*
|
||||
* The function provided by CRTDLL which appears to do the actual work
|
||||
* of setjmp.
|
||||
*/
|
||||
int _setjmp (jmp_buf);
|
||||
|
||||
#define setjmp(x) _setjmp(x)
|
||||
|
||||
/*
|
||||
* Return to the last setjmp call and act as if setjmp had returned
|
||||
* nVal (which had better be non-zero!).
|
||||
*/
|
||||
void longjmp (jmp_buf, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _SETJMP_H_ */
|
||||
|
||||
|
@ -1,44 +1,44 @@
|
||||
/*
|
||||
* share.h
|
||||
*
|
||||
* Constants for file sharing functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _SHARE_H_
|
||||
#define _SHARE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define SH_COMPAT 0x00 /* Compatibility */
|
||||
#define SH_DENYRW 0x10 /* Deny read/write */
|
||||
#define SH_DENYWR 0x20 /* Deny write */
|
||||
#define SH_DENYRD 0x30 /* Deny read */
|
||||
#define SH_DENYNO 0x40 /* Deny nothing */
|
||||
|
||||
#endif /* Not _SHARE_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* share.h
|
||||
*
|
||||
* Constants for file sharing functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _SHARE_H_
|
||||
#define _SHARE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define SH_COMPAT 0x00 /* Compatibility */
|
||||
#define SH_DENYRW 0x10 /* Deny read/write */
|
||||
#define SH_DENYWR 0x20 /* Deny write */
|
||||
#define SH_DENYRD 0x30 /* Deny read */
|
||||
#define SH_DENYNO 0x40 /* Deny nothing */
|
||||
|
||||
#endif /* Not _SHARE_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,111 +1,111 @@
|
||||
/*
|
||||
* signal.h
|
||||
*
|
||||
* A way to set handlers for exceptional conditions (also known as signals).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SIGNAL_H_
|
||||
#define _SIGNAL_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* The actual signal values. Using other values with signal
|
||||
* produces a SIG_ERR return value.
|
||||
*
|
||||
* NOTE: SIGINT is produced when the user presses Ctrl-C.
|
||||
* SIGILL has not been tested.
|
||||
* SIGFPE doesn't seem to work?
|
||||
* SIGSEGV does not catch writing to a NULL pointer (that shuts down
|
||||
* your app; can you say "segmentation violation core dump"?).
|
||||
* SIGTERM comes from what kind of termination request exactly?
|
||||
* SIGBREAK is indeed produced by pressing Ctrl-Break.
|
||||
* SIGABRT is produced by calling abort.
|
||||
* TODO: The above results may be related to not installing an appropriate
|
||||
* structured exception handling frame. Results may be better if I ever
|
||||
* manage to get the SEH stuff down.
|
||||
*/
|
||||
#define SIGINT 2 /* Interactive attention */
|
||||
#define SIGILL 4 /* Illegal instruction */
|
||||
#define SIGFPE 8 /* Floating point error */
|
||||
#define SIGSEGV 11 /* Segmentation violation */
|
||||
#define SIGTERM 15 /* Termination request */
|
||||
#define SIGBREAK 21 /* Control-break */
|
||||
#define SIGABRT 22 /* Abnormal termination (abort) */
|
||||
|
||||
#define NSIG 23 /* maximum signal number + 1 */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _SIG_ATOMIC_T_DEFINED
|
||||
typedef int sig_atomic_t;
|
||||
#define _SIG_ATOMIC_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The prototypes (below) are the easy part. The hard part is figuring
|
||||
* out what signals are available and what numbers they are assigned
|
||||
* along with appropriate values of SIG_DFL and SIG_IGN.
|
||||
*/
|
||||
|
||||
/*
|
||||
* A pointer to a signal handler function. A signal handler takes a
|
||||
* single int, which is the signal it handles.
|
||||
*/
|
||||
typedef void (*__p_sig_fn_t)(int);
|
||||
|
||||
/*
|
||||
* These are special values of signal handler pointers which are
|
||||
* used to send a signal to the default handler (SIG_DFL), ignore
|
||||
* the signal (SIG_IGN), or indicate an error return (SIG_ERR).
|
||||
*/
|
||||
#define SIG_DFL ((__p_sig_fn_t) 0)
|
||||
#define SIG_IGN ((__p_sig_fn_t) 1)
|
||||
#define SIG_ERR ((__p_sig_fn_t) -1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Call signal to set the signal handler for signal sig to the
|
||||
* function pointed to by handler. Returns a pointer to the
|
||||
* previous handler, or SIG_ERR if an error occurs. Initially
|
||||
* unhandled signals defined above will return SIG_DFL.
|
||||
*/
|
||||
__p_sig_fn_t signal(int, __p_sig_fn_t);
|
||||
|
||||
/*
|
||||
* Raise the signal indicated by sig. Returns non-zero on success.
|
||||
*/
|
||||
int raise (int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _SIGNAL_H_ */
|
||||
|
||||
/*
|
||||
* signal.h
|
||||
*
|
||||
* A way to set handlers for exceptional conditions (also known as signals).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SIGNAL_H_
|
||||
#define _SIGNAL_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* The actual signal values. Using other values with signal
|
||||
* produces a SIG_ERR return value.
|
||||
*
|
||||
* NOTE: SIGINT is produced when the user presses Ctrl-C.
|
||||
* SIGILL has not been tested.
|
||||
* SIGFPE doesn't seem to work?
|
||||
* SIGSEGV does not catch writing to a NULL pointer (that shuts down
|
||||
* your app; can you say "segmentation violation core dump"?).
|
||||
* SIGTERM comes from what kind of termination request exactly?
|
||||
* SIGBREAK is indeed produced by pressing Ctrl-Break.
|
||||
* SIGABRT is produced by calling abort.
|
||||
* TODO: The above results may be related to not installing an appropriate
|
||||
* structured exception handling frame. Results may be better if I ever
|
||||
* manage to get the SEH stuff down.
|
||||
*/
|
||||
#define SIGINT 2 /* Interactive attention */
|
||||
#define SIGILL 4 /* Illegal instruction */
|
||||
#define SIGFPE 8 /* Floating point error */
|
||||
#define SIGSEGV 11 /* Segmentation violation */
|
||||
#define SIGTERM 15 /* Termination request */
|
||||
#define SIGBREAK 21 /* Control-break */
|
||||
#define SIGABRT 22 /* Abnormal termination (abort) */
|
||||
|
||||
#define NSIG 23 /* maximum signal number + 1 */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _SIG_ATOMIC_T_DEFINED
|
||||
typedef int sig_atomic_t;
|
||||
#define _SIG_ATOMIC_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The prototypes (below) are the easy part. The hard part is figuring
|
||||
* out what signals are available and what numbers they are assigned
|
||||
* along with appropriate values of SIG_DFL and SIG_IGN.
|
||||
*/
|
||||
|
||||
/*
|
||||
* A pointer to a signal handler function. A signal handler takes a
|
||||
* single int, which is the signal it handles.
|
||||
*/
|
||||
typedef void (*__p_sig_fn_t)(int);
|
||||
|
||||
/*
|
||||
* These are special values of signal handler pointers which are
|
||||
* used to send a signal to the default handler (SIG_DFL), ignore
|
||||
* the signal (SIG_IGN), or indicate an error return (SIG_ERR).
|
||||
*/
|
||||
#define SIG_DFL ((__p_sig_fn_t) 0)
|
||||
#define SIG_IGN ((__p_sig_fn_t) 1)
|
||||
#define SIG_ERR ((__p_sig_fn_t) -1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Call signal to set the signal handler for signal sig to the
|
||||
* function pointed to by handler. Returns a pointer to the
|
||||
* previous handler, or SIG_ERR if an error occurs. Initially
|
||||
* unhandled signals defined above will return SIG_DFL.
|
||||
*/
|
||||
__p_sig_fn_t signal(int, __p_sig_fn_t);
|
||||
|
||||
/*
|
||||
* Raise the signal indicated by sig. Returns non-zero on success.
|
||||
*/
|
||||
int raise (int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _SIGNAL_H_ */
|
||||
|
||||
|
@ -1,184 +1,184 @@
|
||||
/* ISO C9x 7.18 Integer types <stdint.h>
|
||||
* Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* Date: 2000-12-02
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _STDINT_H
|
||||
#define _STDINT_H
|
||||
|
||||
/* 7.18.1.1 Exact-width integer types */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef int int32_t;
|
||||
typedef unsigned uint32_t;
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
|
||||
/* 7.18.1.2 Minimum-width integer types */
|
||||
typedef signed char int_least8_t;
|
||||
typedef unsigned char uint_least8_t;
|
||||
typedef short int_least16_t;
|
||||
typedef unsigned short uint_least16_t;
|
||||
typedef int int_least32_t;
|
||||
typedef unsigned uint_least32_t;
|
||||
typedef long long int_least64_t;
|
||||
typedef unsigned long long uint_least64_t;
|
||||
|
||||
/* 7.18.1.3 Fastest minimum-width integer types
|
||||
* Not actually guaranteed to be fastest for all purposes
|
||||
* Here we use the exact-width types for 8 and 16-bit ints.
|
||||
*/
|
||||
typedef char int_fast8_t;
|
||||
typedef unsigned char uint_fast8_t;
|
||||
typedef short int_fast16_t;
|
||||
typedef unsigned short uint_fast16_t;
|
||||
typedef int int_fast32_t;
|
||||
typedef unsigned int uint_fast32_t;
|
||||
typedef long long int_fast64_t;
|
||||
typedef unsigned long long uint_fast64_t;
|
||||
|
||||
/* 7.18.1.4 Integer types capable of holding object pointers */
|
||||
typedef int intptr_t;
|
||||
typedef unsigned uintptr_t;
|
||||
|
||||
/* 7.18.1.5 Greatest-width integer types */
|
||||
typedef long long intmax_t;
|
||||
typedef unsigned long long uintmax_t;
|
||||
|
||||
/* 7.18.2 Limits of specified-width integer types */
|
||||
#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
|
||||
|
||||
/* 7.18.2.1 Limits of exact-width integer types */
|
||||
#define INT8_MIN (-128)
|
||||
#define INT16_MIN (-32768)
|
||||
#define INT32_MIN (-2147483647 - 1)
|
||||
#define INT64_MIN (-9223372036854775807LL - 1)
|
||||
|
||||
#define INT8_MAX 127
|
||||
#define INT16_MAX 32767
|
||||
#define INT32_MAX 2147483647
|
||||
#define INT64_MAX 9223372036854775807LL
|
||||
|
||||
#define UINT8_MAX 0xff /* 255U */
|
||||
#define UINT16_MAX 0xffff /* 65535U */
|
||||
#define UINT32_MAX 0xffffffff /* 4294967295U */
|
||||
#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
|
||||
|
||||
/* 7.18.2.2 Limits of minimum-width integer types */
|
||||
#define INT_LEAST8_MIN INT8_MIN
|
||||
#define INT_LEAST16_MIN INT16_MIN
|
||||
#define INT_LEAST32_MIN INT32_MIN
|
||||
#define INT_LEAST64_MIN INT64_MIN
|
||||
|
||||
#define INT_LEAST8_MAX INT8_MAX
|
||||
#define INT_LEAST16_MAX INT16_MAX
|
||||
#define INT_LEAST32_MAX INT32_MAX
|
||||
#define INT_LEAST64_MAX INT64_MAX
|
||||
|
||||
#define UINT_LEAST8_MAX UINT8_MAX
|
||||
#define UINT_LEAST16_MAX UINT16_MAX
|
||||
#define UINT_LEAST32_MAX UINT32_MAX
|
||||
#define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.2.3 Limits of fastest minimum-width integer types */
|
||||
#define INT_FAST8_MIN INT8_MIN
|
||||
#define INT_FAST16_MIN INT16_MIN
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
#define INT_FAST64_MIN INT64_MIN
|
||||
|
||||
#define INT_FAST8_MAX INT8_MAX
|
||||
#define INT_FAST16_MAX INT16_MAX
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
#define INT_FAST64_MAX INT64_MAX
|
||||
|
||||
#define UINT_FAST8_MAX UINT8_MAX
|
||||
#define UINT_FAST16_MAX UINT16_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.2.4 Limits of integer types capable of holding
|
||||
object pointers */
|
||||
#define INTPTR_MIN INT32_MIN
|
||||
#define INTPTR_MAX INT32_MAX
|
||||
#define UINTPTR_MAX UINT32_MAX
|
||||
|
||||
/* 7.18.2.5 Limits of greatest-width integer types */
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
#define INTMAX_MAX INT64_MAX
|
||||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.3 Limits of other integer types */
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
|
||||
#define SIG_ATOMIC_MIN INT32_MIN
|
||||
#define SIG_ATOMIC_MAX INT32_MAX
|
||||
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
|
||||
#ifndef WCHAR_MIN /* also in wchar.h */
|
||||
#define WCHAR_MIN 0
|
||||
#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* wint_t is unsigned int in __MINGW32__,
|
||||
* but unsigned short in MS runtime
|
||||
*/
|
||||
#define WINT_MIN 0
|
||||
#define WINT_MAX UINT32_MAX
|
||||
|
||||
#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
|
||||
|
||||
|
||||
/* 7.18.4 Macros for integer constants */
|
||||
#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
|
||||
|
||||
/* 7.18.4.1 Macros for minimum-width integer constants
|
||||
|
||||
Accoding to Douglas Gwyn <gwyn@arl.mil>:
|
||||
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
|
||||
9899:1999 as initially published, the expansion was required
|
||||
to be an integer constant of precisely matching type, which
|
||||
is impossible to accomplish for the shorter types on most
|
||||
platforms, because C99 provides no standard way to designate
|
||||
an integer constant with width less than that of type int.
|
||||
TC1 changed this to require just an integer constant
|
||||
*expression* with *promoted* type."
|
||||
|
||||
The trick used here is from Clive D W Feather.
|
||||
*/
|
||||
|
||||
#define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
|
||||
#define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
|
||||
#define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
|
||||
#define INT64_C(val) (INT_LEAST64_MAX-INT_LEAST64_MAX+(val))
|
||||
|
||||
#define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
|
||||
#define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
|
||||
#define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
|
||||
#define UINT64_C(val) (UINT_LEAST64_MAX-UINT_LEAST64_MAX+(val))
|
||||
|
||||
/* 7.18.4.2 Macros for greatest-width integer constants */
|
||||
#define INTMAX_C(val) (INTMAX_MAX-INTMAX_MAX+(val))
|
||||
#define UINTMAX_C(val) (UINTMAX_MAX-UINTMAX_MAX+(val))
|
||||
|
||||
#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
|
||||
|
||||
#endif
|
||||
/* ISO C9x 7.18 Integer types <stdint.h>
|
||||
* Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* Date: 2000-12-02
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _STDINT_H
|
||||
#define _STDINT_H
|
||||
|
||||
/* 7.18.1.1 Exact-width integer types */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef int int32_t;
|
||||
typedef unsigned uint32_t;
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
|
||||
/* 7.18.1.2 Minimum-width integer types */
|
||||
typedef signed char int_least8_t;
|
||||
typedef unsigned char uint_least8_t;
|
||||
typedef short int_least16_t;
|
||||
typedef unsigned short uint_least16_t;
|
||||
typedef int int_least32_t;
|
||||
typedef unsigned uint_least32_t;
|
||||
typedef long long int_least64_t;
|
||||
typedef unsigned long long uint_least64_t;
|
||||
|
||||
/* 7.18.1.3 Fastest minimum-width integer types
|
||||
* Not actually guaranteed to be fastest for all purposes
|
||||
* Here we use the exact-width types for 8 and 16-bit ints.
|
||||
*/
|
||||
typedef char int_fast8_t;
|
||||
typedef unsigned char uint_fast8_t;
|
||||
typedef short int_fast16_t;
|
||||
typedef unsigned short uint_fast16_t;
|
||||
typedef int int_fast32_t;
|
||||
typedef unsigned int uint_fast32_t;
|
||||
typedef long long int_fast64_t;
|
||||
typedef unsigned long long uint_fast64_t;
|
||||
|
||||
/* 7.18.1.4 Integer types capable of holding object pointers */
|
||||
typedef int intptr_t;
|
||||
typedef unsigned uintptr_t;
|
||||
|
||||
/* 7.18.1.5 Greatest-width integer types */
|
||||
typedef long long intmax_t;
|
||||
typedef unsigned long long uintmax_t;
|
||||
|
||||
/* 7.18.2 Limits of specified-width integer types */
|
||||
#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
|
||||
|
||||
/* 7.18.2.1 Limits of exact-width integer types */
|
||||
#define INT8_MIN (-128)
|
||||
#define INT16_MIN (-32768)
|
||||
#define INT32_MIN (-2147483647 - 1)
|
||||
#define INT64_MIN (-9223372036854775807LL - 1)
|
||||
|
||||
#define INT8_MAX 127
|
||||
#define INT16_MAX 32767
|
||||
#define INT32_MAX 2147483647
|
||||
#define INT64_MAX 9223372036854775807LL
|
||||
|
||||
#define UINT8_MAX 0xff /* 255U */
|
||||
#define UINT16_MAX 0xffff /* 65535U */
|
||||
#define UINT32_MAX 0xffffffff /* 4294967295U */
|
||||
#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
|
||||
|
||||
/* 7.18.2.2 Limits of minimum-width integer types */
|
||||
#define INT_LEAST8_MIN INT8_MIN
|
||||
#define INT_LEAST16_MIN INT16_MIN
|
||||
#define INT_LEAST32_MIN INT32_MIN
|
||||
#define INT_LEAST64_MIN INT64_MIN
|
||||
|
||||
#define INT_LEAST8_MAX INT8_MAX
|
||||
#define INT_LEAST16_MAX INT16_MAX
|
||||
#define INT_LEAST32_MAX INT32_MAX
|
||||
#define INT_LEAST64_MAX INT64_MAX
|
||||
|
||||
#define UINT_LEAST8_MAX UINT8_MAX
|
||||
#define UINT_LEAST16_MAX UINT16_MAX
|
||||
#define UINT_LEAST32_MAX UINT32_MAX
|
||||
#define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.2.3 Limits of fastest minimum-width integer types */
|
||||
#define INT_FAST8_MIN INT8_MIN
|
||||
#define INT_FAST16_MIN INT16_MIN
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
#define INT_FAST64_MIN INT64_MIN
|
||||
|
||||
#define INT_FAST8_MAX INT8_MAX
|
||||
#define INT_FAST16_MAX INT16_MAX
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
#define INT_FAST64_MAX INT64_MAX
|
||||
|
||||
#define UINT_FAST8_MAX UINT8_MAX
|
||||
#define UINT_FAST16_MAX UINT16_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.2.4 Limits of integer types capable of holding
|
||||
object pointers */
|
||||
#define INTPTR_MIN INT32_MIN
|
||||
#define INTPTR_MAX INT32_MAX
|
||||
#define UINTPTR_MAX UINT32_MAX
|
||||
|
||||
/* 7.18.2.5 Limits of greatest-width integer types */
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
#define INTMAX_MAX INT64_MAX
|
||||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
/* 7.18.3 Limits of other integer types */
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
|
||||
#define SIG_ATOMIC_MIN INT32_MIN
|
||||
#define SIG_ATOMIC_MAX INT32_MAX
|
||||
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
|
||||
#ifndef WCHAR_MIN /* also in wchar.h */
|
||||
#define WCHAR_MIN 0
|
||||
#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* wint_t is unsigned int in __MINGW32__,
|
||||
* but unsigned short in MS runtime
|
||||
*/
|
||||
#define WINT_MIN 0
|
||||
#define WINT_MAX UINT32_MAX
|
||||
|
||||
#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
|
||||
|
||||
|
||||
/* 7.18.4 Macros for integer constants */
|
||||
#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
|
||||
|
||||
/* 7.18.4.1 Macros for minimum-width integer constants
|
||||
|
||||
Accoding to Douglas Gwyn <gwyn@arl.mil>:
|
||||
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
|
||||
9899:1999 as initially published, the expansion was required
|
||||
to be an integer constant of precisely matching type, which
|
||||
is impossible to accomplish for the shorter types on most
|
||||
platforms, because C99 provides no standard way to designate
|
||||
an integer constant with width less than that of type int.
|
||||
TC1 changed this to require just an integer constant
|
||||
*expression* with *promoted* type."
|
||||
|
||||
The trick used here is from Clive D W Feather.
|
||||
*/
|
||||
|
||||
#define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
|
||||
#define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
|
||||
#define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
|
||||
#define INT64_C(val) (INT_LEAST64_MAX-INT_LEAST64_MAX+(val))
|
||||
|
||||
#define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
|
||||
#define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
|
||||
#define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
|
||||
#define UINT64_C(val) (UINT_LEAST64_MAX-UINT_LEAST64_MAX+(val))
|
||||
|
||||
/* 7.18.4.2 Macros for greatest-width integer constants */
|
||||
#define INTMAX_C(val) (INTMAX_MAX-INTMAX_MAX+(val))
|
||||
#define UINTMAX_C(val) (UINTMAX_MAX-UINTMAX_MAX+(val))
|
||||
|
||||
#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
|
||||
|
||||
#endif
|
||||
|
@ -1,413 +1,413 @@
|
||||
/*
|
||||
* stdio.h
|
||||
*
|
||||
* Definitions of types and prototypes of functions for standard input and
|
||||
* output.
|
||||
*
|
||||
* NOTE: The file manipulation functions provided by Microsoft seem to
|
||||
* work with either slash (/) or backslash (\) as the path separator.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STDIO_H_
|
||||
#define _STDIO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_NULL
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
|
||||
/* Flags for the iobuf structure */
|
||||
#define _IOREAD 1
|
||||
#define _IOWRT 2
|
||||
#define _IORW 0x0080 /* opened as "r+w" */
|
||||
|
||||
|
||||
/*
|
||||
* The three standard file pointers provided by the run time library.
|
||||
* NOTE: These will go to the bit-bucket silently in GUI applications!
|
||||
*/
|
||||
#define STDIN_FILENO 0
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
/* Returned by various functions on end of file condition or error. */
|
||||
#define EOF (-1)
|
||||
|
||||
/*
|
||||
* The maximum length of a file name. You should use GetVolumeInformation
|
||||
* instead of this constant. But hey, this works.
|
||||
*
|
||||
* NOTE: This is used in the structure _finddata_t (see io.h) so changing it
|
||||
* is probably not a good idea.
|
||||
*/
|
||||
#define FILENAME_MAX (260)
|
||||
|
||||
/*
|
||||
* The maximum number of files that may be open at once. I have set this to
|
||||
* a conservative number. The actual value may be higher.
|
||||
*/
|
||||
#define FOPEN_MAX (20)
|
||||
|
||||
/* After creating this many names, tmpnam and tmpfile return NULL */
|
||||
#define TMP_MAX 32767
|
||||
/*
|
||||
* Tmpnam, tmpfile and, sometimes, _tempnam try to create
|
||||
* temp files in the root directory of the current drive
|
||||
* (not in pwd, as suggested by some older MS doc's).
|
||||
* Redefining these macros does not effect the CRT functions.
|
||||
*/
|
||||
#define _P_tmpdir "\\"
|
||||
#define _wP_tmpdir L"\\"
|
||||
|
||||
/*
|
||||
* The maximum size of name (including NUL) that will be put in the user
|
||||
* supplied buffer caName for tmpnam.
|
||||
* Inferred from the size of the static buffer returned by tmpnam
|
||||
* when passed a NULL argument. May actually be smaller.
|
||||
*/
|
||||
#define L_tmpnam (16)
|
||||
|
||||
#define _IOFBF 0x0000
|
||||
#define _IOLBF 0x0040
|
||||
#define _IONBF 0x0004
|
||||
|
||||
/*
|
||||
* The buffer size as used by setbuf such that it is equivalent to
|
||||
* (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
|
||||
*/
|
||||
#define BUFSIZ 512
|
||||
|
||||
/* Constants for nOrigin indicating the position relative to which fseek
|
||||
* sets the file position. Enclosed in ifdefs because io.h could also
|
||||
* define them. (Though not anymore since io.h includes this file now.) */
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET (0)
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR (1)
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END (2)
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* I used to include stdarg.h at this point, in order to allow for the
|
||||
* functions later on in the file which use va_list. That conflicts with
|
||||
* using stdio.h and varargs.h in the same file, so I do the typedef myself.
|
||||
*/
|
||||
#ifndef _VA_LIST
|
||||
#define _VA_LIST
|
||||
#if defined __GNUC__ && __GNUC__ >= 3
|
||||
typedef __builtin_va_list va_list;
|
||||
#else
|
||||
typedef char* va_list;
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* The structure underlying the FILE type.
|
||||
*
|
||||
* I still believe that nobody in their right mind should make use of the
|
||||
* internals of this structure. Provided by Pedro A. Aranda Gutiirrez
|
||||
* <paag@tid.es>.
|
||||
*/
|
||||
#ifndef _FILE_DEFINED
|
||||
#define _FILE_DEFINED
|
||||
typedef struct _iobuf
|
||||
{
|
||||
char* _ptr;
|
||||
int _cnt;
|
||||
char* _base;
|
||||
int _flag;
|
||||
int _file;
|
||||
int _charbuf;
|
||||
int _bufsiz;
|
||||
char* _tmpfname;
|
||||
} FILE;
|
||||
#endif /* Not _FILE_DEFINED */
|
||||
|
||||
|
||||
/*
|
||||
* The standard file handles
|
||||
*/
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern FILE (*__imp__iob)[]; /* A pointer to an array of FILE */
|
||||
|
||||
#define _iob (*__imp__iob) /* An array of FILE */
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#define stdin (&_iob[STDIN_FILENO])
|
||||
#define stdout (&_iob[STDOUT_FILENO])
|
||||
#define stderr (&_iob[STDERR_FILENO])
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* File Operations
|
||||
*/
|
||||
FILE* fopen (const char*, const char*);
|
||||
FILE* freopen (const char*, const char*, FILE*);
|
||||
int fflush (FILE*);
|
||||
int fclose (FILE*);
|
||||
/* MS puts remove & rename (but not wide versions) in io.h also */
|
||||
int remove (const char*);
|
||||
int rename (const char*, const char*);
|
||||
FILE* tmpfile (void);
|
||||
char* tmpnam (char*);
|
||||
char* _tempnam (const char*, const char*);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
char* tempnam (const char*, const char*);
|
||||
#endif
|
||||
|
||||
int setvbuf (FILE*, char*, int, size_t);
|
||||
|
||||
void setbuf (FILE*, char*);
|
||||
|
||||
/*
|
||||
* Formatted Output
|
||||
*/
|
||||
|
||||
int fprintf (FILE*, const char*, ...);
|
||||
int printf (const char*, ...);
|
||||
int sprintf (char*, const char*, ...);
|
||||
int _snprintf (char*, size_t, const char*, ...);
|
||||
int vfprintf (FILE*, const char*, va_list);
|
||||
int vprintf (const char*, va_list);
|
||||
int vsprintf (char*, const char*, va_list);
|
||||
int _vsnprintf (char*, size_t, const char*, va_list);
|
||||
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int snprintf(char* s, size_t n, const char* format, ...);
|
||||
extern inline int vsnprintf (char* s, size_t n, const char* format,
|
||||
va_list arg)
|
||||
{ return _vsnprintf ( s, n, format, arg); }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Formatted Input
|
||||
*/
|
||||
|
||||
int fscanf (FILE*, const char*, ...);
|
||||
int scanf (const char*, ...);
|
||||
int sscanf (const char*, const char*, ...);
|
||||
/*
|
||||
* Character Input and Output Functions
|
||||
*/
|
||||
|
||||
int fgetc (FILE*);
|
||||
char* fgets (char*, int, FILE*);
|
||||
int fputc (int, FILE*);
|
||||
int fputs (const char*, FILE*);
|
||||
int getc (FILE*);
|
||||
int getchar (void);
|
||||
char* gets (char*);
|
||||
int putc (int, FILE*);
|
||||
int putchar (int);
|
||||
int puts (const char*);
|
||||
int ungetc (int, FILE*);
|
||||
|
||||
/*
|
||||
* Direct Input and Output Functions
|
||||
*/
|
||||
|
||||
size_t fread (void*, size_t, size_t, FILE*);
|
||||
size_t fwrite (const void*, size_t, size_t, FILE*);
|
||||
|
||||
/*
|
||||
* File Positioning Functions
|
||||
*/
|
||||
|
||||
int fseek (FILE*, long, int);
|
||||
long ftell (FILE*);
|
||||
void rewind (FILE*);
|
||||
|
||||
#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
|
||||
/*
|
||||
* Workaround for limitations on win9x where a file contents are
|
||||
* not zero'd out if you seek past the end and then write.
|
||||
*/
|
||||
|
||||
int __mingw_fseek (FILE *, long, int);
|
||||
int __mingw_fwrite (const void*, size_t, size_t, FILE*);
|
||||
#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
|
||||
#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
|
||||
#endif /* __USE_MINGW_FSEEK */
|
||||
|
||||
|
||||
/*
|
||||
* An opaque data type used for storing file positions... The contents of
|
||||
* this type are unknown, but we (the compiler) need to know the size
|
||||
* because the programmer using fgetpos and fsetpos will be setting aside
|
||||
* storage for fpos_t structres. Actually I tested using a byte array and
|
||||
* it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
|
||||
* Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
|
||||
* MSVCRT however, and for now `long long' will do.
|
||||
*/
|
||||
#ifdef __MSVCRT__
|
||||
typedef long long fpos_t;
|
||||
#else
|
||||
typedef long fpos_t;
|
||||
#endif
|
||||
|
||||
int fgetpos (FILE*, fpos_t*);
|
||||
int fsetpos (FILE*, const fpos_t*);
|
||||
|
||||
/*
|
||||
* Error Functions
|
||||
*/
|
||||
|
||||
void clearerr (FILE*);
|
||||
int feof (FILE*);
|
||||
int ferror (FILE*);
|
||||
void perror (const char*);
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Pipes
|
||||
*/
|
||||
FILE* _popen (const char*, const char*);
|
||||
int _pclose (FILE*);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
FILE* popen (const char*, const char*);
|
||||
int pclose (FILE*);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Other Non ANSI functions
|
||||
*/
|
||||
int _flushall (void);
|
||||
int _fgetchar (void);
|
||||
int _fputchar (int);
|
||||
FILE* _fdopen (int, const char*);
|
||||
int _fileno (FILE*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int fgetchar (void);
|
||||
int fputchar (int);
|
||||
FILE* fdopen (int, const char*);
|
||||
int fileno (FILE*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/* Wide versions */
|
||||
|
||||
#ifndef _WSTDIO_DEFINED
|
||||
/* also in wchar.h - keep in sync */
|
||||
int fwprintf (FILE*, const wchar_t*, ...);
|
||||
int wprintf (const wchar_t*, ...);
|
||||
int swprintf (wchar_t*, const wchar_t*, ...);
|
||||
int _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
|
||||
int vfwprintf (FILE*, const wchar_t*, va_list);
|
||||
int vwprintf (const wchar_t*, va_list);
|
||||
int vswprintf (wchar_t*, const wchar_t*, va_list);
|
||||
int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list);
|
||||
int fwscanf (FILE*, const wchar_t*, ...);
|
||||
int wscanf (const wchar_t*, ...);
|
||||
int swscanf (const wchar_t*, const wchar_t*, ...);
|
||||
wint_t fgetwc (FILE*);
|
||||
wint_t fputwc (wchar_t, FILE*);
|
||||
wint_t ungetwc (wchar_t, FILE*);
|
||||
#ifdef __MSVCRT__
|
||||
wchar_t* fgetws (wchar_t*, int, FILE*);
|
||||
int fputws (const wchar_t*, FILE*);
|
||||
wint_t getwc (FILE*);
|
||||
wint_t getwchar (void);
|
||||
wchar_t* _getws (wchar_t*);
|
||||
wint_t putwc (wint_t, FILE*);
|
||||
int _putws (const wchar_t*);
|
||||
wint_t putwchar (wint_t);
|
||||
FILE* _wfopen (const wchar_t*, const wchar_t*);
|
||||
FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
|
||||
FILE* _wfsopen (const wchar_t*, const wchar_t*, int);
|
||||
wchar_t* _wtmpnam (wchar_t*);
|
||||
wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
|
||||
int _wrename (const wchar_t*, const wchar_t*);
|
||||
int _wremove (const wchar_t*);
|
||||
void _wperror (const wchar_t*);
|
||||
FILE* _wpopen (const wchar_t*, const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...);
|
||||
extern inline int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format,
|
||||
va_list arg)
|
||||
{ return _vsnwprintf ( s, n, format, arg); }
|
||||
#endif
|
||||
|
||||
#define _WSTDIO_DEFINED
|
||||
#endif /* _WSTDIO_DEFINED */
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifdef __MSVCRT__
|
||||
#ifndef NO_OLDNAMES
|
||||
FILE* wpopen (const wchar_t*, const wchar_t*);
|
||||
#endif /* not NO_OLDNAMES */
|
||||
#endif /* MSVCRT runtime */
|
||||
|
||||
/*
|
||||
* Other Non ANSI wide functions
|
||||
*/
|
||||
wint_t _fgetwchar (void);
|
||||
wint_t _fputwchar (wint_t);
|
||||
int _getw (FILE*);
|
||||
int _putw (int, FILE*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
wint_t fgetwchar (void);
|
||||
wint_t fputwchar (wint_t);
|
||||
int getw (FILE*);
|
||||
int putw (int, FILE*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* __STRICT_ANSI */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _STDIO_H_ */
|
||||
/*
|
||||
* stdio.h
|
||||
*
|
||||
* Definitions of types and prototypes of functions for standard input and
|
||||
* output.
|
||||
*
|
||||
* NOTE: The file manipulation functions provided by Microsoft seem to
|
||||
* work with either slash (/) or backslash (\) as the path separator.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STDIO_H_
|
||||
#define _STDIO_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_NULL
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
|
||||
/* Flags for the iobuf structure */
|
||||
#define _IOREAD 1
|
||||
#define _IOWRT 2
|
||||
#define _IORW 0x0080 /* opened as "r+w" */
|
||||
|
||||
|
||||
/*
|
||||
* The three standard file pointers provided by the run time library.
|
||||
* NOTE: These will go to the bit-bucket silently in GUI applications!
|
||||
*/
|
||||
#define STDIN_FILENO 0
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
/* Returned by various functions on end of file condition or error. */
|
||||
#define EOF (-1)
|
||||
|
||||
/*
|
||||
* The maximum length of a file name. You should use GetVolumeInformation
|
||||
* instead of this constant. But hey, this works.
|
||||
*
|
||||
* NOTE: This is used in the structure _finddata_t (see io.h) so changing it
|
||||
* is probably not a good idea.
|
||||
*/
|
||||
#define FILENAME_MAX (260)
|
||||
|
||||
/*
|
||||
* The maximum number of files that may be open at once. I have set this to
|
||||
* a conservative number. The actual value may be higher.
|
||||
*/
|
||||
#define FOPEN_MAX (20)
|
||||
|
||||
/* After creating this many names, tmpnam and tmpfile return NULL */
|
||||
#define TMP_MAX 32767
|
||||
/*
|
||||
* Tmpnam, tmpfile and, sometimes, _tempnam try to create
|
||||
* temp files in the root directory of the current drive
|
||||
* (not in pwd, as suggested by some older MS doc's).
|
||||
* Redefining these macros does not effect the CRT functions.
|
||||
*/
|
||||
#define _P_tmpdir "\\"
|
||||
#define _wP_tmpdir L"\\"
|
||||
|
||||
/*
|
||||
* The maximum size of name (including NUL) that will be put in the user
|
||||
* supplied buffer caName for tmpnam.
|
||||
* Inferred from the size of the static buffer returned by tmpnam
|
||||
* when passed a NULL argument. May actually be smaller.
|
||||
*/
|
||||
#define L_tmpnam (16)
|
||||
|
||||
#define _IOFBF 0x0000
|
||||
#define _IOLBF 0x0040
|
||||
#define _IONBF 0x0004
|
||||
|
||||
/*
|
||||
* The buffer size as used by setbuf such that it is equivalent to
|
||||
* (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
|
||||
*/
|
||||
#define BUFSIZ 512
|
||||
|
||||
/* Constants for nOrigin indicating the position relative to which fseek
|
||||
* sets the file position. Enclosed in ifdefs because io.h could also
|
||||
* define them. (Though not anymore since io.h includes this file now.) */
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET (0)
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR (1)
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END (2)
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* I used to include stdarg.h at this point, in order to allow for the
|
||||
* functions later on in the file which use va_list. That conflicts with
|
||||
* using stdio.h and varargs.h in the same file, so I do the typedef myself.
|
||||
*/
|
||||
#ifndef _VA_LIST
|
||||
#define _VA_LIST
|
||||
#if defined __GNUC__ && __GNUC__ >= 3
|
||||
typedef __builtin_va_list va_list;
|
||||
#else
|
||||
typedef char* va_list;
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* The structure underlying the FILE type.
|
||||
*
|
||||
* I still believe that nobody in their right mind should make use of the
|
||||
* internals of this structure. Provided by Pedro A. Aranda Gutiirrez
|
||||
* <paag@tid.es>.
|
||||
*/
|
||||
#ifndef _FILE_DEFINED
|
||||
#define _FILE_DEFINED
|
||||
typedef struct _iobuf
|
||||
{
|
||||
char* _ptr;
|
||||
int _cnt;
|
||||
char* _base;
|
||||
int _flag;
|
||||
int _file;
|
||||
int _charbuf;
|
||||
int _bufsiz;
|
||||
char* _tmpfname;
|
||||
} FILE;
|
||||
#endif /* Not _FILE_DEFINED */
|
||||
|
||||
|
||||
/*
|
||||
* The standard file handles
|
||||
*/
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern FILE (*__imp__iob)[]; /* A pointer to an array of FILE */
|
||||
|
||||
#define _iob (*__imp__iob) /* An array of FILE */
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#define stdin (&_iob[STDIN_FILENO])
|
||||
#define stdout (&_iob[STDOUT_FILENO])
|
||||
#define stderr (&_iob[STDERR_FILENO])
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* File Operations
|
||||
*/
|
||||
FILE* fopen (const char*, const char*);
|
||||
FILE* freopen (const char*, const char*, FILE*);
|
||||
int fflush (FILE*);
|
||||
int fclose (FILE*);
|
||||
/* MS puts remove & rename (but not wide versions) in io.h also */
|
||||
int remove (const char*);
|
||||
int rename (const char*, const char*);
|
||||
FILE* tmpfile (void);
|
||||
char* tmpnam (char*);
|
||||
char* _tempnam (const char*, const char*);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
char* tempnam (const char*, const char*);
|
||||
#endif
|
||||
|
||||
int setvbuf (FILE*, char*, int, size_t);
|
||||
|
||||
void setbuf (FILE*, char*);
|
||||
|
||||
/*
|
||||
* Formatted Output
|
||||
*/
|
||||
|
||||
int fprintf (FILE*, const char*, ...);
|
||||
int printf (const char*, ...);
|
||||
int sprintf (char*, const char*, ...);
|
||||
int _snprintf (char*, size_t, const char*, ...);
|
||||
int vfprintf (FILE*, const char*, va_list);
|
||||
int vprintf (const char*, va_list);
|
||||
int vsprintf (char*, const char*, va_list);
|
||||
int _vsnprintf (char*, size_t, const char*, va_list);
|
||||
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int snprintf(char* s, size_t n, const char* format, ...);
|
||||
extern inline int vsnprintf (char* s, size_t n, const char* format,
|
||||
va_list arg)
|
||||
{ return _vsnprintf ( s, n, format, arg); }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Formatted Input
|
||||
*/
|
||||
|
||||
int fscanf (FILE*, const char*, ...);
|
||||
int scanf (const char*, ...);
|
||||
int sscanf (const char*, const char*, ...);
|
||||
/*
|
||||
* Character Input and Output Functions
|
||||
*/
|
||||
|
||||
int fgetc (FILE*);
|
||||
char* fgets (char*, int, FILE*);
|
||||
int fputc (int, FILE*);
|
||||
int fputs (const char*, FILE*);
|
||||
int getc (FILE*);
|
||||
int getchar (void);
|
||||
char* gets (char*);
|
||||
int putc (int, FILE*);
|
||||
int putchar (int);
|
||||
int puts (const char*);
|
||||
int ungetc (int, FILE*);
|
||||
|
||||
/*
|
||||
* Direct Input and Output Functions
|
||||
*/
|
||||
|
||||
size_t fread (void*, size_t, size_t, FILE*);
|
||||
size_t fwrite (const void*, size_t, size_t, FILE*);
|
||||
|
||||
/*
|
||||
* File Positioning Functions
|
||||
*/
|
||||
|
||||
int fseek (FILE*, long, int);
|
||||
long ftell (FILE*);
|
||||
void rewind (FILE*);
|
||||
|
||||
#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
|
||||
/*
|
||||
* Workaround for limitations on win9x where a file contents are
|
||||
* not zero'd out if you seek past the end and then write.
|
||||
*/
|
||||
|
||||
int __mingw_fseek (FILE *, long, int);
|
||||
int __mingw_fwrite (const void*, size_t, size_t, FILE*);
|
||||
#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
|
||||
#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
|
||||
#endif /* __USE_MINGW_FSEEK */
|
||||
|
||||
|
||||
/*
|
||||
* An opaque data type used for storing file positions... The contents of
|
||||
* this type are unknown, but we (the compiler) need to know the size
|
||||
* because the programmer using fgetpos and fsetpos will be setting aside
|
||||
* storage for fpos_t structres. Actually I tested using a byte array and
|
||||
* it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
|
||||
* Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
|
||||
* MSVCRT however, and for now `long long' will do.
|
||||
*/
|
||||
#ifdef __MSVCRT__
|
||||
typedef long long fpos_t;
|
||||
#else
|
||||
typedef long fpos_t;
|
||||
#endif
|
||||
|
||||
int fgetpos (FILE*, fpos_t*);
|
||||
int fsetpos (FILE*, const fpos_t*);
|
||||
|
||||
/*
|
||||
* Error Functions
|
||||
*/
|
||||
|
||||
void clearerr (FILE*);
|
||||
int feof (FILE*);
|
||||
int ferror (FILE*);
|
||||
void perror (const char*);
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Pipes
|
||||
*/
|
||||
FILE* _popen (const char*, const char*);
|
||||
int _pclose (FILE*);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
FILE* popen (const char*, const char*);
|
||||
int pclose (FILE*);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Other Non ANSI functions
|
||||
*/
|
||||
int _flushall (void);
|
||||
int _fgetchar (void);
|
||||
int _fputchar (int);
|
||||
FILE* _fdopen (int, const char*);
|
||||
int _fileno (FILE*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
int fgetchar (void);
|
||||
int fputchar (int);
|
||||
FILE* fdopen (int, const char*);
|
||||
int fileno (FILE*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/* Wide versions */
|
||||
|
||||
#ifndef _WSTDIO_DEFINED
|
||||
/* also in wchar.h - keep in sync */
|
||||
int fwprintf (FILE*, const wchar_t*, ...);
|
||||
int wprintf (const wchar_t*, ...);
|
||||
int swprintf (wchar_t*, const wchar_t*, ...);
|
||||
int _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
|
||||
int vfwprintf (FILE*, const wchar_t*, va_list);
|
||||
int vwprintf (const wchar_t*, va_list);
|
||||
int vswprintf (wchar_t*, const wchar_t*, va_list);
|
||||
int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list);
|
||||
int fwscanf (FILE*, const wchar_t*, ...);
|
||||
int wscanf (const wchar_t*, ...);
|
||||
int swscanf (const wchar_t*, const wchar_t*, ...);
|
||||
wint_t fgetwc (FILE*);
|
||||
wint_t fputwc (wchar_t, FILE*);
|
||||
wint_t ungetwc (wchar_t, FILE*);
|
||||
#ifdef __MSVCRT__
|
||||
wchar_t* fgetws (wchar_t*, int, FILE*);
|
||||
int fputws (const wchar_t*, FILE*);
|
||||
wint_t getwc (FILE*);
|
||||
wint_t getwchar (void);
|
||||
wchar_t* _getws (wchar_t*);
|
||||
wint_t putwc (wint_t, FILE*);
|
||||
int _putws (const wchar_t*);
|
||||
wint_t putwchar (wint_t);
|
||||
FILE* _wfopen (const wchar_t*, const wchar_t*);
|
||||
FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
|
||||
FILE* _wfsopen (const wchar_t*, const wchar_t*, int);
|
||||
wchar_t* _wtmpnam (wchar_t*);
|
||||
wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
|
||||
int _wrename (const wchar_t*, const wchar_t*);
|
||||
int _wremove (const wchar_t*);
|
||||
void _wperror (const wchar_t*);
|
||||
FILE* _wpopen (const wchar_t*, const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...);
|
||||
extern inline int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format,
|
||||
va_list arg)
|
||||
{ return _vsnwprintf ( s, n, format, arg); }
|
||||
#endif
|
||||
|
||||
#define _WSTDIO_DEFINED
|
||||
#endif /* _WSTDIO_DEFINED */
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifdef __MSVCRT__
|
||||
#ifndef NO_OLDNAMES
|
||||
FILE* wpopen (const wchar_t*, const wchar_t*);
|
||||
#endif /* not NO_OLDNAMES */
|
||||
#endif /* MSVCRT runtime */
|
||||
|
||||
/*
|
||||
* Other Non ANSI wide functions
|
||||
*/
|
||||
wint_t _fgetwchar (void);
|
||||
wint_t _fputwchar (wint_t);
|
||||
int _getw (FILE*);
|
||||
int _putw (int, FILE*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
wint_t fgetwchar (void);
|
||||
wint_t fputwchar (wint_t);
|
||||
int getw (FILE*);
|
||||
int putw (int, FILE*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* __STRICT_ANSI */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _STDIO_H_ */
|
||||
|
@ -1,482 +1,482 @@
|
||||
/*
|
||||
* stdlib.h
|
||||
*
|
||||
* Definitions for common types, variables, and functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB_H_
|
||||
#define _STDLIB_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#define __need_NULL
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
/*
|
||||
* RAND_MAX is the maximum value that may be returned by rand.
|
||||
* The minimum is zero.
|
||||
*/
|
||||
#define RAND_MAX 0x7FFF
|
||||
|
||||
/*
|
||||
* These values may be used as exit status codes.
|
||||
*/
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
/*
|
||||
* Definitions for path name functions.
|
||||
* NOTE: All of these values have simply been chosen to be conservatively high.
|
||||
* Remember that with long file names we can no longer depend on
|
||||
* extensions being short.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH (260)
|
||||
#endif
|
||||
|
||||
#define _MAX_PATH MAX_PATH
|
||||
#define _MAX_DRIVE (3)
|
||||
#define _MAX_DIR 256
|
||||
#define _MAX_FNAME 256
|
||||
#define _MAX_EXT 256
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This seems like a convenient place to declare these variables, which
|
||||
* give programs using WinMain (or main for that matter) access to main-ish
|
||||
* argc and argv. environ is a pointer to a table of environment variables.
|
||||
* NOTE: Strings in _argv and environ are ANSI strings.
|
||||
*/
|
||||
extern int _argc;
|
||||
extern char** _argv;
|
||||
|
||||
/* imports from runtime dll of the above variables */
|
||||
#ifdef __MSVCRT__
|
||||
|
||||
extern int* __p___argc(void);
|
||||
extern char*** __p___argv(void);
|
||||
extern wchar_t*** __p___wargv(void);
|
||||
|
||||
#define __argc (*__p___argc())
|
||||
#define __argv (*__p___argv())
|
||||
#define __wargv (*__p___wargv())
|
||||
|
||||
#else /* !MSVCRT */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern int* __imp___argc_dll;
|
||||
extern char*** __imp___argv_dll;
|
||||
#define __argc (*__imp___argc_dll)
|
||||
#define __argv (*__imp___argv_dll)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT int __argc_dll;
|
||||
__MINGW_IMPORT char** __argv_dll;
|
||||
#define __argc __argc_dll
|
||||
#define __argv __argv_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif /* __MSVCRT */
|
||||
|
||||
/*
|
||||
* Also defined in ctype.h.
|
||||
*/
|
||||
|
||||
#ifndef MB_CUR_MAX
|
||||
# ifdef __MSVCRT__
|
||||
# define MB_CUR_MAX __mb_cur_max
|
||||
__MINGW_IMPORT int __mb_cur_max;
|
||||
# else /* not __MSVCRT */
|
||||
# define MB_CUR_MAX __mb_cur_max_dll
|
||||
__MINGW_IMPORT int __mb_cur_max_dll;
|
||||
# endif /* not __MSVCRT */
|
||||
#endif /* MB_CUR_MAX */
|
||||
|
||||
/*
|
||||
* MS likes to declare errno in stdlib.h as well.
|
||||
*/
|
||||
|
||||
#ifdef _UWIN
|
||||
#undef errno
|
||||
extern int errno;
|
||||
#else
|
||||
int* _errno(void);
|
||||
#define errno (*_errno())
|
||||
#endif
|
||||
int* __doserrno(void);
|
||||
#define _doserrno (*__doserrno())
|
||||
|
||||
/*
|
||||
* Use environ from the DLL, not as a global.
|
||||
*/
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
extern char *** __p__environ(void);
|
||||
extern wchar_t *** __p__wenviron(void);
|
||||
# define _environ (*__p__environ())
|
||||
# define _wenviron (*__p__wenviron())
|
||||
#else /* ! __MSVCRT__ */
|
||||
# ifndef __DECLSPEC_SUPPORTED
|
||||
extern char *** __imp__environ_dll;
|
||||
# define _environ (*__imp__environ_dll)
|
||||
# else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char ** _environ_dll;
|
||||
# define _environ _environ_dll
|
||||
# endif /* __DECLSPEC_SUPPORTED */
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#define environ _environ
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
/* One of the MSVCRTxx libraries */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern int* __imp__sys_nerr;
|
||||
# define sys_nerr (*__imp__sys_nerr)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT int _sys_nerr;
|
||||
# ifndef _UWIN
|
||||
# define sys_nerr _sys_nerr
|
||||
# endif /* _UWIN */
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#else /* ! __MSVCRT__ */
|
||||
|
||||
/* CRTDLL run time library */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern int* __imp__sys_nerr_dll;
|
||||
# define sys_nerr (*__imp__sys_nerr_dll)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT int _sys_nerr_dll;
|
||||
# define sys_nerr _sys_nerr_dll
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern char*** __imp__sys_errlist;
|
||||
#define sys_errlist (*__imp__sys_errlist)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char* _sys_errlist[];
|
||||
#ifndef _UWIN
|
||||
#define sys_errlist _sys_errlist
|
||||
#endif /* _UWIN */
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
/*
|
||||
* OS version and such constants.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
/* msvcrtxx.dll */
|
||||
|
||||
extern unsigned int* __p__osver(void);
|
||||
extern unsigned int* __p__winver(void);
|
||||
extern unsigned int* __p__winmajor(void);
|
||||
extern unsigned int* __p__winminor(void);
|
||||
|
||||
#define _osver (*__p__osver())
|
||||
#define _winver (*__p__winver())
|
||||
#define _winmajor (*__p__winmajor())
|
||||
#define _winminor (*__p__winminor())
|
||||
|
||||
#else
|
||||
/* Not msvcrtxx.dll, thus crtdll.dll */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern unsigned int* _imp___osver_dll;
|
||||
extern unsigned int* _imp___winver_dll;
|
||||
extern unsigned int* _imp___winmajor_dll;
|
||||
extern unsigned int* _imp___winminor_dll;
|
||||
|
||||
#define _osver (*_imp___osver_dll)
|
||||
#define _winver (*_imp___winver_dll)
|
||||
#define _winmajor (*_imp___winmajor_dll)
|
||||
#define _winminor (*_imp___winminor_dll)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT unsigned int _osver_dll;
|
||||
__MINGW_IMPORT unsigned int _winver_dll;
|
||||
__MINGW_IMPORT unsigned int _winmajor_dll;
|
||||
__MINGW_IMPORT unsigned int _winminor_dll;
|
||||
|
||||
#define _osver _osver_dll
|
||||
#define _winver _winver_dll
|
||||
#define _winmajor _winmajor_dll
|
||||
#define _winminor _winminor_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif
|
||||
|
||||
#if defined __MSVCRT__
|
||||
/* although the _pgmptr is exported as DATA,
|
||||
* be safe and use the access function __p__pgmptr() to get it. */
|
||||
char** __p__pgmptr(void);
|
||||
#define _pgmptr (*__p__pgmptr())
|
||||
wchar_t** __p__wpgmptr(void);
|
||||
#define _wpgmptr (*__p__wpgmptr())
|
||||
#else /* ! __MSVCRT__ */
|
||||
# ifndef __DECLSPEC_SUPPORTED
|
||||
extern char** __imp__pgmptr_dll;
|
||||
# define _pgmptr (*__imp__pgmptr_dll)
|
||||
# else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char* _pgmptr_dll;
|
||||
# define _pgmptr _pgmptr_dll
|
||||
# endif /* __DECLSPEC_SUPPORTED */
|
||||
/* no wide version in CRTDLL */
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _ATTRIB_NORETURN __attribute__ ((noreturn))
|
||||
#else /* Not __GNUC__ */
|
||||
#define _ATTRIB_NORETURN
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
double atof (const char*);
|
||||
int atoi (const char*);
|
||||
long atol (const char*);
|
||||
int _wtoi (const wchar_t *);
|
||||
long _wtol (const wchar_t *);
|
||||
|
||||
double strtod (const char*, char**);
|
||||
#if !defined __NO_ISOCEXT /* extern stubs in static libmingwex.a */
|
||||
extern __inline__ float strtof (const char *nptr, char **endptr)
|
||||
{ return (strtod (nptr, endptr));}
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
long strtol (const char*, char**, int);
|
||||
unsigned long strtoul (const char*, char**, int);
|
||||
|
||||
#ifndef _WSTDLIB_DEFINED
|
||||
/* also declared in wchar.h */
|
||||
double wcstod (const wchar_t*, wchar_t**);
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr)
|
||||
{ return (wcstod(nptr, endptr)); }
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
long wcstol (const wchar_t*, wchar_t**, int);
|
||||
unsigned long wcstoul (const wchar_t*, wchar_t**, int);
|
||||
#define _WSTDLIB_DEFINED
|
||||
#endif
|
||||
|
||||
size_t wcstombs (char*, const wchar_t*, size_t);
|
||||
int wctomb (char*, wchar_t);
|
||||
|
||||
int mblen (const char*, size_t);
|
||||
size_t mbstowcs (wchar_t*, const char*, size_t);
|
||||
int mbtowc (wchar_t*, const char*, size_t);
|
||||
|
||||
int rand (void);
|
||||
void srand (unsigned int);
|
||||
|
||||
void* calloc (size_t, size_t);
|
||||
void* malloc (size_t);
|
||||
void* realloc (void*, size_t);
|
||||
void free (void*);
|
||||
|
||||
void abort (void) _ATTRIB_NORETURN;
|
||||
void exit (int) _ATTRIB_NORETURN;
|
||||
int atexit (void (*)(void));
|
||||
|
||||
int system (const char*);
|
||||
char* getenv (const char*);
|
||||
|
||||
void* bsearch (const void*, const void*, size_t, size_t,
|
||||
int (*)(const void*, const void*));
|
||||
void qsort (const void*, size_t, size_t,
|
||||
int (*)(const void*, const void*));
|
||||
|
||||
int abs (int);
|
||||
long labs (long);
|
||||
|
||||
/*
|
||||
* div_t and ldiv_t are structures used to return the results of div and
|
||||
* ldiv.
|
||||
*
|
||||
* NOTE: div and ldiv appear not to work correctly unless
|
||||
* -fno-pcc-struct-return is specified. This is included in the
|
||||
* mingw32 specs file.
|
||||
*/
|
||||
typedef struct { int quot, rem; } div_t;
|
||||
typedef struct { long quot, rem; } ldiv_t;
|
||||
|
||||
div_t div (int, int);
|
||||
ldiv_t ldiv (long, long);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
/*
|
||||
* NOTE: Officially the three following functions are obsolete. The Win32 API
|
||||
* functions SetErrorMode, Beep and Sleep are their replacements.
|
||||
*/
|
||||
void _beep (unsigned int, unsigned int);
|
||||
void _seterrormode (int);
|
||||
void _sleep (unsigned long);
|
||||
|
||||
void _exit (int) _ATTRIB_NORETURN;
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
/* C99 function name */
|
||||
void _Exit(int) _ATTRIB_NORETURN; /* Declare to get noreturn attribute. */
|
||||
extern __inline__ void _Exit(int status)
|
||||
{ _exit(status); }
|
||||
#endif
|
||||
/* _onexit is MS extension. Use atexit for portability. */
|
||||
typedef int (* _onexit_t)(void);
|
||||
_onexit_t _onexit( _onexit_t );
|
||||
|
||||
int _putenv (const char*);
|
||||
void _searchenv (const char*, const char*, char*);
|
||||
|
||||
|
||||
char* _ecvt (double, int, int*, int*);
|
||||
char* _fcvt (double, int, int*, int*);
|
||||
char* _gcvt (double, int, char*);
|
||||
|
||||
void _makepath (char*, const char*, const char*, const char*, const char*);
|
||||
void _splitpath (const char*, char*, char*, char*, char*);
|
||||
char* _fullpath (char*, const char*, size_t);
|
||||
|
||||
|
||||
char* _itoa (int, char*, int);
|
||||
char* _ltoa (long, char*, int);
|
||||
char* _ultoa(unsigned long, char*, int);
|
||||
wchar_t* _itow (int, wchar_t*, int);
|
||||
wchar_t* _ltow (long, wchar_t*, int);
|
||||
wchar_t* _ultow (unsigned long, wchar_t*, int);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__int64 _atoi64(const char *);
|
||||
char* _i64toa(__int64, char *, int);
|
||||
char* _ui64toa(unsigned __int64, char *, int);
|
||||
__int64 _wtoi64(const wchar_t *);
|
||||
wchar_t* _i64tow(__int64, wchar_t *, int);
|
||||
wchar_t* _ui64tow(unsigned __int64, wchar_t *, int);
|
||||
|
||||
wchar_t* _wgetenv(const wchar_t*);
|
||||
int _wputenv(const wchar_t*);
|
||||
void _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
|
||||
void _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
|
||||
void _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
|
||||
wchar_t* _wfullpath (wchar_t*, const wchar_t*, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
int putenv (const char*);
|
||||
void searchenv (const char*, const char*, char*);
|
||||
|
||||
char* itoa (int, char*, int);
|
||||
char* ltoa (long, char*, int);
|
||||
|
||||
#ifndef _UWIN
|
||||
char* ecvt (double, int, int*, int*);
|
||||
char* fcvt (double, int, int*, int*);
|
||||
char* gcvt (double, int, char*);
|
||||
#endif /* _UWIN */
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/* C99 names */
|
||||
|
||||
#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
|
||||
|
||||
typedef struct { long long quot, rem; } lldiv_t;
|
||||
|
||||
lldiv_t lldiv (long long, long long);
|
||||
|
||||
extern __inline__ long long llabs(long long _j)
|
||||
{return (_j >= 0 ? _j : -_j);}
|
||||
|
||||
long long strtoll (const char* __restrict__, char** __restrict, int);
|
||||
unsigned long long strtoull (const char* __restrict__, char** __restrict__, int);
|
||||
|
||||
#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */
|
||||
long long atoll (const char *);
|
||||
|
||||
#if !defined (__STRICT_ANSI__)
|
||||
long long wtoll(const wchar_t *);
|
||||
char* lltoa(long long, char *, int);
|
||||
char* ulltoa(unsigned long long , char *, int);
|
||||
wchar_t* lltow(long long, wchar_t *, int);
|
||||
wchar_t* ulltow(unsigned long long, wchar_t *, int);
|
||||
|
||||
/* inline using non-ansi functions */
|
||||
extern __inline__ long long atoll (const char * _c)
|
||||
{ return _atoi64 (_c); }
|
||||
extern __inline__ char* lltoa(long long _n, char * _c, int _i)
|
||||
{ return _i64toa (_n, _c, _i); }
|
||||
extern __inline__ char* ulltoa(unsigned long long _n, char * _c, int _i)
|
||||
{ return _ui64toa (_n, _c, _i); }
|
||||
extern __inline__ long long wtoll(const wchar_t * _w)
|
||||
{ return _wtoi64 (_w); }
|
||||
extern __inline__ wchar_t* lltow(long long _n, wchar_t * _w, int _i)
|
||||
{ return _i64tow (_n, _w, _i); }
|
||||
extern __inline__ wchar_t* ulltow(unsigned long long _n, wchar_t * _w, int _i)
|
||||
{ return _ui64tow (_n, _w, _i); }
|
||||
#endif /* (__STRICT_ANSI__) */
|
||||
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#endif /* !__NO_ISOCEXT */
|
||||
|
||||
/*
|
||||
* Undefine the no return attribute used in some function definitions
|
||||
*/
|
||||
#undef _ATTRIB_NORETURN
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _STDLIB_H_ */
|
||||
|
||||
/*
|
||||
* stdlib.h
|
||||
*
|
||||
* Definitions for common types, variables, and functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB_H_
|
||||
#define _STDLIB_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#define __need_NULL
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
/*
|
||||
* RAND_MAX is the maximum value that may be returned by rand.
|
||||
* The minimum is zero.
|
||||
*/
|
||||
#define RAND_MAX 0x7FFF
|
||||
|
||||
/*
|
||||
* These values may be used as exit status codes.
|
||||
*/
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
/*
|
||||
* Definitions for path name functions.
|
||||
* NOTE: All of these values have simply been chosen to be conservatively high.
|
||||
* Remember that with long file names we can no longer depend on
|
||||
* extensions being short.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH (260)
|
||||
#endif
|
||||
|
||||
#define _MAX_PATH MAX_PATH
|
||||
#define _MAX_DRIVE (3)
|
||||
#define _MAX_DIR 256
|
||||
#define _MAX_FNAME 256
|
||||
#define _MAX_EXT 256
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This seems like a convenient place to declare these variables, which
|
||||
* give programs using WinMain (or main for that matter) access to main-ish
|
||||
* argc and argv. environ is a pointer to a table of environment variables.
|
||||
* NOTE: Strings in _argv and environ are ANSI strings.
|
||||
*/
|
||||
extern int _argc;
|
||||
extern char** _argv;
|
||||
|
||||
/* imports from runtime dll of the above variables */
|
||||
#ifdef __MSVCRT__
|
||||
|
||||
extern int* __p___argc(void);
|
||||
extern char*** __p___argv(void);
|
||||
extern wchar_t*** __p___wargv(void);
|
||||
|
||||
#define __argc (*__p___argc())
|
||||
#define __argv (*__p___argv())
|
||||
#define __wargv (*__p___wargv())
|
||||
|
||||
#else /* !MSVCRT */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern int* __imp___argc_dll;
|
||||
extern char*** __imp___argv_dll;
|
||||
#define __argc (*__imp___argc_dll)
|
||||
#define __argv (*__imp___argv_dll)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT int __argc_dll;
|
||||
__MINGW_IMPORT char** __argv_dll;
|
||||
#define __argc __argc_dll
|
||||
#define __argv __argv_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif /* __MSVCRT */
|
||||
|
||||
/*
|
||||
* Also defined in ctype.h.
|
||||
*/
|
||||
|
||||
#ifndef MB_CUR_MAX
|
||||
# ifdef __MSVCRT__
|
||||
# define MB_CUR_MAX __mb_cur_max
|
||||
__MINGW_IMPORT int __mb_cur_max;
|
||||
# else /* not __MSVCRT */
|
||||
# define MB_CUR_MAX __mb_cur_max_dll
|
||||
__MINGW_IMPORT int __mb_cur_max_dll;
|
||||
# endif /* not __MSVCRT */
|
||||
#endif /* MB_CUR_MAX */
|
||||
|
||||
/*
|
||||
* MS likes to declare errno in stdlib.h as well.
|
||||
*/
|
||||
|
||||
#ifdef _UWIN
|
||||
#undef errno
|
||||
extern int errno;
|
||||
#else
|
||||
int* _errno(void);
|
||||
#define errno (*_errno())
|
||||
#endif
|
||||
int* __doserrno(void);
|
||||
#define _doserrno (*__doserrno())
|
||||
|
||||
/*
|
||||
* Use environ from the DLL, not as a global.
|
||||
*/
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
extern char *** __p__environ(void);
|
||||
extern wchar_t *** __p__wenviron(void);
|
||||
# define _environ (*__p__environ())
|
||||
# define _wenviron (*__p__wenviron())
|
||||
#else /* ! __MSVCRT__ */
|
||||
# ifndef __DECLSPEC_SUPPORTED
|
||||
extern char *** __imp__environ_dll;
|
||||
# define _environ (*__imp__environ_dll)
|
||||
# else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char ** _environ_dll;
|
||||
# define _environ _environ_dll
|
||||
# endif /* __DECLSPEC_SUPPORTED */
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#define environ _environ
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
/* One of the MSVCRTxx libraries */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern int* __imp__sys_nerr;
|
||||
# define sys_nerr (*__imp__sys_nerr)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT int _sys_nerr;
|
||||
# ifndef _UWIN
|
||||
# define sys_nerr _sys_nerr
|
||||
# endif /* _UWIN */
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#else /* ! __MSVCRT__ */
|
||||
|
||||
/* CRTDLL run time library */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern int* __imp__sys_nerr_dll;
|
||||
# define sys_nerr (*__imp__sys_nerr_dll)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT int _sys_nerr_dll;
|
||||
# define sys_nerr _sys_nerr_dll
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif /* ! __MSVCRT__ */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
extern char*** __imp__sys_errlist;
|
||||
#define sys_errlist (*__imp__sys_errlist)
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char* _sys_errlist[];
|
||||
#ifndef _UWIN
|
||||
#define sys_errlist _sys_errlist
|
||||
#endif /* _UWIN */
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
/*
|
||||
* OS version and such constants.
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
/* msvcrtxx.dll */
|
||||
|
||||
extern unsigned int* __p__osver(void);
|
||||
extern unsigned int* __p__winver(void);
|
||||
extern unsigned int* __p__winmajor(void);
|
||||
extern unsigned int* __p__winminor(void);
|
||||
|
||||
#define _osver (*__p__osver())
|
||||
#define _winver (*__p__winver())
|
||||
#define _winmajor (*__p__winmajor())
|
||||
#define _winminor (*__p__winminor())
|
||||
|
||||
#else
|
||||
/* Not msvcrtxx.dll, thus crtdll.dll */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern unsigned int* _imp___osver_dll;
|
||||
extern unsigned int* _imp___winver_dll;
|
||||
extern unsigned int* _imp___winmajor_dll;
|
||||
extern unsigned int* _imp___winminor_dll;
|
||||
|
||||
#define _osver (*_imp___osver_dll)
|
||||
#define _winver (*_imp___winver_dll)
|
||||
#define _winmajor (*_imp___winmajor_dll)
|
||||
#define _winminor (*_imp___winminor_dll)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT unsigned int _osver_dll;
|
||||
__MINGW_IMPORT unsigned int _winver_dll;
|
||||
__MINGW_IMPORT unsigned int _winmajor_dll;
|
||||
__MINGW_IMPORT unsigned int _winminor_dll;
|
||||
|
||||
#define _osver _osver_dll
|
||||
#define _winver _winver_dll
|
||||
#define _winmajor _winmajor_dll
|
||||
#define _winminor _winminor_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif
|
||||
|
||||
#if defined __MSVCRT__
|
||||
/* although the _pgmptr is exported as DATA,
|
||||
* be safe and use the access function __p__pgmptr() to get it. */
|
||||
char** __p__pgmptr(void);
|
||||
#define _pgmptr (*__p__pgmptr())
|
||||
wchar_t** __p__wpgmptr(void);
|
||||
#define _wpgmptr (*__p__wpgmptr())
|
||||
#else /* ! __MSVCRT__ */
|
||||
# ifndef __DECLSPEC_SUPPORTED
|
||||
extern char** __imp__pgmptr_dll;
|
||||
# define _pgmptr (*__imp__pgmptr_dll)
|
||||
# else /* __DECLSPEC_SUPPORTED */
|
||||
__MINGW_IMPORT char* _pgmptr_dll;
|
||||
# define _pgmptr _pgmptr_dll
|
||||
# endif /* __DECLSPEC_SUPPORTED */
|
||||
/* no wide version in CRTDLL */
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _ATTRIB_NORETURN __attribute__ ((noreturn))
|
||||
#else /* Not __GNUC__ */
|
||||
#define _ATTRIB_NORETURN
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
double atof (const char*);
|
||||
int atoi (const char*);
|
||||
long atol (const char*);
|
||||
int _wtoi (const wchar_t *);
|
||||
long _wtol (const wchar_t *);
|
||||
|
||||
double strtod (const char*, char**);
|
||||
#if !defined __NO_ISOCEXT /* extern stubs in static libmingwex.a */
|
||||
extern __inline__ float strtof (const char *nptr, char **endptr)
|
||||
{ return (strtod (nptr, endptr));}
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
long strtol (const char*, char**, int);
|
||||
unsigned long strtoul (const char*, char**, int);
|
||||
|
||||
#ifndef _WSTDLIB_DEFINED
|
||||
/* also declared in wchar.h */
|
||||
double wcstod (const wchar_t*, wchar_t**);
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr)
|
||||
{ return (wcstod(nptr, endptr)); }
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
long wcstol (const wchar_t*, wchar_t**, int);
|
||||
unsigned long wcstoul (const wchar_t*, wchar_t**, int);
|
||||
#define _WSTDLIB_DEFINED
|
||||
#endif
|
||||
|
||||
size_t wcstombs (char*, const wchar_t*, size_t);
|
||||
int wctomb (char*, wchar_t);
|
||||
|
||||
int mblen (const char*, size_t);
|
||||
size_t mbstowcs (wchar_t*, const char*, size_t);
|
||||
int mbtowc (wchar_t*, const char*, size_t);
|
||||
|
||||
int rand (void);
|
||||
void srand (unsigned int);
|
||||
|
||||
void* calloc (size_t, size_t);
|
||||
void* malloc (size_t);
|
||||
void* realloc (void*, size_t);
|
||||
void free (void*);
|
||||
|
||||
void abort (void) _ATTRIB_NORETURN;
|
||||
void exit (int) _ATTRIB_NORETURN;
|
||||
int atexit (void (*)(void));
|
||||
|
||||
int system (const char*);
|
||||
char* getenv (const char*);
|
||||
|
||||
void* bsearch (const void*, const void*, size_t, size_t,
|
||||
int (*)(const void*, const void*));
|
||||
void qsort (const void*, size_t, size_t,
|
||||
int (*)(const void*, const void*));
|
||||
|
||||
int abs (int);
|
||||
long labs (long);
|
||||
|
||||
/*
|
||||
* div_t and ldiv_t are structures used to return the results of div and
|
||||
* ldiv.
|
||||
*
|
||||
* NOTE: div and ldiv appear not to work correctly unless
|
||||
* -fno-pcc-struct-return is specified. This is included in the
|
||||
* mingw32 specs file.
|
||||
*/
|
||||
typedef struct { int quot, rem; } div_t;
|
||||
typedef struct { long quot, rem; } ldiv_t;
|
||||
|
||||
div_t div (int, int);
|
||||
ldiv_t ldiv (long, long);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
/*
|
||||
* NOTE: Officially the three following functions are obsolete. The Win32 API
|
||||
* functions SetErrorMode, Beep and Sleep are their replacements.
|
||||
*/
|
||||
void _beep (unsigned int, unsigned int);
|
||||
void _seterrormode (int);
|
||||
void _sleep (unsigned long);
|
||||
|
||||
void _exit (int) _ATTRIB_NORETURN;
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
/* C99 function name */
|
||||
void _Exit(int) _ATTRIB_NORETURN; /* Declare to get noreturn attribute. */
|
||||
extern __inline__ void _Exit(int status)
|
||||
{ _exit(status); }
|
||||
#endif
|
||||
/* _onexit is MS extension. Use atexit for portability. */
|
||||
typedef int (* _onexit_t)(void);
|
||||
_onexit_t _onexit( _onexit_t );
|
||||
|
||||
int _putenv (const char*);
|
||||
void _searchenv (const char*, const char*, char*);
|
||||
|
||||
|
||||
char* _ecvt (double, int, int*, int*);
|
||||
char* _fcvt (double, int, int*, int*);
|
||||
char* _gcvt (double, int, char*);
|
||||
|
||||
void _makepath (char*, const char*, const char*, const char*, const char*);
|
||||
void _splitpath (const char*, char*, char*, char*, char*);
|
||||
char* _fullpath (char*, const char*, size_t);
|
||||
|
||||
|
||||
char* _itoa (int, char*, int);
|
||||
char* _ltoa (long, char*, int);
|
||||
char* _ultoa(unsigned long, char*, int);
|
||||
wchar_t* _itow (int, wchar_t*, int);
|
||||
wchar_t* _ltow (long, wchar_t*, int);
|
||||
wchar_t* _ultow (unsigned long, wchar_t*, int);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
__int64 _atoi64(const char *);
|
||||
char* _i64toa(__int64, char *, int);
|
||||
char* _ui64toa(unsigned __int64, char *, int);
|
||||
__int64 _wtoi64(const wchar_t *);
|
||||
wchar_t* _i64tow(__int64, wchar_t *, int);
|
||||
wchar_t* _ui64tow(unsigned __int64, wchar_t *, int);
|
||||
|
||||
wchar_t* _wgetenv(const wchar_t*);
|
||||
int _wputenv(const wchar_t*);
|
||||
void _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
|
||||
void _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
|
||||
void _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
|
||||
wchar_t* _wfullpath (wchar_t*, const wchar_t*, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
int putenv (const char*);
|
||||
void searchenv (const char*, const char*, char*);
|
||||
|
||||
char* itoa (int, char*, int);
|
||||
char* ltoa (long, char*, int);
|
||||
|
||||
#ifndef _UWIN
|
||||
char* ecvt (double, int, int*, int*);
|
||||
char* fcvt (double, int, int*, int*);
|
||||
char* gcvt (double, int, char*);
|
||||
#endif /* _UWIN */
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/* C99 names */
|
||||
|
||||
#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
|
||||
|
||||
typedef struct { long long quot, rem; } lldiv_t;
|
||||
|
||||
lldiv_t lldiv (long long, long long);
|
||||
|
||||
extern __inline__ long long llabs(long long _j)
|
||||
{return (_j >= 0 ? _j : -_j);}
|
||||
|
||||
long long strtoll (const char* __restrict__, char** __restrict, int);
|
||||
unsigned long long strtoull (const char* __restrict__, char** __restrict__, int);
|
||||
|
||||
#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */
|
||||
long long atoll (const char *);
|
||||
|
||||
#if !defined (__STRICT_ANSI__)
|
||||
long long wtoll(const wchar_t *);
|
||||
char* lltoa(long long, char *, int);
|
||||
char* ulltoa(unsigned long long , char *, int);
|
||||
wchar_t* lltow(long long, wchar_t *, int);
|
||||
wchar_t* ulltow(unsigned long long, wchar_t *, int);
|
||||
|
||||
/* inline using non-ansi functions */
|
||||
extern __inline__ long long atoll (const char * _c)
|
||||
{ return _atoi64 (_c); }
|
||||
extern __inline__ char* lltoa(long long _n, char * _c, int _i)
|
||||
{ return _i64toa (_n, _c, _i); }
|
||||
extern __inline__ char* ulltoa(unsigned long long _n, char * _c, int _i)
|
||||
{ return _ui64toa (_n, _c, _i); }
|
||||
extern __inline__ long long wtoll(const wchar_t * _w)
|
||||
{ return _wtoi64 (_w); }
|
||||
extern __inline__ wchar_t* lltow(long long _n, wchar_t * _w, int _i)
|
||||
{ return _i64tow (_n, _w, _i); }
|
||||
extern __inline__ wchar_t* ulltow(unsigned long long _n, wchar_t * _w, int _i)
|
||||
{ return _ui64tow (_n, _w, _i); }
|
||||
#endif /* (__STRICT_ANSI__) */
|
||||
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#endif /* !__NO_ISOCEXT */
|
||||
|
||||
/*
|
||||
* Undefine the no return attribute used in some function definitions
|
||||
*/
|
||||
#undef _ATTRIB_NORETURN
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _STDLIB_H_ */
|
||||
|
||||
|
@ -1,206 +1,206 @@
|
||||
/*
|
||||
* string.h
|
||||
*
|
||||
* Definitions for memory and string functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STRING_H_
|
||||
#define _STRING_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* Define size_t, wchar_t and NULL
|
||||
*/
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#define __need_NULL
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Prototypes of the ANSI Standard C library string functions.
|
||||
*/
|
||||
void* memchr (const void*, int, size_t);
|
||||
int memcmp (const void*, const void*, size_t);
|
||||
void* memcpy (void*, const void*, size_t);
|
||||
void* memmove (void*, const void*, size_t);
|
||||
void* memset (void*, int, size_t);
|
||||
char* strcat (char*, const char*);
|
||||
char* strchr (const char*, int);
|
||||
int strcmp (const char*, const char*);
|
||||
int strcoll (const char*, const char*); /* Compare using locale */
|
||||
char* strcpy (char*, const char*);
|
||||
size_t strcspn (const char*, const char*);
|
||||
char* strerror (int); /* NOTE: NOT an old name wrapper. */
|
||||
char* _strerror (const char *);
|
||||
size_t strlen (const char*);
|
||||
char* strncat (char*, const char*, size_t);
|
||||
int strncmp (const char*, const char*, size_t);
|
||||
char* strncpy (char*, const char*, size_t);
|
||||
char* strpbrk (const char*, const char*);
|
||||
char* strrchr (const char*, int);
|
||||
size_t strspn (const char*, const char*);
|
||||
char* strstr (const char*, const char*);
|
||||
char* strtok (char*, const char*);
|
||||
size_t strxfrm (char*, const char*, size_t);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Extra non-ANSI functions provided by the CRTDLL library
|
||||
*/
|
||||
void* _memccpy (void*, const void*, int, size_t);
|
||||
int _memicmp (const void*, const void*, size_t);
|
||||
char* _strdup (const char*);
|
||||
int _strcmpi (const char*, const char*);
|
||||
int _stricmp (const char*, const char*);
|
||||
int _stricoll (const char*, const char*);
|
||||
char* _strlwr (char*);
|
||||
int _strnicmp (const char*, const char*, size_t);
|
||||
char* _strnset (char*, int, size_t);
|
||||
char* _strrev (char*);
|
||||
char* _strset (char*, int);
|
||||
char* _strupr (char*);
|
||||
void _swab (const char*, char*, size_t);
|
||||
|
||||
/*
|
||||
* Multi-byte character functions
|
||||
*/
|
||||
unsigned char* _mbschr (unsigned char*, unsigned char*);
|
||||
unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t);
|
||||
unsigned char* _mbstok (unsigned char*, unsigned char*);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
int _strncoll(const char*, const char*, size_t);
|
||||
int _strnicoll(const char*, const char*, size_t);
|
||||
#endif
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* Unicode versions of the standard calls.
|
||||
*/
|
||||
wchar_t* wcscat (wchar_t*, const wchar_t*);
|
||||
wchar_t* wcschr (const wchar_t*, wchar_t);
|
||||
int wcscmp (const wchar_t*, const wchar_t*);
|
||||
int wcscoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcscpy (wchar_t*, const wchar_t*);
|
||||
size_t wcscspn (const wchar_t*, const wchar_t*);
|
||||
/* Note: No wcserror in CRTDLL. */
|
||||
size_t wcslen (const wchar_t*);
|
||||
wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
|
||||
int wcsncmp(const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsrchr(const wchar_t*, wchar_t);
|
||||
size_t wcsspn(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsstr(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcstok(wchar_t*, const wchar_t*);
|
||||
size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Unicode versions of non-ANSI functions provided by CRTDLL.
|
||||
*/
|
||||
|
||||
/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
|
||||
#define _wcscmpi _wcsicmp
|
||||
|
||||
wchar_t* _wcsdup (wchar_t*);
|
||||
int _wcsicmp (const wchar_t*, const wchar_t*);
|
||||
int _wcsicoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* _wcslwr (wchar_t*);
|
||||
int _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* _wcsnset (wchar_t*, wchar_t, size_t);
|
||||
wchar_t* _wcsrev (wchar_t*);
|
||||
wchar_t* _wcsset (wchar_t*, wchar_t);
|
||||
wchar_t* _wcsupr (wchar_t*);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
int _wcsncoll(const wchar_t*, const wchar_t*, size_t);
|
||||
int _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/*
|
||||
* Non-underscored versions of non-ANSI functions. They live in liboldnames.a
|
||||
* and provide a little extra portability. Also a few extra UNIX-isms like
|
||||
* strcasecmp.
|
||||
*/
|
||||
|
||||
void* memccpy (void*, const void*, int, size_t);
|
||||
int memicmp (const void*, const void*, size_t);
|
||||
char* strdup (const char*);
|
||||
int strcmpi (const char*, const char*);
|
||||
int stricmp (const char*, const char*);
|
||||
int strcasecmp (const char*, const char*);
|
||||
int stricoll (const char*, const char*);
|
||||
char* strlwr (char*);
|
||||
int strnicmp (const char*, const char*, size_t);
|
||||
int strncasecmp (const char*, const char*, size_t);
|
||||
char* strnset (char*, int, size_t);
|
||||
char* strrev (char*);
|
||||
char* strset (char*, int);
|
||||
char* strupr (char*);
|
||||
#ifndef _UWIN
|
||||
void swab (const char*, char*, size_t);
|
||||
#endif /* _UWIN */
|
||||
|
||||
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
|
||||
int wcscmpi (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsdup (wchar_t*);
|
||||
int wcsicmp (const wchar_t*, const wchar_t*);
|
||||
int wcsicoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcslwr (wchar_t*);
|
||||
int wcsnicmp (const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcsnset (wchar_t*, wchar_t, size_t);
|
||||
wchar_t* wcsrev (wchar_t*);
|
||||
wchar_t* wcsset (wchar_t*, wchar_t);
|
||||
wchar_t* wcsupr (wchar_t*);
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#endif /* Not strict ANSI */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _STRING_H_ */
|
||||
|
||||
/*
|
||||
* string.h
|
||||
*
|
||||
* Definitions for memory and string functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STRING_H_
|
||||
#define _STRING_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* Define size_t, wchar_t and NULL
|
||||
*/
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#define __need_NULL
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Prototypes of the ANSI Standard C library string functions.
|
||||
*/
|
||||
void* memchr (const void*, int, size_t);
|
||||
int memcmp (const void*, const void*, size_t);
|
||||
void* memcpy (void*, const void*, size_t);
|
||||
void* memmove (void*, const void*, size_t);
|
||||
void* memset (void*, int, size_t);
|
||||
char* strcat (char*, const char*);
|
||||
char* strchr (const char*, int);
|
||||
int strcmp (const char*, const char*);
|
||||
int strcoll (const char*, const char*); /* Compare using locale */
|
||||
char* strcpy (char*, const char*);
|
||||
size_t strcspn (const char*, const char*);
|
||||
char* strerror (int); /* NOTE: NOT an old name wrapper. */
|
||||
char* _strerror (const char *);
|
||||
size_t strlen (const char*);
|
||||
char* strncat (char*, const char*, size_t);
|
||||
int strncmp (const char*, const char*, size_t);
|
||||
char* strncpy (char*, const char*, size_t);
|
||||
char* strpbrk (const char*, const char*);
|
||||
char* strrchr (const char*, int);
|
||||
size_t strspn (const char*, const char*);
|
||||
char* strstr (const char*, const char*);
|
||||
char* strtok (char*, const char*);
|
||||
size_t strxfrm (char*, const char*, size_t);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Extra non-ANSI functions provided by the CRTDLL library
|
||||
*/
|
||||
void* _memccpy (void*, const void*, int, size_t);
|
||||
int _memicmp (const void*, const void*, size_t);
|
||||
char* _strdup (const char*);
|
||||
int _strcmpi (const char*, const char*);
|
||||
int _stricmp (const char*, const char*);
|
||||
int _stricoll (const char*, const char*);
|
||||
char* _strlwr (char*);
|
||||
int _strnicmp (const char*, const char*, size_t);
|
||||
char* _strnset (char*, int, size_t);
|
||||
char* _strrev (char*);
|
||||
char* _strset (char*, int);
|
||||
char* _strupr (char*);
|
||||
void _swab (const char*, char*, size_t);
|
||||
|
||||
/*
|
||||
* Multi-byte character functions
|
||||
*/
|
||||
unsigned char* _mbschr (unsigned char*, unsigned char*);
|
||||
unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t);
|
||||
unsigned char* _mbstok (unsigned char*, unsigned char*);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
int _strncoll(const char*, const char*, size_t);
|
||||
int _strnicoll(const char*, const char*, size_t);
|
||||
#endif
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* Unicode versions of the standard calls.
|
||||
*/
|
||||
wchar_t* wcscat (wchar_t*, const wchar_t*);
|
||||
wchar_t* wcschr (const wchar_t*, wchar_t);
|
||||
int wcscmp (const wchar_t*, const wchar_t*);
|
||||
int wcscoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcscpy (wchar_t*, const wchar_t*);
|
||||
size_t wcscspn (const wchar_t*, const wchar_t*);
|
||||
/* Note: No wcserror in CRTDLL. */
|
||||
size_t wcslen (const wchar_t*);
|
||||
wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
|
||||
int wcsncmp(const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsrchr(const wchar_t*, wchar_t);
|
||||
size_t wcsspn(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsstr(const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcstok(wchar_t*, const wchar_t*);
|
||||
size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
/*
|
||||
* Unicode versions of non-ANSI functions provided by CRTDLL.
|
||||
*/
|
||||
|
||||
/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
|
||||
#define _wcscmpi _wcsicmp
|
||||
|
||||
wchar_t* _wcsdup (wchar_t*);
|
||||
int _wcsicmp (const wchar_t*, const wchar_t*);
|
||||
int _wcsicoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* _wcslwr (wchar_t*);
|
||||
int _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* _wcsnset (wchar_t*, wchar_t, size_t);
|
||||
wchar_t* _wcsrev (wchar_t*);
|
||||
wchar_t* _wcsset (wchar_t*, wchar_t);
|
||||
wchar_t* _wcsupr (wchar_t*);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
int _wcsncoll(const wchar_t*, const wchar_t*, size_t);
|
||||
int _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/*
|
||||
* Non-underscored versions of non-ANSI functions. They live in liboldnames.a
|
||||
* and provide a little extra portability. Also a few extra UNIX-isms like
|
||||
* strcasecmp.
|
||||
*/
|
||||
|
||||
void* memccpy (void*, const void*, int, size_t);
|
||||
int memicmp (const void*, const void*, size_t);
|
||||
char* strdup (const char*);
|
||||
int strcmpi (const char*, const char*);
|
||||
int stricmp (const char*, const char*);
|
||||
int strcasecmp (const char*, const char*);
|
||||
int stricoll (const char*, const char*);
|
||||
char* strlwr (char*);
|
||||
int strnicmp (const char*, const char*, size_t);
|
||||
int strncasecmp (const char*, const char*, size_t);
|
||||
char* strnset (char*, int, size_t);
|
||||
char* strrev (char*);
|
||||
char* strset (char*, int);
|
||||
char* strupr (char*);
|
||||
#ifndef _UWIN
|
||||
void swab (const char*, char*, size_t);
|
||||
#endif /* _UWIN */
|
||||
|
||||
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
|
||||
int wcscmpi (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcsdup (wchar_t*);
|
||||
int wcsicmp (const wchar_t*, const wchar_t*);
|
||||
int wcsicoll (const wchar_t*, const wchar_t*);
|
||||
wchar_t* wcslwr (wchar_t*);
|
||||
int wcsnicmp (const wchar_t*, const wchar_t*, size_t);
|
||||
wchar_t* wcsnset (wchar_t*, wchar_t, size_t);
|
||||
wchar_t* wcsrev (wchar_t*);
|
||||
wchar_t* wcsset (wchar_t*, wchar_t);
|
||||
wchar_t* wcsupr (wchar_t*);
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
#endif /* Not strict ANSI */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _STRING_H_ */
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* This fcntl.h maps to the root fcntl.h
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* This fcntl.h maps to the root fcntl.h
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* This file.h maps to the root fcntl.h
|
||||
* TODO?
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* This file.h maps to the root fcntl.h
|
||||
* TODO?
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
@ -1,52 +1,52 @@
|
||||
/*
|
||||
* locking.h
|
||||
*
|
||||
* Constants for the mode parameter of the locking function.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _LOCKING_H_
|
||||
#define _LOCKING_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define _LK_UNLCK 0 /* Unlock */
|
||||
#define _LK_LOCK 1 /* Lock */
|
||||
#define _LK_NBLCK 2 /* Non-blocking lock */
|
||||
#define _LK_RLCK 3 /* Lock for read only */
|
||||
#define _LK_NBRLCK 4 /* Non-blocking lock for read only */
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#define LK_UNLCK _LK_UNLCK
|
||||
#define LK_LOCK _LK_LOCK
|
||||
#define LK_NBLCK _LK_NBLCK
|
||||
#define LK_RLCK _LK_RLCK
|
||||
#define LK_NBRLCK _LK_NBRLCK
|
||||
#endif /* Not NO_OLDNAMES */
|
||||
|
||||
#endif /* Not _LOCKING_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* locking.h
|
||||
*
|
||||
* Constants for the mode parameter of the locking function.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _LOCKING_H_
|
||||
#define _LOCKING_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define _LK_UNLCK 0 /* Unlock */
|
||||
#define _LK_LOCK 1 /* Lock */
|
||||
#define _LK_NBLCK 2 /* Non-blocking lock */
|
||||
#define _LK_RLCK 3 /* Lock for read only */
|
||||
#define _LK_NBRLCK 4 /* Non-blocking lock for read only */
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#define LK_UNLCK _LK_UNLCK
|
||||
#define LK_LOCK _LK_LOCK
|
||||
#define LK_NBLCK _LK_NBLCK
|
||||
#define LK_RLCK _LK_RLCK
|
||||
#define LK_NBRLCK _LK_NBRLCK
|
||||
#endif /* Not NO_OLDNAMES */
|
||||
|
||||
#endif /* Not _LOCKING_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,190 +1,190 @@
|
||||
/*
|
||||
* stat.h
|
||||
*
|
||||
* Symbolic constants for opening and creating files, also stat, fstat and
|
||||
* chmod functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _STAT_H_
|
||||
#define _STAT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Constants for the stat st_mode member.
|
||||
*/
|
||||
#define _S_IFIFO 0x1000 /* FIFO */
|
||||
#define _S_IFCHR 0x2000 /* Character */
|
||||
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
|
||||
#define _S_IFDIR 0x4000 /* Directory */
|
||||
#define _S_IFREG 0x8000 /* Regular */
|
||||
|
||||
#define _S_IFMT 0xF000 /* File type mask */
|
||||
|
||||
#define _S_IEXEC 0x0040
|
||||
#define _S_IWRITE 0x0080
|
||||
#define _S_IREAD 0x0100
|
||||
|
||||
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
|
||||
#define _S_IXUSR _S_IEXEC
|
||||
#define _S_IWUSR _S_IWRITE
|
||||
#define _S_IRUSR _S_IREAD
|
||||
|
||||
#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
|
||||
#define _S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
|
||||
#define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR)
|
||||
#define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK)
|
||||
#define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#define S_IFIFO _S_IFIFO
|
||||
#define S_IFCHR _S_IFCHR
|
||||
#define S_IFBLK _S_IFBLK
|
||||
#define S_IFDIR _S_IFDIR
|
||||
#define S_IFREG _S_IFREG
|
||||
#define S_IFMT _S_IFMT
|
||||
#define S_IEXEC _S_IEXEC
|
||||
#define S_IWRITE _S_IWRITE
|
||||
#define S_IREAD _S_IREAD
|
||||
#define S_IRWXU _S_IRWXU
|
||||
#define S_IXUSR _S_IXUSR
|
||||
#define S_IWUSR _S_IWUSR
|
||||
#define S_IRUSR _S_IRUSR
|
||||
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
||||
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
||||
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _STAT_DEFINED
|
||||
/*
|
||||
* The structure manipulated and returned by stat and fstat.
|
||||
*
|
||||
* NOTE: If called on a directory the values in the time fields are not only
|
||||
* invalid, they will cause localtime et. al. to return NULL. And calling
|
||||
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
|
||||
*/
|
||||
struct _stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
|
||||
struct stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
#if defined (__MSVCRT__)
|
||||
struct _stati64 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int64 st_size;
|
||||
time_t st_atime;
|
||||
time_t st_mtime;
|
||||
time_t st_ctime;
|
||||
};
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _STAT_DEFINED
|
||||
#endif /* _STAT_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _fstat (int, struct _stat*);
|
||||
int _chmod (const char*, int);
|
||||
int _stat (const char*, struct _stat*);
|
||||
|
||||
#if defined (__MSVCRT__)
|
||||
int _fstati64(int, struct _stati64 *);
|
||||
int _stati64(const char *, struct _stati64 *);
|
||||
#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
|
||||
int _wstat(const wchar_t*, struct _stat*);
|
||||
int _wstati64 (const wchar_t*, struct _stati64*);
|
||||
#define _WSTAT_DEFINED
|
||||
#endif /* _WSTAT_DEFIND */
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/* These functions live in liboldnames.a. */
|
||||
int fstat (int, struct stat*);
|
||||
int chmod (const char*, int);
|
||||
int stat (const char*, struct stat*);
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _STAT_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* stat.h
|
||||
*
|
||||
* Symbolic constants for opening and creating files, also stat, fstat and
|
||||
* chmod functions.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _STAT_H_
|
||||
#define _STAT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Constants for the stat st_mode member.
|
||||
*/
|
||||
#define _S_IFIFO 0x1000 /* FIFO */
|
||||
#define _S_IFCHR 0x2000 /* Character */
|
||||
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
|
||||
#define _S_IFDIR 0x4000 /* Directory */
|
||||
#define _S_IFREG 0x8000 /* Regular */
|
||||
|
||||
#define _S_IFMT 0xF000 /* File type mask */
|
||||
|
||||
#define _S_IEXEC 0x0040
|
||||
#define _S_IWRITE 0x0080
|
||||
#define _S_IREAD 0x0100
|
||||
|
||||
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
|
||||
#define _S_IXUSR _S_IEXEC
|
||||
#define _S_IWUSR _S_IWRITE
|
||||
#define _S_IRUSR _S_IREAD
|
||||
|
||||
#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
|
||||
#define _S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
|
||||
#define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR)
|
||||
#define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK)
|
||||
#define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#define S_IFIFO _S_IFIFO
|
||||
#define S_IFCHR _S_IFCHR
|
||||
#define S_IFBLK _S_IFBLK
|
||||
#define S_IFDIR _S_IFDIR
|
||||
#define S_IFREG _S_IFREG
|
||||
#define S_IFMT _S_IFMT
|
||||
#define S_IEXEC _S_IEXEC
|
||||
#define S_IWRITE _S_IWRITE
|
||||
#define S_IREAD _S_IREAD
|
||||
#define S_IRWXU _S_IRWXU
|
||||
#define S_IXUSR _S_IXUSR
|
||||
#define S_IWUSR _S_IWUSR
|
||||
#define S_IRUSR _S_IRUSR
|
||||
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
||||
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
||||
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _STAT_DEFINED
|
||||
/*
|
||||
* The structure manipulated and returned by stat and fstat.
|
||||
*
|
||||
* NOTE: If called on a directory the values in the time fields are not only
|
||||
* invalid, they will cause localtime et. al. to return NULL. And calling
|
||||
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
|
||||
*/
|
||||
struct _stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
|
||||
struct stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
#if defined (__MSVCRT__)
|
||||
struct _stati64 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int64 st_size;
|
||||
time_t st_atime;
|
||||
time_t st_mtime;
|
||||
time_t st_ctime;
|
||||
};
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _STAT_DEFINED
|
||||
#endif /* _STAT_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _fstat (int, struct _stat*);
|
||||
int _chmod (const char*, int);
|
||||
int _stat (const char*, struct _stat*);
|
||||
|
||||
#if defined (__MSVCRT__)
|
||||
int _fstati64(int, struct _stati64 *);
|
||||
int _stati64(const char *, struct _stati64 *);
|
||||
#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
|
||||
int _wstat(const wchar_t*, struct _stat*);
|
||||
int _wstati64 (const wchar_t*, struct _stati64*);
|
||||
#define _WSTAT_DEFINED
|
||||
#endif /* _WSTAT_DEFIND */
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/* These functions live in liboldnames.a. */
|
||||
int fstat (int, struct stat*);
|
||||
int chmod (const char*, int);
|
||||
int stat (const char*, struct stat*);
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _STAT_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
|
||||
#include <time.h>
|
||||
|
||||
|
@ -1,82 +1,82 @@
|
||||
/*
|
||||
* timeb.h
|
||||
*
|
||||
* Support for the UNIX System V ftime system call.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _TIMEB_H_
|
||||
#define _TIMEB_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* TODO: Structure not tested.
|
||||
*/
|
||||
struct _timeb
|
||||
{
|
||||
long time;
|
||||
short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* TODO: Structure not tested.
|
||||
*/
|
||||
struct timeb
|
||||
{
|
||||
long time;
|
||||
short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* TODO: Not tested. */
|
||||
void _ftime (struct _timeb*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
void ftime (struct timeb*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _TIMEB_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* timeb.h
|
||||
*
|
||||
* Support for the UNIX System V ftime system call.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _TIMEB_H_
|
||||
#define _TIMEB_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* TODO: Structure not tested.
|
||||
*/
|
||||
struct _timeb
|
||||
{
|
||||
long time;
|
||||
short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/*
|
||||
* TODO: Structure not tested.
|
||||
*/
|
||||
struct timeb
|
||||
{
|
||||
long time;
|
||||
short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* TODO: Not tested. */
|
||||
void _ftime (struct _timeb*);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
void ftime (struct timeb*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _TIMEB_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,118 +1,118 @@
|
||||
/*
|
||||
* types.h
|
||||
*
|
||||
* The definition of constants, data types and global variables.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
* Lots of types supplied by Pedro A. Aranda <paag@tid.es>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warrenties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TYPES_H_
|
||||
#define _TYPES_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#define __need_ptrdiff_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _TIME_T_DEFINED
|
||||
typedef long time_t;
|
||||
#define _TIME_T_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _OFF_T_
|
||||
#define _OFF_T_
|
||||
typedef long _off_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _off_t off_t;
|
||||
#endif
|
||||
#endif /* Not _OFF_T_ */
|
||||
|
||||
|
||||
#ifndef _DEV_T_
|
||||
#define _DEV_T_
|
||||
#ifdef __MSVCRT__
|
||||
typedef unsigned int _dev_t;
|
||||
#else
|
||||
typedef short _dev_t;
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _dev_t dev_t;
|
||||
#endif
|
||||
#endif /* Not _DEV_T_ */
|
||||
|
||||
|
||||
#ifndef _INO_T_
|
||||
#define _INO_T_
|
||||
typedef short _ino_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _ino_t ino_t;
|
||||
#endif
|
||||
#endif /* Not _INO_T_ */
|
||||
|
||||
|
||||
#ifndef _PID_T_
|
||||
#define _PID_T_
|
||||
typedef int _pid_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _pid_t pid_t;
|
||||
#endif
|
||||
#endif /* Not _PID_T_ */
|
||||
|
||||
|
||||
#ifndef _MODE_T_
|
||||
#define _MODE_T_
|
||||
typedef unsigned short _mode_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _mode_t mode_t;
|
||||
#endif
|
||||
#endif /* Not _MODE_T_ */
|
||||
|
||||
|
||||
#ifndef _SIGSET_T_
|
||||
#define _SIGSET_T_
|
||||
typedef int _sigset_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _sigset_t sigset_t;
|
||||
#endif
|
||||
#endif /* Not _SIGSET_T_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _TYPES_H_ */
|
||||
/*
|
||||
* types.h
|
||||
*
|
||||
* The definition of constants, data types and global variables.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
* Lots of types supplied by Pedro A. Aranda <paag@tid.es>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warrenties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TYPES_H_
|
||||
#define _TYPES_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#define __need_ptrdiff_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifndef _TIME_T_DEFINED
|
||||
typedef long time_t;
|
||||
#define _TIME_T_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _OFF_T_
|
||||
#define _OFF_T_
|
||||
typedef long _off_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _off_t off_t;
|
||||
#endif
|
||||
#endif /* Not _OFF_T_ */
|
||||
|
||||
|
||||
#ifndef _DEV_T_
|
||||
#define _DEV_T_
|
||||
#ifdef __MSVCRT__
|
||||
typedef unsigned int _dev_t;
|
||||
#else
|
||||
typedef short _dev_t;
|
||||
#endif
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _dev_t dev_t;
|
||||
#endif
|
||||
#endif /* Not _DEV_T_ */
|
||||
|
||||
|
||||
#ifndef _INO_T_
|
||||
#define _INO_T_
|
||||
typedef short _ino_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _ino_t ino_t;
|
||||
#endif
|
||||
#endif /* Not _INO_T_ */
|
||||
|
||||
|
||||
#ifndef _PID_T_
|
||||
#define _PID_T_
|
||||
typedef int _pid_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _pid_t pid_t;
|
||||
#endif
|
||||
#endif /* Not _PID_T_ */
|
||||
|
||||
|
||||
#ifndef _MODE_T_
|
||||
#define _MODE_T_
|
||||
typedef unsigned short _mode_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _mode_t mode_t;
|
||||
#endif
|
||||
#endif /* Not _MODE_T_ */
|
||||
|
||||
|
||||
#ifndef _SIGSET_T_
|
||||
#define _SIGSET_T_
|
||||
typedef int _sigset_t;
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
typedef _sigset_t sigset_t;
|
||||
#endif
|
||||
#endif /* Not _SIGSET_T_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _TYPES_H_ */
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* unistd.h maps (roughly) to io.h
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* unistd.h maps (roughly) to io.h
|
||||
*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
|
@ -1,89 +1,89 @@
|
||||
/*
|
||||
* utime.h
|
||||
*
|
||||
* Support for the utime function.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _UTIME_H_
|
||||
#define _UTIME_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* Structure used by _utime function.
|
||||
*/
|
||||
struct _utimbuf
|
||||
{
|
||||
time_t actime; /* Access time */
|
||||
time_t modtime; /* Modification time */
|
||||
};
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/* NOTE: Must be the same as _utimbuf above. */
|
||||
struct utimbuf
|
||||
{
|
||||
time_t actime;
|
||||
time_t modtime;
|
||||
};
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _utime (const char*, struct _utimbuf*);
|
||||
int _futime (int, struct _utimbuf*);
|
||||
|
||||
/* The wide character version, only available for MSVCRT versions of the
|
||||
* C runtime library. */
|
||||
#ifdef __MSVCRT__
|
||||
int _wutime (const wchar_t*, struct _utimbuf*);
|
||||
#endif /* MSVCRT runtime */
|
||||
#ifndef _NO_OLDNAMES
|
||||
int utime (const char*, struct utimbuf*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _UTIME_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* utime.h
|
||||
*
|
||||
* Support for the utime function.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _UTIME_H_
|
||||
#define _UTIME_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* Structure used by _utime function.
|
||||
*/
|
||||
struct _utimbuf
|
||||
{
|
||||
time_t actime; /* Access time */
|
||||
time_t modtime; /* Modification time */
|
||||
};
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
/* NOTE: Must be the same as _utimbuf above. */
|
||||
struct utimbuf
|
||||
{
|
||||
time_t actime;
|
||||
time_t modtime;
|
||||
};
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _utime (const char*, struct _utimbuf*);
|
||||
int _futime (int, struct _utimbuf*);
|
||||
|
||||
/* The wide character version, only available for MSVCRT versions of the
|
||||
* C runtime library. */
|
||||
#ifdef __MSVCRT__
|
||||
int _wutime (const wchar_t*, struct _utimbuf*);
|
||||
#endif /* MSVCRT runtime */
|
||||
#ifndef _NO_OLDNAMES
|
||||
int utime (const char*, struct utimbuf*);
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _UTIME_H_ */
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
|
@ -1,367 +1,367 @@
|
||||
/*
|
||||
* tchar.h
|
||||
*
|
||||
* Unicode mapping layer for the standard C library. By including this
|
||||
* file and using the 't' names for string functions
|
||||
* (eg. _tprintf) you can make code which can be easily adapted to both
|
||||
* Unicode and non-unicode environments. In a unicode enabled compile define
|
||||
* _UNICODE before including tchar.h, otherwise the standard non-unicode
|
||||
* library functions will be used.
|
||||
*
|
||||
* Note that you still need to include string.h or stdlib.h etc. to define
|
||||
* the appropriate functions. Also note that there are several defines
|
||||
* included for non-ANSI functions which are commonly available (but using
|
||||
* the convention of prepending an underscore to non-ANSI library function
|
||||
* names).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TCHAR_H_
|
||||
#define _TCHAR_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* NOTE: This tests _UNICODE, which is different from the UNICODE define
|
||||
* used to differentiate Win32 API calls.
|
||||
*/
|
||||
#ifdef _UNICODE
|
||||
|
||||
|
||||
/*
|
||||
* Use TCHAR instead of char or wchar_t. It will be appropriately translated
|
||||
* if _UNICODE is correctly defined (or not).
|
||||
*/
|
||||
#ifndef _TCHAR_DEFINED
|
||||
#ifndef RC_INVOKED
|
||||
typedef wchar_t TCHAR;
|
||||
typedef wchar_t _TCHAR;
|
||||
#endif /* Not RC_INVOKED */
|
||||
#define _TCHAR_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* __TEXT is a private macro whose specific use is to force the expansion of a
|
||||
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
|
||||
* macro within your programs. It's name and function could change without
|
||||
* notice.
|
||||
*/
|
||||
#define __TEXT(x) L##x
|
||||
|
||||
/* for porting from other Windows compilers */
|
||||
#if 0 // no wide startup module
|
||||
#define _tmain wmain
|
||||
#define _tWinMain wWinMain
|
||||
#define _tenviron _wenviron
|
||||
#define __targv __wargv
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unicode functions
|
||||
*/
|
||||
#define _tprintf wprintf
|
||||
#define _ftprintf fwprintf
|
||||
#define _stprintf swprintf
|
||||
#define _sntprintf _snwprintf
|
||||
#define _vtprintf vwprintf
|
||||
#define _vftprintf vfwprintf
|
||||
#define _vstprintf vswprintf
|
||||
#define _vsntprintf _vsnwprintf
|
||||
#define _tscanf wscanf
|
||||
#define _ftscanf fwscanf
|
||||
#define _stscanf swscanf
|
||||
#define _fgettc fgetwc
|
||||
#define _fgettchar _fgetwchar
|
||||
#define _fgetts fgetws
|
||||
#define _fputtc fputwc
|
||||
#define _fputtchar _fputwchar
|
||||
#define _fputts fputws
|
||||
#define _gettc getwc
|
||||
#define _getts getws
|
||||
#define _puttc putwc
|
||||
#define _putts putws
|
||||
#define _ungettc ungetwc
|
||||
#define _tcstod wcstod
|
||||
#define _tcstol wcstol
|
||||
#define _tcstoul wcstoul
|
||||
#define _itot _itow
|
||||
#define _ltot _ltow
|
||||
#define _ultot _ultow
|
||||
#define _ttoi _wtoi
|
||||
#define _ttol _wtol
|
||||
#define _tcscat wcscat
|
||||
#define _tcschr wcschr
|
||||
#define _tcscmp wcscmp
|
||||
#define _tcscpy wcscpy
|
||||
#define _tcscspn wcscspn
|
||||
#define _tcslen wcslen
|
||||
#define _tcsncat wcsncat
|
||||
#define _tcsncmp wcsncmp
|
||||
#define _tcsncpy wcsncpy
|
||||
#define _tcspbrk wcspbrk
|
||||
#define _tcsrchr wcsrchr
|
||||
#define _tcsspn wcsspn
|
||||
#define _tcsstr wcsstr
|
||||
#define _tcstok wcstok
|
||||
#define _tcsdup _wcsdup
|
||||
#define _tcsicmp _wcsicmp
|
||||
#define _tcsnicmp _wcsnicmp
|
||||
#define _tcsnset _wcsnset
|
||||
#define _tcsrev _wcsrev
|
||||
#define _tcsset _wcsset
|
||||
#define _tcslwr _wcslwr
|
||||
#define _tcsupr _wcsupr
|
||||
#define _tcsxfrm wcsxfrm
|
||||
#define _tcscoll wcscoll
|
||||
#define _tcsicoll _wcsicoll
|
||||
#define _istalpha iswalpha
|
||||
#define _istupper iswupper
|
||||
#define _istlower iswlower
|
||||
#define _istdigit iswdigit
|
||||
#define _istxdigit iswxdigit
|
||||
#define _istspace iswspace
|
||||
#define _istpunct iswpunct
|
||||
#define _istalnum iswalnum
|
||||
#define _istprint iswprint
|
||||
#define _istgraph iswgraph
|
||||
#define _istcntrl iswcntrl
|
||||
#define _istascii iswascii
|
||||
#define _totupper towupper
|
||||
#define _totlower towlower
|
||||
#define _tcsftime wcsftime
|
||||
/* Macro functions */
|
||||
#define _tcsdec _wcsdec
|
||||
#define _tcsinc _wcsinc
|
||||
#define _tcsnbcnt _wcsncnt
|
||||
#define _tcsnccnt _wcsncnt
|
||||
#define _tcsnextc _wcsnextc
|
||||
#define _tcsninc _wcsninc
|
||||
#define _tcsspnp _wcsspnp
|
||||
#define _wcsdec(_wcs1, _wcs2) ((_wcs1)>=(_wcs2) ? NULL : (_wcs2)-1)
|
||||
#define _wcsinc(_wcs) ((_wcs)+1)
|
||||
#define _wcsnextc(_wcs) ((unsigned int) *(_wcs))
|
||||
#define _wcsninc(_wcs, _inc) (((_wcs)+(_inc)))
|
||||
#define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
|
||||
#define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
|
||||
|
||||
#if 1 // defined __MSVCRT__
|
||||
/*
|
||||
* These wide functions not in crtdll.dll.
|
||||
* Define macros anyway so that _wfoo rather than _tfoo is undefined
|
||||
*/
|
||||
#define _ttoi64 _wtoi64
|
||||
#define _i64tot _i64tow
|
||||
#define _ui64tot _ui64tow
|
||||
#define _tasctime _wasctime
|
||||
#define _tctime _wctime
|
||||
#define _tstrdate _wstrdate
|
||||
#define _tstrtime _wstrtime
|
||||
#define _tutime _wutime
|
||||
#define _tcsnccoll _wcsncoll
|
||||
#define _tcsncoll _wcsncoll
|
||||
#define _tcsncicoll _wcsnicoll
|
||||
#define _tcsnicoll _wcsnicoll
|
||||
#define _taccess _waccess
|
||||
#define _tchmod _wchmod
|
||||
#define _tcreat _wcreat
|
||||
#define _tfindfirst _wfindfirst
|
||||
#define _tfindnext _wfindnext
|
||||
#define _tfopen _wfopen
|
||||
#define _tgetenv _wgetenv
|
||||
#define _tmktemp _wmktemp
|
||||
#define _topen _wopen
|
||||
#define _tremove _wremove
|
||||
#define _trename _wrename
|
||||
#define _tsopen _wsopen
|
||||
#define _tsetlocale _wsetlocale
|
||||
#define _tunlink _wunlink
|
||||
#define _tfinddata_t _wfinddata_t
|
||||
#define _tfindfirsti64 _wfindfirsti64
|
||||
#define _tfindnexti64 _wfindnexti64
|
||||
#define _tfinddatai64_t _wfinddatai64_t
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#else /* Not _UNICODE */
|
||||
|
||||
/*
|
||||
* TCHAR, the type you should use instead of char.
|
||||
*/
|
||||
#ifndef _TCHAR_DEFINED
|
||||
#ifndef RC_INVOKED
|
||||
typedef char TCHAR;
|
||||
typedef char _TCHAR;
|
||||
#endif
|
||||
#define _TCHAR_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* __TEXT is a private macro whose specific use is to force the expansion of a
|
||||
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
|
||||
* macro within your programs. It's name and function could change without
|
||||
* notice.
|
||||
*/
|
||||
#define __TEXT(x) x
|
||||
|
||||
/* for porting from other Windows compilers */
|
||||
#define _tmain main
|
||||
#define _tWinMain WinMain
|
||||
#define _tenviron _environ
|
||||
#define __targv __argv
|
||||
|
||||
/*
|
||||
* Non-unicode (standard) functions
|
||||
*/
|
||||
|
||||
#define _tprintf printf
|
||||
#define _ftprintf fprintf
|
||||
#define _stprintf sprintf
|
||||
#define _sntprintf _snprintf
|
||||
#define _vtprintf vprintf
|
||||
#define _vftprintf vfprintf
|
||||
#define _vstprintf vsprintf
|
||||
#define _vsntprintf _vsnprintf
|
||||
#define _tscanf scanf
|
||||
#define _ftscanf fscanf
|
||||
#define _stscanf sscanf
|
||||
#define _fgettc fgetc
|
||||
#define _fgettchar _fgetchar
|
||||
#define _fgetts fgets
|
||||
#define _fputtc fputc
|
||||
#define _fputtchar _fputchar
|
||||
#define _fputts fputs
|
||||
#define _tfopen fopen
|
||||
#define _tgetenv getenv
|
||||
#define _gettc getc
|
||||
#define _getts gets
|
||||
#define _puttc putc
|
||||
#define _putts puts
|
||||
#define _ungettc ungetc
|
||||
#define _tcstod strtod
|
||||
#define _tcstol strtol
|
||||
#define _tcstoul strtoul
|
||||
#define _itot _itoa
|
||||
#define _ltot _ltoa
|
||||
#define _ultot _ultoa
|
||||
#define _ttoi atoi
|
||||
#define _ttol atol
|
||||
#define _tcscat strcat
|
||||
#define _tcschr strchr
|
||||
#define _tcscmp strcmp
|
||||
#define _tcscpy strcpy
|
||||
#define _tcscspn strcspn
|
||||
#define _tcslen strlen
|
||||
#define _tcsncat strncat
|
||||
#define _tcsncmp strncmp
|
||||
#define _tcsncpy strncpy
|
||||
#define _tcspbrk strpbrk
|
||||
#define _tcsrchr strrchr
|
||||
#define _tcsspn strspn
|
||||
#define _tcsstr strstr
|
||||
#define _tcstok strtok
|
||||
#define _tcsdup _strdup
|
||||
#define _tcsicmp _stricmp
|
||||
#define _tcsnicmp _strnicmp
|
||||
#define _tcsnset _strnset
|
||||
#define _tcsrev _strrev
|
||||
#define _tcsset _strset
|
||||
#define _tcslwr _strlwr
|
||||
#define _tcsupr _strupr
|
||||
#define _tcsxfrm strxfrm
|
||||
#define _tcscoll strcoll
|
||||
#define _tcsicoll _stricoll
|
||||
#define _istalpha isalpha
|
||||
#define _istupper isupper
|
||||
#define _istlower islower
|
||||
#define _istdigit isdigit
|
||||
#define _istxdigit isxdigit
|
||||
#define _istspace isspace
|
||||
#define _istpunct ispunct
|
||||
#define _istalnum isalnum
|
||||
#define _istprint isprint
|
||||
#define _istgraph isgraph
|
||||
#define _istcntrl iscntrl
|
||||
#define _istascii isascii
|
||||
#define _totupper toupper
|
||||
#define _totlower tolower
|
||||
#define _tasctime asctime
|
||||
#define _tctime ctime
|
||||
#define _tstrdate _strdate
|
||||
#define _tstrtime _strtime
|
||||
#define _tutime _utime
|
||||
#define _tcsftime strftime
|
||||
/* Macro functions */
|
||||
#define _tcsdec _strdec
|
||||
#define _tcsinc _strinc
|
||||
#define _tcsnbcnt _strncnt
|
||||
#define _tcsnccnt _strncnt
|
||||
#define _tcsnextc _strnextc
|
||||
#define _tcsninc _strninc
|
||||
#define _tcsspnp _strspnp
|
||||
#define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
|
||||
#define _strinc(_str) ((_str)+1)
|
||||
#define _strnextc(_str) ((unsigned int) *(_str))
|
||||
#define _strninc(_str, _inc) (((_str)+(_inc)))
|
||||
#define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
|
||||
#define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL)
|
||||
|
||||
#define _tchmod _chmod
|
||||
#define _tcreat _creat
|
||||
#define _tfindfirst _findfirst
|
||||
#define _tfindnext _findnext
|
||||
#define _tmktemp _mktemp
|
||||
#define _topen _open
|
||||
#define _taccess _access
|
||||
#define _tremove remove
|
||||
#define _trename rename
|
||||
#define _tsopen _sopen
|
||||
#define _tsetlocale setlocale
|
||||
#define _tunlink _unlink
|
||||
#define _tfinddata_t _finddata_t
|
||||
|
||||
|
||||
#if 1 // defined __MSVCRT__
|
||||
/* Not in crtdll.dll. Define macros anyway? */
|
||||
#define _ttoi64 _atoi64
|
||||
#define _i64tot _i64toa
|
||||
#define _ui64tot _ui64toa
|
||||
#define _tcsnccoll _strncoll
|
||||
#define _tcsncoll _strncoll
|
||||
#define _tcsncicoll _strnicoll
|
||||
#define _tcsnicoll _strnicoll
|
||||
#define _tfindfirsti64 _findfirsti64
|
||||
#define _tfindnexti64 _findnexti64
|
||||
#define _tfinddatai64_t _finddatai64_t
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#endif /* Not _UNICODE */
|
||||
|
||||
/*
|
||||
* UNICODE a constant string when _UNICODE is defined else returns the string
|
||||
* unmodified. Also defined in w32api/winnt.h.
|
||||
*/
|
||||
#define _TEXT(x) __TEXT(x)
|
||||
#define _T(x) __TEXT(x)
|
||||
|
||||
#endif /* Not _TCHAR_H_ */
|
||||
|
||||
/*
|
||||
* tchar.h
|
||||
*
|
||||
* Unicode mapping layer for the standard C library. By including this
|
||||
* file and using the 't' names for string functions
|
||||
* (eg. _tprintf) you can make code which can be easily adapted to both
|
||||
* Unicode and non-unicode environments. In a unicode enabled compile define
|
||||
* _UNICODE before including tchar.h, otherwise the standard non-unicode
|
||||
* library functions will be used.
|
||||
*
|
||||
* Note that you still need to include string.h or stdlib.h etc. to define
|
||||
* the appropriate functions. Also note that there are several defines
|
||||
* included for non-ANSI functions which are commonly available (but using
|
||||
* the convention of prepending an underscore to non-ANSI library function
|
||||
* names).
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TCHAR_H_
|
||||
#define _TCHAR_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
/*
|
||||
* NOTE: This tests _UNICODE, which is different from the UNICODE define
|
||||
* used to differentiate Win32 API calls.
|
||||
*/
|
||||
#ifdef _UNICODE
|
||||
|
||||
|
||||
/*
|
||||
* Use TCHAR instead of char or wchar_t. It will be appropriately translated
|
||||
* if _UNICODE is correctly defined (or not).
|
||||
*/
|
||||
#ifndef _TCHAR_DEFINED
|
||||
#ifndef RC_INVOKED
|
||||
typedef wchar_t TCHAR;
|
||||
typedef wchar_t _TCHAR;
|
||||
#endif /* Not RC_INVOKED */
|
||||
#define _TCHAR_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* __TEXT is a private macro whose specific use is to force the expansion of a
|
||||
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
|
||||
* macro within your programs. It's name and function could change without
|
||||
* notice.
|
||||
*/
|
||||
#define __TEXT(x) L##x
|
||||
|
||||
/* for porting from other Windows compilers */
|
||||
#if 0 // no wide startup module
|
||||
#define _tmain wmain
|
||||
#define _tWinMain wWinMain
|
||||
#define _tenviron _wenviron
|
||||
#define __targv __wargv
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unicode functions
|
||||
*/
|
||||
#define _tprintf wprintf
|
||||
#define _ftprintf fwprintf
|
||||
#define _stprintf swprintf
|
||||
#define _sntprintf _snwprintf
|
||||
#define _vtprintf vwprintf
|
||||
#define _vftprintf vfwprintf
|
||||
#define _vstprintf vswprintf
|
||||
#define _vsntprintf _vsnwprintf
|
||||
#define _tscanf wscanf
|
||||
#define _ftscanf fwscanf
|
||||
#define _stscanf swscanf
|
||||
#define _fgettc fgetwc
|
||||
#define _fgettchar _fgetwchar
|
||||
#define _fgetts fgetws
|
||||
#define _fputtc fputwc
|
||||
#define _fputtchar _fputwchar
|
||||
#define _fputts fputws
|
||||
#define _gettc getwc
|
||||
#define _getts getws
|
||||
#define _puttc putwc
|
||||
#define _putts putws
|
||||
#define _ungettc ungetwc
|
||||
#define _tcstod wcstod
|
||||
#define _tcstol wcstol
|
||||
#define _tcstoul wcstoul
|
||||
#define _itot _itow
|
||||
#define _ltot _ltow
|
||||
#define _ultot _ultow
|
||||
#define _ttoi _wtoi
|
||||
#define _ttol _wtol
|
||||
#define _tcscat wcscat
|
||||
#define _tcschr wcschr
|
||||
#define _tcscmp wcscmp
|
||||
#define _tcscpy wcscpy
|
||||
#define _tcscspn wcscspn
|
||||
#define _tcslen wcslen
|
||||
#define _tcsncat wcsncat
|
||||
#define _tcsncmp wcsncmp
|
||||
#define _tcsncpy wcsncpy
|
||||
#define _tcspbrk wcspbrk
|
||||
#define _tcsrchr wcsrchr
|
||||
#define _tcsspn wcsspn
|
||||
#define _tcsstr wcsstr
|
||||
#define _tcstok wcstok
|
||||
#define _tcsdup _wcsdup
|
||||
#define _tcsicmp _wcsicmp
|
||||
#define _tcsnicmp _wcsnicmp
|
||||
#define _tcsnset _wcsnset
|
||||
#define _tcsrev _wcsrev
|
||||
#define _tcsset _wcsset
|
||||
#define _tcslwr _wcslwr
|
||||
#define _tcsupr _wcsupr
|
||||
#define _tcsxfrm wcsxfrm
|
||||
#define _tcscoll wcscoll
|
||||
#define _tcsicoll _wcsicoll
|
||||
#define _istalpha iswalpha
|
||||
#define _istupper iswupper
|
||||
#define _istlower iswlower
|
||||
#define _istdigit iswdigit
|
||||
#define _istxdigit iswxdigit
|
||||
#define _istspace iswspace
|
||||
#define _istpunct iswpunct
|
||||
#define _istalnum iswalnum
|
||||
#define _istprint iswprint
|
||||
#define _istgraph iswgraph
|
||||
#define _istcntrl iswcntrl
|
||||
#define _istascii iswascii
|
||||
#define _totupper towupper
|
||||
#define _totlower towlower
|
||||
#define _tcsftime wcsftime
|
||||
/* Macro functions */
|
||||
#define _tcsdec _wcsdec
|
||||
#define _tcsinc _wcsinc
|
||||
#define _tcsnbcnt _wcsncnt
|
||||
#define _tcsnccnt _wcsncnt
|
||||
#define _tcsnextc _wcsnextc
|
||||
#define _tcsninc _wcsninc
|
||||
#define _tcsspnp _wcsspnp
|
||||
#define _wcsdec(_wcs1, _wcs2) ((_wcs1)>=(_wcs2) ? NULL : (_wcs2)-1)
|
||||
#define _wcsinc(_wcs) ((_wcs)+1)
|
||||
#define _wcsnextc(_wcs) ((unsigned int) *(_wcs))
|
||||
#define _wcsninc(_wcs, _inc) (((_wcs)+(_inc)))
|
||||
#define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
|
||||
#define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
|
||||
|
||||
#if 1 // defined __MSVCRT__
|
||||
/*
|
||||
* These wide functions not in crtdll.dll.
|
||||
* Define macros anyway so that _wfoo rather than _tfoo is undefined
|
||||
*/
|
||||
#define _ttoi64 _wtoi64
|
||||
#define _i64tot _i64tow
|
||||
#define _ui64tot _ui64tow
|
||||
#define _tasctime _wasctime
|
||||
#define _tctime _wctime
|
||||
#define _tstrdate _wstrdate
|
||||
#define _tstrtime _wstrtime
|
||||
#define _tutime _wutime
|
||||
#define _tcsnccoll _wcsncoll
|
||||
#define _tcsncoll _wcsncoll
|
||||
#define _tcsncicoll _wcsnicoll
|
||||
#define _tcsnicoll _wcsnicoll
|
||||
#define _taccess _waccess
|
||||
#define _tchmod _wchmod
|
||||
#define _tcreat _wcreat
|
||||
#define _tfindfirst _wfindfirst
|
||||
#define _tfindnext _wfindnext
|
||||
#define _tfopen _wfopen
|
||||
#define _tgetenv _wgetenv
|
||||
#define _tmktemp _wmktemp
|
||||
#define _topen _wopen
|
||||
#define _tremove _wremove
|
||||
#define _trename _wrename
|
||||
#define _tsopen _wsopen
|
||||
#define _tsetlocale _wsetlocale
|
||||
#define _tunlink _wunlink
|
||||
#define _tfinddata_t _wfinddata_t
|
||||
#define _tfindfirsti64 _wfindfirsti64
|
||||
#define _tfindnexti64 _wfindnexti64
|
||||
#define _tfinddatai64_t _wfinddatai64_t
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#else /* Not _UNICODE */
|
||||
|
||||
/*
|
||||
* TCHAR, the type you should use instead of char.
|
||||
*/
|
||||
#ifndef _TCHAR_DEFINED
|
||||
#ifndef RC_INVOKED
|
||||
typedef char TCHAR;
|
||||
typedef char _TCHAR;
|
||||
#endif
|
||||
#define _TCHAR_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* __TEXT is a private macro whose specific use is to force the expansion of a
|
||||
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
|
||||
* macro within your programs. It's name and function could change without
|
||||
* notice.
|
||||
*/
|
||||
#define __TEXT(x) x
|
||||
|
||||
/* for porting from other Windows compilers */
|
||||
#define _tmain main
|
||||
#define _tWinMain WinMain
|
||||
#define _tenviron _environ
|
||||
#define __targv __argv
|
||||
|
||||
/*
|
||||
* Non-unicode (standard) functions
|
||||
*/
|
||||
|
||||
#define _tprintf printf
|
||||
#define _ftprintf fprintf
|
||||
#define _stprintf sprintf
|
||||
#define _sntprintf _snprintf
|
||||
#define _vtprintf vprintf
|
||||
#define _vftprintf vfprintf
|
||||
#define _vstprintf vsprintf
|
||||
#define _vsntprintf _vsnprintf
|
||||
#define _tscanf scanf
|
||||
#define _ftscanf fscanf
|
||||
#define _stscanf sscanf
|
||||
#define _fgettc fgetc
|
||||
#define _fgettchar _fgetchar
|
||||
#define _fgetts fgets
|
||||
#define _fputtc fputc
|
||||
#define _fputtchar _fputchar
|
||||
#define _fputts fputs
|
||||
#define _tfopen fopen
|
||||
#define _tgetenv getenv
|
||||
#define _gettc getc
|
||||
#define _getts gets
|
||||
#define _puttc putc
|
||||
#define _putts puts
|
||||
#define _ungettc ungetc
|
||||
#define _tcstod strtod
|
||||
#define _tcstol strtol
|
||||
#define _tcstoul strtoul
|
||||
#define _itot _itoa
|
||||
#define _ltot _ltoa
|
||||
#define _ultot _ultoa
|
||||
#define _ttoi atoi
|
||||
#define _ttol atol
|
||||
#define _tcscat strcat
|
||||
#define _tcschr strchr
|
||||
#define _tcscmp strcmp
|
||||
#define _tcscpy strcpy
|
||||
#define _tcscspn strcspn
|
||||
#define _tcslen strlen
|
||||
#define _tcsncat strncat
|
||||
#define _tcsncmp strncmp
|
||||
#define _tcsncpy strncpy
|
||||
#define _tcspbrk strpbrk
|
||||
#define _tcsrchr strrchr
|
||||
#define _tcsspn strspn
|
||||
#define _tcsstr strstr
|
||||
#define _tcstok strtok
|
||||
#define _tcsdup _strdup
|
||||
#define _tcsicmp _stricmp
|
||||
#define _tcsnicmp _strnicmp
|
||||
#define _tcsnset _strnset
|
||||
#define _tcsrev _strrev
|
||||
#define _tcsset _strset
|
||||
#define _tcslwr _strlwr
|
||||
#define _tcsupr _strupr
|
||||
#define _tcsxfrm strxfrm
|
||||
#define _tcscoll strcoll
|
||||
#define _tcsicoll _stricoll
|
||||
#define _istalpha isalpha
|
||||
#define _istupper isupper
|
||||
#define _istlower islower
|
||||
#define _istdigit isdigit
|
||||
#define _istxdigit isxdigit
|
||||
#define _istspace isspace
|
||||
#define _istpunct ispunct
|
||||
#define _istalnum isalnum
|
||||
#define _istprint isprint
|
||||
#define _istgraph isgraph
|
||||
#define _istcntrl iscntrl
|
||||
#define _istascii isascii
|
||||
#define _totupper toupper
|
||||
#define _totlower tolower
|
||||
#define _tasctime asctime
|
||||
#define _tctime ctime
|
||||
#define _tstrdate _strdate
|
||||
#define _tstrtime _strtime
|
||||
#define _tutime _utime
|
||||
#define _tcsftime strftime
|
||||
/* Macro functions */
|
||||
#define _tcsdec _strdec
|
||||
#define _tcsinc _strinc
|
||||
#define _tcsnbcnt _strncnt
|
||||
#define _tcsnccnt _strncnt
|
||||
#define _tcsnextc _strnextc
|
||||
#define _tcsninc _strninc
|
||||
#define _tcsspnp _strspnp
|
||||
#define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
|
||||
#define _strinc(_str) ((_str)+1)
|
||||
#define _strnextc(_str) ((unsigned int) *(_str))
|
||||
#define _strninc(_str, _inc) (((_str)+(_inc)))
|
||||
#define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
|
||||
#define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL)
|
||||
|
||||
#define _tchmod _chmod
|
||||
#define _tcreat _creat
|
||||
#define _tfindfirst _findfirst
|
||||
#define _tfindnext _findnext
|
||||
#define _tmktemp _mktemp
|
||||
#define _topen _open
|
||||
#define _taccess _access
|
||||
#define _tremove remove
|
||||
#define _trename rename
|
||||
#define _tsopen _sopen
|
||||
#define _tsetlocale setlocale
|
||||
#define _tunlink _unlink
|
||||
#define _tfinddata_t _finddata_t
|
||||
|
||||
|
||||
#if 1 // defined __MSVCRT__
|
||||
/* Not in crtdll.dll. Define macros anyway? */
|
||||
#define _ttoi64 _atoi64
|
||||
#define _i64tot _i64toa
|
||||
#define _ui64tot _ui64toa
|
||||
#define _tcsnccoll _strncoll
|
||||
#define _tcsncoll _strncoll
|
||||
#define _tcsncicoll _strnicoll
|
||||
#define _tcsnicoll _strnicoll
|
||||
#define _tfindfirsti64 _findfirsti64
|
||||
#define _tfindnexti64 _findnexti64
|
||||
#define _tfinddatai64_t _finddatai64_t
|
||||
#endif /* __MSVCRT__ */
|
||||
|
||||
#endif /* Not _UNICODE */
|
||||
|
||||
/*
|
||||
* UNICODE a constant string when _UNICODE is defined else returns the string
|
||||
* unmodified. Also defined in w32api/winnt.h.
|
||||
*/
|
||||
#define _TEXT(x) __TEXT(x)
|
||||
#define _T(x) __TEXT(x)
|
||||
|
||||
#endif /* Not _TCHAR_H_ */
|
||||
|
||||
|
@ -1,219 +1,219 @@
|
||||
/*
|
||||
* time.h
|
||||
*
|
||||
* Date and time functions and types.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TIME_H_
|
||||
#define _TIME_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/*
|
||||
* Need a definition of time_t.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Number of clock ticks per second. A clock tick is the unit by which
|
||||
* processor time is measured and is returned by 'clock'.
|
||||
*/
|
||||
#define CLOCKS_PER_SEC ((clock_t)1000)
|
||||
#define CLK_TCK CLOCKS_PER_SEC
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* A type for storing the current time and date. This is the number of
|
||||
* seconds since midnight Jan 1, 1970.
|
||||
* NOTE: Normally this is defined by the above include of sys/types.h
|
||||
*/
|
||||
#ifndef _TIME_T_DEFINED
|
||||
typedef long time_t;
|
||||
#define _TIME_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A type for measuring processor time (in clock ticks).
|
||||
*/
|
||||
#ifndef _CLOCK_T_DEFINED
|
||||
typedef long clock_t;
|
||||
#define _CLOCK_T_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* A structure for storing all kinds of useful information about the
|
||||
* current (or another) time.
|
||||
*/
|
||||
struct tm
|
||||
{
|
||||
int tm_sec; /* Seconds: 0-59 (K&R says 0-61?) */
|
||||
int tm_min; /* Minutes: 0-59 */
|
||||
int tm_hour; /* Hours since midnight: 0-23 */
|
||||
int tm_mday; /* Day of the month: 1-31 */
|
||||
int tm_mon; /* Months *since* january: 0-11 */
|
||||
int tm_year; /* Years since 1900 */
|
||||
int tm_wday; /* Days since Sunday (0-6) */
|
||||
int tm_yday; /* Days since Jan. 1: 0-365 */
|
||||
int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
|
||||
* -1 don't know */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
clock_t clock (void);
|
||||
time_t time (time_t*);
|
||||
double difftime (time_t, time_t);
|
||||
time_t mktime (struct tm*);
|
||||
|
||||
/*
|
||||
* These functions write to and return pointers to static buffers that may
|
||||
* be overwritten by other function calls. Yikes!
|
||||
*
|
||||
* NOTE: localtime, and perhaps the others of the four functions grouped
|
||||
* below may return NULL if their argument is not 'acceptable'. Also note
|
||||
* that calling asctime with a NULL pointer will produce an Invalid Page
|
||||
* Fault and crap out your program. Guess how I know. Hint: stat called on
|
||||
* a directory gives 'invalid' times in st_atime etc...
|
||||
*/
|
||||
char* asctime (const struct tm*);
|
||||
char* ctime (const time_t*);
|
||||
struct tm* gmtime (const time_t*);
|
||||
struct tm* localtime (const time_t*);
|
||||
|
||||
|
||||
size_t strftime (char*, size_t, const char*, const struct tm*);
|
||||
|
||||
size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
extern void _tzset (void);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
extern void tzset (void);
|
||||
#endif
|
||||
|
||||
size_t strftime(char*, size_t, const char*, const struct tm*);
|
||||
char* _strdate(char*);
|
||||
char* _strtime(char*);
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* _daylight: non zero if daylight savings time is used.
|
||||
* _timezone: difference in seconds between GMT and local time.
|
||||
* _tzname: standard/daylight savings time zone names (an array with two
|
||||
* elements).
|
||||
*/
|
||||
#ifdef __MSVCRT__
|
||||
|
||||
/* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */
|
||||
extern int* __p__daylight (void);
|
||||
extern long* __p__timezone (void);
|
||||
extern char** __p__tzname (void);
|
||||
|
||||
__MINGW_IMPORT int _daylight;
|
||||
__MINGW_IMPORT long _timezone;
|
||||
__MINGW_IMPORT char *_tzname[2];
|
||||
|
||||
#else /* not __MSVCRT (ie. crtdll) */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern int* __imp__daylight_dll;
|
||||
extern long* __imp__timezone_dll;
|
||||
extern char** __imp__tzname;
|
||||
|
||||
#define _daylight (*__imp__daylight_dll)
|
||||
#define _timezone (*__imp__timezone_dll)
|
||||
#define _tzname (__imp__tzname)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT int _daylight_dll;
|
||||
__MINGW_IMPORT long _timezone_dll;
|
||||
__MINGW_IMPORT char* _tzname[2];
|
||||
|
||||
#define _daylight _daylight_dll
|
||||
#define _timezone _timezone_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif /* not __MSVCRT__ */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
|
||||
/* These go in the oldnames import library for MSVCRT. */
|
||||
__MINGW_IMPORT int daylight;
|
||||
__MINGW_IMPORT long timezone;
|
||||
__MINGW_IMPORT char *tzname[2];
|
||||
|
||||
#ifndef _WTIME_DEFINED
|
||||
|
||||
/* wide function prototypes, also declared in wchar.h */
|
||||
|
||||
wchar_t * _wasctime(const struct tm*);
|
||||
wchar_t * _wctime(const time_t*);
|
||||
wchar_t* _wstrdate(wchar_t*);
|
||||
wchar_t* _wstrtime(wchar_t*);
|
||||
|
||||
#define _WTIME_DEFINED
|
||||
#endif /* _WTIME_DEFINED */
|
||||
|
||||
|
||||
#else /* not __MSVCRT__ */
|
||||
|
||||
/* CRTDLL is royally messed up when it comes to these macros.
|
||||
TODO: import and alias these via oldnames import library instead
|
||||
of macros. */
|
||||
|
||||
#define daylight _daylight
|
||||
/* NOTE: timezone not defined because it would conflict with sys/timeb.h.
|
||||
Also, tzname used to a be macro, but now it's in moldname. */
|
||||
__MINGW_IMPORT char *tzname[2];
|
||||
|
||||
#endif /* not __MSVCRT__ */
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _TIME_H_ */
|
||||
|
||||
/*
|
||||
* time.h
|
||||
*
|
||||
* Date and time functions and types.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TIME_H_
|
||||
#define _TIME_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_size_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/*
|
||||
* Need a definition of time_t.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Number of clock ticks per second. A clock tick is the unit by which
|
||||
* processor time is measured and is returned by 'clock'.
|
||||
*/
|
||||
#define CLOCKS_PER_SEC ((clock_t)1000)
|
||||
#define CLK_TCK CLOCKS_PER_SEC
|
||||
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
/*
|
||||
* A type for storing the current time and date. This is the number of
|
||||
* seconds since midnight Jan 1, 1970.
|
||||
* NOTE: Normally this is defined by the above include of sys/types.h
|
||||
*/
|
||||
#ifndef _TIME_T_DEFINED
|
||||
typedef long time_t;
|
||||
#define _TIME_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A type for measuring processor time (in clock ticks).
|
||||
*/
|
||||
#ifndef _CLOCK_T_DEFINED
|
||||
typedef long clock_t;
|
||||
#define _CLOCK_T_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* A structure for storing all kinds of useful information about the
|
||||
* current (or another) time.
|
||||
*/
|
||||
struct tm
|
||||
{
|
||||
int tm_sec; /* Seconds: 0-59 (K&R says 0-61?) */
|
||||
int tm_min; /* Minutes: 0-59 */
|
||||
int tm_hour; /* Hours since midnight: 0-23 */
|
||||
int tm_mday; /* Day of the month: 1-31 */
|
||||
int tm_mon; /* Months *since* january: 0-11 */
|
||||
int tm_year; /* Years since 1900 */
|
||||
int tm_wday; /* Days since Sunday (0-6) */
|
||||
int tm_yday; /* Days since Jan. 1: 0-365 */
|
||||
int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
|
||||
* -1 don't know */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
clock_t clock (void);
|
||||
time_t time (time_t*);
|
||||
double difftime (time_t, time_t);
|
||||
time_t mktime (struct tm*);
|
||||
|
||||
/*
|
||||
* These functions write to and return pointers to static buffers that may
|
||||
* be overwritten by other function calls. Yikes!
|
||||
*
|
||||
* NOTE: localtime, and perhaps the others of the four functions grouped
|
||||
* below may return NULL if their argument is not 'acceptable'. Also note
|
||||
* that calling asctime with a NULL pointer will produce an Invalid Page
|
||||
* Fault and crap out your program. Guess how I know. Hint: stat called on
|
||||
* a directory gives 'invalid' times in st_atime etc...
|
||||
*/
|
||||
char* asctime (const struct tm*);
|
||||
char* ctime (const time_t*);
|
||||
struct tm* gmtime (const time_t*);
|
||||
struct tm* localtime (const time_t*);
|
||||
|
||||
|
||||
size_t strftime (char*, size_t, const char*, const struct tm*);
|
||||
|
||||
size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
extern void _tzset (void);
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
extern void tzset (void);
|
||||
#endif
|
||||
|
||||
size_t strftime(char*, size_t, const char*, const struct tm*);
|
||||
char* _strdate(char*);
|
||||
char* _strtime(char*);
|
||||
|
||||
#endif /* Not __STRICT_ANSI__ */
|
||||
|
||||
/*
|
||||
* _daylight: non zero if daylight savings time is used.
|
||||
* _timezone: difference in seconds between GMT and local time.
|
||||
* _tzname: standard/daylight savings time zone names (an array with two
|
||||
* elements).
|
||||
*/
|
||||
#ifdef __MSVCRT__
|
||||
|
||||
/* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */
|
||||
extern int* __p__daylight (void);
|
||||
extern long* __p__timezone (void);
|
||||
extern char** __p__tzname (void);
|
||||
|
||||
__MINGW_IMPORT int _daylight;
|
||||
__MINGW_IMPORT long _timezone;
|
||||
__MINGW_IMPORT char *_tzname[2];
|
||||
|
||||
#else /* not __MSVCRT (ie. crtdll) */
|
||||
|
||||
#ifndef __DECLSPEC_SUPPORTED
|
||||
|
||||
extern int* __imp__daylight_dll;
|
||||
extern long* __imp__timezone_dll;
|
||||
extern char** __imp__tzname;
|
||||
|
||||
#define _daylight (*__imp__daylight_dll)
|
||||
#define _timezone (*__imp__timezone_dll)
|
||||
#define _tzname (__imp__tzname)
|
||||
|
||||
#else /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
__MINGW_IMPORT int _daylight_dll;
|
||||
__MINGW_IMPORT long _timezone_dll;
|
||||
__MINGW_IMPORT char* _tzname[2];
|
||||
|
||||
#define _daylight _daylight_dll
|
||||
#define _timezone _timezone_dll
|
||||
|
||||
#endif /* __DECLSPEC_SUPPORTED */
|
||||
|
||||
#endif /* not __MSVCRT__ */
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
|
||||
/* These go in the oldnames import library for MSVCRT. */
|
||||
__MINGW_IMPORT int daylight;
|
||||
__MINGW_IMPORT long timezone;
|
||||
__MINGW_IMPORT char *tzname[2];
|
||||
|
||||
#ifndef _WTIME_DEFINED
|
||||
|
||||
/* wide function prototypes, also declared in wchar.h */
|
||||
|
||||
wchar_t * _wasctime(const struct tm*);
|
||||
wchar_t * _wctime(const time_t*);
|
||||
wchar_t* _wstrdate(wchar_t*);
|
||||
wchar_t* _wstrtime(wchar_t*);
|
||||
|
||||
#define _WTIME_DEFINED
|
||||
#endif /* _WTIME_DEFINED */
|
||||
|
||||
|
||||
#else /* not __MSVCRT__ */
|
||||
|
||||
/* CRTDLL is royally messed up when it comes to these macros.
|
||||
TODO: import and alias these via oldnames import library instead
|
||||
of macros. */
|
||||
|
||||
#define daylight _daylight
|
||||
/* NOTE: timezone not defined because it would conflict with sys/timeb.h.
|
||||
Also, tzname used to a be macro, but now it's in moldname. */
|
||||
__MINGW_IMPORT char *tzname[2];
|
||||
|
||||
#endif /* not __MSVCRT__ */
|
||||
|
||||
#endif /* Not _NO_OLDNAMES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _TIME_H_ */
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* unistd.h maps (roughly) to io.h
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* unistd.h maps (roughly) to io.h
|
||||
*/
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
* TODO: Nothing here yet. Should provide UNIX compatibility constants
|
||||
* comparible to those in limits.h and float.h.
|
||||
*/
|
||||
/*
|
||||
* TODO: Nothing here yet. Should provide UNIX compatibility constants
|
||||
* comparible to those in limits.h and float.h.
|
||||
*/
|
||||
|
@ -1,318 +1,318 @@
|
||||
/*
|
||||
* wchar.h
|
||||
*
|
||||
* Defines of all functions for supporting wide characters. Actually it
|
||||
* just includes all those headers, which is not a good thing to do from a
|
||||
* processing time point of view, but it does mean that everything will be
|
||||
* in sync.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/14 23:49:21 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WCHAR_H_
|
||||
#define _WCHAR_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_wint_t
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#define WCHAR_MIN 0
|
||||
#define WCHAR_MAX ((wchar_t)-1)
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _FSIZE_T_DEFINED
|
||||
typedef unsigned long _fsize_t;
|
||||
#define _FSIZE_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _WFINDDATA_T_DEFINED
|
||||
struct _wfinddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create; /* -1 for FAT file systems */
|
||||
time_t time_access; /* -1 for FAT file systems */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
wchar_t name[FILENAME_MAX]; /* may include spaces. */
|
||||
};
|
||||
struct _wfinddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[FILENAME_MAX];
|
||||
};
|
||||
#define _WFINDDATA_T_DEFINED
|
||||
#endif
|
||||
|
||||
/* Wide character versions. Also defined in io.h. */
|
||||
/* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
|
||||
applies to other wide character versions? */
|
||||
#if !defined (_WIO_DEFINED)
|
||||
#if defined (__MSVCRT__)
|
||||
int _waccess (const wchar_t*, int);
|
||||
int _wchmod (const wchar_t*, int);
|
||||
int _wcreat (const wchar_t*, int);
|
||||
long _wfindfirst (wchar_t*, struct _wfinddata_t *);
|
||||
int _wfindnext (long, struct _wfinddata_t *);
|
||||
int _wunlink (const wchar_t*);
|
||||
int _wopen (const wchar_t*, int, ...);
|
||||
int _wsopen (const wchar_t*, int, int, ...);
|
||||
wchar_t* _wmktemp (wchar_t*);
|
||||
long _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
|
||||
int _wfindnexti64 (long, struct _wfinddatai64_t*);
|
||||
#endif /* defined (__MSVCRT__) */
|
||||
#define _WIO_DEFINED
|
||||
#endif /* _WIO_DEFINED */
|
||||
|
||||
#ifndef _WSTDIO_DEFINED
|
||||
/* also in stdio.h - keep in sync */
|
||||
int fwprintf (FILE*, const wchar_t*, ...);
|
||||
int wprintf (const wchar_t*, ...);
|
||||
int swprintf (wchar_t*, const wchar_t*, ...);
|
||||
int _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
|
||||
int vfwprintf (FILE*, const wchar_t*, va_list);
|
||||
int vwprintf (const wchar_t*, va_list);
|
||||
int vswprintf (wchar_t*, const wchar_t*, va_list);
|
||||
int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list);
|
||||
int fwscanf (FILE*, const wchar_t*, ...);
|
||||
int wscanf (const wchar_t*, ...);
|
||||
int swscanf (const wchar_t*, const wchar_t*, ...);
|
||||
wint_t fgetwc (FILE*);
|
||||
wint_t fputwc (wchar_t, FILE*);
|
||||
wint_t ungetwc (wchar_t, FILE*);
|
||||
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...);
|
||||
extern inline int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format,
|
||||
va_list arg)
|
||||
{ return _vsnwprintf ( s, n, format, arg); }
|
||||
#endif
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
wchar_t* fgetws (wchar_t*, int, FILE*);
|
||||
int fputws (const wchar_t*, FILE*);
|
||||
wint_t getwc (FILE*);
|
||||
wint_t getwchar (void);
|
||||
wchar_t* _getws (wchar_t*);
|
||||
wint_t putwc (wint_t, FILE*);
|
||||
int _putws (const wchar_t*);
|
||||
wint_t putwchar (wint_t);
|
||||
|
||||
FILE* _wfopen (const wchar_t*, const wchar_t*);
|
||||
FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
|
||||
FILE* _wfsopen (const wchar_t*, const wchar_t*, int);
|
||||
wchar_t* _wtmpnam (wchar_t*);
|
||||
wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
|
||||
int _wrename (const wchar_t*, const wchar_t*);
|
||||
int _wremove (const wchar_t*)
|
||||
|
||||
FILE* _wpopen (const wchar_t*, const wchar_t*)
|
||||
void _wperror (const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WSTDIO_DEFINED
|
||||
#endif /* _WSTDIO_DEFINED */
|
||||
|
||||
#ifndef _WDIRECT_DEFINED
|
||||
/* Also in direct.h */
|
||||
#ifdef __MSVCRT__
|
||||
int _wchdir (const wchar_t*);
|
||||
wchar_t* _wgetcwd (wchar_t*, int);
|
||||
wchar_t* _wgetdcwd (int, wchar_t*, int);
|
||||
int _wmkdir (const wchar_t*);
|
||||
int _wrmdir (const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WDIRECT_DEFINED
|
||||
#endif /* _WDIRECT_DEFINED */
|
||||
|
||||
#ifndef _STAT_DEFINED
|
||||
/*
|
||||
* The structure manipulated and returned by stat and fstat.
|
||||
*
|
||||
* NOTE: If called on a directory the values in the time fields are not only
|
||||
* invalid, they will cause localtime et. al. to return NULL. And calling
|
||||
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
|
||||
*/
|
||||
struct _stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
|
||||
struct stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
#if defined (__MSVCRT__)
|
||||
struct _stati64 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int64 st_size;
|
||||
time_t st_atime;
|
||||
time_t st_mtime;
|
||||
time_t st_ctime;
|
||||
};
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _STAT_DEFINED
|
||||
#endif /* _STAT_DEFINED */
|
||||
|
||||
#if !defined ( _WSTAT_DEFINED)
|
||||
/* also declared in sys/stat.h */
|
||||
#if defined __MSVCRT__
|
||||
int _wstat (const wchar_t*, struct _stat*);
|
||||
int _wstati64 (const wchar_t*, struct _stati64*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WSTAT_DEFINED
|
||||
#endif /* ! _WSTAT_DEFIND */
|
||||
|
||||
#ifndef _WTIME_DEFINED
|
||||
#ifdef __MSVCRT__
|
||||
/* wide function prototypes, also declared in time.h */
|
||||
wchar_t* _wasctime (const struct tm*);
|
||||
wchar_t* _wctime (const time_t*);
|
||||
wchar_t* _wstrdate (wchar_t*);
|
||||
wchar_t* _wstrtime (wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
|
||||
#define _WTIME_DEFINED
|
||||
#endif /* _WTIME_DEFINED */
|
||||
|
||||
#ifndef _WLOCALE_DEFINED /* also declared in locale.h */
|
||||
wchar_t* _wsetlocale (int, const wchar_t*);
|
||||
#define _WLOCALE_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */
|
||||
long wcstol (const wchar_t*, wchar_t**, int);
|
||||
unsigned long wcstoul (const wchar_t*, wchar_t**, int);
|
||||
double wcstod (const wchar_t*, wchar_t**);
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr)
|
||||
{ return (wcstod(nptr, endptr)); }
|
||||
#endif /* __NO_ISOCEXT */
|
||||
#define _WSTDLIB_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/* Wide character versions. Also declared in io.h. */
|
||||
/* CHECK: Are these in the oldnames??? NO! */
|
||||
#if (0)
|
||||
int waccess (const wchar_t *, int);
|
||||
int wchmod (const wchar_t *, int);
|
||||
int wcreat (const wchar_t *, int);
|
||||
long wfindfirst (wchar_t *, struct _wfinddata_t *);
|
||||
int wfindnext (long, struct _wfinddata_t *);
|
||||
int wunlink (const wchar_t *);
|
||||
int wrename (const wchar_t *, const wchar_t *);
|
||||
int wremove (const wchar_t *);
|
||||
int wopen (const wchar_t *, int, ...);
|
||||
int wsopen (const wchar_t *, int, int, ...);
|
||||
wchar_t* wmktemp (wchar_t *);
|
||||
#endif
|
||||
#endif /* _NO_OLDNAMES */
|
||||
|
||||
#endif /* not __STRICT_ANSI__ */
|
||||
|
||||
/* These are resolved by -lmsvcp60 */
|
||||
/* If you don't have msvcp60.dll in your windows system directory, you can
|
||||
easily obtain it with a search from your favorite search engine. */
|
||||
typedef int mbstate_t;
|
||||
typedef wchar_t _Wint_t;
|
||||
|
||||
wint_t btowc(int);
|
||||
size_t mbrlen(const char *, size_t, mbstate_t *);
|
||||
size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
|
||||
size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
|
||||
|
||||
size_t wcrtomb(char *, wchar_t, mbstate_t *);
|
||||
size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
|
||||
int wctob(wint_t);
|
||||
|
||||
#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
|
||||
extern inline int fwide(FILE* stream, int mode) {return -1;} /* limited to byte orientation */
|
||||
extern inline int mbsinit(const mbstate_t* ps) {return 1;}
|
||||
wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
|
||||
wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
|
||||
int wmemcmp(const wchar_t* s1, const wchar_t * s2, size_t n);
|
||||
wchar_t* wmemcpy(wchar_t* __restrict__ s1, const wchar_t* __restrict__ s2,
|
||||
size_t n);
|
||||
wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
|
||||
long long wcstoll(const wchar_t* __restrict__ nptr,
|
||||
wchar_t** __restrict__ endptr, int base);
|
||||
unsigned long long wcstoull(const wchar_t* __restrict__ nptr,
|
||||
wchar_t ** __restrict__ endptr, int base);
|
||||
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* not _WCHAR_H_ */
|
||||
|
||||
/*
|
||||
* wchar.h
|
||||
*
|
||||
* Defines of all functions for supporting wide characters. Actually it
|
||||
* just includes all those headers, which is not a good thing to do from a
|
||||
* processing time point of view, but it does mean that everything will be
|
||||
* in sync.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: bellard $
|
||||
* $Date: 2005/04/17 13:14:29 $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WCHAR_H_
|
||||
#define _WCHAR_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define __need_size_t
|
||||
#define __need_wint_t
|
||||
#define __need_wchar_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#define WCHAR_MIN 0
|
||||
#define WCHAR_MAX ((wchar_t)-1)
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
#ifndef _FSIZE_T_DEFINED
|
||||
typedef unsigned long _fsize_t;
|
||||
#define _FSIZE_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _WFINDDATA_T_DEFINED
|
||||
struct _wfinddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create; /* -1 for FAT file systems */
|
||||
time_t time_access; /* -1 for FAT file systems */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
wchar_t name[FILENAME_MAX]; /* may include spaces. */
|
||||
};
|
||||
struct _wfinddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[FILENAME_MAX];
|
||||
};
|
||||
#define _WFINDDATA_T_DEFINED
|
||||
#endif
|
||||
|
||||
/* Wide character versions. Also defined in io.h. */
|
||||
/* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
|
||||
applies to other wide character versions? */
|
||||
#if !defined (_WIO_DEFINED)
|
||||
#if defined (__MSVCRT__)
|
||||
int _waccess (const wchar_t*, int);
|
||||
int _wchmod (const wchar_t*, int);
|
||||
int _wcreat (const wchar_t*, int);
|
||||
long _wfindfirst (wchar_t*, struct _wfinddata_t *);
|
||||
int _wfindnext (long, struct _wfinddata_t *);
|
||||
int _wunlink (const wchar_t*);
|
||||
int _wopen (const wchar_t*, int, ...);
|
||||
int _wsopen (const wchar_t*, int, int, ...);
|
||||
wchar_t* _wmktemp (wchar_t*);
|
||||
long _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
|
||||
int _wfindnexti64 (long, struct _wfinddatai64_t*);
|
||||
#endif /* defined (__MSVCRT__) */
|
||||
#define _WIO_DEFINED
|
||||
#endif /* _WIO_DEFINED */
|
||||
|
||||
#ifndef _WSTDIO_DEFINED
|
||||
/* also in stdio.h - keep in sync */
|
||||
int fwprintf (FILE*, const wchar_t*, ...);
|
||||
int wprintf (const wchar_t*, ...);
|
||||
int swprintf (wchar_t*, const wchar_t*, ...);
|
||||
int _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
|
||||
int vfwprintf (FILE*, const wchar_t*, va_list);
|
||||
int vwprintf (const wchar_t*, va_list);
|
||||
int vswprintf (wchar_t*, const wchar_t*, va_list);
|
||||
int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list);
|
||||
int fwscanf (FILE*, const wchar_t*, ...);
|
||||
int wscanf (const wchar_t*, ...);
|
||||
int swscanf (const wchar_t*, const wchar_t*, ...);
|
||||
wint_t fgetwc (FILE*);
|
||||
wint_t fputwc (wchar_t, FILE*);
|
||||
wint_t ungetwc (wchar_t, FILE*);
|
||||
|
||||
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
||||
int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...);
|
||||
extern inline int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format,
|
||||
va_list arg)
|
||||
{ return _vsnwprintf ( s, n, format, arg); }
|
||||
#endif
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
wchar_t* fgetws (wchar_t*, int, FILE*);
|
||||
int fputws (const wchar_t*, FILE*);
|
||||
wint_t getwc (FILE*);
|
||||
wint_t getwchar (void);
|
||||
wchar_t* _getws (wchar_t*);
|
||||
wint_t putwc (wint_t, FILE*);
|
||||
int _putws (const wchar_t*);
|
||||
wint_t putwchar (wint_t);
|
||||
|
||||
FILE* _wfopen (const wchar_t*, const wchar_t*);
|
||||
FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
|
||||
FILE* _wfsopen (const wchar_t*, const wchar_t*, int);
|
||||
wchar_t* _wtmpnam (wchar_t*);
|
||||
wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
|
||||
int _wrename (const wchar_t*, const wchar_t*);
|
||||
int _wremove (const wchar_t*)
|
||||
|
||||
FILE* _wpopen (const wchar_t*, const wchar_t*)
|
||||
void _wperror (const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WSTDIO_DEFINED
|
||||
#endif /* _WSTDIO_DEFINED */
|
||||
|
||||
#ifndef _WDIRECT_DEFINED
|
||||
/* Also in direct.h */
|
||||
#ifdef __MSVCRT__
|
||||
int _wchdir (const wchar_t*);
|
||||
wchar_t* _wgetcwd (wchar_t*, int);
|
||||
wchar_t* _wgetdcwd (int, wchar_t*, int);
|
||||
int _wmkdir (const wchar_t*);
|
||||
int _wrmdir (const wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WDIRECT_DEFINED
|
||||
#endif /* _WDIRECT_DEFINED */
|
||||
|
||||
#ifndef _STAT_DEFINED
|
||||
/*
|
||||
* The structure manipulated and returned by stat and fstat.
|
||||
*
|
||||
* NOTE: If called on a directory the values in the time fields are not only
|
||||
* invalid, they will cause localtime et. al. to return NULL. And calling
|
||||
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
|
||||
*/
|
||||
struct _stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
|
||||
struct stat
|
||||
{
|
||||
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||
_ino_t st_ino; /* Always zero ? */
|
||||
_mode_t st_mode; /* See above constants */
|
||||
short st_nlink; /* Number of links. */
|
||||
short st_uid; /* User: Maybe significant on NT ? */
|
||||
short st_gid; /* Group: Ditto */
|
||||
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||
_off_t st_size; /* File size in bytes */
|
||||
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||
* on FAT) */
|
||||
time_t st_mtime; /* Modified time */
|
||||
time_t st_ctime; /* Creation time */
|
||||
};
|
||||
#if defined (__MSVCRT__)
|
||||
struct _stati64 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int64 st_size;
|
||||
time_t st_atime;
|
||||
time_t st_mtime;
|
||||
time_t st_ctime;
|
||||
};
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _STAT_DEFINED
|
||||
#endif /* _STAT_DEFINED */
|
||||
|
||||
#if !defined ( _WSTAT_DEFINED)
|
||||
/* also declared in sys/stat.h */
|
||||
#if defined __MSVCRT__
|
||||
int _wstat (const wchar_t*, struct _stat*);
|
||||
int _wstati64 (const wchar_t*, struct _stati64*);
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WSTAT_DEFINED
|
||||
#endif /* ! _WSTAT_DEFIND */
|
||||
|
||||
#ifndef _WTIME_DEFINED
|
||||
#ifdef __MSVCRT__
|
||||
/* wide function prototypes, also declared in time.h */
|
||||
wchar_t* _wasctime (const struct tm*);
|
||||
wchar_t* _wctime (const time_t*);
|
||||
wchar_t* _wstrdate (wchar_t*);
|
||||
wchar_t* _wstrtime (wchar_t*);
|
||||
#endif /* __MSVCRT__ */
|
||||
size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
|
||||
#define _WTIME_DEFINED
|
||||
#endif /* _WTIME_DEFINED */
|
||||
|
||||
#ifndef _WLOCALE_DEFINED /* also declared in locale.h */
|
||||
wchar_t* _wsetlocale (int, const wchar_t*);
|
||||
#define _WLOCALE_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */
|
||||
long wcstol (const wchar_t*, wchar_t**, int);
|
||||
unsigned long wcstoul (const wchar_t*, wchar_t**, int);
|
||||
double wcstod (const wchar_t*, wchar_t**);
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr)
|
||||
{ return (wcstod(nptr, endptr)); }
|
||||
#endif /* __NO_ISOCEXT */
|
||||
#define _WSTDLIB_DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _NO_OLDNAMES
|
||||
|
||||
/* Wide character versions. Also declared in io.h. */
|
||||
/* CHECK: Are these in the oldnames??? NO! */
|
||||
#if (0)
|
||||
int waccess (const wchar_t *, int);
|
||||
int wchmod (const wchar_t *, int);
|
||||
int wcreat (const wchar_t *, int);
|
||||
long wfindfirst (wchar_t *, struct _wfinddata_t *);
|
||||
int wfindnext (long, struct _wfinddata_t *);
|
||||
int wunlink (const wchar_t *);
|
||||
int wrename (const wchar_t *, const wchar_t *);
|
||||
int wremove (const wchar_t *);
|
||||
int wopen (const wchar_t *, int, ...);
|
||||
int wsopen (const wchar_t *, int, int, ...);
|
||||
wchar_t* wmktemp (wchar_t *);
|
||||
#endif
|
||||
#endif /* _NO_OLDNAMES */
|
||||
|
||||
#endif /* not __STRICT_ANSI__ */
|
||||
|
||||
/* These are resolved by -lmsvcp60 */
|
||||
/* If you don't have msvcp60.dll in your windows system directory, you can
|
||||
easily obtain it with a search from your favorite search engine. */
|
||||
typedef int mbstate_t;
|
||||
typedef wchar_t _Wint_t;
|
||||
|
||||
wint_t btowc(int);
|
||||
size_t mbrlen(const char *, size_t, mbstate_t *);
|
||||
size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
|
||||
size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
|
||||
|
||||
size_t wcrtomb(char *, wchar_t, mbstate_t *);
|
||||
size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
|
||||
int wctob(wint_t);
|
||||
|
||||
#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
|
||||
extern inline int fwide(FILE* stream, int mode) {return -1;} /* limited to byte orientation */
|
||||
extern inline int mbsinit(const mbstate_t* ps) {return 1;}
|
||||
wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
|
||||
wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
|
||||
int wmemcmp(const wchar_t* s1, const wchar_t * s2, size_t n);
|
||||
wchar_t* wmemcpy(wchar_t* __restrict__ s1, const wchar_t* __restrict__ s2,
|
||||
size_t n);
|
||||
wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
|
||||
long long wcstoll(const wchar_t* __restrict__ nptr,
|
||||
wchar_t** __restrict__ endptr, int base);
|
||||
unsigned long long wcstoull(const wchar_t* __restrict__ nptr,
|
||||
wchar_t ** __restrict__ endptr, int base);
|
||||
|
||||
#endif /* __NO_ISOCEXT */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* not _WCHAR_H_ */
|
||||
|
||||
|
@ -1,127 +1,127 @@
|
||||
/*
|
||||
* wctype.h
|
||||
*
|
||||
* Functions for testing wide character types and converting characters.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Mumit Khan <khan@xraylith.wisc.edu>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WCTYPE_H_
|
||||
#define _WCTYPE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/*
|
||||
* The following flags are used to tell iswctype and _isctype what character
|
||||
* types you are looking for.
|
||||
*/
|
||||
#define _UPPER 0x0001
|
||||
#define _LOWER 0x0002
|
||||
#define _DIGIT 0x0004
|
||||
#define _SPACE 0x0008
|
||||
#define _PUNCT 0x0010
|
||||
#define _CONTROL 0x0020
|
||||
#define _BLANK 0x0040
|
||||
#define _HEX 0x0080
|
||||
#define _LEADBYTE 0x8000
|
||||
|
||||
#define _ALPHA 0x0103
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef WEOF
|
||||
#define WEOF (wchar_t)(0xFFFF)
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_T_DEFINED
|
||||
typedef wchar_t wctype_t;
|
||||
#define _WCTYPE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/* Wide character equivalents - also in ctype.h */
|
||||
int iswalnum(wint_t);
|
||||
int iswalpha(wint_t);
|
||||
int iswascii(wint_t);
|
||||
int iswcntrl(wint_t);
|
||||
int iswctype(wint_t, wctype_t);
|
||||
int is_wctype(wint_t, wctype_t); /* Obsolete! */
|
||||
int iswdigit(wint_t);
|
||||
int iswgraph(wint_t);
|
||||
int iswlower(wint_t);
|
||||
int iswprint(wint_t);
|
||||
int iswpunct(wint_t);
|
||||
int iswspace(wint_t);
|
||||
int iswupper(wint_t);
|
||||
int iswxdigit(wint_t);
|
||||
|
||||
wchar_t towlower(wchar_t);
|
||||
wchar_t towupper(wchar_t);
|
||||
|
||||
int isleadbyte (int);
|
||||
|
||||
/* Also in ctype.h */
|
||||
|
||||
__MINGW_IMPORT unsigned short _ctype[];
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned short* _pctype;
|
||||
#else
|
||||
__MINGW_IMPORT unsigned short* _pctype_dll;
|
||||
#define _pctype _pctype_dll
|
||||
#endif
|
||||
|
||||
#if !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
|
||||
#define __WCTYPE_INLINES_DEFINED
|
||||
extern inline int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
|
||||
extern inline int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
|
||||
extern inline int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
|
||||
extern inline int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
|
||||
extern inline int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
|
||||
extern inline int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern inline int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
|
||||
extern inline int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern inline int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
|
||||
extern inline int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
|
||||
extern inline int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
|
||||
extern inline int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
|
||||
extern inline int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
|
||||
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
|
||||
|
||||
|
||||
typedef wchar_t wctrans_t;
|
||||
wint_t towctrans(wint_t, wctrans_t);
|
||||
wctrans_t wctrans(const char*);
|
||||
wctype_t wctype(const char*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _WCTYPE_H_ */
|
||||
|
||||
/*
|
||||
* wctype.h
|
||||
*
|
||||
* Functions for testing wide character types and converting characters.
|
||||
*
|
||||
* This file is part of the Mingw32 package.
|
||||
*
|
||||
* Contributors:
|
||||
* Created by Mumit Khan <khan@xraylith.wisc.edu>
|
||||
*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WCTYPE_H_
|
||||
#define _WCTYPE_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
|
||||
#define __need_wchar_t
|
||||
#define __need_wint_t
|
||||
#ifndef RC_INVOKED
|
||||
#include <stddef.h>
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
/*
|
||||
* The following flags are used to tell iswctype and _isctype what character
|
||||
* types you are looking for.
|
||||
*/
|
||||
#define _UPPER 0x0001
|
||||
#define _LOWER 0x0002
|
||||
#define _DIGIT 0x0004
|
||||
#define _SPACE 0x0008
|
||||
#define _PUNCT 0x0010
|
||||
#define _CONTROL 0x0020
|
||||
#define _BLANK 0x0040
|
||||
#define _HEX 0x0080
|
||||
#define _LEADBYTE 0x8000
|
||||
|
||||
#define _ALPHA 0x0103
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef WEOF
|
||||
#define WEOF (wchar_t)(0xFFFF)
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_T_DEFINED
|
||||
typedef wchar_t wctype_t;
|
||||
#define _WCTYPE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/* Wide character equivalents - also in ctype.h */
|
||||
int iswalnum(wint_t);
|
||||
int iswalpha(wint_t);
|
||||
int iswascii(wint_t);
|
||||
int iswcntrl(wint_t);
|
||||
int iswctype(wint_t, wctype_t);
|
||||
int is_wctype(wint_t, wctype_t); /* Obsolete! */
|
||||
int iswdigit(wint_t);
|
||||
int iswgraph(wint_t);
|
||||
int iswlower(wint_t);
|
||||
int iswprint(wint_t);
|
||||
int iswpunct(wint_t);
|
||||
int iswspace(wint_t);
|
||||
int iswupper(wint_t);
|
||||
int iswxdigit(wint_t);
|
||||
|
||||
wchar_t towlower(wchar_t);
|
||||
wchar_t towupper(wchar_t);
|
||||
|
||||
int isleadbyte (int);
|
||||
|
||||
/* Also in ctype.h */
|
||||
|
||||
__MINGW_IMPORT unsigned short _ctype[];
|
||||
#ifdef __MSVCRT__
|
||||
__MINGW_IMPORT unsigned short* _pctype;
|
||||
#else
|
||||
__MINGW_IMPORT unsigned short* _pctype_dll;
|
||||
#define _pctype _pctype_dll
|
||||
#endif
|
||||
|
||||
#if !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
|
||||
#define __WCTYPE_INLINES_DEFINED
|
||||
extern inline int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
|
||||
extern inline int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
|
||||
extern inline int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
|
||||
extern inline int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
|
||||
extern inline int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
|
||||
extern inline int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern inline int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
|
||||
extern inline int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
|
||||
extern inline int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
|
||||
extern inline int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
|
||||
extern inline int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
|
||||
extern inline int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
|
||||
extern inline int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
|
||||
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
|
||||
|
||||
|
||||
typedef wchar_t wctrans_t;
|
||||
wint_t towctrans(wint_t, wctrans_t);
|
||||
wctrans_t wctrans(const char*);
|
||||
wctype_t wctype(const char*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _WCTYPE_H_ */
|
||||
|
||||
|
@ -1,119 +1,119 @@
|
||||
#ifndef _BASETSD_H
|
||||
#define _BASETSD_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef __int64
|
||||
#define __int64 long long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64)
|
||||
#define __int3264 __int64
|
||||
#define ADDRESS_TAG_BIT 0x40000000000UI64
|
||||
#else /* !_WIN64 */
|
||||
#define __int3264 __int32
|
||||
#define ADDRESS_TAG_BIT 0x80000000UL
|
||||
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
|
||||
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
|
||||
#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
|
||||
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
|
||||
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
|
||||
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
|
||||
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
|
||||
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
|
||||
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
|
||||
#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
|
||||
#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
|
||||
#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
|
||||
#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
|
||||
#endif /* !_WIN64 */
|
||||
|
||||
#define UlongToPtr(ul) ULongToPtr(ul)
|
||||
#define UintToPtr(ui) UIntToPtr(ui)
|
||||
#define MAXUINT_PTR (~((UINT_PTR)0))
|
||||
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
|
||||
#define MININT_PTR (~MAXINT_PTR)
|
||||
#define MAXULONG_PTR (~((ULONG_PTR)0))
|
||||
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
|
||||
#define MINLONG_PTR (~MAXLONG_PTR)
|
||||
#define MAXUHALF_PTR ((UHALF_PTR)~0)
|
||||
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
|
||||
#define MINHALF_PTR (~MAXHALF_PTR)
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int LONG32, *PLONG32;
|
||||
#ifndef XFree86Server
|
||||
typedef int INT32, *PINT32;
|
||||
#endif /* ndef XFree86Server */
|
||||
typedef unsigned int ULONG32, *PULONG32;
|
||||
typedef unsigned int DWORD32, *PDWORD32;
|
||||
typedef unsigned int UINT32, *PUINT32;
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef __int64 INT_PTR, *PINT_PTR;
|
||||
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
|
||||
typedef __int64 LONG_PTR, *PLONG_PTR;
|
||||
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned __int64 HANDLE_PTR;
|
||||
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
|
||||
typedef int HALF_PTR, *PHALF_PTR;
|
||||
|
||||
#if 0 /* TODO when WIN64 is here */
|
||||
inline unsigned long HandleToUlong(const void* h )
|
||||
{ return((unsigned long) h ); }
|
||||
inline long HandleToLong( const void* h )
|
||||
{ return((long) h ); }
|
||||
inline void* LongToHandle( const long h )
|
||||
{ return((void*) (INT_PTR) h ); }
|
||||
inline unsigned long PtrToUlong( const void* p)
|
||||
{ return((unsigned long) p ); }
|
||||
inline unsigned int PtrToUint( const void* p )
|
||||
{ return((unsigned int) p ); }
|
||||
inline unsigned short PtrToUshort( const void* p )
|
||||
{ return((unsigned short) p ); }
|
||||
inline long PtrToLong( const void* p )
|
||||
{ return((long) p ); }
|
||||
inline int PtrToInt( const void* p )
|
||||
{ return((int) p ); }
|
||||
inline short PtrToShort( const void* p )
|
||||
{ return((short) p ); }
|
||||
inline void* IntToPtr( const int i )
|
||||
{ return( (void*)(INT_PTR)i ); }
|
||||
inline void* UIntToPtr(const unsigned int ui)
|
||||
{ return( (void*)(UINT_PTR)ui ); }
|
||||
inline void* LongToPtr( const long l )
|
||||
{ return( (void*)(LONG_PTR)l ); }
|
||||
inline void* ULongToPtr( const unsigned long ul )
|
||||
{ return( (void*)(ULONG_PTR)ul ); }
|
||||
#endif /* 0_ */
|
||||
|
||||
#else /* !_WIN64 */
|
||||
typedef int INT_PTR, *PINT_PTR;
|
||||
typedef unsigned int UINT_PTR, *PUINT_PTR;
|
||||
typedef long LONG_PTR, *PLONG_PTR;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
|
||||
typedef short HALF_PTR, *PHALF_PTR;
|
||||
typedef unsigned long HANDLE_PTR;
|
||||
#endif /* !_WIN64 */
|
||||
|
||||
typedef ULONG_PTR SIZE_T, *PSIZE_T;
|
||||
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
|
||||
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
|
||||
typedef __int64 LONG64, *PLONG64;
|
||||
typedef __int64 INT64, *PINT64;
|
||||
typedef unsigned __int64 ULONG64, *PULONG64;
|
||||
typedef unsigned __int64 DWORD64, *PDWORD64;
|
||||
typedef unsigned __int64 UINT64, *PUINT64;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !RC_INVOKED */
|
||||
|
||||
#endif /* _BASETSD_H */
|
||||
#ifndef _BASETSD_H
|
||||
#define _BASETSD_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef __int64
|
||||
#define __int64 long long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64)
|
||||
#define __int3264 __int64
|
||||
#define ADDRESS_TAG_BIT 0x40000000000UI64
|
||||
#else /* !_WIN64 */
|
||||
#define __int3264 __int32
|
||||
#define ADDRESS_TAG_BIT 0x80000000UL
|
||||
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
|
||||
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
|
||||
#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
|
||||
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
|
||||
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
|
||||
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
|
||||
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
|
||||
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
|
||||
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
|
||||
#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
|
||||
#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
|
||||
#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
|
||||
#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
|
||||
#endif /* !_WIN64 */
|
||||
|
||||
#define UlongToPtr(ul) ULongToPtr(ul)
|
||||
#define UintToPtr(ui) UIntToPtr(ui)
|
||||
#define MAXUINT_PTR (~((UINT_PTR)0))
|
||||
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
|
||||
#define MININT_PTR (~MAXINT_PTR)
|
||||
#define MAXULONG_PTR (~((ULONG_PTR)0))
|
||||
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
|
||||
#define MINLONG_PTR (~MAXLONG_PTR)
|
||||
#define MAXUHALF_PTR ((UHALF_PTR)~0)
|
||||
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
|
||||
#define MINHALF_PTR (~MAXHALF_PTR)
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int LONG32, *PLONG32;
|
||||
#ifndef XFree86Server
|
||||
typedef int INT32, *PINT32;
|
||||
#endif /* ndef XFree86Server */
|
||||
typedef unsigned int ULONG32, *PULONG32;
|
||||
typedef unsigned int DWORD32, *PDWORD32;
|
||||
typedef unsigned int UINT32, *PUINT32;
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef __int64 INT_PTR, *PINT_PTR;
|
||||
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
|
||||
typedef __int64 LONG_PTR, *PLONG_PTR;
|
||||
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned __int64 HANDLE_PTR;
|
||||
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
|
||||
typedef int HALF_PTR, *PHALF_PTR;
|
||||
|
||||
#if 0 /* TODO when WIN64 is here */
|
||||
inline unsigned long HandleToUlong(const void* h )
|
||||
{ return((unsigned long) h ); }
|
||||
inline long HandleToLong( const void* h )
|
||||
{ return((long) h ); }
|
||||
inline void* LongToHandle( const long h )
|
||||
{ return((void*) (INT_PTR) h ); }
|
||||
inline unsigned long PtrToUlong( const void* p)
|
||||
{ return((unsigned long) p ); }
|
||||
inline unsigned int PtrToUint( const void* p )
|
||||
{ return((unsigned int) p ); }
|
||||
inline unsigned short PtrToUshort( const void* p )
|
||||
{ return((unsigned short) p ); }
|
||||
inline long PtrToLong( const void* p )
|
||||
{ return((long) p ); }
|
||||
inline int PtrToInt( const void* p )
|
||||
{ return((int) p ); }
|
||||
inline short PtrToShort( const void* p )
|
||||
{ return((short) p ); }
|
||||
inline void* IntToPtr( const int i )
|
||||
{ return( (void*)(INT_PTR)i ); }
|
||||
inline void* UIntToPtr(const unsigned int ui)
|
||||
{ return( (void*)(UINT_PTR)ui ); }
|
||||
inline void* LongToPtr( const long l )
|
||||
{ return( (void*)(LONG_PTR)l ); }
|
||||
inline void* ULongToPtr( const unsigned long ul )
|
||||
{ return( (void*)(ULONG_PTR)ul ); }
|
||||
#endif /* 0_ */
|
||||
|
||||
#else /* !_WIN64 */
|
||||
typedef int INT_PTR, *PINT_PTR;
|
||||
typedef unsigned int UINT_PTR, *PUINT_PTR;
|
||||
typedef long LONG_PTR, *PLONG_PTR;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
|
||||
typedef short HALF_PTR, *PHALF_PTR;
|
||||
typedef unsigned long HANDLE_PTR;
|
||||
#endif /* !_WIN64 */
|
||||
|
||||
typedef ULONG_PTR SIZE_T, *PSIZE_T;
|
||||
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
|
||||
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
|
||||
typedef __int64 LONG64, *PLONG64;
|
||||
typedef __int64 INT64, *PINT64;
|
||||
typedef unsigned __int64 ULONG64, *PULONG64;
|
||||
typedef unsigned __int64 DWORD64, *PDWORD64;
|
||||
typedef unsigned __int64 UINT64, *PUINT64;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !RC_INVOKED */
|
||||
|
||||
#endif /* _BASETSD_H */
|
||||
|
@ -1,144 +1,144 @@
|
||||
#ifndef _BASETYPS_H
|
||||
#define _BASETYPS_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifndef __OBJC__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN_C extern "C"
|
||||
#else
|
||||
#define EXTERN_C extern
|
||||
#endif /* __cplusplus */
|
||||
#define STDMETHODCALLTYPE __stdcall
|
||||
#define STDMETHODVCALLTYPE __cdecl
|
||||
#define STDAPICALLTYPE __stdcall
|
||||
#define STDAPIVCALLTYPE __cdecl
|
||||
#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
|
||||
#define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
|
||||
#define STDMETHODIMP HRESULT STDMETHODCALLTYPE
|
||||
#define STDMETHODIMP_(t) t STDMETHODCALLTYPE
|
||||
#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
|
||||
#define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
|
||||
#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
|
||||
#define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
|
||||
#define interface struct
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
|
||||
#define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
|
||||
#define PURE =0
|
||||
#define THIS_
|
||||
#define THIS void
|
||||
/*
|
||||
__attribute__((com_interface)) is obsolete in __GNUC__ >= 3
|
||||
g++ vtables are now COM-compatible by default
|
||||
*/
|
||||
#if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE)
|
||||
#define DECLARE_INTERFACE(i) interface __attribute__((com_interface)) i
|
||||
#define DECLARE_INTERFACE_(i,b) interface __attribute__((com_interface)) i : public b
|
||||
#else
|
||||
#define DECLARE_INTERFACE(i) interface i
|
||||
#define DECLARE_INTERFACE_(i,b) interface i : public b
|
||||
#endif
|
||||
#else
|
||||
#define STDMETHOD(m) HRESULT(STDMETHODCALLTYPE *m)
|
||||
#define STDMETHOD_(t,m) t(STDMETHODCALLTYPE *m)
|
||||
#define PURE
|
||||
#define THIS_ INTERFACE *,
|
||||
#define THIS INTERFACE *
|
||||
#ifndef CONST_VTABLE
|
||||
#define CONST_VTABLE
|
||||
#endif
|
||||
#define DECLARE_INTERFACE(i) \
|
||||
typedef interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
|
||||
typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
|
||||
CONST_VTABLE struct i##Vtbl
|
||||
#define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
|
||||
#endif
|
||||
#define BEGIN_INTERFACE
|
||||
#define END_INTERFACE
|
||||
|
||||
#define FWD_DECL(i) typedef interface i i
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define IENUM_THIS(T)
|
||||
#define IENUM_THIS_(T)
|
||||
#else
|
||||
#define IENUM_THIS(T) T*
|
||||
#define IENUM_THIS_(T) T*,
|
||||
#endif
|
||||
#define DECLARE_ENUMERATOR_(I,T) \
|
||||
DECLARE_INTERFACE_(I,IUnknown) \
|
||||
{ \
|
||||
STDMETHOD(QueryInterface)(IENUM_THIS_(I) REFIID,PVOID*) PURE; \
|
||||
STDMETHOD_(ULONG,AddRef)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD_(ULONG,Release)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD(Next)(IENUM_THIS_(I) ULONG,T*,ULONG*) PURE; \
|
||||
STDMETHOD(Skip)(IENUM_THIS_(I) ULONG) PURE; \
|
||||
STDMETHOD(Reset)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
|
||||
}
|
||||
#define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
|
||||
|
||||
#endif /* __OBJC__ */
|
||||
|
||||
#ifndef _GUID_DEFINED /* also defined in winnt.h */
|
||||
#define _GUID_DEFINED
|
||||
typedef struct _GUID
|
||||
{
|
||||
unsigned long Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[8];
|
||||
} GUID,*REFGUID,*LPGUID;
|
||||
#endif /* _GUID_DEFINED */
|
||||
#ifndef UUID_DEFINED
|
||||
#define UUID_DEFINED
|
||||
typedef GUID UUID;
|
||||
#endif /* UUID_DEFINED */
|
||||
typedef GUID IID;
|
||||
typedef GUID CLSID;
|
||||
typedef CLSID *LPCLSID;
|
||||
typedef IID *LPIID;
|
||||
typedef IID *REFIID;
|
||||
typedef CLSID *REFCLSID;
|
||||
typedef GUID FMTID;
|
||||
typedef FMTID *REFFMTID;
|
||||
typedef unsigned long error_status_t;
|
||||
#define uuid_t UUID
|
||||
typedef unsigned long PROPID;
|
||||
|
||||
#ifndef _REFGUID_DEFINED
|
||||
#if defined (__cplusplus) && !defined (CINTERFACE)
|
||||
#define REFGUID const GUID&
|
||||
#define REFIID const IID&
|
||||
#define REFCLSID const CLSID&
|
||||
#else
|
||||
#define REFGUID const GUID* const
|
||||
#define REFIID const IID* const
|
||||
#define REFCLSID const CLSID* const
|
||||
#endif
|
||||
#define _REFGUID_DEFINED
|
||||
#define _REFGIID_DEFINED
|
||||
#define _REFCLSID_DEFINED
|
||||
#endif
|
||||
#ifndef GUID_SECTION
|
||||
#define GUID_SECTION ".text"
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
#define GUID_SECT __attribute__ ((section (GUID_SECTION)))
|
||||
#else
|
||||
#define GUID_SECT
|
||||
#endif
|
||||
#if !defined(INITGUID) || (defined(INITGUID) && defined(__cplusplus))
|
||||
#define GUID_EXT EXTERN_C
|
||||
#else
|
||||
#define GUID_EXT
|
||||
#endif
|
||||
#ifdef INITGUID
|
||||
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||
#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||
#else
|
||||
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n
|
||||
#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _BASETYPS_H
|
||||
#define _BASETYPS_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifndef __OBJC__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN_C extern "C"
|
||||
#else
|
||||
#define EXTERN_C extern
|
||||
#endif /* __cplusplus */
|
||||
#define STDMETHODCALLTYPE __stdcall
|
||||
#define STDMETHODVCALLTYPE __cdecl
|
||||
#define STDAPICALLTYPE __stdcall
|
||||
#define STDAPIVCALLTYPE __cdecl
|
||||
#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
|
||||
#define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
|
||||
#define STDMETHODIMP HRESULT STDMETHODCALLTYPE
|
||||
#define STDMETHODIMP_(t) t STDMETHODCALLTYPE
|
||||
#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
|
||||
#define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
|
||||
#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
|
||||
#define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
|
||||
#define interface struct
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
|
||||
#define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
|
||||
#define PURE =0
|
||||
#define THIS_
|
||||
#define THIS void
|
||||
/*
|
||||
__attribute__((com_interface)) is obsolete in __GNUC__ >= 3
|
||||
g++ vtables are now COM-compatible by default
|
||||
*/
|
||||
#if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE)
|
||||
#define DECLARE_INTERFACE(i) interface __attribute__((com_interface)) i
|
||||
#define DECLARE_INTERFACE_(i,b) interface __attribute__((com_interface)) i : public b
|
||||
#else
|
||||
#define DECLARE_INTERFACE(i) interface i
|
||||
#define DECLARE_INTERFACE_(i,b) interface i : public b
|
||||
#endif
|
||||
#else
|
||||
#define STDMETHOD(m) HRESULT(STDMETHODCALLTYPE *m)
|
||||
#define STDMETHOD_(t,m) t(STDMETHODCALLTYPE *m)
|
||||
#define PURE
|
||||
#define THIS_ INTERFACE *,
|
||||
#define THIS INTERFACE *
|
||||
#ifndef CONST_VTABLE
|
||||
#define CONST_VTABLE
|
||||
#endif
|
||||
#define DECLARE_INTERFACE(i) \
|
||||
typedef interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
|
||||
typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
|
||||
CONST_VTABLE struct i##Vtbl
|
||||
#define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
|
||||
#endif
|
||||
#define BEGIN_INTERFACE
|
||||
#define END_INTERFACE
|
||||
|
||||
#define FWD_DECL(i) typedef interface i i
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
#define IENUM_THIS(T)
|
||||
#define IENUM_THIS_(T)
|
||||
#else
|
||||
#define IENUM_THIS(T) T*
|
||||
#define IENUM_THIS_(T) T*,
|
||||
#endif
|
||||
#define DECLARE_ENUMERATOR_(I,T) \
|
||||
DECLARE_INTERFACE_(I,IUnknown) \
|
||||
{ \
|
||||
STDMETHOD(QueryInterface)(IENUM_THIS_(I) REFIID,PVOID*) PURE; \
|
||||
STDMETHOD_(ULONG,AddRef)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD_(ULONG,Release)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD(Next)(IENUM_THIS_(I) ULONG,T*,ULONG*) PURE; \
|
||||
STDMETHOD(Skip)(IENUM_THIS_(I) ULONG) PURE; \
|
||||
STDMETHOD(Reset)(IENUM_THIS(I)) PURE; \
|
||||
STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
|
||||
}
|
||||
#define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
|
||||
|
||||
#endif /* __OBJC__ */
|
||||
|
||||
#ifndef _GUID_DEFINED /* also defined in winnt.h */
|
||||
#define _GUID_DEFINED
|
||||
typedef struct _GUID
|
||||
{
|
||||
unsigned long Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[8];
|
||||
} GUID,*REFGUID,*LPGUID;
|
||||
#endif /* _GUID_DEFINED */
|
||||
#ifndef UUID_DEFINED
|
||||
#define UUID_DEFINED
|
||||
typedef GUID UUID;
|
||||
#endif /* UUID_DEFINED */
|
||||
typedef GUID IID;
|
||||
typedef GUID CLSID;
|
||||
typedef CLSID *LPCLSID;
|
||||
typedef IID *LPIID;
|
||||
typedef IID *REFIID;
|
||||
typedef CLSID *REFCLSID;
|
||||
typedef GUID FMTID;
|
||||
typedef FMTID *REFFMTID;
|
||||
typedef unsigned long error_status_t;
|
||||
#define uuid_t UUID
|
||||
typedef unsigned long PROPID;
|
||||
|
||||
#ifndef _REFGUID_DEFINED
|
||||
#if defined (__cplusplus) && !defined (CINTERFACE)
|
||||
#define REFGUID const GUID&
|
||||
#define REFIID const IID&
|
||||
#define REFCLSID const CLSID&
|
||||
#else
|
||||
#define REFGUID const GUID* const
|
||||
#define REFIID const IID* const
|
||||
#define REFCLSID const CLSID* const
|
||||
#endif
|
||||
#define _REFGUID_DEFINED
|
||||
#define _REFGIID_DEFINED
|
||||
#define _REFCLSID_DEFINED
|
||||
#endif
|
||||
#ifndef GUID_SECTION
|
||||
#define GUID_SECTION ".text"
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
#define GUID_SECT __attribute__ ((section (GUID_SECTION)))
|
||||
#else
|
||||
#define GUID_SECT
|
||||
#endif
|
||||
#if !defined(INITGUID) || (defined(INITGUID) && defined(__cplusplus))
|
||||
#define GUID_EXT EXTERN_C
|
||||
#else
|
||||
#define GUID_EXT
|
||||
#endif
|
||||
#ifdef INITGUID
|
||||
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||
#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||
#else
|
||||
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n
|
||||
#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
|
||||
#endif
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,207 +1,207 @@
|
||||
#ifndef _WINCON_H
|
||||
#define _WINCON_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FOREGROUND_BLUE 1
|
||||
#define FOREGROUND_GREEN 2
|
||||
#define FOREGROUND_RED 4
|
||||
#define FOREGROUND_INTENSITY 8
|
||||
#define BACKGROUND_BLUE 16
|
||||
#define BACKGROUND_GREEN 32
|
||||
#define BACKGROUND_RED 64
|
||||
#define BACKGROUND_INTENSITY 128
|
||||
#define CTRL_C_EVENT 0
|
||||
#define CTRL_BREAK_EVENT 1
|
||||
#define CTRL_CLOSE_EVENT 2
|
||||
#define CTRL_LOGOFF_EVENT 5
|
||||
#define CTRL_SHUTDOWN_EVENT 6
|
||||
#define ENABLE_LINE_INPUT 2
|
||||
#define ENABLE_ECHO_INPUT 4
|
||||
#define ENABLE_PROCESSED_INPUT 1
|
||||
#define ENABLE_WINDOW_INPUT 8
|
||||
#define ENABLE_MOUSE_INPUT 16
|
||||
#define ENABLE_PROCESSED_OUTPUT 1
|
||||
#define ENABLE_WRAP_AT_EOL_OUTPUT 2
|
||||
#define KEY_EVENT 1
|
||||
#define MOUSE_EVENT 2
|
||||
#define WINDOW_BUFFER_SIZE_EVENT 4
|
||||
#define MENU_EVENT 8
|
||||
#define FOCUS_EVENT 16
|
||||
#define CAPSLOCK_ON 128
|
||||
#define ENHANCED_KEY 256
|
||||
#define RIGHT_ALT_PRESSED 1
|
||||
#define LEFT_ALT_PRESSED 2
|
||||
#define RIGHT_CTRL_PRESSED 4
|
||||
#define LEFT_CTRL_PRESSED 8
|
||||
#define SHIFT_PRESSED 16
|
||||
#define NUMLOCK_ON 32
|
||||
#define SCROLLLOCK_ON 64
|
||||
#define FROM_LEFT_1ST_BUTTON_PRESSED 1
|
||||
#define RIGHTMOST_BUTTON_PRESSED 2
|
||||
#define FROM_LEFT_2ND_BUTTON_PRESSED 4
|
||||
#define FROM_LEFT_3RD_BUTTON_PRESSED 8
|
||||
#define FROM_LEFT_4TH_BUTTON_PRESSED 16
|
||||
#define MOUSE_MOVED 1
|
||||
#define DOUBLE_CLICK 2
|
||||
#define MOUSE_WHEELED 4
|
||||
|
||||
typedef struct _CHAR_INFO {
|
||||
union {
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} Char;
|
||||
WORD Attributes;
|
||||
} CHAR_INFO,*PCHAR_INFO;
|
||||
typedef struct _SMALL_RECT {
|
||||
SHORT Left;
|
||||
SHORT Top;
|
||||
SHORT Right;
|
||||
SHORT Bottom;
|
||||
} SMALL_RECT,*PSMALL_RECT;
|
||||
typedef struct _CONSOLE_CURSOR_INFO {
|
||||
DWORD dwSize;
|
||||
BOOL bVisible;
|
||||
} CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
|
||||
typedef struct _COORD {
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
} COORD;
|
||||
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
|
||||
COORD dwSize;
|
||||
COORD dwCursorPosition;
|
||||
WORD wAttributes;
|
||||
SMALL_RECT srWindow;
|
||||
COORD dwMaximumWindowSize;
|
||||
} CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
|
||||
typedef BOOL(CALLBACK *PHANDLER_ROUTINE)(DWORD);
|
||||
typedef struct _KEY_EVENT_RECORD {
|
||||
BOOL bKeyDown;
|
||||
WORD wRepeatCount;
|
||||
WORD wVirtualKeyCode;
|
||||
WORD wVirtualScanCode;
|
||||
union {
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} uChar;
|
||||
DWORD dwControlKeyState;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
/* gcc's alignment is not what win32 expects */
|
||||
PACKED
|
||||
#endif
|
||||
KEY_EVENT_RECORD;
|
||||
|
||||
typedef struct _MOUSE_EVENT_RECORD {
|
||||
COORD dwMousePosition;
|
||||
DWORD dwButtonState;
|
||||
DWORD dwControlKeyState;
|
||||
DWORD dwEventFlags;
|
||||
} MOUSE_EVENT_RECORD;
|
||||
typedef struct _WINDOW_BUFFER_SIZE_RECORD { COORD dwSize; } WINDOW_BUFFER_SIZE_RECORD;
|
||||
typedef struct _MENU_EVENT_RECORD { UINT dwCommandId; } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
|
||||
typedef struct _FOCUS_EVENT_RECORD { BOOL bSetFocus; } FOCUS_EVENT_RECORD;
|
||||
typedef struct _INPUT_RECORD {
|
||||
WORD EventType;
|
||||
union {
|
||||
KEY_EVENT_RECORD KeyEvent;
|
||||
MOUSE_EVENT_RECORD MouseEvent;
|
||||
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
|
||||
MENU_EVENT_RECORD MenuEvent;
|
||||
FOCUS_EVENT_RECORD FocusEvent;
|
||||
} Event;
|
||||
} INPUT_RECORD,*PINPUT_RECORD;
|
||||
|
||||
BOOL WINAPI AllocConsole(void);
|
||||
HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,PVOID);
|
||||
BOOL WINAPI FillConsoleOutputAttribute(HANDLE,WORD,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FillConsoleOutputCharacterA(HANDLE,CHAR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FillConsoleOutputCharacterW(HANDLE,WCHAR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FlushConsoleInputBuffer(HANDLE);
|
||||
BOOL WINAPI FreeConsole(void);
|
||||
BOOL WINAPI GenerateConsoleCtrlEvent(DWORD,DWORD);
|
||||
UINT WINAPI GetConsoleCP(void);
|
||||
BOOL WINAPI GetConsoleCursorInfo(HANDLE,PCONSOLE_CURSOR_INFO);
|
||||
BOOL WINAPI GetConsoleMode(HANDLE,PDWORD);
|
||||
UINT WINAPI GetConsoleOutputCP(void);
|
||||
BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE,PCONSOLE_SCREEN_BUFFER_INFO);
|
||||
DWORD WINAPI GetConsoleTitleA(LPSTR,DWORD);
|
||||
DWORD WINAPI GetConsoleTitleW(LPWSTR,DWORD);
|
||||
COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
|
||||
BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,PDWORD);
|
||||
BOOL WINAPI GetNumberOfConsoleMouseButtons(PDWORD);
|
||||
BOOL WINAPI PeekConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI PeekConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleA(HANDLE,PVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI ReadConsoleW(HANDLE,PVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI ReadConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputAttribute(HANDLE,LPWORD,DWORD,COORD,LPDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputA(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI ReadConsoleOutputW(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
|
||||
BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
|
||||
BOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE);
|
||||
BOOL WINAPI SetConsoleCP(UINT);
|
||||
BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE,BOOL);
|
||||
BOOL WINAPI SetConsoleCursorInfo(HANDLE,const CONSOLE_CURSOR_INFO*);
|
||||
BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD);
|
||||
BOOL WINAPI SetConsoleMode(HANDLE,DWORD);
|
||||
BOOL WINAPI SetConsoleOutputCP(UINT);
|
||||
BOOL WINAPI SetConsoleScreenBufferSize(HANDLE,COORD);
|
||||
BOOL WINAPI SetConsoleTextAttribute(HANDLE,WORD);
|
||||
BOOL WINAPI SetConsoleTitleA(LPCSTR);
|
||||
BOOL WINAPI SetConsoleTitleW(LPCWSTR);
|
||||
BOOL WINAPI SetConsoleWindowInfo(HANDLE,BOOL,const SMALL_RECT*);
|
||||
BOOL WINAPI WriteConsoleA(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI WriteConsoleW(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI WriteConsoleInputA(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleInputW(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputA(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI WriteConsoleOutputW(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI WriteConsoleOutputAttribute(HANDLE,const WORD*,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE,LPCSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputCharacterW(HANDLE,LPCWSTR,DWORD,COORD,PDWORD);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
|
||||
#define GetConsoleTitle GetConsoleTitleW
|
||||
#define PeekConsoleInput PeekConsoleInputW
|
||||
#define ReadConsole ReadConsoleW
|
||||
#define ReadConsoleInput ReadConsoleInputW
|
||||
#define ReadConsoleOutput ReadConsoleOutputW
|
||||
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
|
||||
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
|
||||
#define SetConsoleTitle SetConsoleTitleW
|
||||
#define WriteConsole WriteConsoleW
|
||||
#define WriteConsoleInput WriteConsoleInputW
|
||||
#define WriteConsoleOutput WriteConsoleOutputW
|
||||
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
|
||||
#else
|
||||
#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
|
||||
#define GetConsoleTitle GetConsoleTitleA
|
||||
#define PeekConsoleInput PeekConsoleInputA
|
||||
#define ReadConsole ReadConsoleA
|
||||
#define ReadConsoleInput ReadConsoleInputA
|
||||
#define ReadConsoleOutput ReadConsoleOutputA
|
||||
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
|
||||
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
|
||||
#define SetConsoleTitle SetConsoleTitleA
|
||||
#define WriteConsole WriteConsoleA
|
||||
#define WriteConsoleInput WriteConsoleInputA
|
||||
#define WriteConsoleOutput WriteConsoleOutputA
|
||||
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _WINCON_H
|
||||
#define _WINCON_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FOREGROUND_BLUE 1
|
||||
#define FOREGROUND_GREEN 2
|
||||
#define FOREGROUND_RED 4
|
||||
#define FOREGROUND_INTENSITY 8
|
||||
#define BACKGROUND_BLUE 16
|
||||
#define BACKGROUND_GREEN 32
|
||||
#define BACKGROUND_RED 64
|
||||
#define BACKGROUND_INTENSITY 128
|
||||
#define CTRL_C_EVENT 0
|
||||
#define CTRL_BREAK_EVENT 1
|
||||
#define CTRL_CLOSE_EVENT 2
|
||||
#define CTRL_LOGOFF_EVENT 5
|
||||
#define CTRL_SHUTDOWN_EVENT 6
|
||||
#define ENABLE_LINE_INPUT 2
|
||||
#define ENABLE_ECHO_INPUT 4
|
||||
#define ENABLE_PROCESSED_INPUT 1
|
||||
#define ENABLE_WINDOW_INPUT 8
|
||||
#define ENABLE_MOUSE_INPUT 16
|
||||
#define ENABLE_PROCESSED_OUTPUT 1
|
||||
#define ENABLE_WRAP_AT_EOL_OUTPUT 2
|
||||
#define KEY_EVENT 1
|
||||
#define MOUSE_EVENT 2
|
||||
#define WINDOW_BUFFER_SIZE_EVENT 4
|
||||
#define MENU_EVENT 8
|
||||
#define FOCUS_EVENT 16
|
||||
#define CAPSLOCK_ON 128
|
||||
#define ENHANCED_KEY 256
|
||||
#define RIGHT_ALT_PRESSED 1
|
||||
#define LEFT_ALT_PRESSED 2
|
||||
#define RIGHT_CTRL_PRESSED 4
|
||||
#define LEFT_CTRL_PRESSED 8
|
||||
#define SHIFT_PRESSED 16
|
||||
#define NUMLOCK_ON 32
|
||||
#define SCROLLLOCK_ON 64
|
||||
#define FROM_LEFT_1ST_BUTTON_PRESSED 1
|
||||
#define RIGHTMOST_BUTTON_PRESSED 2
|
||||
#define FROM_LEFT_2ND_BUTTON_PRESSED 4
|
||||
#define FROM_LEFT_3RD_BUTTON_PRESSED 8
|
||||
#define FROM_LEFT_4TH_BUTTON_PRESSED 16
|
||||
#define MOUSE_MOVED 1
|
||||
#define DOUBLE_CLICK 2
|
||||
#define MOUSE_WHEELED 4
|
||||
|
||||
typedef struct _CHAR_INFO {
|
||||
union {
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} Char;
|
||||
WORD Attributes;
|
||||
} CHAR_INFO,*PCHAR_INFO;
|
||||
typedef struct _SMALL_RECT {
|
||||
SHORT Left;
|
||||
SHORT Top;
|
||||
SHORT Right;
|
||||
SHORT Bottom;
|
||||
} SMALL_RECT,*PSMALL_RECT;
|
||||
typedef struct _CONSOLE_CURSOR_INFO {
|
||||
DWORD dwSize;
|
||||
BOOL bVisible;
|
||||
} CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
|
||||
typedef struct _COORD {
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
} COORD;
|
||||
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
|
||||
COORD dwSize;
|
||||
COORD dwCursorPosition;
|
||||
WORD wAttributes;
|
||||
SMALL_RECT srWindow;
|
||||
COORD dwMaximumWindowSize;
|
||||
} CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
|
||||
typedef BOOL(CALLBACK *PHANDLER_ROUTINE)(DWORD);
|
||||
typedef struct _KEY_EVENT_RECORD {
|
||||
BOOL bKeyDown;
|
||||
WORD wRepeatCount;
|
||||
WORD wVirtualKeyCode;
|
||||
WORD wVirtualScanCode;
|
||||
union {
|
||||
WCHAR UnicodeChar;
|
||||
CHAR AsciiChar;
|
||||
} uChar;
|
||||
DWORD dwControlKeyState;
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
/* gcc's alignment is not what win32 expects */
|
||||
PACKED
|
||||
#endif
|
||||
KEY_EVENT_RECORD;
|
||||
|
||||
typedef struct _MOUSE_EVENT_RECORD {
|
||||
COORD dwMousePosition;
|
||||
DWORD dwButtonState;
|
||||
DWORD dwControlKeyState;
|
||||
DWORD dwEventFlags;
|
||||
} MOUSE_EVENT_RECORD;
|
||||
typedef struct _WINDOW_BUFFER_SIZE_RECORD { COORD dwSize; } WINDOW_BUFFER_SIZE_RECORD;
|
||||
typedef struct _MENU_EVENT_RECORD { UINT dwCommandId; } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
|
||||
typedef struct _FOCUS_EVENT_RECORD { BOOL bSetFocus; } FOCUS_EVENT_RECORD;
|
||||
typedef struct _INPUT_RECORD {
|
||||
WORD EventType;
|
||||
union {
|
||||
KEY_EVENT_RECORD KeyEvent;
|
||||
MOUSE_EVENT_RECORD MouseEvent;
|
||||
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
|
||||
MENU_EVENT_RECORD MenuEvent;
|
||||
FOCUS_EVENT_RECORD FocusEvent;
|
||||
} Event;
|
||||
} INPUT_RECORD,*PINPUT_RECORD;
|
||||
|
||||
BOOL WINAPI AllocConsole(void);
|
||||
HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,PVOID);
|
||||
BOOL WINAPI FillConsoleOutputAttribute(HANDLE,WORD,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FillConsoleOutputCharacterA(HANDLE,CHAR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FillConsoleOutputCharacterW(HANDLE,WCHAR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI FlushConsoleInputBuffer(HANDLE);
|
||||
BOOL WINAPI FreeConsole(void);
|
||||
BOOL WINAPI GenerateConsoleCtrlEvent(DWORD,DWORD);
|
||||
UINT WINAPI GetConsoleCP(void);
|
||||
BOOL WINAPI GetConsoleCursorInfo(HANDLE,PCONSOLE_CURSOR_INFO);
|
||||
BOOL WINAPI GetConsoleMode(HANDLE,PDWORD);
|
||||
UINT WINAPI GetConsoleOutputCP(void);
|
||||
BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE,PCONSOLE_SCREEN_BUFFER_INFO);
|
||||
DWORD WINAPI GetConsoleTitleA(LPSTR,DWORD);
|
||||
DWORD WINAPI GetConsoleTitleW(LPWSTR,DWORD);
|
||||
COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
|
||||
BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,PDWORD);
|
||||
BOOL WINAPI GetNumberOfConsoleMouseButtons(PDWORD);
|
||||
BOOL WINAPI PeekConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI PeekConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleA(HANDLE,PVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI ReadConsoleW(HANDLE,PVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI ReadConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputAttribute(HANDLE,LPWORD,DWORD,COORD,LPDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI ReadConsoleOutputA(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI ReadConsoleOutputW(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
|
||||
BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
|
||||
BOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE);
|
||||
BOOL WINAPI SetConsoleCP(UINT);
|
||||
BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE,BOOL);
|
||||
BOOL WINAPI SetConsoleCursorInfo(HANDLE,const CONSOLE_CURSOR_INFO*);
|
||||
BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD);
|
||||
BOOL WINAPI SetConsoleMode(HANDLE,DWORD);
|
||||
BOOL WINAPI SetConsoleOutputCP(UINT);
|
||||
BOOL WINAPI SetConsoleScreenBufferSize(HANDLE,COORD);
|
||||
BOOL WINAPI SetConsoleTextAttribute(HANDLE,WORD);
|
||||
BOOL WINAPI SetConsoleTitleA(LPCSTR);
|
||||
BOOL WINAPI SetConsoleTitleW(LPCWSTR);
|
||||
BOOL WINAPI SetConsoleWindowInfo(HANDLE,BOOL,const SMALL_RECT*);
|
||||
BOOL WINAPI WriteConsoleA(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI WriteConsoleW(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
|
||||
BOOL WINAPI WriteConsoleInputA(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleInputW(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputA(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI WriteConsoleOutputW(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
|
||||
BOOL WINAPI WriteConsoleOutputAttribute(HANDLE,const WORD*,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE,LPCSTR,DWORD,COORD,PDWORD);
|
||||
BOOL WINAPI WriteConsoleOutputCharacterW(HANDLE,LPCWSTR,DWORD,COORD,PDWORD);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
|
||||
#define GetConsoleTitle GetConsoleTitleW
|
||||
#define PeekConsoleInput PeekConsoleInputW
|
||||
#define ReadConsole ReadConsoleW
|
||||
#define ReadConsoleInput ReadConsoleInputW
|
||||
#define ReadConsoleOutput ReadConsoleOutputW
|
||||
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
|
||||
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
|
||||
#define SetConsoleTitle SetConsoleTitleW
|
||||
#define WriteConsole WriteConsoleW
|
||||
#define WriteConsoleInput WriteConsoleInputW
|
||||
#define WriteConsoleOutput WriteConsoleOutputW
|
||||
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
|
||||
#else
|
||||
#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
|
||||
#define GetConsoleTitle GetConsoleTitleA
|
||||
#define PeekConsoleInput PeekConsoleInputA
|
||||
#define ReadConsole ReadConsoleA
|
||||
#define ReadConsoleInput ReadConsoleInputA
|
||||
#define ReadConsoleOutput ReadConsoleOutputA
|
||||
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
|
||||
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
|
||||
#define SetConsoleTitle SetConsoleTitleA
|
||||
#define WriteConsole WriteConsoleA
|
||||
#define WriteConsoleInput WriteConsoleInputA
|
||||
#define WriteConsoleOutput WriteConsoleOutputA
|
||||
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,240 +1,240 @@
|
||||
#ifndef _WINDEF_H
|
||||
#define _WINDEF_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0400
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT WINVER
|
||||
#endif
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
#define _WIN32
|
||||
#endif
|
||||
#define FAR
|
||||
#define far
|
||||
#define NEAR
|
||||
#define near
|
||||
#ifndef CONST
|
||||
#define CONST const
|
||||
#endif
|
||||
#undef MAX_PATH
|
||||
#define MAX_PATH 260
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
#define IN
|
||||
#define OUT
|
||||
#ifndef OPTIONAL
|
||||
#define OPTIONAL
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define PACKED __attribute__((packed))
|
||||
#ifndef _stdcall
|
||||
#define _stdcall __attribute__((stdcall))
|
||||
#endif
|
||||
#ifndef __stdcall
|
||||
#define __stdcall __attribute__((stdcall))
|
||||
#endif
|
||||
#ifndef _cdecl
|
||||
#define _cdecl __attribute__((cdecl))
|
||||
#endif
|
||||
#ifndef __cdecl
|
||||
#define __cdecl __attribute__((cdecl))
|
||||
#endif
|
||||
#ifndef __declspec
|
||||
#define __declspec(e) __attribute__((e))
|
||||
#endif
|
||||
#ifndef _declspec
|
||||
#define _declspec(e) __attribute__((e))
|
||||
#endif
|
||||
#else
|
||||
#define PACKED
|
||||
#define _cdecl
|
||||
#define __cdecl
|
||||
#endif
|
||||
|
||||
#undef pascal
|
||||
#undef _pascal
|
||||
#undef __pascal
|
||||
#define pascal __stdcall
|
||||
#define _pascal __stdcall
|
||||
#define __pascal __stdcall
|
||||
#define PASCAL _pascal
|
||||
#define CDECL _cdecl
|
||||
#define STDCALL __stdcall
|
||||
#define WINAPI __stdcall
|
||||
#define WINAPIV __cdecl
|
||||
#define APIENTRY __stdcall
|
||||
#define CALLBACK __stdcall
|
||||
#define APIPRIVATE __stdcall
|
||||
|
||||
#define DECLSPEC_IMPORT __declspec(dllimport)
|
||||
#define DECLSPEC_EXPORT __declspec(dllexport)
|
||||
#ifdef __GNUC__
|
||||
#define DECLSPEC_NORETURN __declspec(noreturn)
|
||||
#define DECLARE_STDCALL_P( type ) __stdcall type
|
||||
#elif defined(__WATCOMC__)
|
||||
#define DECLSPEC_NORETURN
|
||||
#define DECLARE_STDCALL_P( type ) type __stdcall
|
||||
#endif /* __GNUC__/__WATCOMC__ */
|
||||
#define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
|
||||
#define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
|
||||
#define LOWORD(l) ((WORD)((DWORD)(l)))
|
||||
#define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF))
|
||||
#define LOBYTE(w) ((BYTE)(w))
|
||||
#define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
|
||||
|
||||
#ifndef _export
|
||||
#define _export
|
||||
#endif
|
||||
#ifndef __export
|
||||
#define __export
|
||||
#endif
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#ifndef max
|
||||
#define max(a,b) ((a)>(b)?(a):(b))
|
||||
#endif
|
||||
#ifndef min
|
||||
#define min(a,b) ((a)<(b)?(a):(b))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
||||
#define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
|
||||
#define DBG_UNREFERENCED_PARAMETER(P)
|
||||
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
|
||||
|
||||
typedef unsigned long DWORD;
|
||||
typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
|
||||
/* FIXME: Is there a good solution to this? */
|
||||
#ifndef XFree86Server
|
||||
#ifndef __OBJC__
|
||||
typedef WINBOOL BOOL;
|
||||
#else
|
||||
#define BOOL WINBOOL
|
||||
#endif
|
||||
typedef unsigned char BYTE;
|
||||
#endif /* ndef XFree86Server */
|
||||
typedef BOOL *PBOOL,*LPBOOL;
|
||||
typedef unsigned short WORD;
|
||||
typedef float FLOAT;
|
||||
typedef FLOAT *PFLOAT;
|
||||
typedef BYTE *PBYTE,*LPBYTE;
|
||||
typedef int *PINT,*LPINT;
|
||||
typedef WORD *PWORD,*LPWORD;
|
||||
typedef long *LPLONG;
|
||||
typedef DWORD *PDWORD,*LPDWORD;
|
||||
typedef void *PVOID,*LPVOID;
|
||||
typedef CONST void *PCVOID,*LPCVOID;
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT,*PUINT,*LPUINT;
|
||||
|
||||
#include <winnt.h>
|
||||
|
||||
typedef UINT WPARAM;
|
||||
typedef LONG LPARAM;
|
||||
typedef LONG LRESULT;
|
||||
#ifndef _HRESULT_DEFINED
|
||||
typedef LONG HRESULT;
|
||||
#define _HRESULT_DEFINED
|
||||
#endif
|
||||
#ifndef XFree86Server
|
||||
typedef WORD ATOM;
|
||||
#endif /* XFree86Server */
|
||||
typedef HANDLE HGLOBAL;
|
||||
typedef HANDLE HLOCAL;
|
||||
typedef HANDLE GLOBALHANDLE;
|
||||
typedef HANDLE LOCALHANDLE;
|
||||
typedef void *HGDIOBJ;
|
||||
DECLARE_HANDLE(HACCEL);
|
||||
DECLARE_HANDLE(HBITMAP);
|
||||
DECLARE_HANDLE(HBRUSH);
|
||||
DECLARE_HANDLE(HCOLORSPACE);
|
||||
DECLARE_HANDLE(HDC);
|
||||
DECLARE_HANDLE(HGLRC);
|
||||
DECLARE_HANDLE(HDESK);
|
||||
DECLARE_HANDLE(HENHMETAFILE);
|
||||
DECLARE_HANDLE(HFONT);
|
||||
DECLARE_HANDLE(HICON);
|
||||
DECLARE_HANDLE(HKEY);
|
||||
/* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
|
||||
/* #if (WINVER >= 0x0500) */
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
#define HMONITOR_DECLARED 1
|
||||
DECLARE_HANDLE(HTERMINAL);
|
||||
DECLARE_HANDLE(HWINEVENTHOOK);
|
||||
/* #endif */
|
||||
typedef HKEY *PHKEY;
|
||||
DECLARE_HANDLE(HMENU);
|
||||
DECLARE_HANDLE(HMETAFILE);
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
typedef HINSTANCE HMODULE;
|
||||
DECLARE_HANDLE(HPALETTE);
|
||||
DECLARE_HANDLE(HPEN);
|
||||
DECLARE_HANDLE(HRGN);
|
||||
DECLARE_HANDLE(HRSRC);
|
||||
DECLARE_HANDLE(HSTR);
|
||||
DECLARE_HANDLE(HTASK);
|
||||
DECLARE_HANDLE(HWND);
|
||||
DECLARE_HANDLE(HWINSTA);
|
||||
DECLARE_HANDLE(HKL);
|
||||
typedef int HFILE;
|
||||
typedef HICON HCURSOR;
|
||||
typedef DWORD COLORREF;
|
||||
typedef int (WINAPI *FARPROC)();
|
||||
typedef int (WINAPI *NEARPROC)();
|
||||
typedef int (WINAPI *PROC)();
|
||||
typedef struct tagRECT {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECT,*PRECT,*LPRECT;
|
||||
typedef const RECT *LPCRECT;
|
||||
typedef struct tagRECTL {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECTL,*PRECTL,*LPRECTL;
|
||||
typedef const RECTL *LPCRECTL;
|
||||
typedef struct tagPOINT {
|
||||
LONG x;
|
||||
LONG y;
|
||||
} POINT,POINTL,*PPOINT,*LPPOINT,*PPOINTL,*LPPOINTL;
|
||||
typedef struct tagSIZE {
|
||||
LONG cx;
|
||||
LONG cy;
|
||||
} SIZE,SIZEL,*PSIZE,*LPSIZE,*PSIZEL,*LPSIZEL;
|
||||
typedef struct tagPOINTS {
|
||||
SHORT x;
|
||||
SHORT y;
|
||||
} POINTS,*PPOINTS,*LPPOINTS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _WINDEF_H
|
||||
#define _WINDEF_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0400
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT WINVER
|
||||
#endif
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
#define _WIN32
|
||||
#endif
|
||||
#define FAR
|
||||
#define far
|
||||
#define NEAR
|
||||
#define near
|
||||
#ifndef CONST
|
||||
#define CONST const
|
||||
#endif
|
||||
#undef MAX_PATH
|
||||
#define MAX_PATH 260
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
#define IN
|
||||
#define OUT
|
||||
#ifndef OPTIONAL
|
||||
#define OPTIONAL
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define PACKED __attribute__((packed))
|
||||
#ifndef _stdcall
|
||||
#define _stdcall __attribute__((stdcall))
|
||||
#endif
|
||||
#ifndef __stdcall
|
||||
#define __stdcall __attribute__((stdcall))
|
||||
#endif
|
||||
#ifndef _cdecl
|
||||
#define _cdecl __attribute__((cdecl))
|
||||
#endif
|
||||
#ifndef __cdecl
|
||||
#define __cdecl __attribute__((cdecl))
|
||||
#endif
|
||||
#ifndef __declspec
|
||||
#define __declspec(e) __attribute__((e))
|
||||
#endif
|
||||
#ifndef _declspec
|
||||
#define _declspec(e) __attribute__((e))
|
||||
#endif
|
||||
#else
|
||||
#define PACKED
|
||||
#define _cdecl
|
||||
#define __cdecl
|
||||
#endif
|
||||
|
||||
#undef pascal
|
||||
#undef _pascal
|
||||
#undef __pascal
|
||||
#define pascal __stdcall
|
||||
#define _pascal __stdcall
|
||||
#define __pascal __stdcall
|
||||
#define PASCAL _pascal
|
||||
#define CDECL _cdecl
|
||||
#define STDCALL __stdcall
|
||||
#define WINAPI __stdcall
|
||||
#define WINAPIV __cdecl
|
||||
#define APIENTRY __stdcall
|
||||
#define CALLBACK __stdcall
|
||||
#define APIPRIVATE __stdcall
|
||||
|
||||
#define DECLSPEC_IMPORT __declspec(dllimport)
|
||||
#define DECLSPEC_EXPORT __declspec(dllexport)
|
||||
#ifdef __GNUC__
|
||||
#define DECLSPEC_NORETURN __declspec(noreturn)
|
||||
#define DECLARE_STDCALL_P( type ) __stdcall type
|
||||
#elif defined(__WATCOMC__)
|
||||
#define DECLSPEC_NORETURN
|
||||
#define DECLARE_STDCALL_P( type ) type __stdcall
|
||||
#endif /* __GNUC__/__WATCOMC__ */
|
||||
#define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
|
||||
#define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
|
||||
#define LOWORD(l) ((WORD)((DWORD)(l)))
|
||||
#define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF))
|
||||
#define LOBYTE(w) ((BYTE)(w))
|
||||
#define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
|
||||
|
||||
#ifndef _export
|
||||
#define _export
|
||||
#endif
|
||||
#ifndef __export
|
||||
#define __export
|
||||
#endif
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#ifndef max
|
||||
#define max(a,b) ((a)>(b)?(a):(b))
|
||||
#endif
|
||||
#ifndef min
|
||||
#define min(a,b) ((a)<(b)?(a):(b))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
||||
#define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
|
||||
#define DBG_UNREFERENCED_PARAMETER(P)
|
||||
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
|
||||
|
||||
typedef unsigned long DWORD;
|
||||
typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
|
||||
/* FIXME: Is there a good solution to this? */
|
||||
#ifndef XFree86Server
|
||||
#ifndef __OBJC__
|
||||
typedef WINBOOL BOOL;
|
||||
#else
|
||||
#define BOOL WINBOOL
|
||||
#endif
|
||||
typedef unsigned char BYTE;
|
||||
#endif /* ndef XFree86Server */
|
||||
typedef BOOL *PBOOL,*LPBOOL;
|
||||
typedef unsigned short WORD;
|
||||
typedef float FLOAT;
|
||||
typedef FLOAT *PFLOAT;
|
||||
typedef BYTE *PBYTE,*LPBYTE;
|
||||
typedef int *PINT,*LPINT;
|
||||
typedef WORD *PWORD,*LPWORD;
|
||||
typedef long *LPLONG;
|
||||
typedef DWORD *PDWORD,*LPDWORD;
|
||||
typedef void *PVOID,*LPVOID;
|
||||
typedef CONST void *PCVOID,*LPCVOID;
|
||||
typedef int INT;
|
||||
typedef unsigned int UINT,*PUINT,*LPUINT;
|
||||
|
||||
#include <winnt.h>
|
||||
|
||||
typedef UINT WPARAM;
|
||||
typedef LONG LPARAM;
|
||||
typedef LONG LRESULT;
|
||||
#ifndef _HRESULT_DEFINED
|
||||
typedef LONG HRESULT;
|
||||
#define _HRESULT_DEFINED
|
||||
#endif
|
||||
#ifndef XFree86Server
|
||||
typedef WORD ATOM;
|
||||
#endif /* XFree86Server */
|
||||
typedef HANDLE HGLOBAL;
|
||||
typedef HANDLE HLOCAL;
|
||||
typedef HANDLE GLOBALHANDLE;
|
||||
typedef HANDLE LOCALHANDLE;
|
||||
typedef void *HGDIOBJ;
|
||||
DECLARE_HANDLE(HACCEL);
|
||||
DECLARE_HANDLE(HBITMAP);
|
||||
DECLARE_HANDLE(HBRUSH);
|
||||
DECLARE_HANDLE(HCOLORSPACE);
|
||||
DECLARE_HANDLE(HDC);
|
||||
DECLARE_HANDLE(HGLRC);
|
||||
DECLARE_HANDLE(HDESK);
|
||||
DECLARE_HANDLE(HENHMETAFILE);
|
||||
DECLARE_HANDLE(HFONT);
|
||||
DECLARE_HANDLE(HICON);
|
||||
DECLARE_HANDLE(HKEY);
|
||||
/* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
|
||||
/* #if (WINVER >= 0x0500) */
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
#define HMONITOR_DECLARED 1
|
||||
DECLARE_HANDLE(HTERMINAL);
|
||||
DECLARE_HANDLE(HWINEVENTHOOK);
|
||||
/* #endif */
|
||||
typedef HKEY *PHKEY;
|
||||
DECLARE_HANDLE(HMENU);
|
||||
DECLARE_HANDLE(HMETAFILE);
|
||||
DECLARE_HANDLE(HINSTANCE);
|
||||
typedef HINSTANCE HMODULE;
|
||||
DECLARE_HANDLE(HPALETTE);
|
||||
DECLARE_HANDLE(HPEN);
|
||||
DECLARE_HANDLE(HRGN);
|
||||
DECLARE_HANDLE(HRSRC);
|
||||
DECLARE_HANDLE(HSTR);
|
||||
DECLARE_HANDLE(HTASK);
|
||||
DECLARE_HANDLE(HWND);
|
||||
DECLARE_HANDLE(HWINSTA);
|
||||
DECLARE_HANDLE(HKL);
|
||||
typedef int HFILE;
|
||||
typedef HICON HCURSOR;
|
||||
typedef DWORD COLORREF;
|
||||
typedef int (WINAPI *FARPROC)();
|
||||
typedef int (WINAPI *NEARPROC)();
|
||||
typedef int (WINAPI *PROC)();
|
||||
typedef struct tagRECT {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECT,*PRECT,*LPRECT;
|
||||
typedef const RECT *LPCRECT;
|
||||
typedef struct tagRECTL {
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECTL,*PRECTL,*LPRECTL;
|
||||
typedef const RECTL *LPCRECTL;
|
||||
typedef struct tagPOINT {
|
||||
LONG x;
|
||||
LONG y;
|
||||
} POINT,POINTL,*PPOINT,*LPPOINT,*PPOINTL,*LPPOINTL;
|
||||
typedef struct tagSIZE {
|
||||
LONG cx;
|
||||
LONG cy;
|
||||
} SIZE,SIZEL,*PSIZE,*LPSIZE,*PSIZEL,*LPSIZEL;
|
||||
typedef struct tagPOINTS {
|
||||
SHORT x;
|
||||
SHORT y;
|
||||
} POINTS,*PPOINTS,*LPPOINTS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,176 +1,176 @@
|
||||
/*
|
||||
windows.h - main header file for the Win32 API
|
||||
|
||||
Written by Anders Norlander <anorland@hem2.passagen.se>
|
||||
|
||||
This file is part of a free library for the Win32 API.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
*/
|
||||
#ifndef _WINDOWS_H
|
||||
#define _WINDOWS_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
/* translate GCC target defines to MS equivalents. Keep this synchronized
|
||||
with winnt.h. */
|
||||
#if defined(__i686__) && !defined(_M_IX86)
|
||||
#define _M_IX86 600
|
||||
#elif defined(__i586__) && !defined(_M_IX86)
|
||||
#define _M_IX86 500
|
||||
#elif defined(__i486__) && !defined(_M_IX86)
|
||||
#define _M_IX86 400
|
||||
#elif defined(__i386__) && !defined(_M_IX86)
|
||||
#define _M_IX86 300
|
||||
#endif
|
||||
#if defined(_M_IX86) && !defined(_X86_)
|
||||
#define _X86_
|
||||
#elif defined(_M_ALPHA) && !defined(_ALPHA_)
|
||||
#define _ALPHA_
|
||||
#elif defined(_M_PPC) && !defined(_PPC_)
|
||||
#define _PPC_
|
||||
#elif defined(_M_MRX000) && !defined(_MIPS_)
|
||||
#define _MIPS_
|
||||
#elif defined(_M_M68K) && !defined(_68K_)
|
||||
#define _68K_
|
||||
#endif
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
/* winresrc.h includes the necessary headers */
|
||||
#include <winresrc.h>
|
||||
#else
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef NONAMELESSUNION
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#define _ANONYMOUS_STRUCT __extension__
|
||||
#else
|
||||
#if defined(__cplusplus)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
|
||||
#endif /* NONAMELESSUNION */
|
||||
#elif defined(__WATCOMC__)
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#endif /* __GNUC__/__WATCOMC__ */
|
||||
|
||||
#ifndef _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _UNION_NAME(x) x
|
||||
#define DUMMYUNIONNAME u
|
||||
#define DUMMYUNIONNAME2 u2
|
||||
#define DUMMYUNIONNAME3 u3
|
||||
#define DUMMYUNIONNAME4 u4
|
||||
#define DUMMYUNIONNAME5 u5
|
||||
#define DUMMYUNIONNAME6 u6
|
||||
#define DUMMYUNIONNAME7 u7
|
||||
#define DUMMYUNIONNAME8 u8
|
||||
#else
|
||||
#define _UNION_NAME(x)
|
||||
#define DUMMYUNIONNAME
|
||||
#define DUMMYUNIONNAME2
|
||||
#define DUMMYUNIONNAME3
|
||||
#define DUMMYUNIONNAME4
|
||||
#define DUMMYUNIONNAME5
|
||||
#define DUMMYUNIONNAME6
|
||||
#define DUMMYUNIONNAME7
|
||||
#define DUMMYUNIONNAME8
|
||||
#endif
|
||||
#ifndef _ANONYMOUS_STRUCT
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#define _STRUCT_NAME(x) x
|
||||
#define DUMMYSTRUCTNAME s
|
||||
#define DUMMYSTRUCTNAME2 s2
|
||||
#define DUMMYSTRUCTNAME3 s3
|
||||
#else
|
||||
#define _STRUCT_NAME(x)
|
||||
#define DUMMYSTRUCTNAME
|
||||
#define DUMMYSTRUCTNAME2
|
||||
#define DUMMYSTRUCTNAME3
|
||||
#endif
|
||||
|
||||
#ifndef NO_STRICT
|
||||
#ifndef STRICT
|
||||
#define STRICT 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <wincon.h>
|
||||
#include <basetyps.h>
|
||||
#include <excpt.h>
|
||||
#include <winbase.h>
|
||||
#ifndef _WINGDI_H
|
||||
#include <wingdi.h>
|
||||
#endif
|
||||
#ifndef _WINUSER_H
|
||||
#include <winuser.h>
|
||||
#endif
|
||||
#ifndef _WINNLS_H
|
||||
#include <winnls.h>
|
||||
#endif
|
||||
#ifndef _WINVER_H
|
||||
#include <winver.h>
|
||||
#endif
|
||||
#ifndef _WINNETWK_H
|
||||
#include <winnetwk.h>
|
||||
#endif
|
||||
#ifndef _WINREG_H
|
||||
#include <winreg.h>
|
||||
#endif
|
||||
#ifndef _WINSVC_H
|
||||
#include <winsvc.h>
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#include <commdlg.h>
|
||||
#include <cderr.h>
|
||||
#include <dde.h>
|
||||
#include <ddeml.h>
|
||||
#include <dlgs.h>
|
||||
#include <lzexpand.h>
|
||||
#include <mmsystem.h>
|
||||
#include <nb30.h>
|
||||
#include <rpc.h>
|
||||
#include <shellapi.h>
|
||||
#include <winperf.h>
|
||||
#include <winspool.h>
|
||||
#if defined(Win32_Winsock)
|
||||
#warning "The Win32_Winsock macro name is deprecated.\
|
||||
Please use __USE_W32_SOCKETS instead"
|
||||
#ifndef __USE_W32_SOCKETS
|
||||
#define __USE_W32_SOCKETS
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__USE_W32_SOCKETS) || !(defined(__CYGWIN__) || defined(__MSYS__) || defined(_UWIN))
|
||||
#if (_WIN32_WINNT >= 0x0400)
|
||||
#include <winsock2.h>
|
||||
/*
|
||||
* MS likes to include mswsock.h here as well,
|
||||
* but that can cause undefined symbols if
|
||||
* winsock2.h is included before windows.h
|
||||
*/
|
||||
#else
|
||||
#include <winsock.h>
|
||||
#endif /* (_WIN32_WINNT >= 0x0400) */
|
||||
#endif
|
||||
#endif /* WIN32_LEAN_AND_MEAN */
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
#ifdef __OBJC__
|
||||
/* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
|
||||
but undefining it causes trouble as well if a file is included after
|
||||
windows.h
|
||||
*/
|
||||
#undef BOOL
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*
|
||||
windows.h - main header file for the Win32 API
|
||||
|
||||
Written by Anders Norlander <anorland@hem2.passagen.se>
|
||||
|
||||
This file is part of a free library for the Win32 API.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
*/
|
||||
#ifndef _WINDOWS_H
|
||||
#define _WINDOWS_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
/* translate GCC target defines to MS equivalents. Keep this synchronized
|
||||
with winnt.h. */
|
||||
#if defined(__i686__) && !defined(_M_IX86)
|
||||
#define _M_IX86 600
|
||||
#elif defined(__i586__) && !defined(_M_IX86)
|
||||
#define _M_IX86 500
|
||||
#elif defined(__i486__) && !defined(_M_IX86)
|
||||
#define _M_IX86 400
|
||||
#elif defined(__i386__) && !defined(_M_IX86)
|
||||
#define _M_IX86 300
|
||||
#endif
|
||||
#if defined(_M_IX86) && !defined(_X86_)
|
||||
#define _X86_
|
||||
#elif defined(_M_ALPHA) && !defined(_ALPHA_)
|
||||
#define _ALPHA_
|
||||
#elif defined(_M_PPC) && !defined(_PPC_)
|
||||
#define _PPC_
|
||||
#elif defined(_M_MRX000) && !defined(_MIPS_)
|
||||
#define _MIPS_
|
||||
#elif defined(_M_M68K) && !defined(_68K_)
|
||||
#define _68K_
|
||||
#endif
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
/* winresrc.h includes the necessary headers */
|
||||
#include <winresrc.h>
|
||||
#else
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef NONAMELESSUNION
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#define _ANONYMOUS_STRUCT __extension__
|
||||
#else
|
||||
#if defined(__cplusplus)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
|
||||
#endif /* NONAMELESSUNION */
|
||||
#elif defined(__WATCOMC__)
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#endif /* __GNUC__/__WATCOMC__ */
|
||||
|
||||
#ifndef _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _UNION_NAME(x) x
|
||||
#define DUMMYUNIONNAME u
|
||||
#define DUMMYUNIONNAME2 u2
|
||||
#define DUMMYUNIONNAME3 u3
|
||||
#define DUMMYUNIONNAME4 u4
|
||||
#define DUMMYUNIONNAME5 u5
|
||||
#define DUMMYUNIONNAME6 u6
|
||||
#define DUMMYUNIONNAME7 u7
|
||||
#define DUMMYUNIONNAME8 u8
|
||||
#else
|
||||
#define _UNION_NAME(x)
|
||||
#define DUMMYUNIONNAME
|
||||
#define DUMMYUNIONNAME2
|
||||
#define DUMMYUNIONNAME3
|
||||
#define DUMMYUNIONNAME4
|
||||
#define DUMMYUNIONNAME5
|
||||
#define DUMMYUNIONNAME6
|
||||
#define DUMMYUNIONNAME7
|
||||
#define DUMMYUNIONNAME8
|
||||
#endif
|
||||
#ifndef _ANONYMOUS_STRUCT
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#define _STRUCT_NAME(x) x
|
||||
#define DUMMYSTRUCTNAME s
|
||||
#define DUMMYSTRUCTNAME2 s2
|
||||
#define DUMMYSTRUCTNAME3 s3
|
||||
#else
|
||||
#define _STRUCT_NAME(x)
|
||||
#define DUMMYSTRUCTNAME
|
||||
#define DUMMYSTRUCTNAME2
|
||||
#define DUMMYSTRUCTNAME3
|
||||
#endif
|
||||
|
||||
#ifndef NO_STRICT
|
||||
#ifndef STRICT
|
||||
#define STRICT 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <wincon.h>
|
||||
#include <basetyps.h>
|
||||
#include <excpt.h>
|
||||
#include <winbase.h>
|
||||
#ifndef _WINGDI_H
|
||||
#include <wingdi.h>
|
||||
#endif
|
||||
#ifndef _WINUSER_H
|
||||
#include <winuser.h>
|
||||
#endif
|
||||
#ifndef _WINNLS_H
|
||||
#include <winnls.h>
|
||||
#endif
|
||||
#ifndef _WINVER_H
|
||||
#include <winver.h>
|
||||
#endif
|
||||
#ifndef _WINNETWK_H
|
||||
#include <winnetwk.h>
|
||||
#endif
|
||||
#ifndef _WINREG_H
|
||||
#include <winreg.h>
|
||||
#endif
|
||||
#ifndef _WINSVC_H
|
||||
#include <winsvc.h>
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#include <commdlg.h>
|
||||
#include <cderr.h>
|
||||
#include <dde.h>
|
||||
#include <ddeml.h>
|
||||
#include <dlgs.h>
|
||||
#include <lzexpand.h>
|
||||
#include <mmsystem.h>
|
||||
#include <nb30.h>
|
||||
#include <rpc.h>
|
||||
#include <shellapi.h>
|
||||
#include <winperf.h>
|
||||
#include <winspool.h>
|
||||
#if defined(Win32_Winsock)
|
||||
#warning "The Win32_Winsock macro name is deprecated.\
|
||||
Please use __USE_W32_SOCKETS instead"
|
||||
#ifndef __USE_W32_SOCKETS
|
||||
#define __USE_W32_SOCKETS
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__USE_W32_SOCKETS) || !(defined(__CYGWIN__) || defined(__MSYS__) || defined(_UWIN))
|
||||
#if (_WIN32_WINNT >= 0x0400)
|
||||
#include <winsock2.h>
|
||||
/*
|
||||
* MS likes to include mswsock.h here as well,
|
||||
* but that can cause undefined symbols if
|
||||
* winsock2.h is included before windows.h
|
||||
*/
|
||||
#else
|
||||
#include <winsock.h>
|
||||
#endif /* (_WIN32_WINNT >= 0x0400) */
|
||||
#endif
|
||||
#endif /* WIN32_LEAN_AND_MEAN */
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
#ifdef __OBJC__
|
||||
/* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
|
||||
but undefining it causes trouble as well if a file is included after
|
||||
windows.h
|
||||
*/
|
||||
#undef BOOL
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,346 +1,346 @@
|
||||
#ifndef _WINNETWK_H
|
||||
#define _WINNETWK_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define WNNC_NET_MSNET 0x00010000
|
||||
#define WNNC_NET_LANMAN 0x00020000
|
||||
#define WNNC_NET_NETWARE 0x00030000
|
||||
#define WNNC_NET_VINES 0x00040000
|
||||
#define WNNC_NET_10NET 0x00050000
|
||||
#define WNNC_NET_LOCUS 0x00060000
|
||||
#define WNNC_NET_SUN_PC_NFS 0x00070000
|
||||
#define WNNC_NET_LANSTEP 0x00080000
|
||||
#define WNNC_NET_9TILES 0x00090000
|
||||
#define WNNC_NET_LANTASTIC 0x000A0000
|
||||
#define WNNC_NET_AS400 0x000B0000
|
||||
#define WNNC_NET_FTP_NFS 0x000C0000
|
||||
#define WNNC_NET_PATHWORKS 0x000D0000
|
||||
#define WNNC_NET_LIFENET 0x000E0000
|
||||
#define WNNC_NET_POWERLAN 0x000F0000
|
||||
#define WNNC_NET_BWNFS 0x00100000
|
||||
#define WNNC_NET_COGENT 0x00110000
|
||||
#define WNNC_NET_FARALLON 0x00120000
|
||||
#define WNNC_NET_APPLETALK 0x00130000
|
||||
#define WNNC_NET_INTERGRAPH 0x00140000
|
||||
#define WNNC_NET_SYMFONET 0x00150000
|
||||
#define WNNC_NET_CLEARCASE 0x00160000
|
||||
#define WNNC_NET_FRONTIER 0x00170000
|
||||
#define WNNC_NET_BMC 0x00180000
|
||||
#define WNNC_NET_DCE 0x00190000
|
||||
#define WNNC_NET_AVID 0x001A0000
|
||||
#define WNNC_NET_DOCUSPACE 0x001B0000
|
||||
#define WNNC_NET_MANGOSOFT 0x001C0000
|
||||
#define WNNC_NET_SERNET 0x001D0000
|
||||
#define WNNC_NET_DECORB 0x00200000
|
||||
#define WNNC_NET_PROTSTOR 0x00210000
|
||||
#define WNNC_NET_FJ_REDIR 0x00220000
|
||||
#define WNNC_NET_DISTINCT 0x00230000
|
||||
#define WNNC_NET_TWINS 0x00240000
|
||||
#define WNNC_NET_RDR2SAMPLE 0x00250000
|
||||
#define WNNC_NET_CSC 0x00260000
|
||||
#define WNNC_NET_3IN1 0x00270000
|
||||
#define WNNC_NET_EXTENDNET 0x00290000
|
||||
#define WNNC_NET_OBJECT_DIRE 0x00300000
|
||||
#define WNNC_NET_MASFAX 0x00310000
|
||||
#define WNNC_NET_HOB_NFS 0x00320000
|
||||
#define WNNC_NET_SHIVA 0x00330000
|
||||
#define WNNC_NET_IBMAL 0x00340000
|
||||
#define WNNC_CRED_MANAGER 0xFFFF0000
|
||||
|
||||
#define RESOURCE_CONNECTED 1
|
||||
#define RESOURCE_GLOBALNET 2
|
||||
#define RESOURCE_REMEMBERED 3
|
||||
#define RESOURCE_RECENT 4
|
||||
#define RESOURCE_CONTEXT 5
|
||||
#define RESOURCETYPE_ANY 0
|
||||
#define RESOURCETYPE_DISK 1
|
||||
#define RESOURCETYPE_PRINT 2
|
||||
#define RESOURCETYPE_RESERVED 8
|
||||
#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
|
||||
#define RESOURCEUSAGE_CONNECTABLE 0x00000001
|
||||
#define RESOURCEUSAGE_CONTAINER 0x00000002
|
||||
#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
|
||||
#define RESOURCEUSAGE_SIBLING 0x00000008
|
||||
#define RESOURCEUSAGE_ATTACHED 0x00000010
|
||||
#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
|
||||
#define RESOURCEUSAGE_RESERVED 0x80000000
|
||||
#define RESOURCEDISPLAYTYPE_GENERIC 0
|
||||
#define RESOURCEDISPLAYTYPE_DOMAIN 1
|
||||
#define RESOURCEDISPLAYTYPE_SERVER 2
|
||||
#define RESOURCEDISPLAYTYPE_SHARE 3
|
||||
#define RESOURCEDISPLAYTYPE_FILE 4
|
||||
#define RESOURCEDISPLAYTYPE_GROUP 5
|
||||
#define RESOURCEDISPLAYTYPE_NETWORK 6
|
||||
#define RESOURCEDISPLAYTYPE_ROOT 7
|
||||
#define RESOURCEDISPLAYTYPE_SHAREADMIN 8
|
||||
#define RESOURCEDISPLAYTYPE_DIRECTORY 9
|
||||
#define RESOURCEDISPLAYTYPE_TREE 10
|
||||
#define NETPROPERTY_PERSISTENT 1
|
||||
#define CONNECT_UPDATE_PROFILE 1
|
||||
#define CONNECT_UPDATE_RECENT 2
|
||||
#define CONNECT_TEMPORARY 4
|
||||
#define CONNECT_INTERACTIVE 8
|
||||
#define CONNECT_PROMPT 16
|
||||
#define CONNECT_NEED_DRIVE 32
|
||||
#define CONNECT_REFCOUNT 64
|
||||
#define CONNECT_REDIRECT 128
|
||||
#define CONNECT_LOCALDRIVE 256
|
||||
#define CONNECT_CURRENT_MEDIA 512
|
||||
#define CONNDLG_RO_PATH 1
|
||||
#define CONNDLG_CONN_POINT 2
|
||||
#define CONNDLG_USE_MRU 4
|
||||
#define CONNDLG_HIDE_BOX 8
|
||||
#define CONNDLG_PERSIST 16
|
||||
#define CONNDLG_NOT_PERSIST 32
|
||||
#define DISC_UPDATE_PROFILE 1
|
||||
#define DISC_NO_FORCE 64
|
||||
#define WNFMT_MULTILINE 1
|
||||
#define WNFMT_ABBREVIATED 2
|
||||
#define WNFMT_INENUM 16
|
||||
#define WNFMT_CONNECTION 32
|
||||
#define WN_SUCCESS NO_ERROR
|
||||
#define WN_NO_ERROR NO_ERROR
|
||||
#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
|
||||
#define WN_CANCEL ERROR_CANCELLED
|
||||
#define WN_RETRY ERROR_RETRY
|
||||
#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
|
||||
#define WN_MORE_DATA ERROR_MORE_DATA
|
||||
#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
|
||||
#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
|
||||
#define WN_BAD_USER ERROR_BAD_USERNAME
|
||||
#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
|
||||
#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
|
||||
#define WN_FUNCTION_BUSY ERROR_BUSY
|
||||
#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
|
||||
#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
|
||||
#define WN_NO_NETWORK ERROR_NO_NETWORK
|
||||
#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
|
||||
#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
|
||||
#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
|
||||
#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
|
||||
#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
|
||||
#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
|
||||
#define WN_OPEN_FILES ERROR_OPEN_FILES
|
||||
#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
|
||||
#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
|
||||
#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
|
||||
#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
|
||||
#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
|
||||
#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
|
||||
#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
|
||||
#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
|
||||
#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
|
||||
#define WN_BAD_PROFILE ERROR_BAD_PROFILE
|
||||
#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
|
||||
#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
|
||||
#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
|
||||
#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
|
||||
#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
|
||||
#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
|
||||
#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
|
||||
#define UNIVERSAL_NAME_INFO_LEVEL 1
|
||||
#define REMOTE_NAME_INFO_LEVEL 2
|
||||
#define NETINFO_DLL16 1
|
||||
#define NETINFO_DISKRED 4
|
||||
#define NETINFO_PRINTERRED 8
|
||||
#define RP_LOGON 1
|
||||
#define RP_INIFILE 2
|
||||
#define PP_DISPLAYERRORS 1
|
||||
#define WNCON_FORNETCARD 1
|
||||
#define WNCON_NOTROUTED 2
|
||||
#define WNCON_SLOWLINK 4
|
||||
#define WNCON_DYNAMIC 8
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
typedef struct _NETRESOURCEA {
|
||||
DWORD dwScope;
|
||||
DWORD dwType;
|
||||
DWORD dwDisplayType;
|
||||
DWORD dwUsage;
|
||||
LPSTR lpLocalName;
|
||||
LPSTR lpRemoteName;
|
||||
LPSTR lpComment ;
|
||||
LPSTR lpProvider;
|
||||
}NETRESOURCEA,*LPNETRESOURCEA;
|
||||
typedef struct _NETRESOURCEW {
|
||||
DWORD dwScope;
|
||||
DWORD dwType;
|
||||
DWORD dwDisplayType;
|
||||
DWORD dwUsage;
|
||||
LPWSTR lpLocalName;
|
||||
LPWSTR lpRemoteName;
|
||||
LPWSTR lpComment ;
|
||||
LPWSTR lpProvider;
|
||||
}NETRESOURCEW,*LPNETRESOURCEW;
|
||||
typedef struct _CONNECTDLGSTRUCTA{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPNETRESOURCEA lpConnRes;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevNum;
|
||||
} CONNECTDLGSTRUCTA,*LPCONNECTDLGSTRUCTA;
|
||||
typedef struct _CONNECTDLGSTRUCTW{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPNETRESOURCEW lpConnRes;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevNum;
|
||||
} CONNECTDLGSTRUCTW,*LPCONNECTDLGSTRUCTW;
|
||||
typedef struct _DISCDLGSTRUCTA{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPSTR lpLocalName;
|
||||
LPSTR lpRemoteName;
|
||||
DWORD dwFlags;
|
||||
} DISCDLGSTRUCTA,*LPDISCDLGSTRUCTA;
|
||||
typedef struct _DISCDLGSTRUCTW{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPWSTR lpLocalName;
|
||||
LPWSTR lpRemoteName;
|
||||
DWORD dwFlags;
|
||||
} DISCDLGSTRUCTW,*LPDISCDLGSTRUCTW;
|
||||
typedef struct _UNIVERSAL_NAME_INFOA { LPSTR lpUniversalName; }UNIVERSAL_NAME_INFOA,*LPUNIVERSAL_NAME_INFOA;
|
||||
typedef struct _UNIVERSAL_NAME_INFOW { LPWSTR lpUniversalName; }UNIVERSAL_NAME_INFOW,*LPUNIVERSAL_NAME_INFOW;
|
||||
typedef struct _REMOTE_NAME_INFOA {
|
||||
LPSTR lpUniversalName;
|
||||
LPSTR lpConnectionName;
|
||||
LPSTR lpRemainingPath;
|
||||
}REMOTE_NAME_INFOA,*LPREMOTE_NAME_INFOA;
|
||||
typedef struct _REMOTE_NAME_INFOW {
|
||||
LPWSTR lpUniversalName;
|
||||
LPWSTR lpConnectionName;
|
||||
LPWSTR lpRemainingPath;
|
||||
}REMOTE_NAME_INFOW,*LPREMOTE_NAME_INFOW;
|
||||
typedef struct _NETINFOSTRUCT{
|
||||
DWORD cbStructure;
|
||||
DWORD dwProviderVersion;
|
||||
DWORD dwStatus;
|
||||
DWORD dwCharacteristics;
|
||||
DWORD dwHandle;
|
||||
WORD wNetType;
|
||||
DWORD dwPrinters;
|
||||
DWORD dwDrives;
|
||||
} NETINFOSTRUCT,*LPNETINFOSTRUCT;
|
||||
typedef UINT(PASCAL *PFNGETPROFILEPATHA)(LPCSTR,LPSTR,UINT);
|
||||
typedef UINT(PASCAL *PFNGETPROFILEPATHW)(LPCWSTR,LPWSTR,UINT);
|
||||
typedef UINT(PASCAL *PFNRECONCILEPROFILEA)(LPCSTR,LPCSTR,DWORD);
|
||||
typedef UINT(PASCAL *PFNRECONCILEPROFILEW)(LPCWSTR,LPCWSTR,DWORD);
|
||||
typedef BOOL(PASCAL *PFNPROCESSPOLICIESA)(HWND,LPCSTR,LPCSTR,LPCSTR,DWORD);
|
||||
typedef BOOL(PASCAL *PFNPROCESSPOLICIESW)(HWND,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
|
||||
typedef struct _NETCONNECTINFOSTRUCT{
|
||||
DWORD cbStructure;
|
||||
DWORD dwFlags;
|
||||
DWORD dwSpeed;
|
||||
DWORD dwDelay;
|
||||
DWORD dwOptDataSize;
|
||||
} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
|
||||
|
||||
DWORD APIENTRY WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
|
||||
DWORD APIENTRY WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
DWORD APIENTRY WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
|
||||
DWORD APIENTRY WNetCancelConnectionA(LPCSTR,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnectionW(LPCWSTR,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
|
||||
DWORD APIENTRY WNetGetConnectionA(LPCSTR,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetConnectionW(LPCWSTR,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,PDWORD,PDWORD);
|
||||
DWORD APIENTRY WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,PDWORD,PDWORD);
|
||||
DWORD APIENTRY WNetSetConnectionA(LPCSTR,DWORD,PVOID);
|
||||
DWORD APIENTRY WNetSetConnectionW(LPCWSTR,DWORD,PVOID);
|
||||
DWORD APIENTRY WNetConnectionDialog(HWND,DWORD);
|
||||
DWORD APIENTRY WNetDisconnectDialog(HWND,DWORD);
|
||||
DWORD APIENTRY WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
|
||||
DWORD APIENTRY WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
|
||||
DWORD APIENTRY WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
|
||||
DWORD APIENTRY WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
|
||||
DWORD APIENTRY WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
|
||||
DWORD APIENTRY WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
|
||||
DWORD APIENTRY WNetEnumResourceA(HANDLE,PDWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetEnumResourceW(HANDLE,PDWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetCloseEnum(HANDLE);
|
||||
DWORD APIENTRY WNetGetUniversalNameA(LPCSTR,DWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetGetUniversalNameW(LPCWSTR,DWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetGetUserA(LPCSTR,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetUserW(LPCWSTR,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetProviderNameA(DWORD,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetProviderNameW(DWORD,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
|
||||
DWORD APIENTRY WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
|
||||
DWORD APIENTRY WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPCSTR*);
|
||||
DWORD APIENTRY WNetGetResourceInformationW(LPNETRESOURCEA,LPVOID,LPDWORD,LPCWSTR*);
|
||||
DWORD APIENTRY WNetGetLastErrorA(PDWORD,LPSTR,DWORD,LPSTR,DWORD);
|
||||
DWORD APIENTRY WNetGetLastErrorW(PDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
|
||||
DWORD APIENTRY MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
|
||||
DWORD APIENTRY MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
|
||||
#ifdef UNICODE
|
||||
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
|
||||
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
|
||||
#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
|
||||
typedef NETRESOURCEW NETRESOURCE,*LPNETRESOURCE;
|
||||
typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
|
||||
typedef DISCDLGSTRUCTW DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
|
||||
typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
|
||||
typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
|
||||
#define WNetEnumResource WNetEnumResourceW
|
||||
#define WNetOpenEnum WNetOpenEnumW
|
||||
#define WNetGetResourceInformation WNetGetResourceInformationW
|
||||
#define WNetGetUniversalName WNetGetUniversalNameW
|
||||
#define WNetSetConnection WNetSetConnectionW
|
||||
#define WNetUseConnection WNetUseConnectionW
|
||||
#define WNetGetConnection WNetGetConnectionW
|
||||
#define WNetCancelConnection2 WNetCancelConnection2W
|
||||
#define WNetCancelConnection WNetCancelConnectionW
|
||||
#define WNetAddConnection3 WNetAddConnection3W
|
||||
#define WNetAddConnection2 WNetAddConnection2W
|
||||
#define WNetAddConnection WNetAddConnectionW
|
||||
#define WNetConnectionDialog1 WNetConnectionDialog1W
|
||||
#define WNetDisconnectDialog1 WNetDisconnectDialog1W
|
||||
#define WNetGetNetworkInformation WNetGetNetworkInformationW
|
||||
#define WNetGetProviderName WNetGetProviderNameW
|
||||
#define WNetGetUser WNetGetUserW
|
||||
#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
|
||||
#define WNetGetLastError WNetGetLastErrorW
|
||||
#else
|
||||
#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
|
||||
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
|
||||
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
|
||||
typedef NETRESOURCEA NETRESOURCE,*LPNETRESOURCE;
|
||||
typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
|
||||
typedef DISCDLGSTRUCTA DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
|
||||
typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
|
||||
typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
|
||||
#define WNetOpenEnum WNetOpenEnumA
|
||||
#define WNetEnumResource WNetEnumResourceA
|
||||
#define WNetGetResourceInformation WNetGetResourceInformationA
|
||||
#define WNetGetUniversalName WNetGetUniversalNameA
|
||||
#define WNetConnectionDialog1 WNetConnectionDialog1A
|
||||
#define WNetDisconnectDialog1 WNetDisconnectDialog1A
|
||||
#define WNetAddConnection2 WNetAddConnection2A
|
||||
#define WNetAddConnection3 WNetAddConnection3A
|
||||
#define WNetCancelConnection WNetCancelConnectionA
|
||||
#define WNetCancelConnection2 WNetCancelConnection2A
|
||||
#define WNetGetConnection WNetGetConnectionA
|
||||
#define WNetUseConnection WNetUseConnectionA
|
||||
#define WNetSetConnection WNetSetConnectionA
|
||||
#define WNetAddConnection WNetAddConnectionA
|
||||
#define WNetGetUser WNetGetUserA
|
||||
#define WNetGetProviderName WNetGetProviderNameA
|
||||
#define WNetGetNetworkInformation WNetGetNetworkInformationA
|
||||
#define WNetGetLastError WNetGetLastErrorA
|
||||
#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _WINNETWK_H
|
||||
#define _WINNETWK_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define WNNC_NET_MSNET 0x00010000
|
||||
#define WNNC_NET_LANMAN 0x00020000
|
||||
#define WNNC_NET_NETWARE 0x00030000
|
||||
#define WNNC_NET_VINES 0x00040000
|
||||
#define WNNC_NET_10NET 0x00050000
|
||||
#define WNNC_NET_LOCUS 0x00060000
|
||||
#define WNNC_NET_SUN_PC_NFS 0x00070000
|
||||
#define WNNC_NET_LANSTEP 0x00080000
|
||||
#define WNNC_NET_9TILES 0x00090000
|
||||
#define WNNC_NET_LANTASTIC 0x000A0000
|
||||
#define WNNC_NET_AS400 0x000B0000
|
||||
#define WNNC_NET_FTP_NFS 0x000C0000
|
||||
#define WNNC_NET_PATHWORKS 0x000D0000
|
||||
#define WNNC_NET_LIFENET 0x000E0000
|
||||
#define WNNC_NET_POWERLAN 0x000F0000
|
||||
#define WNNC_NET_BWNFS 0x00100000
|
||||
#define WNNC_NET_COGENT 0x00110000
|
||||
#define WNNC_NET_FARALLON 0x00120000
|
||||
#define WNNC_NET_APPLETALK 0x00130000
|
||||
#define WNNC_NET_INTERGRAPH 0x00140000
|
||||
#define WNNC_NET_SYMFONET 0x00150000
|
||||
#define WNNC_NET_CLEARCASE 0x00160000
|
||||
#define WNNC_NET_FRONTIER 0x00170000
|
||||
#define WNNC_NET_BMC 0x00180000
|
||||
#define WNNC_NET_DCE 0x00190000
|
||||
#define WNNC_NET_AVID 0x001A0000
|
||||
#define WNNC_NET_DOCUSPACE 0x001B0000
|
||||
#define WNNC_NET_MANGOSOFT 0x001C0000
|
||||
#define WNNC_NET_SERNET 0x001D0000
|
||||
#define WNNC_NET_DECORB 0x00200000
|
||||
#define WNNC_NET_PROTSTOR 0x00210000
|
||||
#define WNNC_NET_FJ_REDIR 0x00220000
|
||||
#define WNNC_NET_DISTINCT 0x00230000
|
||||
#define WNNC_NET_TWINS 0x00240000
|
||||
#define WNNC_NET_RDR2SAMPLE 0x00250000
|
||||
#define WNNC_NET_CSC 0x00260000
|
||||
#define WNNC_NET_3IN1 0x00270000
|
||||
#define WNNC_NET_EXTENDNET 0x00290000
|
||||
#define WNNC_NET_OBJECT_DIRE 0x00300000
|
||||
#define WNNC_NET_MASFAX 0x00310000
|
||||
#define WNNC_NET_HOB_NFS 0x00320000
|
||||
#define WNNC_NET_SHIVA 0x00330000
|
||||
#define WNNC_NET_IBMAL 0x00340000
|
||||
#define WNNC_CRED_MANAGER 0xFFFF0000
|
||||
|
||||
#define RESOURCE_CONNECTED 1
|
||||
#define RESOURCE_GLOBALNET 2
|
||||
#define RESOURCE_REMEMBERED 3
|
||||
#define RESOURCE_RECENT 4
|
||||
#define RESOURCE_CONTEXT 5
|
||||
#define RESOURCETYPE_ANY 0
|
||||
#define RESOURCETYPE_DISK 1
|
||||
#define RESOURCETYPE_PRINT 2
|
||||
#define RESOURCETYPE_RESERVED 8
|
||||
#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
|
||||
#define RESOURCEUSAGE_CONNECTABLE 0x00000001
|
||||
#define RESOURCEUSAGE_CONTAINER 0x00000002
|
||||
#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
|
||||
#define RESOURCEUSAGE_SIBLING 0x00000008
|
||||
#define RESOURCEUSAGE_ATTACHED 0x00000010
|
||||
#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
|
||||
#define RESOURCEUSAGE_RESERVED 0x80000000
|
||||
#define RESOURCEDISPLAYTYPE_GENERIC 0
|
||||
#define RESOURCEDISPLAYTYPE_DOMAIN 1
|
||||
#define RESOURCEDISPLAYTYPE_SERVER 2
|
||||
#define RESOURCEDISPLAYTYPE_SHARE 3
|
||||
#define RESOURCEDISPLAYTYPE_FILE 4
|
||||
#define RESOURCEDISPLAYTYPE_GROUP 5
|
||||
#define RESOURCEDISPLAYTYPE_NETWORK 6
|
||||
#define RESOURCEDISPLAYTYPE_ROOT 7
|
||||
#define RESOURCEDISPLAYTYPE_SHAREADMIN 8
|
||||
#define RESOURCEDISPLAYTYPE_DIRECTORY 9
|
||||
#define RESOURCEDISPLAYTYPE_TREE 10
|
||||
#define NETPROPERTY_PERSISTENT 1
|
||||
#define CONNECT_UPDATE_PROFILE 1
|
||||
#define CONNECT_UPDATE_RECENT 2
|
||||
#define CONNECT_TEMPORARY 4
|
||||
#define CONNECT_INTERACTIVE 8
|
||||
#define CONNECT_PROMPT 16
|
||||
#define CONNECT_NEED_DRIVE 32
|
||||
#define CONNECT_REFCOUNT 64
|
||||
#define CONNECT_REDIRECT 128
|
||||
#define CONNECT_LOCALDRIVE 256
|
||||
#define CONNECT_CURRENT_MEDIA 512
|
||||
#define CONNDLG_RO_PATH 1
|
||||
#define CONNDLG_CONN_POINT 2
|
||||
#define CONNDLG_USE_MRU 4
|
||||
#define CONNDLG_HIDE_BOX 8
|
||||
#define CONNDLG_PERSIST 16
|
||||
#define CONNDLG_NOT_PERSIST 32
|
||||
#define DISC_UPDATE_PROFILE 1
|
||||
#define DISC_NO_FORCE 64
|
||||
#define WNFMT_MULTILINE 1
|
||||
#define WNFMT_ABBREVIATED 2
|
||||
#define WNFMT_INENUM 16
|
||||
#define WNFMT_CONNECTION 32
|
||||
#define WN_SUCCESS NO_ERROR
|
||||
#define WN_NO_ERROR NO_ERROR
|
||||
#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
|
||||
#define WN_CANCEL ERROR_CANCELLED
|
||||
#define WN_RETRY ERROR_RETRY
|
||||
#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
|
||||
#define WN_MORE_DATA ERROR_MORE_DATA
|
||||
#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
|
||||
#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
|
||||
#define WN_BAD_USER ERROR_BAD_USERNAME
|
||||
#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
|
||||
#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
|
||||
#define WN_FUNCTION_BUSY ERROR_BUSY
|
||||
#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
|
||||
#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
|
||||
#define WN_NO_NETWORK ERROR_NO_NETWORK
|
||||
#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
|
||||
#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
|
||||
#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
|
||||
#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
|
||||
#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
|
||||
#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
|
||||
#define WN_OPEN_FILES ERROR_OPEN_FILES
|
||||
#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
|
||||
#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
|
||||
#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
|
||||
#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
|
||||
#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
|
||||
#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
|
||||
#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
|
||||
#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
|
||||
#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
|
||||
#define WN_BAD_PROFILE ERROR_BAD_PROFILE
|
||||
#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
|
||||
#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
|
||||
#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
|
||||
#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
|
||||
#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
|
||||
#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
|
||||
#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
|
||||
#define UNIVERSAL_NAME_INFO_LEVEL 1
|
||||
#define REMOTE_NAME_INFO_LEVEL 2
|
||||
#define NETINFO_DLL16 1
|
||||
#define NETINFO_DISKRED 4
|
||||
#define NETINFO_PRINTERRED 8
|
||||
#define RP_LOGON 1
|
||||
#define RP_INIFILE 2
|
||||
#define PP_DISPLAYERRORS 1
|
||||
#define WNCON_FORNETCARD 1
|
||||
#define WNCON_NOTROUTED 2
|
||||
#define WNCON_SLOWLINK 4
|
||||
#define WNCON_DYNAMIC 8
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
typedef struct _NETRESOURCEA {
|
||||
DWORD dwScope;
|
||||
DWORD dwType;
|
||||
DWORD dwDisplayType;
|
||||
DWORD dwUsage;
|
||||
LPSTR lpLocalName;
|
||||
LPSTR lpRemoteName;
|
||||
LPSTR lpComment ;
|
||||
LPSTR lpProvider;
|
||||
}NETRESOURCEA,*LPNETRESOURCEA;
|
||||
typedef struct _NETRESOURCEW {
|
||||
DWORD dwScope;
|
||||
DWORD dwType;
|
||||
DWORD dwDisplayType;
|
||||
DWORD dwUsage;
|
||||
LPWSTR lpLocalName;
|
||||
LPWSTR lpRemoteName;
|
||||
LPWSTR lpComment ;
|
||||
LPWSTR lpProvider;
|
||||
}NETRESOURCEW,*LPNETRESOURCEW;
|
||||
typedef struct _CONNECTDLGSTRUCTA{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPNETRESOURCEA lpConnRes;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevNum;
|
||||
} CONNECTDLGSTRUCTA,*LPCONNECTDLGSTRUCTA;
|
||||
typedef struct _CONNECTDLGSTRUCTW{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPNETRESOURCEW lpConnRes;
|
||||
DWORD dwFlags;
|
||||
DWORD dwDevNum;
|
||||
} CONNECTDLGSTRUCTW,*LPCONNECTDLGSTRUCTW;
|
||||
typedef struct _DISCDLGSTRUCTA{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPSTR lpLocalName;
|
||||
LPSTR lpRemoteName;
|
||||
DWORD dwFlags;
|
||||
} DISCDLGSTRUCTA,*LPDISCDLGSTRUCTA;
|
||||
typedef struct _DISCDLGSTRUCTW{
|
||||
DWORD cbStructure;
|
||||
HWND hwndOwner;
|
||||
LPWSTR lpLocalName;
|
||||
LPWSTR lpRemoteName;
|
||||
DWORD dwFlags;
|
||||
} DISCDLGSTRUCTW,*LPDISCDLGSTRUCTW;
|
||||
typedef struct _UNIVERSAL_NAME_INFOA { LPSTR lpUniversalName; }UNIVERSAL_NAME_INFOA,*LPUNIVERSAL_NAME_INFOA;
|
||||
typedef struct _UNIVERSAL_NAME_INFOW { LPWSTR lpUniversalName; }UNIVERSAL_NAME_INFOW,*LPUNIVERSAL_NAME_INFOW;
|
||||
typedef struct _REMOTE_NAME_INFOA {
|
||||
LPSTR lpUniversalName;
|
||||
LPSTR lpConnectionName;
|
||||
LPSTR lpRemainingPath;
|
||||
}REMOTE_NAME_INFOA,*LPREMOTE_NAME_INFOA;
|
||||
typedef struct _REMOTE_NAME_INFOW {
|
||||
LPWSTR lpUniversalName;
|
||||
LPWSTR lpConnectionName;
|
||||
LPWSTR lpRemainingPath;
|
||||
}REMOTE_NAME_INFOW,*LPREMOTE_NAME_INFOW;
|
||||
typedef struct _NETINFOSTRUCT{
|
||||
DWORD cbStructure;
|
||||
DWORD dwProviderVersion;
|
||||
DWORD dwStatus;
|
||||
DWORD dwCharacteristics;
|
||||
DWORD dwHandle;
|
||||
WORD wNetType;
|
||||
DWORD dwPrinters;
|
||||
DWORD dwDrives;
|
||||
} NETINFOSTRUCT,*LPNETINFOSTRUCT;
|
||||
typedef UINT(PASCAL *PFNGETPROFILEPATHA)(LPCSTR,LPSTR,UINT);
|
||||
typedef UINT(PASCAL *PFNGETPROFILEPATHW)(LPCWSTR,LPWSTR,UINT);
|
||||
typedef UINT(PASCAL *PFNRECONCILEPROFILEA)(LPCSTR,LPCSTR,DWORD);
|
||||
typedef UINT(PASCAL *PFNRECONCILEPROFILEW)(LPCWSTR,LPCWSTR,DWORD);
|
||||
typedef BOOL(PASCAL *PFNPROCESSPOLICIESA)(HWND,LPCSTR,LPCSTR,LPCSTR,DWORD);
|
||||
typedef BOOL(PASCAL *PFNPROCESSPOLICIESW)(HWND,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
|
||||
typedef struct _NETCONNECTINFOSTRUCT{
|
||||
DWORD cbStructure;
|
||||
DWORD dwFlags;
|
||||
DWORD dwSpeed;
|
||||
DWORD dwDelay;
|
||||
DWORD dwOptDataSize;
|
||||
} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
|
||||
|
||||
DWORD APIENTRY WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
|
||||
DWORD APIENTRY WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
DWORD APIENTRY WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
|
||||
DWORD APIENTRY WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
|
||||
DWORD APIENTRY WNetCancelConnectionA(LPCSTR,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnectionW(LPCWSTR,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
|
||||
DWORD APIENTRY WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
|
||||
DWORD APIENTRY WNetGetConnectionA(LPCSTR,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetConnectionW(LPCWSTR,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,PDWORD,PDWORD);
|
||||
DWORD APIENTRY WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,PDWORD,PDWORD);
|
||||
DWORD APIENTRY WNetSetConnectionA(LPCSTR,DWORD,PVOID);
|
||||
DWORD APIENTRY WNetSetConnectionW(LPCWSTR,DWORD,PVOID);
|
||||
DWORD APIENTRY WNetConnectionDialog(HWND,DWORD);
|
||||
DWORD APIENTRY WNetDisconnectDialog(HWND,DWORD);
|
||||
DWORD APIENTRY WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
|
||||
DWORD APIENTRY WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
|
||||
DWORD APIENTRY WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
|
||||
DWORD APIENTRY WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
|
||||
DWORD APIENTRY WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
|
||||
DWORD APIENTRY WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
|
||||
DWORD APIENTRY WNetEnumResourceA(HANDLE,PDWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetEnumResourceW(HANDLE,PDWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetCloseEnum(HANDLE);
|
||||
DWORD APIENTRY WNetGetUniversalNameA(LPCSTR,DWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetGetUniversalNameW(LPCWSTR,DWORD,PVOID,PDWORD);
|
||||
DWORD APIENTRY WNetGetUserA(LPCSTR,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetUserW(LPCWSTR,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetProviderNameA(DWORD,LPSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetProviderNameW(DWORD,LPWSTR,PDWORD);
|
||||
DWORD APIENTRY WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
|
||||
DWORD APIENTRY WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
|
||||
DWORD APIENTRY WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPCSTR*);
|
||||
DWORD APIENTRY WNetGetResourceInformationW(LPNETRESOURCEA,LPVOID,LPDWORD,LPCWSTR*);
|
||||
DWORD APIENTRY WNetGetLastErrorA(PDWORD,LPSTR,DWORD,LPSTR,DWORD);
|
||||
DWORD APIENTRY WNetGetLastErrorW(PDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
|
||||
DWORD APIENTRY MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
|
||||
DWORD APIENTRY MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
|
||||
#ifdef UNICODE
|
||||
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
|
||||
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
|
||||
#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
|
||||
typedef NETRESOURCEW NETRESOURCE,*LPNETRESOURCE;
|
||||
typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
|
||||
typedef DISCDLGSTRUCTW DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
|
||||
typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
|
||||
typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
|
||||
#define WNetEnumResource WNetEnumResourceW
|
||||
#define WNetOpenEnum WNetOpenEnumW
|
||||
#define WNetGetResourceInformation WNetGetResourceInformationW
|
||||
#define WNetGetUniversalName WNetGetUniversalNameW
|
||||
#define WNetSetConnection WNetSetConnectionW
|
||||
#define WNetUseConnection WNetUseConnectionW
|
||||
#define WNetGetConnection WNetGetConnectionW
|
||||
#define WNetCancelConnection2 WNetCancelConnection2W
|
||||
#define WNetCancelConnection WNetCancelConnectionW
|
||||
#define WNetAddConnection3 WNetAddConnection3W
|
||||
#define WNetAddConnection2 WNetAddConnection2W
|
||||
#define WNetAddConnection WNetAddConnectionW
|
||||
#define WNetConnectionDialog1 WNetConnectionDialog1W
|
||||
#define WNetDisconnectDialog1 WNetDisconnectDialog1W
|
||||
#define WNetGetNetworkInformation WNetGetNetworkInformationW
|
||||
#define WNetGetProviderName WNetGetProviderNameW
|
||||
#define WNetGetUser WNetGetUserW
|
||||
#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
|
||||
#define WNetGetLastError WNetGetLastErrorW
|
||||
#else
|
||||
#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
|
||||
#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
|
||||
#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
|
||||
typedef NETRESOURCEA NETRESOURCE,*LPNETRESOURCE;
|
||||
typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
|
||||
typedef DISCDLGSTRUCTA DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
|
||||
typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
|
||||
typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
|
||||
#define WNetOpenEnum WNetOpenEnumA
|
||||
#define WNetEnumResource WNetEnumResourceA
|
||||
#define WNetGetResourceInformation WNetGetResourceInformationA
|
||||
#define WNetGetUniversalName WNetGetUniversalNameA
|
||||
#define WNetConnectionDialog1 WNetConnectionDialog1A
|
||||
#define WNetDisconnectDialog1 WNetDisconnectDialog1A
|
||||
#define WNetAddConnection2 WNetAddConnection2A
|
||||
#define WNetAddConnection3 WNetAddConnection3A
|
||||
#define WNetCancelConnection WNetCancelConnectionA
|
||||
#define WNetCancelConnection2 WNetCancelConnection2A
|
||||
#define WNetGetConnection WNetGetConnectionA
|
||||
#define WNetUseConnection WNetUseConnectionA
|
||||
#define WNetSetConnection WNetSetConnectionA
|
||||
#define WNetAddConnection WNetAddConnectionA
|
||||
#define WNetGetUser WNetGetUserA
|
||||
#define WNetGetProviderName WNetGetProviderNameA
|
||||
#define WNetGetNetworkInformation WNetGetNetworkInformationA
|
||||
#define WNetGetLastError WNetGetLastErrorA
|
||||
#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,159 +1,159 @@
|
||||
#ifndef _WINREG_H
|
||||
#define _WINREG_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
|
||||
#define HKEY_CURRENT_USER ((HKEY)0x80000001)
|
||||
#define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
|
||||
#define HKEY_USERS ((HKEY)0x80000003)
|
||||
#define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
|
||||
#define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
|
||||
#define HKEY_DYN_DATA ((HKEY)0x80000006)
|
||||
#define REG_OPTION_VOLATILE 1
|
||||
#define REG_OPTION_NON_VOLATILE 0
|
||||
#define REG_CREATED_NEW_KEY 1
|
||||
#define REG_OPENED_EXISTING_KEY 2
|
||||
#define REG_NONE 0
|
||||
#define REG_SZ 1
|
||||
#define REG_EXPAND_SZ 2
|
||||
#define REG_BINARY 3
|
||||
#define REG_DWORD 4
|
||||
#define REG_DWORD_BIG_ENDIAN 5
|
||||
#define REG_DWORD_LITTLE_ENDIAN 4
|
||||
#define REG_LINK 6
|
||||
#define REG_MULTI_SZ 7
|
||||
#define REG_RESOURCE_LIST 8
|
||||
#define REG_FULL_RESOURCE_DESCRIPTOR 9
|
||||
#define REG_RESOURCE_REQUIREMENTS_LIST 10
|
||||
#define REG_NOTIFY_CHANGE_NAME 1
|
||||
#define REG_NOTIFY_CHANGE_ATTRIBUTES 2
|
||||
#define REG_NOTIFY_CHANGE_LAST_SET 4
|
||||
#define REG_NOTIFY_CHANGE_SECURITY 8
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
typedef ACCESS_MASK REGSAM;
|
||||
typedef struct value_entA {
|
||||
LPSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} VALENTA,*PVALENTA;
|
||||
typedef struct value_entW {
|
||||
LPWSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} VALENTW,*PVALENTW;
|
||||
BOOL WINAPI AbortSystemShutdownA(LPCSTR);
|
||||
BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
|
||||
BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
|
||||
BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
|
||||
LONG WINAPI RegCloseKey(HKEY);
|
||||
LONG WINAPI RegConnectRegistryA(LPSTR,HKEY,PHKEY);
|
||||
LONG WINAPI RegConnectRegistryW(LPWSTR,HKEY,PHKEY);
|
||||
LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
|
||||
LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
|
||||
LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
|
||||
LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
|
||||
LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
|
||||
LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
|
||||
LONG WINAPI RegDeleteValueA (HKEY,LPCSTR);
|
||||
LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
|
||||
LONG WINAPI RegEnumKeyA (HKEY,DWORD,LPSTR,DWORD);
|
||||
LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
|
||||
LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegFlushKey(HKEY);
|
||||
LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
|
||||
LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
|
||||
LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
|
||||
LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
|
||||
LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
|
||||
LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
|
||||
LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
|
||||
LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
|
||||
LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,PDWORD);
|
||||
LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,PDWORD);
|
||||
LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
|
||||
LONG WINAPI RegQueryValueExA (HKEY,LPCSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
|
||||
LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
|
||||
LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
LONG WINAPI RegRestoreKeyA (HKEY,LPCSTR,DWORD);
|
||||
LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
|
||||
LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
|
||||
LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
|
||||
LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
||||
LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
|
||||
LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
|
||||
LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
|
||||
LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
|
||||
LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
|
||||
LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef VALENTW VALENT,*PVALENT;
|
||||
#define AbortSystemShutdown AbortSystemShutdownW
|
||||
#define InitiateSystemShutdown InitiateSystemShutdownW
|
||||
#define RegConnectRegistry RegConnectRegistryW
|
||||
#define RegCreateKey RegCreateKeyW
|
||||
#define RegCreateKeyEx RegCreateKeyExW
|
||||
#define RegDeleteKey RegDeleteKeyW
|
||||
#define RegDeleteValue RegDeleteValueW
|
||||
#define RegEnumKey RegEnumKeyW
|
||||
#define RegEnumKeyEx RegEnumKeyExW
|
||||
#define RegEnumValue RegEnumValueW
|
||||
#define RegLoadKey RegLoadKeyW
|
||||
#define RegOpenKey RegOpenKeyW
|
||||
#define RegOpenKeyEx RegOpenKeyExW
|
||||
#define RegQueryInfoKey RegQueryInfoKeyW
|
||||
#define RegQueryMultipleValues RegQueryMultipleValuesW
|
||||
#define RegQueryValue RegQueryValueW
|
||||
#define RegQueryValueEx RegQueryValueExW
|
||||
#define RegReplaceKey RegReplaceKeyW
|
||||
#define RegRestoreKey RegRestoreKeyW
|
||||
#define RegSaveKey RegSaveKeyW
|
||||
#define RegSetValue RegSetValueW
|
||||
#define RegSetValueEx RegSetValueExW
|
||||
#define RegUnLoadKey RegUnLoadKeyW
|
||||
#else
|
||||
typedef VALENTA VALENT,*PVALENT;
|
||||
#define AbortSystemShutdown AbortSystemShutdownA
|
||||
#define InitiateSystemShutdown InitiateSystemShutdownA
|
||||
#define RegConnectRegistry RegConnectRegistryA
|
||||
#define RegCreateKey RegCreateKeyA
|
||||
#define RegCreateKeyEx RegCreateKeyExA
|
||||
#define RegDeleteKey RegDeleteKeyA
|
||||
#define RegDeleteValue RegDeleteValueA
|
||||
#define RegEnumKey RegEnumKeyA
|
||||
#define RegEnumKeyEx RegEnumKeyExA
|
||||
#define RegEnumValue RegEnumValueA
|
||||
#define RegLoadKey RegLoadKeyA
|
||||
#define RegOpenKey RegOpenKeyA
|
||||
#define RegOpenKeyEx RegOpenKeyExA
|
||||
#define RegQueryInfoKey RegQueryInfoKeyA
|
||||
#define RegQueryMultipleValues RegQueryMultipleValuesA
|
||||
#define RegQueryValue RegQueryValueA
|
||||
#define RegQueryValueEx RegQueryValueExA
|
||||
#define RegReplaceKey RegReplaceKeyA
|
||||
#define RegRestoreKey RegRestoreKeyA
|
||||
#define RegSaveKey RegSaveKeyA
|
||||
#define RegSetValue RegSetValueA
|
||||
#define RegSetValueEx RegSetValueExA
|
||||
#define RegUnLoadKey RegUnLoadKeyA
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _WINREG_H
|
||||
#define _WINREG_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
|
||||
#define HKEY_CURRENT_USER ((HKEY)0x80000001)
|
||||
#define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
|
||||
#define HKEY_USERS ((HKEY)0x80000003)
|
||||
#define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
|
||||
#define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
|
||||
#define HKEY_DYN_DATA ((HKEY)0x80000006)
|
||||
#define REG_OPTION_VOLATILE 1
|
||||
#define REG_OPTION_NON_VOLATILE 0
|
||||
#define REG_CREATED_NEW_KEY 1
|
||||
#define REG_OPENED_EXISTING_KEY 2
|
||||
#define REG_NONE 0
|
||||
#define REG_SZ 1
|
||||
#define REG_EXPAND_SZ 2
|
||||
#define REG_BINARY 3
|
||||
#define REG_DWORD 4
|
||||
#define REG_DWORD_BIG_ENDIAN 5
|
||||
#define REG_DWORD_LITTLE_ENDIAN 4
|
||||
#define REG_LINK 6
|
||||
#define REG_MULTI_SZ 7
|
||||
#define REG_RESOURCE_LIST 8
|
||||
#define REG_FULL_RESOURCE_DESCRIPTOR 9
|
||||
#define REG_RESOURCE_REQUIREMENTS_LIST 10
|
||||
#define REG_NOTIFY_CHANGE_NAME 1
|
||||
#define REG_NOTIFY_CHANGE_ATTRIBUTES 2
|
||||
#define REG_NOTIFY_CHANGE_LAST_SET 4
|
||||
#define REG_NOTIFY_CHANGE_SECURITY 8
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
typedef ACCESS_MASK REGSAM;
|
||||
typedef struct value_entA {
|
||||
LPSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} VALENTA,*PVALENTA;
|
||||
typedef struct value_entW {
|
||||
LPWSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} VALENTW,*PVALENTW;
|
||||
BOOL WINAPI AbortSystemShutdownA(LPCSTR);
|
||||
BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
|
||||
BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
|
||||
BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
|
||||
LONG WINAPI RegCloseKey(HKEY);
|
||||
LONG WINAPI RegConnectRegistryA(LPSTR,HKEY,PHKEY);
|
||||
LONG WINAPI RegConnectRegistryW(LPWSTR,HKEY,PHKEY);
|
||||
LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
|
||||
LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
|
||||
LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
|
||||
LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
|
||||
LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
|
||||
LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
|
||||
LONG WINAPI RegDeleteValueA (HKEY,LPCSTR);
|
||||
LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
|
||||
LONG WINAPI RegEnumKeyA (HKEY,DWORD,LPSTR,DWORD);
|
||||
LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
|
||||
LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegFlushKey(HKEY);
|
||||
LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
|
||||
LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
|
||||
LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
|
||||
LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
|
||||
LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
|
||||
LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
|
||||
LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
|
||||
LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
|
||||
LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
|
||||
LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,PDWORD);
|
||||
LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,PDWORD);
|
||||
LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
|
||||
LONG WINAPI RegQueryValueExA (HKEY,LPCSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
|
||||
LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
|
||||
LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
|
||||
LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
LONG WINAPI RegRestoreKeyA (HKEY,LPCSTR,DWORD);
|
||||
LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
|
||||
LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
|
||||
LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
|
||||
LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
||||
LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
|
||||
LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
|
||||
LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
|
||||
LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
|
||||
LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
|
||||
LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef VALENTW VALENT,*PVALENT;
|
||||
#define AbortSystemShutdown AbortSystemShutdownW
|
||||
#define InitiateSystemShutdown InitiateSystemShutdownW
|
||||
#define RegConnectRegistry RegConnectRegistryW
|
||||
#define RegCreateKey RegCreateKeyW
|
||||
#define RegCreateKeyEx RegCreateKeyExW
|
||||
#define RegDeleteKey RegDeleteKeyW
|
||||
#define RegDeleteValue RegDeleteValueW
|
||||
#define RegEnumKey RegEnumKeyW
|
||||
#define RegEnumKeyEx RegEnumKeyExW
|
||||
#define RegEnumValue RegEnumValueW
|
||||
#define RegLoadKey RegLoadKeyW
|
||||
#define RegOpenKey RegOpenKeyW
|
||||
#define RegOpenKeyEx RegOpenKeyExW
|
||||
#define RegQueryInfoKey RegQueryInfoKeyW
|
||||
#define RegQueryMultipleValues RegQueryMultipleValuesW
|
||||
#define RegQueryValue RegQueryValueW
|
||||
#define RegQueryValueEx RegQueryValueExW
|
||||
#define RegReplaceKey RegReplaceKeyW
|
||||
#define RegRestoreKey RegRestoreKeyW
|
||||
#define RegSaveKey RegSaveKeyW
|
||||
#define RegSetValue RegSetValueW
|
||||
#define RegSetValueEx RegSetValueExW
|
||||
#define RegUnLoadKey RegUnLoadKeyW
|
||||
#else
|
||||
typedef VALENTA VALENT,*PVALENT;
|
||||
#define AbortSystemShutdown AbortSystemShutdownA
|
||||
#define InitiateSystemShutdown InitiateSystemShutdownA
|
||||
#define RegConnectRegistry RegConnectRegistryA
|
||||
#define RegCreateKey RegCreateKeyA
|
||||
#define RegCreateKeyEx RegCreateKeyExA
|
||||
#define RegDeleteKey RegDeleteKeyA
|
||||
#define RegDeleteValue RegDeleteValueA
|
||||
#define RegEnumKey RegEnumKeyA
|
||||
#define RegEnumKeyEx RegEnumKeyExA
|
||||
#define RegEnumValue RegEnumValueA
|
||||
#define RegLoadKey RegLoadKeyA
|
||||
#define RegOpenKey RegOpenKeyA
|
||||
#define RegOpenKeyEx RegOpenKeyExA
|
||||
#define RegQueryInfoKey RegQueryInfoKeyA
|
||||
#define RegQueryMultipleValues RegQueryMultipleValuesA
|
||||
#define RegQueryValue RegQueryValueA
|
||||
#define RegQueryValueEx RegQueryValueExA
|
||||
#define RegReplaceKey RegReplaceKeyA
|
||||
#define RegRestoreKey RegRestoreKeyA
|
||||
#define RegSaveKey RegSaveKeyA
|
||||
#define RegSetValue RegSetValueA
|
||||
#define RegSetValueEx RegSetValueExA
|
||||
#define RegUnLoadKey RegUnLoadKeyA
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,309 +1,309 @@
|
||||
#ifndef _WINSVC_H
|
||||
#define _WINSVC_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SERVICES_ACTIVE_DATABASEA "ServicesActive"
|
||||
#define SERVICES_ACTIVE_DATABASEW L"ServicesActive"
|
||||
#define SERVICES_FAILED_DATABASEA "ServicesFailed"
|
||||
#define SERVICES_FAILED_DATABASEW L"ServicesFailed"
|
||||
#define SC_GROUP_IDENTIFIERA '+'
|
||||
#define SC_GROUP_IDENTIFIERW L'+'
|
||||
#define SC_MANAGER_ALL_ACCESS 0xf003f
|
||||
#define SC_MANAGER_CONNECT 1
|
||||
#define SC_MANAGER_CREATE_SERVICE 2
|
||||
#define SC_MANAGER_ENUMERATE_SERVICE 4
|
||||
#define SC_MANAGER_LOCK 8
|
||||
#define SC_MANAGER_QUERY_LOCK_STATUS 16
|
||||
#define SC_MANAGER_MODIFY_BOOT_CONFIG 32
|
||||
#define SERVICE_NO_CHANGE (-1)
|
||||
#define SERVICE_STOPPED 1
|
||||
#define SERVICE_START_PENDING 2
|
||||
#define SERVICE_STOP_PENDING 3
|
||||
#define SERVICE_RUNNING 4
|
||||
#define SERVICE_CONTINUE_PENDING 5
|
||||
#define SERVICE_PAUSE_PENDING 6
|
||||
#define SERVICE_PAUSED 7
|
||||
#define SERVICE_ACCEPT_STOP 1
|
||||
#define SERVICE_ACCEPT_PAUSE_CONTINUE 2
|
||||
#define SERVICE_ACCEPT_SHUTDOWN 4
|
||||
#define SERVICE_ACCEPT_PARAMCHANGE 8
|
||||
#define SERVICE_ACCEPT_NETBINDCHANGE 16
|
||||
#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 32
|
||||
#define SERVICE_ACCEPT_POWEREVENT 64
|
||||
#define SERVICE_ACCEPT_SESSIONCHANGE 128
|
||||
#define SERVICE_CONTROL_STOP 1
|
||||
#define SERVICE_CONTROL_PAUSE 2
|
||||
#define SERVICE_CONTROL_CONTINUE 3
|
||||
#define SERVICE_CONTROL_INTERROGATE 4
|
||||
#define SERVICE_CONTROL_SHUTDOWN 5
|
||||
#define SERVICE_CONTROL_PARAMCHANGE 6
|
||||
#define SERVICE_CONTROL_NETBINDADD 7
|
||||
#define SERVICE_CONTROL_NETBINDREMOVE 8
|
||||
#define SERVICE_CONTROL_NETBINDENABLE 9
|
||||
#define SERVICE_CONTROL_NETBINDDISABLE 10
|
||||
#define SERVICE_CONTROL_DEVICEEVENT 11
|
||||
#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 12
|
||||
#define SERVICE_CONTROL_POWEREVENT 13
|
||||
#define SERVICE_CONTROL_SESSIONCHANGE 14
|
||||
#define SERVICE_ACTIVE 1
|
||||
#define SERVICE_INACTIVE 2
|
||||
#define SERVICE_STATE_ALL 3
|
||||
#define SERVICE_QUERY_CONFIG 1
|
||||
#define SERVICE_CHANGE_CONFIG 2
|
||||
#define SERVICE_QUERY_STATUS 4
|
||||
#define SERVICE_ENUMERATE_DEPENDENTS 8
|
||||
#define SERVICE_START 16
|
||||
#define SERVICE_STOP 32
|
||||
#define SERVICE_PAUSE_CONTINUE 64
|
||||
#define SERVICE_INTERROGATE 128
|
||||
#define SERVICE_USER_DEFINED_CONTROL 256
|
||||
#define SERVICE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SERVICE_QUERY_CONFIG|SERVICE_CHANGE_CONFIG|SERVICE_QUERY_STATUS|SERVICE_ENUMERATE_DEPENDENTS|SERVICE_START|SERVICE_STOP|SERVICE_PAUSE_CONTINUE|SERVICE_INTERROGATE|SERVICE_USER_DEFINED_CONTROL)
|
||||
#define SERVICE_RUNS_IN_SYSTEM_PROCESS 1
|
||||
#define SERVICE_CONFIG_DESCRIPTION 1
|
||||
#define SERVICE_CONFIG_FAILURE_ACTIONS 2
|
||||
|
||||
typedef struct _SERVICE_STATUS {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwCurrentState;
|
||||
DWORD dwControlsAccepted;
|
||||
DWORD dwWin32ExitCode;
|
||||
DWORD dwServiceSpecificExitCode;
|
||||
DWORD dwCheckPoint;
|
||||
DWORD dwWaitHint;
|
||||
} SERVICE_STATUS,*LPSERVICE_STATUS;
|
||||
typedef struct _SERVICE_STATUS_PROCESS {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwCurrentState;
|
||||
DWORD dwControlsAccepted;
|
||||
DWORD dwWin32ExitCode;
|
||||
DWORD dwServiceSpecificExitCode;
|
||||
DWORD dwCheckPoint;
|
||||
DWORD dwWaitHint;
|
||||
DWORD dwProcessId;
|
||||
DWORD dwServiceFlags;
|
||||
} SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
|
||||
typedef enum _SC_STATUS_TYPE {
|
||||
SC_STATUS_PROCESS_INFO = 0
|
||||
} SC_STATUS_TYPE;
|
||||
typedef enum _SC_ENUM_TYPE {
|
||||
SC_ENUM_PROCESS_INFO = 0
|
||||
} SC_ENUM_TYPE;
|
||||
typedef struct _ENUM_SERVICE_STATUSA {
|
||||
LPSTR lpServiceName;
|
||||
LPSTR lpDisplayName;
|
||||
SERVICE_STATUS ServiceStatus;
|
||||
} ENUM_SERVICE_STATUSA,*LPENUM_SERVICE_STATUSA;
|
||||
typedef struct _ENUM_SERVICE_STATUSW {
|
||||
LPWSTR lpServiceName;
|
||||
LPWSTR lpDisplayName;
|
||||
SERVICE_STATUS ServiceStatus;
|
||||
} ENUM_SERVICE_STATUSW,*LPENUM_SERVICE_STATUSW;
|
||||
typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
|
||||
LPSTR lpServiceName;
|
||||
LPSTR lpDisplayName;
|
||||
SERVICE_STATUS_PROCESS ServiceStatusProcess;
|
||||
} ENUM_SERVICE_STATUS_PROCESSA,*LPENUM_SERVICE_STATUS_PROCESSA;
|
||||
typedef struct _ENUM_SERVICE_STATUS_PROCESSW {
|
||||
LPWSTR lpServiceName;
|
||||
LPWSTR lpDisplayName;
|
||||
SERVICE_STATUS_PROCESS ServiceStatusProcess;
|
||||
} ENUM_SERVICE_STATUS_PROCESSW,*LPENUM_SERVICE_STATUS_PROCESSW;
|
||||
typedef struct _QUERY_SERVICE_CONFIGA {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPSTR lpBinaryPathName;
|
||||
LPSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPSTR lpDependencies;
|
||||
LPSTR lpServiceStartName;
|
||||
LPSTR lpDisplayName;
|
||||
} QUERY_SERVICE_CONFIGA,*LPQUERY_SERVICE_CONFIGA;
|
||||
typedef struct _QUERY_SERVICE_CONFIGW {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPWSTR lpBinaryPathName;
|
||||
LPWSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPWSTR lpDependencies;
|
||||
LPWSTR lpServiceStartName;
|
||||
LPWSTR lpDisplayName;
|
||||
} QUERY_SERVICE_CONFIGW,*LPQUERY_SERVICE_CONFIGW;
|
||||
typedef struct _QUERY_SERVICE_LOCK_STATUSA {
|
||||
DWORD fIsLocked;
|
||||
LPSTR lpLockOwner;
|
||||
DWORD dwLockDuration;
|
||||
} QUERY_SERVICE_LOCK_STATUSA,*LPQUERY_SERVICE_LOCK_STATUSA;
|
||||
typedef struct _QUERY_SERVICE_LOCK_STATUSW {
|
||||
DWORD fIsLocked;
|
||||
LPWSTR lpLockOwner;
|
||||
DWORD dwLockDuration;
|
||||
} QUERY_SERVICE_LOCK_STATUSW,*LPQUERY_SERVICE_LOCK_STATUSW;
|
||||
typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONA)(DWORD,LPSTR*);
|
||||
typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONW)(DWORD,LPWSTR*);
|
||||
typedef struct _SERVICE_TABLE_ENTRYA {
|
||||
LPSTR lpServiceName;
|
||||
LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
|
||||
} SERVICE_TABLE_ENTRYA,*LPSERVICE_TABLE_ENTRYA;
|
||||
typedef struct _SERVICE_TABLE_ENTRYW {
|
||||
LPWSTR lpServiceName;
|
||||
LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
|
||||
} SERVICE_TABLE_ENTRYW,*LPSERVICE_TABLE_ENTRYW;
|
||||
DECLARE_HANDLE(SC_HANDLE);
|
||||
typedef SC_HANDLE *LPSC_HANDLE;
|
||||
typedef PVOID SC_LOCK;
|
||||
typedef DWORD SERVICE_STATUS_HANDLE;
|
||||
typedef VOID(WINAPI *LPHANDLER_FUNCTION)(DWORD);
|
||||
typedef DWORD (WINAPI *LPHANDLER_FUNCTION_EX)(DWORD,DWORD,LPVOID,LPVOID);
|
||||
typedef struct _SERVICE_DESCRIPTIONA {
|
||||
LPSTR lpDescription;
|
||||
} SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
|
||||
typedef struct _SERVICE_DESCRIPTIONW {
|
||||
LPWSTR lpDescription;
|
||||
} SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
|
||||
typedef enum _SC_ACTION_TYPE {
|
||||
SC_ACTION_NONE = 0,
|
||||
SC_ACTION_RESTART = 1,
|
||||
SC_ACTION_REBOOT = 2,
|
||||
SC_ACTION_RUN_COMMAND = 3
|
||||
} SC_ACTION_TYPE;
|
||||
typedef struct _SC_ACTION {
|
||||
SC_ACTION_TYPE Type;
|
||||
DWORD Delay;
|
||||
} SC_ACTION,*LPSC_ACTION;
|
||||
typedef struct _SERVICE_FAILURE_ACTIONSA {
|
||||
DWORD dwResetPeriod;
|
||||
LPSTR lpRebootMsg;
|
||||
LPSTR lpCommand;
|
||||
DWORD cActions;
|
||||
SC_ACTION * lpsaActions;
|
||||
} SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
|
||||
typedef struct _SERVICE_FAILURE_ACTIONSW {
|
||||
DWORD dwResetPeriod;
|
||||
LPWSTR lpRebootMsg;
|
||||
LPWSTR lpCommand;
|
||||
DWORD cActions;
|
||||
SC_ACTION * lpsaActions;
|
||||
} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
|
||||
|
||||
BOOL WINAPI ChangeServiceConfigA(SC_HANDLE,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,LPDWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
|
||||
BOOL WINAPI ChangeServiceConfigW(SC_HANDLE,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,LPDWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
BOOL WINAPI ChangeServiceConfig2A(SC_HANDLE,DWORD,LPVOID);
|
||||
BOOL WINAPI ChangeServiceConfig2W(SC_HANDLE,DWORD,LPVOID);
|
||||
BOOL WINAPI CloseServiceHandle(SC_HANDLE);
|
||||
BOOL WINAPI ControlService(SC_HANDLE,DWORD,LPSERVICE_STATUS);
|
||||
SC_HANDLE WINAPI CreateServiceA(SC_HANDLE,LPCSTR,LPCSTR,DWORD,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,PDWORD,LPCSTR,LPCSTR,LPCSTR);
|
||||
SC_HANDLE WINAPI CreateServiceW(SC_HANDLE,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,PDWORD,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
BOOL WINAPI DeleteService(SC_HANDLE);
|
||||
BOOL WINAPI EnumDependentServicesA(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumDependentServicesW(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusA(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusW(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusExA(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCSTR);
|
||||
BOOL WINAPI EnumServicesStatusExW(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCWSTR);
|
||||
BOOL WINAPI GetServiceDisplayNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceDisplayNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceKeyNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
|
||||
SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE);
|
||||
BOOL WINAPI NotifyBootConfigStatus(BOOL);
|
||||
SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenServiceA(SC_HANDLE,LPCSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE,LPCWSTR,DWORD);
|
||||
BOOL WINAPI QueryServiceConfigA(SC_HANDLE,LPQUERY_SERVICE_CONFIGA,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceConfigW(SC_HANDLE,LPQUERY_SERVICE_CONFIGW,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceConfig2A(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceConfig2W(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceLockStatusA(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSA,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceLockStatusW(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSW,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceStatus(SC_HANDLE,LPSERVICE_STATUS);
|
||||
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE,SC_STATUS_TYPE,LPBYTE,DWORD,LPDWORD);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(LPCSTR,LPHANDLER_FUNCTION);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR,LPHANDLER_FUNCTION);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA(LPCSTR,LPHANDLER_FUNCTION_EX,LPVOID);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR,LPHANDLER_FUNCTION_EX,LPVOID);
|
||||
BOOL WINAPI SetServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
||||
BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE,LPSERVICE_STATUS);
|
||||
BOOL WINAPI StartServiceA(SC_HANDLE,DWORD,LPCSTR*);
|
||||
BOOL WINAPI StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA);
|
||||
BOOL WINAPI StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW);
|
||||
BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR);
|
||||
BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
|
||||
typedef ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef LPENUM_SERVICE_STATUS_PROCESSW LPENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
|
||||
typedef QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
|
||||
typedef SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
|
||||
typedef LPSERVICE_MAIN_FUNCTIONW LPSERVICE_MAIN_FUNCTION;
|
||||
typedef SERVICE_DESCRIPTIONW SERVICE_DESCRIPTION;
|
||||
typedef LPSERVICE_DESCRIPTIONW LPSERVICE_DESCRIPTION;
|
||||
typedef SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONS;
|
||||
typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
|
||||
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
|
||||
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
|
||||
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERW
|
||||
#define ChangeServiceConfig ChangeServiceConfigW
|
||||
#define ChangeServiceConfig2 ChangeServiceConfig2W
|
||||
#define CreateService CreateServiceW
|
||||
#define EnumDependentServices EnumDependentServicesW
|
||||
#define EnumServicesStatus EnumServicesStatusW
|
||||
#define EnumServicesStatusEx EnumServicesStatusExW
|
||||
#define GetServiceDisplayName GetServiceDisplayNameW
|
||||
#define GetServiceKeyName GetServiceKeyNameW
|
||||
#define OpenSCManager OpenSCManagerW
|
||||
#define OpenService OpenServiceW
|
||||
#define QueryServiceConfig QueryServiceConfigW
|
||||
#define QueryServiceConfig2 QueryServiceConfig2W
|
||||
#define QueryServiceLockStatus QueryServiceLockStatusW
|
||||
#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerW
|
||||
#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExW
|
||||
#define StartService StartServiceW
|
||||
#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherW
|
||||
#else
|
||||
typedef ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
|
||||
typedef ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
|
||||
typedef QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
|
||||
typedef SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
|
||||
typedef LPSERVICE_MAIN_FUNCTIONA LPSERVICE_MAIN_FUNCTION;
|
||||
typedef SERVICE_DESCRIPTIONA SERVICE_DESCRIPTION;
|
||||
typedef LPSERVICE_DESCRIPTIONA LPSERVICE_DESCRIPTION;
|
||||
typedef SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS;
|
||||
typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS;
|
||||
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
|
||||
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
|
||||
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
|
||||
#define ChangeServiceConfig ChangeServiceConfigA
|
||||
#define ChangeServiceConfig2 ChangeServiceConfig2A
|
||||
#define CreateService CreateServiceA
|
||||
#define EnumDependentServices EnumDependentServicesA
|
||||
#define EnumServicesStatus EnumServicesStatusA
|
||||
#define EnumServicesStatusEx EnumServicesStatusExA
|
||||
#define GetServiceDisplayName GetServiceDisplayNameA
|
||||
#define GetServiceKeyName GetServiceKeyNameA
|
||||
#define OpenSCManager OpenSCManagerA
|
||||
#define OpenService OpenServiceA
|
||||
#define QueryServiceConfig QueryServiceConfigA
|
||||
#define QueryServiceConfig2 QueryServiceConfig2A
|
||||
#define QueryServiceLockStatus QueryServiceLockStatusA
|
||||
#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerA
|
||||
#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExA
|
||||
#define StartService StartServiceA
|
||||
#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherA
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _WINSVC_H */
|
||||
#ifndef _WINSVC_H
|
||||
#define _WINSVC_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SERVICES_ACTIVE_DATABASEA "ServicesActive"
|
||||
#define SERVICES_ACTIVE_DATABASEW L"ServicesActive"
|
||||
#define SERVICES_FAILED_DATABASEA "ServicesFailed"
|
||||
#define SERVICES_FAILED_DATABASEW L"ServicesFailed"
|
||||
#define SC_GROUP_IDENTIFIERA '+'
|
||||
#define SC_GROUP_IDENTIFIERW L'+'
|
||||
#define SC_MANAGER_ALL_ACCESS 0xf003f
|
||||
#define SC_MANAGER_CONNECT 1
|
||||
#define SC_MANAGER_CREATE_SERVICE 2
|
||||
#define SC_MANAGER_ENUMERATE_SERVICE 4
|
||||
#define SC_MANAGER_LOCK 8
|
||||
#define SC_MANAGER_QUERY_LOCK_STATUS 16
|
||||
#define SC_MANAGER_MODIFY_BOOT_CONFIG 32
|
||||
#define SERVICE_NO_CHANGE (-1)
|
||||
#define SERVICE_STOPPED 1
|
||||
#define SERVICE_START_PENDING 2
|
||||
#define SERVICE_STOP_PENDING 3
|
||||
#define SERVICE_RUNNING 4
|
||||
#define SERVICE_CONTINUE_PENDING 5
|
||||
#define SERVICE_PAUSE_PENDING 6
|
||||
#define SERVICE_PAUSED 7
|
||||
#define SERVICE_ACCEPT_STOP 1
|
||||
#define SERVICE_ACCEPT_PAUSE_CONTINUE 2
|
||||
#define SERVICE_ACCEPT_SHUTDOWN 4
|
||||
#define SERVICE_ACCEPT_PARAMCHANGE 8
|
||||
#define SERVICE_ACCEPT_NETBINDCHANGE 16
|
||||
#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 32
|
||||
#define SERVICE_ACCEPT_POWEREVENT 64
|
||||
#define SERVICE_ACCEPT_SESSIONCHANGE 128
|
||||
#define SERVICE_CONTROL_STOP 1
|
||||
#define SERVICE_CONTROL_PAUSE 2
|
||||
#define SERVICE_CONTROL_CONTINUE 3
|
||||
#define SERVICE_CONTROL_INTERROGATE 4
|
||||
#define SERVICE_CONTROL_SHUTDOWN 5
|
||||
#define SERVICE_CONTROL_PARAMCHANGE 6
|
||||
#define SERVICE_CONTROL_NETBINDADD 7
|
||||
#define SERVICE_CONTROL_NETBINDREMOVE 8
|
||||
#define SERVICE_CONTROL_NETBINDENABLE 9
|
||||
#define SERVICE_CONTROL_NETBINDDISABLE 10
|
||||
#define SERVICE_CONTROL_DEVICEEVENT 11
|
||||
#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 12
|
||||
#define SERVICE_CONTROL_POWEREVENT 13
|
||||
#define SERVICE_CONTROL_SESSIONCHANGE 14
|
||||
#define SERVICE_ACTIVE 1
|
||||
#define SERVICE_INACTIVE 2
|
||||
#define SERVICE_STATE_ALL 3
|
||||
#define SERVICE_QUERY_CONFIG 1
|
||||
#define SERVICE_CHANGE_CONFIG 2
|
||||
#define SERVICE_QUERY_STATUS 4
|
||||
#define SERVICE_ENUMERATE_DEPENDENTS 8
|
||||
#define SERVICE_START 16
|
||||
#define SERVICE_STOP 32
|
||||
#define SERVICE_PAUSE_CONTINUE 64
|
||||
#define SERVICE_INTERROGATE 128
|
||||
#define SERVICE_USER_DEFINED_CONTROL 256
|
||||
#define SERVICE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SERVICE_QUERY_CONFIG|SERVICE_CHANGE_CONFIG|SERVICE_QUERY_STATUS|SERVICE_ENUMERATE_DEPENDENTS|SERVICE_START|SERVICE_STOP|SERVICE_PAUSE_CONTINUE|SERVICE_INTERROGATE|SERVICE_USER_DEFINED_CONTROL)
|
||||
#define SERVICE_RUNS_IN_SYSTEM_PROCESS 1
|
||||
#define SERVICE_CONFIG_DESCRIPTION 1
|
||||
#define SERVICE_CONFIG_FAILURE_ACTIONS 2
|
||||
|
||||
typedef struct _SERVICE_STATUS {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwCurrentState;
|
||||
DWORD dwControlsAccepted;
|
||||
DWORD dwWin32ExitCode;
|
||||
DWORD dwServiceSpecificExitCode;
|
||||
DWORD dwCheckPoint;
|
||||
DWORD dwWaitHint;
|
||||
} SERVICE_STATUS,*LPSERVICE_STATUS;
|
||||
typedef struct _SERVICE_STATUS_PROCESS {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwCurrentState;
|
||||
DWORD dwControlsAccepted;
|
||||
DWORD dwWin32ExitCode;
|
||||
DWORD dwServiceSpecificExitCode;
|
||||
DWORD dwCheckPoint;
|
||||
DWORD dwWaitHint;
|
||||
DWORD dwProcessId;
|
||||
DWORD dwServiceFlags;
|
||||
} SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
|
||||
typedef enum _SC_STATUS_TYPE {
|
||||
SC_STATUS_PROCESS_INFO = 0
|
||||
} SC_STATUS_TYPE;
|
||||
typedef enum _SC_ENUM_TYPE {
|
||||
SC_ENUM_PROCESS_INFO = 0
|
||||
} SC_ENUM_TYPE;
|
||||
typedef struct _ENUM_SERVICE_STATUSA {
|
||||
LPSTR lpServiceName;
|
||||
LPSTR lpDisplayName;
|
||||
SERVICE_STATUS ServiceStatus;
|
||||
} ENUM_SERVICE_STATUSA,*LPENUM_SERVICE_STATUSA;
|
||||
typedef struct _ENUM_SERVICE_STATUSW {
|
||||
LPWSTR lpServiceName;
|
||||
LPWSTR lpDisplayName;
|
||||
SERVICE_STATUS ServiceStatus;
|
||||
} ENUM_SERVICE_STATUSW,*LPENUM_SERVICE_STATUSW;
|
||||
typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
|
||||
LPSTR lpServiceName;
|
||||
LPSTR lpDisplayName;
|
||||
SERVICE_STATUS_PROCESS ServiceStatusProcess;
|
||||
} ENUM_SERVICE_STATUS_PROCESSA,*LPENUM_SERVICE_STATUS_PROCESSA;
|
||||
typedef struct _ENUM_SERVICE_STATUS_PROCESSW {
|
||||
LPWSTR lpServiceName;
|
||||
LPWSTR lpDisplayName;
|
||||
SERVICE_STATUS_PROCESS ServiceStatusProcess;
|
||||
} ENUM_SERVICE_STATUS_PROCESSW,*LPENUM_SERVICE_STATUS_PROCESSW;
|
||||
typedef struct _QUERY_SERVICE_CONFIGA {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPSTR lpBinaryPathName;
|
||||
LPSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPSTR lpDependencies;
|
||||
LPSTR lpServiceStartName;
|
||||
LPSTR lpDisplayName;
|
||||
} QUERY_SERVICE_CONFIGA,*LPQUERY_SERVICE_CONFIGA;
|
||||
typedef struct _QUERY_SERVICE_CONFIGW {
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPWSTR lpBinaryPathName;
|
||||
LPWSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPWSTR lpDependencies;
|
||||
LPWSTR lpServiceStartName;
|
||||
LPWSTR lpDisplayName;
|
||||
} QUERY_SERVICE_CONFIGW,*LPQUERY_SERVICE_CONFIGW;
|
||||
typedef struct _QUERY_SERVICE_LOCK_STATUSA {
|
||||
DWORD fIsLocked;
|
||||
LPSTR lpLockOwner;
|
||||
DWORD dwLockDuration;
|
||||
} QUERY_SERVICE_LOCK_STATUSA,*LPQUERY_SERVICE_LOCK_STATUSA;
|
||||
typedef struct _QUERY_SERVICE_LOCK_STATUSW {
|
||||
DWORD fIsLocked;
|
||||
LPWSTR lpLockOwner;
|
||||
DWORD dwLockDuration;
|
||||
} QUERY_SERVICE_LOCK_STATUSW,*LPQUERY_SERVICE_LOCK_STATUSW;
|
||||
typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONA)(DWORD,LPSTR*);
|
||||
typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONW)(DWORD,LPWSTR*);
|
||||
typedef struct _SERVICE_TABLE_ENTRYA {
|
||||
LPSTR lpServiceName;
|
||||
LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
|
||||
} SERVICE_TABLE_ENTRYA,*LPSERVICE_TABLE_ENTRYA;
|
||||
typedef struct _SERVICE_TABLE_ENTRYW {
|
||||
LPWSTR lpServiceName;
|
||||
LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
|
||||
} SERVICE_TABLE_ENTRYW,*LPSERVICE_TABLE_ENTRYW;
|
||||
DECLARE_HANDLE(SC_HANDLE);
|
||||
typedef SC_HANDLE *LPSC_HANDLE;
|
||||
typedef PVOID SC_LOCK;
|
||||
typedef DWORD SERVICE_STATUS_HANDLE;
|
||||
typedef VOID(WINAPI *LPHANDLER_FUNCTION)(DWORD);
|
||||
typedef DWORD (WINAPI *LPHANDLER_FUNCTION_EX)(DWORD,DWORD,LPVOID,LPVOID);
|
||||
typedef struct _SERVICE_DESCRIPTIONA {
|
||||
LPSTR lpDescription;
|
||||
} SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
|
||||
typedef struct _SERVICE_DESCRIPTIONW {
|
||||
LPWSTR lpDescription;
|
||||
} SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
|
||||
typedef enum _SC_ACTION_TYPE {
|
||||
SC_ACTION_NONE = 0,
|
||||
SC_ACTION_RESTART = 1,
|
||||
SC_ACTION_REBOOT = 2,
|
||||
SC_ACTION_RUN_COMMAND = 3
|
||||
} SC_ACTION_TYPE;
|
||||
typedef struct _SC_ACTION {
|
||||
SC_ACTION_TYPE Type;
|
||||
DWORD Delay;
|
||||
} SC_ACTION,*LPSC_ACTION;
|
||||
typedef struct _SERVICE_FAILURE_ACTIONSA {
|
||||
DWORD dwResetPeriod;
|
||||
LPSTR lpRebootMsg;
|
||||
LPSTR lpCommand;
|
||||
DWORD cActions;
|
||||
SC_ACTION * lpsaActions;
|
||||
} SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
|
||||
typedef struct _SERVICE_FAILURE_ACTIONSW {
|
||||
DWORD dwResetPeriod;
|
||||
LPWSTR lpRebootMsg;
|
||||
LPWSTR lpCommand;
|
||||
DWORD cActions;
|
||||
SC_ACTION * lpsaActions;
|
||||
} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
|
||||
|
||||
BOOL WINAPI ChangeServiceConfigA(SC_HANDLE,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,LPDWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
|
||||
BOOL WINAPI ChangeServiceConfigW(SC_HANDLE,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,LPDWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
BOOL WINAPI ChangeServiceConfig2A(SC_HANDLE,DWORD,LPVOID);
|
||||
BOOL WINAPI ChangeServiceConfig2W(SC_HANDLE,DWORD,LPVOID);
|
||||
BOOL WINAPI CloseServiceHandle(SC_HANDLE);
|
||||
BOOL WINAPI ControlService(SC_HANDLE,DWORD,LPSERVICE_STATUS);
|
||||
SC_HANDLE WINAPI CreateServiceA(SC_HANDLE,LPCSTR,LPCSTR,DWORD,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,PDWORD,LPCSTR,LPCSTR,LPCSTR);
|
||||
SC_HANDLE WINAPI CreateServiceW(SC_HANDLE,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,PDWORD,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
BOOL WINAPI DeleteService(SC_HANDLE);
|
||||
BOOL WINAPI EnumDependentServicesA(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumDependentServicesW(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusA(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusW(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD,PDWORD);
|
||||
BOOL WINAPI EnumServicesStatusExA(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCSTR);
|
||||
BOOL WINAPI EnumServicesStatusExW(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCWSTR);
|
||||
BOOL WINAPI GetServiceDisplayNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceDisplayNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceKeyNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
|
||||
BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
|
||||
SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE);
|
||||
BOOL WINAPI NotifyBootConfigStatus(BOOL);
|
||||
SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenServiceA(SC_HANDLE,LPCSTR,DWORD);
|
||||
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE,LPCWSTR,DWORD);
|
||||
BOOL WINAPI QueryServiceConfigA(SC_HANDLE,LPQUERY_SERVICE_CONFIGA,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceConfigW(SC_HANDLE,LPQUERY_SERVICE_CONFIGW,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceConfig2A(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceConfig2W(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceLockStatusA(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSA,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceLockStatusW(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSW,DWORD,PDWORD);
|
||||
BOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
|
||||
BOOL WINAPI QueryServiceStatus(SC_HANDLE,LPSERVICE_STATUS);
|
||||
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE,SC_STATUS_TYPE,LPBYTE,DWORD,LPDWORD);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(LPCSTR,LPHANDLER_FUNCTION);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR,LPHANDLER_FUNCTION);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA(LPCSTR,LPHANDLER_FUNCTION_EX,LPVOID);
|
||||
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR,LPHANDLER_FUNCTION_EX,LPVOID);
|
||||
BOOL WINAPI SetServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
|
||||
BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE,LPSERVICE_STATUS);
|
||||
BOOL WINAPI StartServiceA(SC_HANDLE,DWORD,LPCSTR*);
|
||||
BOOL WINAPI StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA);
|
||||
BOOL WINAPI StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW);
|
||||
BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR);
|
||||
BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
|
||||
typedef ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef LPENUM_SERVICE_STATUS_PROCESSW LPENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
|
||||
typedef QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
|
||||
typedef SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
|
||||
typedef LPSERVICE_MAIN_FUNCTIONW LPSERVICE_MAIN_FUNCTION;
|
||||
typedef SERVICE_DESCRIPTIONW SERVICE_DESCRIPTION;
|
||||
typedef LPSERVICE_DESCRIPTIONW LPSERVICE_DESCRIPTION;
|
||||
typedef SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONS;
|
||||
typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
|
||||
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
|
||||
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
|
||||
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERW
|
||||
#define ChangeServiceConfig ChangeServiceConfigW
|
||||
#define ChangeServiceConfig2 ChangeServiceConfig2W
|
||||
#define CreateService CreateServiceW
|
||||
#define EnumDependentServices EnumDependentServicesW
|
||||
#define EnumServicesStatus EnumServicesStatusW
|
||||
#define EnumServicesStatusEx EnumServicesStatusExW
|
||||
#define GetServiceDisplayName GetServiceDisplayNameW
|
||||
#define GetServiceKeyName GetServiceKeyNameW
|
||||
#define OpenSCManager OpenSCManagerW
|
||||
#define OpenService OpenServiceW
|
||||
#define QueryServiceConfig QueryServiceConfigW
|
||||
#define QueryServiceConfig2 QueryServiceConfig2W
|
||||
#define QueryServiceLockStatus QueryServiceLockStatusW
|
||||
#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerW
|
||||
#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExW
|
||||
#define StartService StartServiceW
|
||||
#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherW
|
||||
#else
|
||||
typedef ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
|
||||
typedef ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS;
|
||||
typedef QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
|
||||
typedef QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
|
||||
typedef SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
|
||||
typedef LPSERVICE_MAIN_FUNCTIONA LPSERVICE_MAIN_FUNCTION;
|
||||
typedef SERVICE_DESCRIPTIONA SERVICE_DESCRIPTION;
|
||||
typedef LPSERVICE_DESCRIPTIONA LPSERVICE_DESCRIPTION;
|
||||
typedef SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS;
|
||||
typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS;
|
||||
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
|
||||
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
|
||||
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
|
||||
#define ChangeServiceConfig ChangeServiceConfigA
|
||||
#define ChangeServiceConfig2 ChangeServiceConfig2A
|
||||
#define CreateService CreateServiceA
|
||||
#define EnumDependentServices EnumDependentServicesA
|
||||
#define EnumServicesStatus EnumServicesStatusA
|
||||
#define EnumServicesStatusEx EnumServicesStatusExA
|
||||
#define GetServiceDisplayName GetServiceDisplayNameA
|
||||
#define GetServiceKeyName GetServiceKeyNameA
|
||||
#define OpenSCManager OpenSCManagerA
|
||||
#define OpenService OpenServiceA
|
||||
#define QueryServiceConfig QueryServiceConfigA
|
||||
#define QueryServiceConfig2 QueryServiceConfig2A
|
||||
#define QueryServiceLockStatus QueryServiceLockStatusA
|
||||
#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerA
|
||||
#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExA
|
||||
#define StartService StartServiceA
|
||||
#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherA
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _WINSVC_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,133 +1,133 @@
|
||||
#ifndef _WINVER_H
|
||||
#define _WINVER_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define VS_FILE_INFO RT_VERSION
|
||||
#define VS_VERSION_INFO 1
|
||||
#define VS_USER_DEFINED 100
|
||||
#define VS_FFI_SIGNATURE 0xFEEF04BD
|
||||
#define VS_FFI_STRUCVERSION 0x10000
|
||||
#define VS_FFI_FILEFLAGSMASK 0x3F
|
||||
#define VS_FF_DEBUG 1
|
||||
#define VS_FF_PRERELEASE 2
|
||||
#define VS_FF_PATCHED 4
|
||||
#define VS_FF_PRIVATEBUILD 8
|
||||
#define VS_FF_INFOINFERRED 16
|
||||
#define VS_FF_SPECIALBUILD 32
|
||||
#define VOS_UNKNOWN 0
|
||||
#define VOS_DOS 0x10000
|
||||
#define VOS_OS216 0x20000
|
||||
#define VOS_OS232 0x30000
|
||||
#define VOS_NT 0x40000
|
||||
#define VOS__BASE 0
|
||||
#define VOS__WINDOWS16 1
|
||||
#define VOS__PM16 2
|
||||
#define VOS__PM32 3
|
||||
#define VOS__WINDOWS32 4
|
||||
#define VOS_DOS_WINDOWS16 0x10001
|
||||
#define VOS_DOS_WINDOWS32 0x10004
|
||||
#define VOS_OS216_PM16 0x20002
|
||||
#define VOS_OS232_PM32 0x30003
|
||||
#define VOS_NT_WINDOWS32 0x40004
|
||||
#define VFT_UNKNOWN 0
|
||||
#define VFT_APP 1
|
||||
#define VFT_DLL 2
|
||||
#define VFT_DRV 3
|
||||
#define VFT_FONT 4
|
||||
#define VFT_VXD 5
|
||||
#define VFT_STATIC_LIB 7
|
||||
#define VFT2_UNKNOWN 0
|
||||
#define VFT2_DRV_PRINTER 1
|
||||
#define VFT2_DRV_KEYBOARD 2
|
||||
#define VFT2_DRV_LANGUAGE 3
|
||||
#define VFT2_DRV_DISPLAY 4
|
||||
#define VFT2_DRV_MOUSE 5
|
||||
#define VFT2_DRV_NETWORK 6
|
||||
#define VFT2_DRV_SYSTEM 7
|
||||
#define VFT2_DRV_INSTALLABLE 8
|
||||
#define VFT2_DRV_SOUND 9
|
||||
#define VFT2_DRV_COMM 10
|
||||
#define VFT2_DRV_INPUTMETHOD 11
|
||||
#define VFT2_FONT_RASTER 1
|
||||
#define VFT2_FONT_VECTOR 2
|
||||
#define VFT2_FONT_TRUETYPE 3
|
||||
#define VFFF_ISSHAREDFILE 1
|
||||
#define VFF_CURNEDEST 1
|
||||
#define VFF_FILEINUSE 2
|
||||
#define VFF_BUFFTOOSMALL 4
|
||||
#define VIFF_FORCEINSTALL 1
|
||||
#define VIFF_DONTDELETEOLD 2
|
||||
#define VIF_TEMPFILE 1
|
||||
#define VIF_MISMATCH 2
|
||||
#define VIF_SRCOLD 4
|
||||
#define VIF_DIFFLANG 8
|
||||
#define VIF_DIFFCODEPG 16
|
||||
#define VIF_DIFFTYPE 32
|
||||
#define VIF_WRITEPROT 64
|
||||
#define VIF_FILEINUSE 128
|
||||
#define VIF_OUTOFSPACE 256
|
||||
#define VIF_ACCESSVIOLATION 512
|
||||
#define VIF_SHARINGVIOLATION 1024
|
||||
#define VIF_CANNOTCREATE 2048
|
||||
#define VIF_CANNOTDELETE 4096
|
||||
#define VIF_CANNOTRENAME 8192
|
||||
#define VIF_CANNOTDELETECUR 16384
|
||||
#define VIF_OUTOFMEMORY 32768
|
||||
#define VIF_CANNOTREADSRC 65536
|
||||
#define VIF_CANNOTREADDST 0x20000
|
||||
#define VIF_BUFFTOOSMALL 0x40000
|
||||
#ifndef RC_INVOKED
|
||||
typedef struct tagVS_FIXEDFILEINFO {
|
||||
DWORD dwSignature;
|
||||
DWORD dwStrucVersion;
|
||||
DWORD dwFileVersionMS;
|
||||
DWORD dwFileVersionLS;
|
||||
DWORD dwProductVersionMS;
|
||||
DWORD dwProductVersionLS;
|
||||
DWORD dwFileFlagsMask;
|
||||
DWORD dwFileFlags;
|
||||
DWORD dwFileOS;
|
||||
DWORD dwFileType;
|
||||
DWORD dwFileSubtype;
|
||||
DWORD dwFileDateMS;
|
||||
DWORD dwFileDateLS;
|
||||
} VS_FIXEDFILEINFO;
|
||||
DWORD WINAPI VerFindFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,PUINT,LPSTR,PUINT);
|
||||
DWORD WINAPI VerFindFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT,LPWSTR,PUINT);
|
||||
DWORD WINAPI VerInstallFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,PUINT);
|
||||
DWORD WINAPI VerInstallFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT);
|
||||
DWORD WINAPI GetFileVersionInfoSizeA(LPSTR,PDWORD);
|
||||
DWORD WINAPI GetFileVersionInfoSizeW(LPWSTR,PDWORD);
|
||||
BOOL WINAPI GetFileVersionInfoA(LPSTR,DWORD,DWORD,PVOID);
|
||||
BOOL WINAPI GetFileVersionInfoW(LPWSTR,DWORD,DWORD,PVOID);
|
||||
DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
|
||||
DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
|
||||
BOOL WINAPI VerQueryValueA(PCVOID,LPSTR,PVOID*,PUINT);
|
||||
BOOL WINAPI VerQueryValueW(PCVOID,LPWSTR,PVOID*,PUINT);
|
||||
#ifdef UNICODE
|
||||
#define VerFindFile VerFindFileW
|
||||
#define VerQueryValue VerQueryValueW
|
||||
#define VerInstallFile VerInstallFileW
|
||||
#define GetFileVersionInfoSize GetFileVersionInfoSizeW
|
||||
#define GetFileVersionInfo GetFileVersionInfoW
|
||||
#define VerLanguageName VerLanguageNameW
|
||||
#define VerQueryValue VerQueryValueW
|
||||
#else
|
||||
#define VerQueryValue VerQueryValueA
|
||||
#define VerFindFile VerFindFileA
|
||||
#define VerInstallFile VerInstallFileA
|
||||
#define GetFileVersionInfoSize GetFileVersionInfoSizeA
|
||||
#define GetFileVersionInfo GetFileVersionInfoA
|
||||
#define VerLanguageName VerLanguageNameA
|
||||
#define VerQueryValue VerQueryValueA
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _WINVER_H
|
||||
#define _WINVER_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define VS_FILE_INFO RT_VERSION
|
||||
#define VS_VERSION_INFO 1
|
||||
#define VS_USER_DEFINED 100
|
||||
#define VS_FFI_SIGNATURE 0xFEEF04BD
|
||||
#define VS_FFI_STRUCVERSION 0x10000
|
||||
#define VS_FFI_FILEFLAGSMASK 0x3F
|
||||
#define VS_FF_DEBUG 1
|
||||
#define VS_FF_PRERELEASE 2
|
||||
#define VS_FF_PATCHED 4
|
||||
#define VS_FF_PRIVATEBUILD 8
|
||||
#define VS_FF_INFOINFERRED 16
|
||||
#define VS_FF_SPECIALBUILD 32
|
||||
#define VOS_UNKNOWN 0
|
||||
#define VOS_DOS 0x10000
|
||||
#define VOS_OS216 0x20000
|
||||
#define VOS_OS232 0x30000
|
||||
#define VOS_NT 0x40000
|
||||
#define VOS__BASE 0
|
||||
#define VOS__WINDOWS16 1
|
||||
#define VOS__PM16 2
|
||||
#define VOS__PM32 3
|
||||
#define VOS__WINDOWS32 4
|
||||
#define VOS_DOS_WINDOWS16 0x10001
|
||||
#define VOS_DOS_WINDOWS32 0x10004
|
||||
#define VOS_OS216_PM16 0x20002
|
||||
#define VOS_OS232_PM32 0x30003
|
||||
#define VOS_NT_WINDOWS32 0x40004
|
||||
#define VFT_UNKNOWN 0
|
||||
#define VFT_APP 1
|
||||
#define VFT_DLL 2
|
||||
#define VFT_DRV 3
|
||||
#define VFT_FONT 4
|
||||
#define VFT_VXD 5
|
||||
#define VFT_STATIC_LIB 7
|
||||
#define VFT2_UNKNOWN 0
|
||||
#define VFT2_DRV_PRINTER 1
|
||||
#define VFT2_DRV_KEYBOARD 2
|
||||
#define VFT2_DRV_LANGUAGE 3
|
||||
#define VFT2_DRV_DISPLAY 4
|
||||
#define VFT2_DRV_MOUSE 5
|
||||
#define VFT2_DRV_NETWORK 6
|
||||
#define VFT2_DRV_SYSTEM 7
|
||||
#define VFT2_DRV_INSTALLABLE 8
|
||||
#define VFT2_DRV_SOUND 9
|
||||
#define VFT2_DRV_COMM 10
|
||||
#define VFT2_DRV_INPUTMETHOD 11
|
||||
#define VFT2_FONT_RASTER 1
|
||||
#define VFT2_FONT_VECTOR 2
|
||||
#define VFT2_FONT_TRUETYPE 3
|
||||
#define VFFF_ISSHAREDFILE 1
|
||||
#define VFF_CURNEDEST 1
|
||||
#define VFF_FILEINUSE 2
|
||||
#define VFF_BUFFTOOSMALL 4
|
||||
#define VIFF_FORCEINSTALL 1
|
||||
#define VIFF_DONTDELETEOLD 2
|
||||
#define VIF_TEMPFILE 1
|
||||
#define VIF_MISMATCH 2
|
||||
#define VIF_SRCOLD 4
|
||||
#define VIF_DIFFLANG 8
|
||||
#define VIF_DIFFCODEPG 16
|
||||
#define VIF_DIFFTYPE 32
|
||||
#define VIF_WRITEPROT 64
|
||||
#define VIF_FILEINUSE 128
|
||||
#define VIF_OUTOFSPACE 256
|
||||
#define VIF_ACCESSVIOLATION 512
|
||||
#define VIF_SHARINGVIOLATION 1024
|
||||
#define VIF_CANNOTCREATE 2048
|
||||
#define VIF_CANNOTDELETE 4096
|
||||
#define VIF_CANNOTRENAME 8192
|
||||
#define VIF_CANNOTDELETECUR 16384
|
||||
#define VIF_OUTOFMEMORY 32768
|
||||
#define VIF_CANNOTREADSRC 65536
|
||||
#define VIF_CANNOTREADDST 0x20000
|
||||
#define VIF_BUFFTOOSMALL 0x40000
|
||||
#ifndef RC_INVOKED
|
||||
typedef struct tagVS_FIXEDFILEINFO {
|
||||
DWORD dwSignature;
|
||||
DWORD dwStrucVersion;
|
||||
DWORD dwFileVersionMS;
|
||||
DWORD dwFileVersionLS;
|
||||
DWORD dwProductVersionMS;
|
||||
DWORD dwProductVersionLS;
|
||||
DWORD dwFileFlagsMask;
|
||||
DWORD dwFileFlags;
|
||||
DWORD dwFileOS;
|
||||
DWORD dwFileType;
|
||||
DWORD dwFileSubtype;
|
||||
DWORD dwFileDateMS;
|
||||
DWORD dwFileDateLS;
|
||||
} VS_FIXEDFILEINFO;
|
||||
DWORD WINAPI VerFindFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,PUINT,LPSTR,PUINT);
|
||||
DWORD WINAPI VerFindFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT,LPWSTR,PUINT);
|
||||
DWORD WINAPI VerInstallFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,PUINT);
|
||||
DWORD WINAPI VerInstallFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT);
|
||||
DWORD WINAPI GetFileVersionInfoSizeA(LPSTR,PDWORD);
|
||||
DWORD WINAPI GetFileVersionInfoSizeW(LPWSTR,PDWORD);
|
||||
BOOL WINAPI GetFileVersionInfoA(LPSTR,DWORD,DWORD,PVOID);
|
||||
BOOL WINAPI GetFileVersionInfoW(LPWSTR,DWORD,DWORD,PVOID);
|
||||
DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
|
||||
DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
|
||||
BOOL WINAPI VerQueryValueA(PCVOID,LPSTR,PVOID*,PUINT);
|
||||
BOOL WINAPI VerQueryValueW(PCVOID,LPWSTR,PVOID*,PUINT);
|
||||
#ifdef UNICODE
|
||||
#define VerFindFile VerFindFileW
|
||||
#define VerQueryValue VerQueryValueW
|
||||
#define VerInstallFile VerInstallFileW
|
||||
#define GetFileVersionInfoSize GetFileVersionInfoSizeW
|
||||
#define GetFileVersionInfo GetFileVersionInfoW
|
||||
#define VerLanguageName VerLanguageNameW
|
||||
#define VerQueryValue VerQueryValueW
|
||||
#else
|
||||
#define VerQueryValue VerQueryValueA
|
||||
#define VerFindFile VerFindFileA
|
||||
#define VerInstallFile VerInstallFileA
|
||||
#define GetFileVersionInfoSize GetFileVersionInfoSizeA
|
||||
#define GetFileVersionInfo GetFileVersionInfoA
|
||||
#define VerLanguageName VerLanguageNameA
|
||||
#define VerQueryValue VerQueryValueA
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,29 +1,29 @@
|
||||
// =================================================
|
||||
// chkstk.s
|
||||
|
||||
.text
|
||||
.globl __chkstk
|
||||
|
||||
__chkstk:
|
||||
xchg (%esp), %ebp // store ebp, get ret.addr
|
||||
push %ebp // push ret.addr
|
||||
lea 4(%esp), %ebp // setup frame ptr
|
||||
push %ecx // save ecx
|
||||
mov %ebp, %ecx
|
||||
P0:
|
||||
sub $4096,%ecx
|
||||
test %eax,(%ecx)
|
||||
sub $4096,%eax
|
||||
cmp $4096,%eax
|
||||
jge P0
|
||||
|
||||
sub %eax,%ecx
|
||||
mov %esp,%eax
|
||||
test %eax,(%ecx)
|
||||
mov %ecx,%esp
|
||||
|
||||
mov (%eax),%ecx // restore ecx
|
||||
mov 4(%eax),%eax
|
||||
push %eax
|
||||
ret
|
||||
|
||||
// =================================================
|
||||
// chkstk.s
|
||||
|
||||
.text
|
||||
.globl __chkstk
|
||||
|
||||
__chkstk:
|
||||
xchg (%esp), %ebp // store ebp, get ret.addr
|
||||
push %ebp // push ret.addr
|
||||
lea 4(%esp), %ebp // setup frame ptr
|
||||
push %ecx // save ecx
|
||||
mov %ebp, %ecx
|
||||
P0:
|
||||
sub $4096,%ecx
|
||||
test %eax,(%ecx)
|
||||
sub $4096,%eax
|
||||
cmp $4096,%eax
|
||||
jge P0
|
||||
|
||||
sub %eax,%ecx
|
||||
mov %esp,%eax
|
||||
test %eax,(%ecx)
|
||||
mov %ecx,%esp
|
||||
|
||||
mov (%eax),%ecx // restore ecx
|
||||
mov 4(%eax),%eax
|
||||
push %eax
|
||||
ret
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved);
|
||||
|
||||
BOOL WINAPI _dllstart(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
BOOL bRet;
|
||||
bRet = DllMain (hDll, dwReason, lpReserved);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved);
|
||||
|
||||
BOOL WINAPI _dllstart(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
BOOL bRet;
|
||||
bRet = DllMain (hDll, dwReason, lpReserved);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1,337 +1,337 @@
|
||||
LIBRARY gdi32.dll
|
||||
|
||||
EXPORTS
|
||||
AbortDoc
|
||||
AbortPath
|
||||
AddFontResourceA
|
||||
AddFontResourceW
|
||||
AngleArc
|
||||
AnimatePalette
|
||||
Arc
|
||||
ArcTo
|
||||
BeginPath
|
||||
BitBlt
|
||||
ByeByeGDI
|
||||
CancelDC
|
||||
CheckColorsInGamut
|
||||
ChoosePixelFormat
|
||||
Chord
|
||||
CloseEnhMetaFile
|
||||
CloseFigure
|
||||
CloseMetaFile
|
||||
ColorCorrectPalette
|
||||
ColorMatchToTarget
|
||||
CombineRgn
|
||||
CombineTransform
|
||||
CopyEnhMetaFileA
|
||||
CopyEnhMetaFileW
|
||||
CopyMetaFileA
|
||||
CopyMetaFileW
|
||||
CreateBitmap
|
||||
CreateBitmapIndirect
|
||||
CreateBrushIndirect
|
||||
CreateColorSpaceA
|
||||
CreateColorSpaceW
|
||||
CreateCompatibleBitmap
|
||||
CreateCompatibleDC
|
||||
CreateDCA
|
||||
CreateDCW
|
||||
CreateDIBPatternBrush
|
||||
CreateDIBPatternBrushPt
|
||||
CreateDIBSection
|
||||
CreateDIBitmap
|
||||
CreateDiscardableBitmap
|
||||
CreateEllipticRgn
|
||||
CreateEllipticRgnIndirect
|
||||
CreateEnhMetaFileA
|
||||
CreateEnhMetaFileW
|
||||
CreateFontA
|
||||
CreateFontIndirectA
|
||||
CreateFontIndirectW
|
||||
CreateFontW
|
||||
CreateHalftonePalette
|
||||
CreateHatchBrush
|
||||
CreateICA
|
||||
CreateICW
|
||||
CreateMetaFileA
|
||||
CreateMetaFileW
|
||||
CreatePalette
|
||||
CreatePatternBrush
|
||||
CreatePen
|
||||
CreatePenIndirect
|
||||
CreatePolyPolygonRgn
|
||||
CreatePolygonRgn
|
||||
CreateRectRgn
|
||||
CreateRectRgnIndirect
|
||||
CreateRoundRectRgn
|
||||
CreateScalableFontResourceA
|
||||
CreateScalableFontResourceW
|
||||
CreateSolidBrush
|
||||
DPtoLP
|
||||
DeleteColorSpace
|
||||
DeleteDC
|
||||
DeleteEnhMetaFile
|
||||
DeleteMetaFile
|
||||
DeleteObject
|
||||
DescribePixelFormat
|
||||
DeviceCapabilitiesEx
|
||||
DeviceCapabilitiesExA
|
||||
DeviceCapabilitiesExW
|
||||
DrawEscape
|
||||
Ellipse
|
||||
EnableEUDC
|
||||
EndDoc
|
||||
EndPage
|
||||
EndPath
|
||||
EnumEnhMetaFile
|
||||
EnumFontFamiliesA
|
||||
EnumFontFamiliesExA
|
||||
EnumFontFamiliesExW
|
||||
EnumFontFamiliesW
|
||||
EnumFontsA
|
||||
EnumFontsW
|
||||
EnumICMProfilesA
|
||||
EnumICMProfilesW
|
||||
EnumMetaFile
|
||||
EnumObjects
|
||||
EqualRgn
|
||||
Escape
|
||||
ExcludeClipRect
|
||||
ExtCreatePen
|
||||
ExtCreateRegion
|
||||
ExtEscape
|
||||
ExtFloodFill
|
||||
ExtSelectClipRgn
|
||||
ExtTextOutA
|
||||
ExtTextOutW
|
||||
FillPath
|
||||
FillRgn
|
||||
FixBrushOrgEx
|
||||
FlattenPath
|
||||
FloodFill
|
||||
FrameRgn
|
||||
GdiComment
|
||||
GdiFlush
|
||||
GdiGetBatchLimit
|
||||
GdiPlayDCScript
|
||||
GdiPlayJournal
|
||||
GdiPlayScript
|
||||
GdiSetBatchLimit
|
||||
GetArcDirection
|
||||
GetAspectRatioFilterEx
|
||||
GetBitmapBits
|
||||
GetBitmapDimensionEx
|
||||
GetBkColor
|
||||
GetBkMode
|
||||
GetBoundsRect
|
||||
GetBrushOrgEx
|
||||
GetCharABCWidthsA
|
||||
GetCharABCWidthsFloatA
|
||||
GetCharABCWidthsFloatW
|
||||
GetCharABCWidthsW
|
||||
GetCharWidth32A
|
||||
GetCharWidth32W
|
||||
GetCharWidthA
|
||||
GetCharWidthFloatA
|
||||
GetCharWidthFloatW
|
||||
GetCharWidthW
|
||||
GetCharacterPlacementA
|
||||
GetCharacterPlacementW
|
||||
GetClipBox
|
||||
GetClipRgn
|
||||
GetColorAdjustment
|
||||
GetColorSpace
|
||||
GetCurrentObject
|
||||
GetCurrentPositionEx
|
||||
GetDCOrgEx
|
||||
GetDIBColorTable
|
||||
GetDIBits
|
||||
GetDeviceCaps
|
||||
GetDeviceGammaRamp
|
||||
GetEnhMetaFileA
|
||||
GetEnhMetaFileBits
|
||||
GetEnhMetaFileDescriptionA
|
||||
GetEnhMetaFileDescriptionW
|
||||
GetEnhMetaFileHeader
|
||||
GetEnhMetaFilePaletteEntries
|
||||
GetEnhMetaFileW
|
||||
GetFontData
|
||||
GetFontLanguageInfo
|
||||
GetFontResourceInfo
|
||||
GetGlyphOutline
|
||||
GetGlyphOutlineA
|
||||
GetGlyphOutlineW
|
||||
GetGraphicsMode
|
||||
GetICMProfileA
|
||||
GetICMProfileW
|
||||
GetKerningPairs
|
||||
GetKerningPairsA
|
||||
GetKerningPairsW
|
||||
GetLayout
|
||||
GetLogColorSpaceA
|
||||
GetLogColorSpaceW
|
||||
GetMapMode
|
||||
GetMetaFileA
|
||||
GetMetaFileBitsEx
|
||||
GetMetaFileW
|
||||
GetMetaRgn
|
||||
GetMiterLimit
|
||||
GetNearestColor
|
||||
GetNearestPaletteIndex
|
||||
GetObjectA
|
||||
GetObjectType
|
||||
GetObjectW
|
||||
GetOutlineTextMetricsA
|
||||
GetOutlineTextMetricsW
|
||||
GetPaletteEntries
|
||||
GetPath
|
||||
GetPixel
|
||||
GetPixelFormat
|
||||
GetPolyFillMode
|
||||
GetROP2
|
||||
GetRandomRgn
|
||||
GetRasterizerCaps
|
||||
GetRegionData
|
||||
GetRgnBox
|
||||
GetStockObject
|
||||
GetStretchBltMode
|
||||
GetSystemPaletteEntries
|
||||
GetSystemPaletteUse
|
||||
GetTextAlign
|
||||
GetTextCharacterExtra
|
||||
GetTextCharset
|
||||
GetTextCharsetInfo
|
||||
GetTextColor
|
||||
GetTextExtentExPointA
|
||||
GetTextExtentExPointW
|
||||
GetTextExtentPoint32A
|
||||
GetTextExtentPoint32W
|
||||
GetTextExtentPointA
|
||||
GetTextExtentPointW
|
||||
GetTextFaceA
|
||||
GetTextFaceW
|
||||
GetTextMetricsA
|
||||
GetTextMetricsW
|
||||
GetViewportExtEx
|
||||
GetViewportOrgEx
|
||||
GetWinMetaFileBits
|
||||
GetWindowExtEx
|
||||
GetWindowOrgEx
|
||||
GetWorldTransform
|
||||
IntersectClipRect
|
||||
InvertRgn
|
||||
LPtoDP
|
||||
LineDDA
|
||||
LineTo
|
||||
MaskBlt
|
||||
ModifyWorldTransform
|
||||
MoveToEx
|
||||
OffsetClipRgn
|
||||
OffsetRgn
|
||||
OffsetViewportOrgEx
|
||||
OffsetWindowOrgEx
|
||||
PaintRgn
|
||||
PatBlt
|
||||
PathToRegion
|
||||
Pie
|
||||
PlayEnhMetaFile
|
||||
PlayEnhMetaFileRecord
|
||||
PlayMetaFile
|
||||
PlayMetaFileRecord
|
||||
PlgBlt
|
||||
PolyBezier
|
||||
PolyBezierTo
|
||||
PolyDraw
|
||||
PolyPolygon
|
||||
PolyPolyline
|
||||
PolyTextOutA
|
||||
PolyTextOutW
|
||||
Polygon
|
||||
Polyline
|
||||
PolylineTo
|
||||
PtInRegion
|
||||
PtVisible
|
||||
RealizePalette
|
||||
RectInRegion
|
||||
RectVisible
|
||||
Rectangle
|
||||
RemoveFontResourceA
|
||||
RemoveFontResourceW
|
||||
ResetDCA
|
||||
ResetDCW
|
||||
ResizePalette
|
||||
RestoreDC
|
||||
RoundRect
|
||||
SaveDC
|
||||
ScaleViewportExtEx
|
||||
ScaleWindowExtEx
|
||||
SelectClipPath
|
||||
SelectClipRgn
|
||||
SelectObject
|
||||
SelectPalette
|
||||
SetAbortProc
|
||||
SetArcDirection
|
||||
SetBitmapBits
|
||||
SetBitmapDimensionEx
|
||||
SetBkColor
|
||||
SetBkMode
|
||||
SetBoundsRect
|
||||
SetBrushOrgEx
|
||||
SetColorAdjustment
|
||||
SetColorSpace
|
||||
SetDIBColorTable
|
||||
SetDIBits
|
||||
SetDIBitsToDevice
|
||||
SetDeviceGammaRamp
|
||||
SetEnhMetaFileBits
|
||||
SetFontEnumeration
|
||||
SetGraphicsMode
|
||||
SetICMMode
|
||||
SetICMProfileA
|
||||
SetICMProfileW
|
||||
SetLayout
|
||||
SetMagicColors
|
||||
SetMapMode
|
||||
SetMapperFlags
|
||||
SetMetaFileBitsEx
|
||||
SetMetaRgn
|
||||
SetMiterLimit
|
||||
SetObjectOwner
|
||||
SetPaletteEntries
|
||||
SetPixel
|
||||
SetPixelFormat
|
||||
SetPixelV
|
||||
SetPolyFillMode
|
||||
SetROP2
|
||||
SetRectRgn
|
||||
SetStretchBltMode
|
||||
SetSystemPaletteUse
|
||||
SetTextAlign
|
||||
SetTextCharacterExtra
|
||||
SetTextColor
|
||||
SetTextJustification
|
||||
SetViewportExtEx
|
||||
SetViewportOrgEx
|
||||
SetWinMetaFileBits
|
||||
SetWindowExtEx
|
||||
SetWindowOrgEx
|
||||
SetWorldTransform
|
||||
StartDocA
|
||||
StartDocW
|
||||
StartPage
|
||||
StretchBlt
|
||||
StretchDIBits
|
||||
StrokeAndFillPath
|
||||
StrokePath
|
||||
SwapBuffers
|
||||
TextOutA
|
||||
TextOutW
|
||||
TranslateCharsetInfo
|
||||
UnrealizeObject
|
||||
UpdateColors
|
||||
UpdateICMRegKeyA
|
||||
UpdateICMRegKeyW
|
||||
WidenPath
|
||||
gdiPlaySpoolStream
|
||||
pfnRealizePalette
|
||||
pfnSelectPalette
|
||||
LIBRARY gdi32.dll
|
||||
|
||||
EXPORTS
|
||||
AbortDoc
|
||||
AbortPath
|
||||
AddFontResourceA
|
||||
AddFontResourceW
|
||||
AngleArc
|
||||
AnimatePalette
|
||||
Arc
|
||||
ArcTo
|
||||
BeginPath
|
||||
BitBlt
|
||||
ByeByeGDI
|
||||
CancelDC
|
||||
CheckColorsInGamut
|
||||
ChoosePixelFormat
|
||||
Chord
|
||||
CloseEnhMetaFile
|
||||
CloseFigure
|
||||
CloseMetaFile
|
||||
ColorCorrectPalette
|
||||
ColorMatchToTarget
|
||||
CombineRgn
|
||||
CombineTransform
|
||||
CopyEnhMetaFileA
|
||||
CopyEnhMetaFileW
|
||||
CopyMetaFileA
|
||||
CopyMetaFileW
|
||||
CreateBitmap
|
||||
CreateBitmapIndirect
|
||||
CreateBrushIndirect
|
||||
CreateColorSpaceA
|
||||
CreateColorSpaceW
|
||||
CreateCompatibleBitmap
|
||||
CreateCompatibleDC
|
||||
CreateDCA
|
||||
CreateDCW
|
||||
CreateDIBPatternBrush
|
||||
CreateDIBPatternBrushPt
|
||||
CreateDIBSection
|
||||
CreateDIBitmap
|
||||
CreateDiscardableBitmap
|
||||
CreateEllipticRgn
|
||||
CreateEllipticRgnIndirect
|
||||
CreateEnhMetaFileA
|
||||
CreateEnhMetaFileW
|
||||
CreateFontA
|
||||
CreateFontIndirectA
|
||||
CreateFontIndirectW
|
||||
CreateFontW
|
||||
CreateHalftonePalette
|
||||
CreateHatchBrush
|
||||
CreateICA
|
||||
CreateICW
|
||||
CreateMetaFileA
|
||||
CreateMetaFileW
|
||||
CreatePalette
|
||||
CreatePatternBrush
|
||||
CreatePen
|
||||
CreatePenIndirect
|
||||
CreatePolyPolygonRgn
|
||||
CreatePolygonRgn
|
||||
CreateRectRgn
|
||||
CreateRectRgnIndirect
|
||||
CreateRoundRectRgn
|
||||
CreateScalableFontResourceA
|
||||
CreateScalableFontResourceW
|
||||
CreateSolidBrush
|
||||
DPtoLP
|
||||
DeleteColorSpace
|
||||
DeleteDC
|
||||
DeleteEnhMetaFile
|
||||
DeleteMetaFile
|
||||
DeleteObject
|
||||
DescribePixelFormat
|
||||
DeviceCapabilitiesEx
|
||||
DeviceCapabilitiesExA
|
||||
DeviceCapabilitiesExW
|
||||
DrawEscape
|
||||
Ellipse
|
||||
EnableEUDC
|
||||
EndDoc
|
||||
EndPage
|
||||
EndPath
|
||||
EnumEnhMetaFile
|
||||
EnumFontFamiliesA
|
||||
EnumFontFamiliesExA
|
||||
EnumFontFamiliesExW
|
||||
EnumFontFamiliesW
|
||||
EnumFontsA
|
||||
EnumFontsW
|
||||
EnumICMProfilesA
|
||||
EnumICMProfilesW
|
||||
EnumMetaFile
|
||||
EnumObjects
|
||||
EqualRgn
|
||||
Escape
|
||||
ExcludeClipRect
|
||||
ExtCreatePen
|
||||
ExtCreateRegion
|
||||
ExtEscape
|
||||
ExtFloodFill
|
||||
ExtSelectClipRgn
|
||||
ExtTextOutA
|
||||
ExtTextOutW
|
||||
FillPath
|
||||
FillRgn
|
||||
FixBrushOrgEx
|
||||
FlattenPath
|
||||
FloodFill
|
||||
FrameRgn
|
||||
GdiComment
|
||||
GdiFlush
|
||||
GdiGetBatchLimit
|
||||
GdiPlayDCScript
|
||||
GdiPlayJournal
|
||||
GdiPlayScript
|
||||
GdiSetBatchLimit
|
||||
GetArcDirection
|
||||
GetAspectRatioFilterEx
|
||||
GetBitmapBits
|
||||
GetBitmapDimensionEx
|
||||
GetBkColor
|
||||
GetBkMode
|
||||
GetBoundsRect
|
||||
GetBrushOrgEx
|
||||
GetCharABCWidthsA
|
||||
GetCharABCWidthsFloatA
|
||||
GetCharABCWidthsFloatW
|
||||
GetCharABCWidthsW
|
||||
GetCharWidth32A
|
||||
GetCharWidth32W
|
||||
GetCharWidthA
|
||||
GetCharWidthFloatA
|
||||
GetCharWidthFloatW
|
||||
GetCharWidthW
|
||||
GetCharacterPlacementA
|
||||
GetCharacterPlacementW
|
||||
GetClipBox
|
||||
GetClipRgn
|
||||
GetColorAdjustment
|
||||
GetColorSpace
|
||||
GetCurrentObject
|
||||
GetCurrentPositionEx
|
||||
GetDCOrgEx
|
||||
GetDIBColorTable
|
||||
GetDIBits
|
||||
GetDeviceCaps
|
||||
GetDeviceGammaRamp
|
||||
GetEnhMetaFileA
|
||||
GetEnhMetaFileBits
|
||||
GetEnhMetaFileDescriptionA
|
||||
GetEnhMetaFileDescriptionW
|
||||
GetEnhMetaFileHeader
|
||||
GetEnhMetaFilePaletteEntries
|
||||
GetEnhMetaFileW
|
||||
GetFontData
|
||||
GetFontLanguageInfo
|
||||
GetFontResourceInfo
|
||||
GetGlyphOutline
|
||||
GetGlyphOutlineA
|
||||
GetGlyphOutlineW
|
||||
GetGraphicsMode
|
||||
GetICMProfileA
|
||||
GetICMProfileW
|
||||
GetKerningPairs
|
||||
GetKerningPairsA
|
||||
GetKerningPairsW
|
||||
GetLayout
|
||||
GetLogColorSpaceA
|
||||
GetLogColorSpaceW
|
||||
GetMapMode
|
||||
GetMetaFileA
|
||||
GetMetaFileBitsEx
|
||||
GetMetaFileW
|
||||
GetMetaRgn
|
||||
GetMiterLimit
|
||||
GetNearestColor
|
||||
GetNearestPaletteIndex
|
||||
GetObjectA
|
||||
GetObjectType
|
||||
GetObjectW
|
||||
GetOutlineTextMetricsA
|
||||
GetOutlineTextMetricsW
|
||||
GetPaletteEntries
|
||||
GetPath
|
||||
GetPixel
|
||||
GetPixelFormat
|
||||
GetPolyFillMode
|
||||
GetROP2
|
||||
GetRandomRgn
|
||||
GetRasterizerCaps
|
||||
GetRegionData
|
||||
GetRgnBox
|
||||
GetStockObject
|
||||
GetStretchBltMode
|
||||
GetSystemPaletteEntries
|
||||
GetSystemPaletteUse
|
||||
GetTextAlign
|
||||
GetTextCharacterExtra
|
||||
GetTextCharset
|
||||
GetTextCharsetInfo
|
||||
GetTextColor
|
||||
GetTextExtentExPointA
|
||||
GetTextExtentExPointW
|
||||
GetTextExtentPoint32A
|
||||
GetTextExtentPoint32W
|
||||
GetTextExtentPointA
|
||||
GetTextExtentPointW
|
||||
GetTextFaceA
|
||||
GetTextFaceW
|
||||
GetTextMetricsA
|
||||
GetTextMetricsW
|
||||
GetViewportExtEx
|
||||
GetViewportOrgEx
|
||||
GetWinMetaFileBits
|
||||
GetWindowExtEx
|
||||
GetWindowOrgEx
|
||||
GetWorldTransform
|
||||
IntersectClipRect
|
||||
InvertRgn
|
||||
LPtoDP
|
||||
LineDDA
|
||||
LineTo
|
||||
MaskBlt
|
||||
ModifyWorldTransform
|
||||
MoveToEx
|
||||
OffsetClipRgn
|
||||
OffsetRgn
|
||||
OffsetViewportOrgEx
|
||||
OffsetWindowOrgEx
|
||||
PaintRgn
|
||||
PatBlt
|
||||
PathToRegion
|
||||
Pie
|
||||
PlayEnhMetaFile
|
||||
PlayEnhMetaFileRecord
|
||||
PlayMetaFile
|
||||
PlayMetaFileRecord
|
||||
PlgBlt
|
||||
PolyBezier
|
||||
PolyBezierTo
|
||||
PolyDraw
|
||||
PolyPolygon
|
||||
PolyPolyline
|
||||
PolyTextOutA
|
||||
PolyTextOutW
|
||||
Polygon
|
||||
Polyline
|
||||
PolylineTo
|
||||
PtInRegion
|
||||
PtVisible
|
||||
RealizePalette
|
||||
RectInRegion
|
||||
RectVisible
|
||||
Rectangle
|
||||
RemoveFontResourceA
|
||||
RemoveFontResourceW
|
||||
ResetDCA
|
||||
ResetDCW
|
||||
ResizePalette
|
||||
RestoreDC
|
||||
RoundRect
|
||||
SaveDC
|
||||
ScaleViewportExtEx
|
||||
ScaleWindowExtEx
|
||||
SelectClipPath
|
||||
SelectClipRgn
|
||||
SelectObject
|
||||
SelectPalette
|
||||
SetAbortProc
|
||||
SetArcDirection
|
||||
SetBitmapBits
|
||||
SetBitmapDimensionEx
|
||||
SetBkColor
|
||||
SetBkMode
|
||||
SetBoundsRect
|
||||
SetBrushOrgEx
|
||||
SetColorAdjustment
|
||||
SetColorSpace
|
||||
SetDIBColorTable
|
||||
SetDIBits
|
||||
SetDIBitsToDevice
|
||||
SetDeviceGammaRamp
|
||||
SetEnhMetaFileBits
|
||||
SetFontEnumeration
|
||||
SetGraphicsMode
|
||||
SetICMMode
|
||||
SetICMProfileA
|
||||
SetICMProfileW
|
||||
SetLayout
|
||||
SetMagicColors
|
||||
SetMapMode
|
||||
SetMapperFlags
|
||||
SetMetaFileBitsEx
|
||||
SetMetaRgn
|
||||
SetMiterLimit
|
||||
SetObjectOwner
|
||||
SetPaletteEntries
|
||||
SetPixel
|
||||
SetPixelFormat
|
||||
SetPixelV
|
||||
SetPolyFillMode
|
||||
SetROP2
|
||||
SetRectRgn
|
||||
SetStretchBltMode
|
||||
SetSystemPaletteUse
|
||||
SetTextAlign
|
||||
SetTextCharacterExtra
|
||||
SetTextColor
|
||||
SetTextJustification
|
||||
SetViewportExtEx
|
||||
SetViewportOrgEx
|
||||
SetWinMetaFileBits
|
||||
SetWindowExtEx
|
||||
SetWindowOrgEx
|
||||
SetWorldTransform
|
||||
StartDocA
|
||||
StartDocW
|
||||
StartPage
|
||||
StretchBlt
|
||||
StretchDIBits
|
||||
StrokeAndFillPath
|
||||
StrokePath
|
||||
SwapBuffers
|
||||
TextOutA
|
||||
TextOutW
|
||||
TranslateCharsetInfo
|
||||
UnrealizeObject
|
||||
UpdateColors
|
||||
UpdateICMRegKeyA
|
||||
UpdateICMRegKeyW
|
||||
WidenPath
|
||||
gdiPlaySpoolStream
|
||||
pfnRealizePalette
|
||||
pfnSelectPalette
|
||||
|
File diff suppressed because it is too large
Load Diff
1564
win32/lib/msvcrt.def
1564
win32/lib/msvcrt.def
File diff suppressed because it is too large
Load Diff
1308
win32/lib/user32.def
1308
win32/lib/user32.def
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user