X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Flib_head.h;h=cf50054db81d27a97944abb6d3e47069ae66b74c;hb=5ab89616163e37b41b208796e3455b891bda44dc;hp=560ea8adf4e4c8d9b4da77c152c50428b772387b;hpb=676e5f342c49b655bbc936225bf4524d1fbedc36;p=16.git diff --git a/src/lib/lib_head.h b/src/lib/lib_head.h index 560ea8ad..cf50054d 100644 --- a/src/lib/lib_head.h +++ b/src/lib/lib_head.h @@ -1,10 +1,35 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 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. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + #ifndef _LIBHEAD_H_ #define _LIBHEAD_H_ +#include #include #include #include // just for wait #include // just for wait -#include "src\lib\types.h" +#include +#include +#include "src/lib/types.h" /* Control codes for all keys on the keyboard */ //here temperarly @@ -98,13 +123,22 @@ #define KEY_MENU (0x75) */ -//typedef unsigned char byte; -//typedef unsigned int word; -//typedef unsigned short syte; +static dword far* clockdw= (dword far*) 0x046C; /* 18.2hz clock */ -void wait(clock_t wait); +#define nil ((void *)0) + +#define peekb(segm,ofs) (*(byte far*)MK_FP((segm),(ofs))) +#define peekw(segm,ofs) (*(word far*)MK_FP((segm),(ofs))) +#define pokeb(segm,ofs,value) (peekb((segm),(ofs)) = (byte)(value)) +#define pokew(segm,ofs,value) (peekw((segm),(ofs)) = (word)(value)) -/* THIS FUNCTION CONVERTS A POINTER TO AN INTEL LONG */ -//int long ptr2long(char *p); +typedef union REGPACK regs_t; +typedef enum {false,true} boolean; + +void wait(clock_t wait); +void* AllocateLargestFreeBlock(size_t* Size); +size_t GetFreeSize(void); +long int filesize(FILE *fp); +int US_CheckParm(char *parm,char **strings); #endif/*_LIBHEAD_H_*/