Parcourir la source

C headers: for now, surround #inclusion of default.h by #ifndef KERNEL_NEW.
kernel.h: use #include "..." instead of #include <...> so that the modified versions of the same folder can be used.

git-svn-id: file:///var/svn/tigccpp/branches/include@1291 9552661e-59e3-4036-b4f2-dbe53926924f

debrouxl il y a 15 ans
Parent
commit
97d417b54a
52 fichiers modifiés avec 146 ajouts et 45 suppressions
  1. 2 0
      C/alloc.h
  2. 2 0
      C/args.h
  3. 2 0
      C/asmtypes.h
  4. 2 0
      C/assert.h
  5. 2 0
      C/bascmd.h
  6. 2 0
      C/basfunc.h
  7. 2 0
      C/basop.h
  8. 2 0
      C/cert.h
  9. 2 0
      C/compat.h
  10. 2 0
      C/ctype.h
  11. 2 0
      C/dialogs.h
  12. 2 0
      C/dll.h
  13. 2 0
      C/doors.h
  14. 2 0
      C/error.h
  15. 2 0
      C/estack.h
  16. 2 0
      C/events.h
  17. 2 0
      C/files.h
  18. 2 0
      C/flash.h
  19. 2 0
      C/float.h
  20. 2 0
      C/gdraw.h
  21. 2 0
      C/graph.h
  22. 2 0
      C/graphing.h
  23. 2 0
      C/gray.h
  24. 2 0
      C/homescr.h
  25. 2 0
      C/intr.h
  26. 2 0
      C/kbd.h
  27. 45 45
      C/kernel.h
  28. 2 0
      C/limits.h
  29. 2 0
      C/link.h
  30. 2 0
      C/math.h
  31. 2 0
      C/mem.h
  32. 2 0
      C/menus.h
  33. 2 0
      C/nostub.h
  34. 2 0
      C/peekpoke.h
  35. 2 0
      C/rsa.h
  36. 2 0
      C/setjmp.h
  37. 2 0
      C/sprites.h
  38. 2 0
      C/statline.h
  39. 2 0
      C/stdarg.h
  40. 2 0
      C/stddef.h
  41. 2 0
      C/stdint.h
  42. 2 0
      C/stdio.h
  43. 2 0
      C/stdlib.h
  44. 2 0
      C/string.h
  45. 2 0
      C/system.h
  46. 2 0
      C/textedit.h
  47. 1 0
      C/tigcclib.h
  48. 2 0
      C/timath.h
  49. 2 0
      C/unknown.h
  50. 2 0
      C/values.h
  51. 2 0
      C/vat.h
  52. 2 0
      C/wingraph.h

+ 2 - 0
C/alloc.h

@@ -1,7 +1,9 @@
 #ifndef __ALLOC
 #define __ALLOC
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define H_NULL 0

+ 2 - 0
C/args.h

@@ -1,7 +1,9 @@
 #ifndef __ARGS
 #define __ARGS
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define NULL ((void*)0)

+ 2 - 0
C/asmtypes.h

@@ -1,7 +1,9 @@
 #ifndef __ASMTYPES
 #define __ASMTYPES
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 typedef unsigned short BOOL;

+ 2 - 0
C/assert.h

@@ -1,7 +1,9 @@
 #ifndef __ASSERT
 #define __ASSERT
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #ifndef NDEBUG
 

+ 2 - 0
C/bascmd.h

@@ -1,7 +1,9 @@
 #ifndef __BASCMD
 #define __BASCMD
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #ifndef __HAVE_ESQ

+ 2 - 0
C/basfunc.h

@@ -1,7 +1,9 @@
 #ifndef __BASFUNC
 #define __BASFUNC
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define NULL_INDEX ((CESI)0)

+ 2 - 0
C/basop.h

@@ -1,7 +1,9 @@
 #ifndef __BASOP
 #define __BASOP
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #ifndef __HAVE_ESQ

+ 2 - 0
C/cert.h

@@ -1,7 +1,9 @@
 #ifndef __CERT
 #define __CERT
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define H_NULL 0

+ 2 - 0
C/compat.h

@@ -1,7 +1,9 @@
 #ifndef __COMPAT
 #define __COMPAT
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define KEY_DIAMOND (PSEUDO_CONST_KBD(16384,8192))

+ 2 - 0
C/ctype.h

@@ -1,7 +1,9 @@
 #ifndef __CTYPE_H
 #define __CTYPE_H
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* NOTE: These macros use GNU C extensions for defining safe and "smart" */
 /* macros, so they are not portable to other C dialects                  */

+ 2 - 0
C/dialogs.h

@@ -1,7 +1,9 @@
 #ifndef __DIALOGS
 #define __DIALOGS
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #define DialogAddScroll(h,x,y,w,g,f,t,p,u,m) DialogAdd(h,0,x,y,3,(short)w,(short)g,(short)f,(short)t,(short)p,(short)u,(short)m)
 

+ 2 - 0
C/dll.h

@@ -1,7 +1,9 @@
 #ifndef __DLL
 #define __DLL
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #define __DLL_SIGNATURE 0x444C4C20
 typedef struct{unsigned long Signature,ID;unsigned short major,minor;void*jump_table[];}__DLL_interface_struct;

+ 2 - 0
C/doors.h

@@ -8,7 +8,9 @@
 
 #else
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 #define __REDEFINE_ALL_ROM_CALLS
 #include <romsymb.h>
 

+ 2 - 0
C/error.h

@@ -1,7 +1,9 @@
 #ifndef __ERROR
 #define __ERROR
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #ifndef __HAVE_Bool

+ 2 - 0
C/estack.h

@@ -1,7 +1,9 @@
 #ifndef __ESTACK
 #define __ESTACK
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #define _push_zstr(s) ({register const char*__p=(s);register long __l=_rom_call(long,(const char*),27E)(__p);char __s[__l+2];__s[0]=0;push_expr_quantum(_rom_call(char*,(char*,const char*),26C)(__s+1,__p)+__l,STR_TAG);})
 #define _push_zstr_const(s) (push_expr_quantum(SYMSTR(s),STR_TAG))

+ 2 - 0
C/events.h

@@ -1,7 +1,9 @@
 #ifndef __EVENTS
 #define __EVENTS
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define MO_option ((unsigned short*const)(_rom_call_addr_hack(447,(((unsigned short*const)(long)*(short*)((char*)MO_currentOptions+6))),200)))

+ 2 - 0
C/files.h

@@ -1,7 +1,9 @@
 #ifndef __FILES
 #define __FILES
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #ifndef __HAVE_FindOptions

+ 2 - 0
C/flash.h

@@ -1,7 +1,9 @@
 #ifndef __FLASH
 #define __FLASH
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #define __EM_findEmptySlot _rom_call(void*,(long,short),15F)
 

+ 2 - 0
C/float.h

@@ -1,7 +1,9 @@
 #ifndef __FLOAT_H
 #define __FLOAT_H
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define DBL_DIG 16

+ 2 - 0
C/gdraw.h

@@ -1,7 +1,9 @@
 #ifndef __GDRAW
 #define __GDRAW
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #ifndef __HAVE_GraphModes

+ 2 - 0
C/graph.h

@@ -1,7 +1,9 @@
 #ifndef __GRAPH
 #define __GRAPH
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define BITMAP_HDR_SIZE 4

+ 2 - 0
C/graphing.h

@@ -1,7 +1,9 @@
 #ifndef __GRAPHING
 #define __GRAPHING
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #ifndef __HAVE_Attrs

+ 2 - 0
C/gray.h

@@ -1,7 +1,9 @@
 #ifndef __GRAY
 #define __GRAY
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /*===========================================================================*/
 /*                                                                           */

+ 2 - 0
C/homescr.h

@@ -1,7 +1,9 @@
 #ifndef __HOMESCR
 #define __HOMESCR
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 typedef void(*__HS_pushEmptyFIFONode__type__)(short)__ATTR_TIOS__;
 extern __HS_pushEmptyFIFONode__type__ __get_HS_pushEmptyFIFONode(void)__ATTR_LIB_C__;

+ 2 - 0
C/intr.h

@@ -1,7 +1,9 @@
 #ifndef __INTR
 #define __INTR
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 extern void __attribute__((__may_alias__)) __dummy_handler__;
 

+ 2 - 0
C/kbd.h

@@ -1,7 +1,9 @@
 #ifndef __KBD
 #define __KBD
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* We have to use this internal macro since _keytest needs to be able to
    accept single parameters (in particular, the RR_... constant pairs). */

+ 45 - 45
C/kernel.h

@@ -170,57 +170,57 @@ void	kernel_RegisterVector (unsigned short vect asm("d0"), const void *func asm(
 extern const char kernel_SystemDir[];
 
 /* Use other TIGCC headers */
-#include <alloc.h>
-#include <args.h>
-#include <asmtypes.h>
-#include <assert.h>
-#include <bascmd.h>
-#include <basfunc.h>
-#include <basop.h>
-#include <cert.h>
+#include "alloc.h"
+#include "args.h"
+#include "asmtypes.h"
+#include "assert.h"
+#include "bascmd.h"
+#include "basfunc.h"
+#include "basop.h"
+#include "cert.h"
 // HEADER NOT INCLUED FOR NOW: compat.h (FIXME)
-#include <ctype.h>
+#include "ctype.h"
 // HEADER NOT INCLUED FOR NOW: default.h (FIXME)
-#include <dialogs.h>
+#include "dialogs.h"
 // HEADER NOT INCLUED: dll.h
 // HEADER IS INCOMPATIBLE WITH THIS ONE: doors.h
-#include <error.h>
-#include <estack.h>
-#include <events.h>
-#include <files.h>
-#include <flash.h> // TODO: merge FL_getHardwareParmBlock definitions.
-#include <float.h>
-#include <gdraw.h>
-#include <graph.h>
-#include <graphing.h>
+#include "error.h"
+#include "estack.h"
+#include "events.h"
+#include "files.h"
+#include "flash.h" // TODO: merge FL_getHardwareParmBlock definitions.
+#include "float.h"
+#include "gdraw.h"
+#include "graph.h"
+#include "graphing.h"
 // HEADER NOT INCLUED: gray.h
-#include <homescr.h>
-#include <intr.h>
-#include <kbd.h>
-#include <limits.h>
-#include <link.h>
-#include <mem.h>
-#include <menus.h>
+#include "homescr.h"
+#include "intr.h"
+#include "kbd.h"
+#include "limits.h"
+#include "link.h"
+#include "mem.h"
+#include "menus.h"
 // HEADER NOT INCLUED: nostub.h
-#include <peekpoke.h>
-#include <rsa.h>
-#include <setjmp.h>
-#include <sprites.h>
-#include <statline.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h> // TODO: modify the #ifndef DOORS.
-#include <string.h>
-#include <system.h>
-#include <textedit.h>
-#include <timath.h>
-#include <unknown.h> // HEADER NOT INCLUED ??
-#include <values.h>
-#include <vat.h>
-//#include <version.h> HEADER NOT INCLUED MAYBE ?
-#include <wingraph.h>
+#include "peekpoke.h"
+#include "rsa.h"
+#include "setjmp.h"
+#include "sprites.h"
+#include "statline.h"
+#include "stdarg.h"
+#include "stddef.h"
+#include "stdint.h"
+#include "stdio.h"
+#include "stdlib.h" // TODO: modify the #ifndef DOORS.
+#include "string.h"
+#include "system.h"
+#include "textedit.h"
+#include "timath.h"
+#include "unknown.h" // HEADER NOT INCLUED ??
+#include "values.h"
+#include "vat.h"
+//#include "version.h" HEADER NOT INCLUED MAYBE ?
+#include "wingraph.h"
 
 
 /* From tigcclib.h */

+ 2 - 0
C/limits.h

@@ -1,7 +1,9 @@
 #ifndef __LIMITS
 #define __LIMITS
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #ifdef __CHAR_UNSIGNED__
 #define CHAR_MAX 255

+ 2 - 0
C/link.h

@@ -1,7 +1,9 @@
 #ifndef __LINK
 #define __LINK
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define NULL ((void*)0)

+ 2 - 0
C/math.h

@@ -1,7 +1,9 @@
 #ifndef __MATH
 #define __MATH
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define HALF_PI (1.570796326794897)

+ 2 - 0
C/mem.h

@@ -1,7 +1,9 @@
 #ifndef __MEM
 #define __MEM
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define NULL ((void*)0)

+ 2 - 0
C/menus.h

@@ -1,7 +1,9 @@
 #ifndef __MENUS
 #define __MENUS
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* These constants are needed for use in "asm" statements */
 asm(".set MT_TEXT,0x8000");

+ 2 - 0
C/nostub.h

@@ -8,7 +8,9 @@
 
 #else
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #ifndef _GENERIC_ARCHIVE
 

+ 2 - 0
C/peekpoke.h

@@ -1,7 +1,9 @@
 #ifndef __PEEKPOKE
 #define __PEEKPOKE
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define peek_bit(addr,bit) (!!(*((unsigned char*)(long)(addr))&(1<<(bit))))

+ 2 - 0
C/rsa.h

@@ -1,7 +1,9 @@
 #ifndef __RSA
 #define __RSA
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 typedef struct{unsigned char Len;unsigned char Data[];}BN;

+ 2 - 0
C/setjmp.h

@@ -1,7 +1,9 @@
 #ifndef __SETJMP
 #define __SETJMP
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 typedef struct{unsigned long D2,D3,D4,D5,D6,D7;unsigned long A2,A3,A4,A5,A6,A7;unsigned long PC;}JMP_BUF[1];

+ 2 - 0
C/sprites.h

@@ -1,7 +1,9 @@
 #ifndef __SPRITES
 #define __SPRITES
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 enum SprtModes{SPRT_XOR,SPRT_OR,SPRT_AND};

+ 2 - 0
C/statline.h

@@ -1,7 +1,9 @@
 #ifndef __STATLINE
 #define __STATLINE
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #ifndef __HAVE_Bool

+ 2 - 0
C/stdarg.h

@@ -1,7 +1,9 @@
 #ifndef __STDARG
 #define __STDARG
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #ifndef __HAVE_va_list

+ 2 - 0
C/stddef.h

@@ -1,7 +1,9 @@
 #ifndef __STDDEF
 #define __STDDEF
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define NULL ((void*)0)

+ 2 - 0
C/stdint.h

@@ -1,7 +1,9 @@
 #ifndef __STDINT
 #define __STDINT
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define INT_FAST16_MAX (32767)

+ 2 - 0
C/stdio.h

@@ -1,7 +1,9 @@
 #ifndef __STDIO
 #define __STDIO
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define EOF (-1)

+ 2 - 0
C/stdlib.h

@@ -1,7 +1,9 @@
 #ifndef __STDLIB
 #define __STDLIB
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #ifndef DOORS
 #define ldiv(n,d) ({ldiv_t __r;long __n=(n),__d=(d);asm("move.l 0xC8,%%a5;move.l %2,%%d1;move.l %3,%%d0;move.l (%%a5,2720),%%a0;jsr (%%a0);move.l %%d1,%0;move.l %2,%%d1;move.l %3,%%d0;move.l (%%a5,2724),%%a0;jsr (%%a0);move.l %%d1,%1" : "=&g"(__r.quot),"=g"(__r.rem) : "g"(__n),"g"(__d) : "a0","a1","a5","d0","d1","d2");__r;})

+ 2 - 0
C/string.h

@@ -1,7 +1,9 @@
 #ifndef __STRING
 #define __STRING
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define NULL ((void*)0)

+ 2 - 0
C/system.h

@@ -1,7 +1,9 @@
 #ifndef __SYSTEM
 #define __SYSTEM
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define KB_AUTOREPEAT (1<<11)

+ 2 - 0
C/textedit.h

@@ -1,7 +1,9 @@
 #ifndef __TEXTEDIT
 #define __TEXTEDIT
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define TE_FAR_RIGHT (0xFFFF)

+ 1 - 0
C/tigcclib.h

@@ -35,6 +35,7 @@
 #include <statline.h>
 #include <stdarg.h>
 #include <stddef.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 2 - 0
C/timath.h

@@ -1,7 +1,9 @@
 #ifndef __TIMATH
 #define __TIMATH
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define FIVE (5.)

+ 2 - 0
C/unknown.h

@@ -1,7 +1,9 @@
 #ifndef __UNKNOWN
 #define __UNKNOWN
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define SYM_LEN 8

+ 2 - 0
C/values.h

@@ -1,7 +1,9 @@
 #ifndef __VALUES
 #define __VALUES
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 #ifdef __INT_SHORT__
 #define MAXINT 0x7FFF

+ 2 - 0
C/vat.h

@@ -1,7 +1,9 @@
 #ifndef __VAT
 #define __VAT
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 void *alloca(long)__ATTR_GCC__;
 #define SYMSTR_CONST(s) ((SYM_STR)(("\0"s)+sizeof(s)))

+ 2 - 0
C/wingraph.h

@@ -1,7 +1,9 @@
 #ifndef __WINGRAPH
 #define __WINGRAPH
 
+#ifndef KERNEL_NEW
 #include <default.h>
+#endif
 
 /* Begin Auto-Generated Part */
 #define BITMAP_HDR_SIZE 4