2025-09-29 00:06:16 +00:00
|
|
|
/* $Id$ */
|
2025-09-30 13:04:40 +00:00
|
|
|
/*!
|
2025-10-28 20:40:26 +00:00
|
|
|
* @file Mw/MachDep.h
|
|
|
|
|
* @brief Machine dependent headers and macros
|
2025-09-30 13:04:40 +00:00
|
|
|
*/
|
2025-09-29 00:06:16 +00:00
|
|
|
#ifndef __MW_MACHDEP_H__
|
|
|
|
|
#define __MW_MACHDEP_H__
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdarg.h>
|
2025-09-30 03:14:02 +00:00
|
|
|
#include <setjmp.h>
|
2025-10-01 05:59:53 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <assert.h>
|
2025-10-04 17:28:33 +00:00
|
|
|
#include <math.h>
|
2025-10-08 18:03:46 +00:00
|
|
|
#include <ctype.h>
|
2025-10-13 12:39:37 +00:00
|
|
|
#include <time.h>
|
2025-11-26 22:04:02 +00:00
|
|
|
#include <sys/stat.h>
|
2025-10-17 00:16:02 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
#include <direct.h>
|
2025-11-13 03:28:25 +00:00
|
|
|
|
|
|
|
|
#ifdef _MILSKO
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
#ifndef GWLP_USERDATA
|
|
|
|
|
#define GWLP_USERDATA GWL_USERDATA
|
|
|
|
|
#define GWLP_WNDPROC GWL_WNDPROC
|
|
|
|
|
#define GCLP_HICON GCL_HICON
|
|
|
|
|
#define GCLP_HCURSOR GCL_HCURSOR
|
|
|
|
|
#define SetWindowLongPtr SetWindowLong
|
|
|
|
|
#define GetWindowLongPtr GetWindowLong
|
|
|
|
|
#define SetClassLongPtr SetClassLong
|
|
|
|
|
#define GetClassLongPtr GetClassLong
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef WM_MOUSEWHEEL
|
|
|
|
|
#define WM_MOUSEWHEEL 0x020a
|
|
|
|
|
#define GET_WHEEL_DELTA_WPARAM(x) ((short)HIWORD(x))
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-10-17 00:16:02 +00:00
|
|
|
#else
|
2025-09-29 00:06:16 +00:00
|
|
|
#include <unistd.h>
|
2025-10-18 16:31:59 +00:00
|
|
|
#include <pwd.h>
|
2025-10-01 06:42:52 +00:00
|
|
|
#include <dlfcn.h>
|
2025-10-04 12:33:26 +00:00
|
|
|
#include <signal.h>
|
2025-10-15 16:17:47 +00:00
|
|
|
#include <dirent.h>
|
2025-09-29 00:06:16 +00:00
|
|
|
#endif
|
|
|
|
|
|
2025-10-08 11:15:48 +00:00
|
|
|
#ifndef M_PI
|
|
|
|
|
#define M_PI 3.14159265
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-09-29 04:11:24 +00:00
|
|
|
#if defined(_MILSKO) && defined(_WIN32)
|
2025-09-29 00:06:16 +00:00
|
|
|
#define MWDECL extern __declspec(dllexport)
|
|
|
|
|
#elif defined(_WIN32)
|
|
|
|
|
#define MWDECL extern __declspec(dllimport)
|
|
|
|
|
#else
|
|
|
|
|
#define MWDECL extern
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-10-21 16:46:20 +00:00
|
|
|
#define MwInline static __inline
|
2025-10-20 21:55:30 +00:00
|
|
|
|
2025-09-29 00:06:16 +00:00
|
|
|
#endif
|