1 /* $Id: tools.h,v 1.4 2000/11/16 14:21:31 amura Exp $ */ 2 /* OS dependent code used by Ng for WinCE. 3 * Copyright (C) 1998 Eiichiro Ito 4 * Modified for Ng for Win32 5 * Copyright (C) 1999,2000 Toru Imai 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * ree Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 */ 21 22 /* 23 * $Log: tools.h,v $ 24 * Revision 1.4 2000/11/16 14:21:31 amura 25 * merge Ng for win32 0.5 26 * 27 * Revision 1.3 2000/10/23 16:52:51 amura 28 * add GPL copyright to header 29 * 30 * Revision 1.2 2000/07/18 12:40:35 amura 31 * for Win32, enable to handle japanese directory 32 * 33 * Revision 1.1.1.1 2000/06/27 01:48:00 amura 34 * import to CVS 35 * 36 */ 37 38 #ifndef APP_TOOLS1 39 #define APP_TOOLS1 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 BOOL Fopen( LPCTSTR path, LPCTSTR modestr ) ; 46 void Fclose( void ) ; 47 int Fgetc( void ) ; 48 char* Fgets( char *buf, int size ) ; 49 int Fputc( int c ) ; 50 int Fputs( const char *buf ) ; 51 void Fwrite( const char *buf, int size ) ; 52 BOOL Ferror( void ) ; 53 void slash2backslash( LPTSTR str ) ; 54 void catdir( LPTSTR body, LPCTSTR adddir, LPTSTR pPrevDir ) ; 55 void rel2abs( LPTSTR newPath, LPCTSTR oldPath, LPCTSTR adddir ) ; 56 int SendClipboard( const char *sjis ) ; 57 int ReceiveClipboard(char *sjis, int bufsize); 58 59 int unicode2sjis(const char *src, unsigned char *dst, int max); 60 int sjis2unicode(const unsigned char *src, char *dst, int max); 61 TCHAR sjis2unicode_char(WORD sjis); 62 WORD unicode2sjis_char(TCHAR unicode); 63 LONG RegQueryString(HKEY, LPCTSTR, LPTSTR, LPTSTR, DWORD*); 64 LONG RegSetString(HKEY, LPCTSTR, LPTSTR, LPTSTR); 65 LONG RegSetBinary(HKEY, LPCTSTR, LPTSTR, LPBYTE, DWORD); 66 LONG RegSetDWord(HKEY, LPCTSTR, LPTSTR, DWORD); 67 DWORD RegQueryDWord(HKEY, LPCTSTR, LPTSTR); 68 LONG RegRemoveValue(HKEY, LPCTSTR, LPTSTR); 69 #ifdef __cplusplus 70 } ; 71 #endif 72 73 #ifdef KANJI 74 #define NGREGKEY TEXT("Software\\mg-developers\\Ng") 75 #define NGDEFAULTINIFILE TEXT("\\ng.ini") 76 #else 77 #define NGREGKEY TEXT("Software\\mg-developers\\MG") 78 #define NGDEFAULTINIFILE TEXT("\\mg.ini") 79 #endif 80 #define NGSTARTUPFILEVAL TEXT("Startup File") 81 #define NGCTRLKEYMAPVAL TEXT("Control Key Mapping") 82 #define NGBEEPSOUNDVAL TEXT("Beep Sound") 83 #define NGBEEPFILEVAL TEXT("Beep Sound File") 84 #define NGFONTNAMEVAL TEXT("Font Name") 85 #define NGFONTSIZEVAL TEXT("Font Size") 86 #define NGLINESPACEVAL TEXT("Line Space") 87 #define NGPREVPOSVAL TEXT("Previous Position") 88 #define NGKEYBOARDLOCALEVAL TEXT("Keyboard Locale") 89 90 #define NGKEYBOARD_US 1 91 #define NGKEYBOARD_JP 81 92 93 #define NG_WAVE_OFFSET 2 94 95 #endif /* APP_TOOLS1 */ 96