Debian Codegraph @

terps/tads/glk/osgarglk.h

raw symbols SCIP
1 /******************************************************************************
2 * *
3 * Copyright (C) 2006-2009 by Tor Andersson. *
4 * Copyright (C) 2010 by Ben Cressey. *
5 * *
6 * This file is part of Gargoyle. *
7 * *
8 * Gargoyle is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * Gargoyle is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with Gargoyle; if not, write to the Free Software *
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
21 * *
22 *****************************************************************************/
23
24 #ifndef OSGARGLK_H
25 #define OSGARGLK_H
26
27 #define USE_OS_LINEWRAP /* tell tads not to let os do paging */
28
29 #include <stdlib.h>
30 #include <string.h>
31 #include <stdio.h>
32 #include <stdint.h>
33 #include <stdarg.h>
34
35 #ifndef _MSC_VER
36 /* For strcasecmp() */
37 #include <strings.h>
38 #endif
39
40 #define TRUE 1
41 #define FALSE 0
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47 #include "osfrobtads.h"
48
49 #define TADS_OEM_NAME "Mr Oizo"
50
51 #ifndef _MSC_VER
52 /* Replace stricmp with strcasecmp */
53 #define strnicmp strncasecmp
54 #define stricmp strcasecmp
55 #endif
56
57 #define memicmp os_memicmp
58
59 int os_memicmp(const char *a, const char *b, int n);
60
61 #define OS_SYSTEM_NAME "Gargoyle"
62
63 #define OSFNMAX 1024
64
65 #ifdef _WIN32
66 #define OSPATHCHAR '\\'
67 #define OSPATHALT "/:"
68 #define OSPATHURL "\\/"
69 #define OSPATHSEP ';'
70 #define OS_NEWLINE_SEQ "\r\n"
71 #else
72 #define OSPATHCHAR '/'
73 #define OSPATHALT ""
74 #define OSPATHURL "/"
75 #define OSPATHSEP ':'
76 #define OS_NEWLINE_SEQ "\n"
77 #endif
78
79 #define OSPATHPWD "."
80
81 void os_put_buffer (unsigned char *buf, size_t len);
82 void os_get_buffer (unsigned char *buf, size_t len, size_t init);
83 unsigned char *os_fill_buffer (unsigned char *buf, size_t len);
84
85 #define OS_MAXWIDTH 255
86
87 #define OS_ATTR_HILITE OS_ATTR_BOLD
88 #define OS_ATTR_EM OS_ATTR_ITALIC
89 #define OS_ATTR_STRONG OS_ATTR_BOLD
90
91 #define OS_DECLARATIVE_TLS
92 #define OS_DECL_TLS(t, v) t v
93
94 int os_vasprintf(char **bufptr, const char *fmt, va_list ap);
95
96 #ifdef __cplusplus
97 }
98 #endif
99
100 #endif /* OSGARGLK_H */