]> git.sur5r.net Git - cc65/blobdiff - include/conio.h
Stefan Haubenthal fixed a few typos.
[cc65] / include / conio.h
index 4a7bd0eb773d0708d50b638bbbf3b34ae9d20f5f..21a0c1ea7907a6ab826c6bed70a3c5db03e21946 100644 (file)
@@ -6,8 +6,8 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2004 Ullrich von Bassewitz                                       */
-/*               Römerstraße 52                                              */
+/* (C) 1998-2007 Ullrich von Bassewitz                                       */
+/*               Roemerstrasse 52                                            */
 /*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
@@ -77,8 +77,6 @@
 #  include <lynx.h>
 #elif defined(__NES__)
 #  include <nes.h>
-#else
-#  error "Unknown platform in conio.h"
 #endif
 
 
@@ -191,6 +189,34 @@ void __fastcall__ cputhex16 (unsigned val);
 
 
 
+/*****************************************************************************/
+/*                                  Macros                                   */
+/*****************************************************************************/
+
+
+
+/* On some platforms, functions are not available or are dummys. To suppress
+ * the call to these functions completely, the platform header files may
+ * define macros for these functions that start with an underline. If such a
+ * macro exists, a new macro is defined here, that expands to the one with the
+ * underline. The reason for this two stepped approach is that it is sometimes
+ * necessary to take the address of the function, which is not possible when
+ * using a macro. Since the function prototype is still present, #undefining
+ * the macro will give access to the actual function.
+ */
+
+#if defined(_textcolor)
+#  define textcolor(x)          _textcolor(x)
+#endif
+#if defined(_bgcolor)
+#  define bgcolor(x)            _bgcolor(x)
+#endif
+#if defined(_bordercolor)
+#  define bordercolor(x)        _bordercolor(x)
+#endif
+
+
+
 /* End of conio.h */
 #endif