1 /***************************************************************************/ 2 /* Copyright (c) 2016 Linas Vepstas */ 3 /* Copyright (c) 2016 Amir Plivatsky */ 4 /* All rights reserved */ 5 /* */ 6 /* Use of the link grammar parsing system is subject to the terms of the */ 7 /* license set forth in the LICENSE file included with this software. */ 8 /* This license allows free redistribution and use in source and binary */ 9 /* forms, with or without modification, subject to certain conditions. */ 10 /* */ 11 /***************************************************************************/ 12 13 #ifndef _PARSER_UTILITIES_ 14 #define _PARSER_UTILITIES_ 15 16 #include "../link-grammar/link-includes.h" 17 18 char *expand_homedir(const char *fn); 19 20 #define MAX_INPUT 2048 21 22 #ifdef _WIN32 23 #ifndef __MINGW32__ 24 /* There is no ssize_t definition in native Windows. */ 25 #include <BaseTsd.h> 26 typedef SSIZE_T ssize_t; 27 #endif 28 29 #define strcasecmp _stricmp 30 #ifndef strncasecmp 31 #define strncasecmp _strnicmp 32 #endif 33 34 char *get_console_line(void); 35 void win32_set_utf8_output(void); 36 char **argv2utf8(int); 37 int lg_isatty(int); 38 #define isatty lg_isatty 39 #endif /* _WIN32 */ 40 41 #endif // _PARSER_UTILITIES_ 42