⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windows.h

📁 BOSS窗口开发 C 语言程序库
💻 H
📖 第 1 页 / 共 2 页
字号:
/*
** WINDOW BOSS - Simple but Elegant Window Functions 
**
** Lattice, Computer Innovations, Microsoft, Datalight, Aztec, 
** Watcom, Mix Power C, Zortech
**
** Copyright (c) 1984, 1985, 1986 - Philip A. Mongelluzzo
** All rights reserved.
**
** The complex web of compiler defines and feature tests follows.
*/

/*
** Computer Innovations comes first....
*/

#ifdef C86
#define BORLAND 0
#define MSCV3   0
#define MSCV4   0
#define MSCV6   0
#define MSC     0
#define MSC3    0
#define MSC4    0
#define DLC     0
#define CI86    1
#define LC2     0
#define LC3     0
#define LC6     0
#define __ZTC__ 0
#define MIXPC   0
#define AZTEC   0
#define WATCOM  0
#ifdef _C86_BIG
#define LPTR    1
#define SPTR    0
#else
#define LPTR    0
#define SPTR    1
#endif
#define LATTICE 0
#define void int                        /* define void as int */
struct WORDREGS {                       /* register layout is */
        unsigned int ax;                /* different from the rest !! */
        unsigned int bx;
        unsigned int cx;
        unsigned int dx;
        unsigned int si;
        unsigned int di;
        unsigned int ds;                /* <= NB */
        unsigned int es;                /* <= NB */
        unsigned int flags;
        };
struct BYTEREGS {
        unsigned char al, ah;
        unsigned char bl, bh;
        unsigned char cl, ch;
        unsigned char dl, dh;
        };
union REGS {
        struct WORDREGS x;
        struct BYTEREGS h;
        };
struct SREGS {
        unsigned int cs;
        unsigned int ss;
        unsigned int ds;
        unsigned int es;
        };
extern unsigned wns_mtype();            /* make everyone happy */
#endif                                  /* end C86 Stuff */


#if WATCOM
#pragma aux v_stksp "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux _putca "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux _getca "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux _absloc "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_wca "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es];

#pragma aux v_wtty "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_cls "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es];

#pragma aux v_spage "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_smode "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_locate "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_hidec "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_sapu "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_sapd "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_rcpos "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_rcvs "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_getch "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_kflush "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_kstat "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_sctype "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux xferdata "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux v_border "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux _vidblt "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 

#pragma aux _putca "_*" parm caller []                           \
                         value struct float struct routine [ax]   \
                         modify [ax bx cx dx es]; 
#endif

/*
** Microsoft 4.0, 5.X, 6.X, QuickC, PowerC
*/


#if MSCV6
#undef NULL                             /* NULL must be redefined */
#define NULL (int)0                     /* to avoid useless errors MSC 6.XX */
#define MSCV4   1
#endif

#if MSCV4
#define MSC     1
#define MSCV3   0
#define MSC4    1
#define DLC     0
#define CI86    0
#define LC2     0
#define LC3     0
#define BORLAND 0
#ifndef MIXPC
#define MIXPC   0
#endif
#define AZTEC   0
#ifdef M_I86SM                          /* small code, small data */
#define SPTR    1
#define LPTR    0
#endif
#ifdef M_I86LM                          /* large code, large data */
#define SPTR    0
#define LPTR    1
#endif
#ifdef M_I86CM                          /* small code, large data */
#define SPTR    0
#define LPTR    1
#endif
#ifdef M_I86MM                          /* large code, small data */
#define SPTR    1
#define LPTR    0
#endif
#define LATTICE 1
#endif

/*
** Microsoft 3.00
*/

#if MSCV3
#define MSC     1
#define MSC4    0
#define DLC     0
#define CI86    0
#define LC2     0
#define LC3     0
#define BORLAND 0
#define MIXPC   0
#ifndef AZTEC
#define AZTEC   0
#endif
#ifdef M_I86SM                          /* small code, small data */
#define SPTR    1
#define LPTR    0
#endif
#ifdef M_I86LM                          /* large code, large data */
#define SPTR    0
#define LPTR    1
#endif
#ifdef M_I86CM                          /* small code, large data */
#define SPTR    0
#define LPTR    1
#endif
#ifdef M_I86MM                          /* large code, small data */
#define SPTR    1
#define LPTR    0
#endif
#define LATTICE 1
#endif

/*
** Lattice 6.XX
*/

#if LC6                                 /* Lattice 6 looks like BORLAND! */
#define BORLAND 1                       /* from a code standpoint */
#undef NULL                             /* NULL must be redefined */
#define NULL (int)0                     /* to avoid useless errors */
#endif                                  /* any changes here must also */
                                        /* be made in "windows.c" */

/*
** Zortech
*/

#if __ZTC__                             /* ZORTECH looks like BORLAND! */
#define BORLAND 1                       /* from a code standpoint */
#undef NULL                             /* NULL must be undefined */
#endif                                  /* any changes here must also */
                                        /* be made in "windows.c" */
/*
** BORLAND
*/

#ifdef __TURBOC__
#ifndef BORLAND
#define BORLAND 1
#endif
#endif

#if BORLAND
#define MSC     1
#define MSC4    1
#define DLC     0
#define CI86    0
#define LC2     0
#define LC3     0
#define MIXPC   0
#define AZTEC   0
#ifdef __SMALL__                        /* small code, small data */
#define SPTR    1
#define LPTR    0
#endif
#ifdef __LARGE__                        /* large code, large data */
#define SPTR    0
#define LPTR    1
#endif
#ifdef __COMPACT__                      /* small code, large data */
#define SPTR    0
#define LPTR    1
#endif
#ifdef __MEDIUM__                       /* large code, small data */
#define SPTR    1
#define LPTR    0
#endif
#ifdef __HUGE__                         /* large code, large data */
#define SPTR    0
#define LPTR    1
#endif
#define LATTICE 1
#endif

#define TRUE    1                       /* truth */
#define FALSE   0                       /* lies */
#define The_BOSS TRUE                   /* convienent equate */

#include "stdio.h"                      /* standard header */
#if CI86
char *malloc(), *calloc();              /* for the OLD TIMER */
#else
#include "stdlib.h"                     /* For the rest */
#endif
#if LC6
#include "string.h"                     /* Now for Lattice 6.XX */
#endif

#if BORLAND | MSC | DLC | LC2 | LC3 | MIXPC | WATCOM | CI86
#if AZTEC
#else
#include "dos.h"                        /* Lattice stuff */
#endif
#endif
#include "ctype.h"                      /* character conversion stuff */
#if MSC4
#include "stdarg.h"                     /* variable arg list marcos */
#endif

#if AZTEC                               /* AZTEC DOS.H */

struct WORDREGS {
    unsigned int ax;
    unsigned int bx;
    unsigned int cx;
    unsigned int dx;
    unsigned int si;
    unsigned int di;
    unsigned int cflag;
    };

struct BYTEREGS {
    unsigned char al, ah;
    unsigned char bl, bh;
    unsigned char cl, ch;
    unsigned char dl, dh;
    };

union REGS {
    struct WORDREGS x;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -