00001 /* -*- mode: C; c-file-style: "bsd"; tab-width: 4 -*- */ 00002 /* pilotcompat.h - non-Pilot compatibility defines, particularly for Unix. 00003 * JStroke 1.x - Japanese Kanji handwriting recognition technology demo. 00004 * Copyright (C) 1997 Robert E. Wells 00005 * http://wellscs.com/pilot 00006 * mailto:robert@wellscs.com 00007 * 00008 * This program is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU General Public License 00010 * as published by the Free Software Foundation; either version 2 00011 * of the License, or (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program (gpl.html); if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 * 00022 * pilotcompat.h created by Owen Taylor <owt1@cornell.edu>, 9/1997. 00023 * Owen is using the jstroke recognition code on Linux in his KanjiPad 00024 * application, and uses pilotcompat.h to provide compatibility with some 00025 * Pilot environment definitions. Owen says: "It's a rough attempt - 00026 * it probably would need some small changes for machines where malloc 00027 * returns (char *) instead of (void *)." -19970907. 00028 * 00029 * -------------------------------------------------------------------------*/ 00030 00031 #ifndef __PILOTCOMPAT_H__ 00032 #define __PILOTCOMPAT_H__ 00033 00034 #include <basic.h> 00035 #include <bstdio.h> 00036 #include <bstdlib.h> 00037 #include <bstring.h> 00038 00039 typedef int Boolean; 00040 typedef unsigned char Byte; 00041 typedef long Long; 00042 typedef unsigned long ULong; 00043 typedef unsigned int UInt; 00044 typedef void * VoidPtr; 00045 typedef char * CharPtr; 00046 00047 #define MemPtrNew malloc 00048 #define MemPtrFree free 00049 #define StrLen strlen 00050 #define StrIToA(str, n) sprintf((str),"%ld",(long)(n)) 00051 #define StrIToH(str, n) sprintf((str),"%lx",(long)(n)) 00052 #define false 0 00053 #define true 1 00054 00055 #endif /*__PILOTCOMPAT_H__*/ 00056 /* ----- End of pilotcompat.h --------------------------------------------- */