public.h

来自「运行环境:DOS, 通过串口升级的下位程序, 需配合上位升级程序FileUpgr」· C头文件 代码 · 共 36 行

H
36
字号
#ifndef _CLASS_PUBLIC_H__
#define _CLASS_PUBLIC_H__
#include <io.h>
#include <stdio.h>
#include <conio.h>
#include <dir.h>
#include <dos.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>

/////////////////////////////////////////////////////////////////////////////
#define ULongInt(s)   (*(unsigned long int *)(s))
#define UShortInt(s)  (*(unsigned short int *)(s))
#define LongInt(s)    (*(long int *)(s))
#define ShortInt(s)   (*(signed short int *)(s))
#define ULongInt(s)   (*(unsigned long int *)(s))
#define UShortInt(s)  (*(unsigned short int *)(s))
#define LongInt(s)    (*(long int *)(s))
#define ShortInt(s)   (*(signed short int *)(s))


extern void RuningOK();
extern unsigned long ftonl(unsigned long t);
extern unsigned short ftons(unsigned short t);
extern unsigned long ftonl(const void *t);
extern unsigned short ftons(const void *t);
inline void flush(FILE *stream)
{
   fflush(stream);
   close(dup(fileno(stream)));
}

#define DELETE(x)  if(x) delete[](x);x=NULL;
#define FCLOSE(x)  if(x) fclose(x);x=NULL;
#endif

⌨️ 快捷键说明

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