+/* 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 <http://www.gnu.org/licenses/>, 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 <i86.h>
#include <dos.h>
#include <stdio.h>
#include <conio.h> // just for wait
#include <time.h> // just for wait
-#include "src\lib\types.h"
+#include <stdlib.h>
+#include <ctype.h>
+#include "src/lib/types.h"
/* Control codes for all keys on the keyboard */
//here temperarly
+/*
#define KEY_A (0x1E)
#define KEY_B (0x30)
#define KEY_C (0x2E)
#define KEY_8 (0x09)
#define KEY_9 (0x0A)
#define KEY_0 (0x0B)
-#define KEY_DASH (0x0C) /* -_ */
-#define KEY_EQUAL (0x0D) /* =+ */
-#define KEY_LBRACKET (0x1A) /* [{ */
-#define KEY_RBRACKET (0x1B) /* ]} */
-#define KEY_SEMICOLON (0x27) /* ;: */
-#define KEY_RQUOTE (0x28) /* '" */
-#define KEY_LQUOTE (0x29) /* `~ */
-#define KEY_PERIOD (0x33) /* .> */
-#define KEY_COMMA (0x34) /* ,< */
-#define KEY_SLASH (0x35) /* /? */
-#define KEY_BACKSLASH (0x2B) /* \| */
+#define KEY_DASH (0x0C) // -_
+#define KEY_EQUAL (0x0D) // =+
+#define KEY_LBRACKET (0x1A) // [{
+#define KEY_RBRACKET (0x1B) // ]}
+#define KEY_SEMICOLON (0x27) // ;:
+#define KEY_RQUOTE (0x28) // '"
+#define KEY_LQUOTE (0x29) // `~
+#define KEY_PERIOD (0x33) // .>
+#define KEY_COMMA (0x34) // ,<
+#define KEY_SLASH (0x35) // /?
+#define KEY_BACKSLASH (0x2B) // \|
#define KEY_F1 (0x3B)
#define KEY_F2 (0x3C)
#define KEY_F3 (0x3D)
#define KEY_LWIN (0x73)
#define KEY_RWIN (0x74)
#define KEY_MENU (0x75)
+*/
+
+static dword far* clockdw= (dword far*) 0x046C; /* 18.2hz clock */
+
+#define nil ((void *)0)
+#define peekb(segm,ofs) (*(byte far*)MK_FP((segm),(ofs)))\r
+#define peekw(segm,ofs) (*(word far*)MK_FP((segm),(ofs)))\r
+#define pokeb(segm,ofs,value) (peekb((segm),(ofs)) = (byte)(value))\r
+#define pokew(segm,ofs,value) (peekw((segm),(ofs)) = (word)(value))\r
-//typedef unsigned char byte;
-//typedef unsigned int word;
-//typedef unsigned short syte;
+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_*/