From 057884ffa921eb2b19b152a1623da4d318d17e12 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Thu, 2 Jan 2014 19:28:22 +0100 Subject: [PATCH 01/76] Atari: initial support to create cassette bootable programs -- unfinished --- cfg/atari-cassette.cfg | 53 ++++++++++++++++++++++++++++++++++++++++++ libsrc/atari/cashdr.s | 40 +++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 cfg/atari-cassette.cfg create mode 100644 libsrc/atari/cashdr.s diff --git a/cfg/atari-cassette.cfg b/cfg/atari-cassette.cfg new file mode 100644 index 000000000..ba640a54e --- /dev/null +++ b/cfg/atari-cassette.cfg @@ -0,0 +1,53 @@ +FEATURES { + STARTADDRESS: default = $1000; +} +SYMBOLS { +_cas_init: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __STARTADDRESS__: type = export, value = %S; + __RESERVED_MEMORY__: type = weak, value = $0000; +} +MEMORY { + ZP: file = "", define = yes, start = $0082, size = $007E; + +# file header, just $FFFF +# HEADER: file = "", start = $0000, size = $0002; + +# CASHDR: file = %O, start = $3FD, size = 128, fill = yes; + CASHDR: file = %O, start = $0, size = 6; +# "main program" load chunk +# MAINHDR: file = "", start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S; +# TRAILER: file = "", start = $0000, size = $0006; +} +SEGMENTS { +# EXEHDR: load = HEADER, type = ro; +# MAINHDR: load = MAINHDR, type = ro; + CASHDR: load = CASHDR, type = ro; + CASINIT: load = RAM, type = ro; + STARTUP: load = RAM, type = ro, define = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; + INIT: load = RAM, type = ro, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; + EXTZP: load = ZP, type = zp, optional = yes; +# AUTOSTRT: load = TRAILER, type = ro; +} +FEATURES { + CONDES: type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__, + segment = INIT; + CONDES: type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__, + segment = RODATA; + CONDES: type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__, + segment = RODATA, + import = __CALLIRQ__; +} diff --git a/libsrc/atari/cashdr.s b/libsrc/atari/cashdr.s new file mode 100644 index 000000000..8d3d0868a --- /dev/null +++ b/libsrc/atari/cashdr.s @@ -0,0 +1,40 @@ +; +; Cassette boot file header +; +; Christian Groessler, chris@groessler.org, 2013 +; + +.ifndef __ATARIXL__ + + .include "atari.inc" + + .import __BSS_RUN__, __STARTADDRESS__, start + .export _cas_init + +.segment "CASHDR" + + .byte 0 ; ignored + .byte <((__BSS_RUN__ - __STARTADDRESS__ + 127 + 6) / 128) + .word __STARTADDRESS__ + .word _cas_init + +.segment "CASINIT" + + lda #33 + ldy #80 + sta (SAVMSC),y + clc + rts + +_cas_init: + lda #34 + ldy #81 + sta (SAVMSC),y + + lda #start + sta DOSVEC+1 + rts + +.endif ; .ifdef __ATARIXL__ From 2ab89621a9cee8cf32176f750d9ac9ffedaef7e0 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Thu, 2 Jan 2014 21:45:12 +0100 Subject: [PATCH 02/76] Use deferred VBI instead of immediate VBI. A deferred VBI won't be called if the user program has interrupts disabled which makes it easier to avoid race conditions. --- libsrc/atari/irq.s | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libsrc/atari/irq.s b/libsrc/atari/irq.s index 8ec1b12df..9f12d47ed 100644 --- a/libsrc/atari/irq.s +++ b/libsrc/atari/irq.s @@ -16,11 +16,11 @@ .segment "INIT" initirq: - lda VVBLKI - ldx VVBLKI+1 + lda VVBLKD + ldx VVBLKD+1 sta IRQInd+1 stx IRQInd+2 - lda #6 + lda #7 ldy #IRQStub jsr SETVBV @@ -31,7 +31,7 @@ initirq: .code doneirq: - lda #6 + lda #7 ldy IRQInd+1 ldx IRQInd+2 jsr SETVBV @@ -44,7 +44,6 @@ doneirq: IRQStub: cld ; Just to be sure .ifdef __ATARIXL__ - pha .ifdef CHARGEN_RELOC lda CHBAS pha @@ -64,7 +63,6 @@ IRQStub: sta CHBAS sta CHBASE .endif - pla .endif jmp IRQInd ; Jump to the saved IRQ vector From 95c6063f909e6e5c6bf9330e23cb472c12914005 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 3 Jan 2014 23:40:22 +0100 Subject: [PATCH 03/76] Add "joystick mouse" driver and default mouse callback routine (not using P/M graphics). --- libsrc/atari/libref.s | 3 +- libsrc/atari/mcbdefault.s | 114 ++++++++ libsrc/atari/mou/atrjoy.s | 443 +++++++++++++++++++++++++++++++ libsrc/atari/mouse_stat_stddrv.s | 22 ++ libsrc/atari/mouse_stddrv.s | 18 ++ libsrc/atari/mul40.s | 2 +- 6 files changed, 600 insertions(+), 2 deletions(-) create mode 100644 libsrc/atari/mcbdefault.s create mode 100644 libsrc/atari/mou/atrjoy.s create mode 100644 libsrc/atari/mouse_stat_stddrv.s create mode 100644 libsrc/atari/mouse_stddrv.s diff --git a/libsrc/atari/libref.s b/libsrc/atari/libref.s index 8d96ff62d..e6b9df6a5 100644 --- a/libsrc/atari/libref.s +++ b/libsrc/atari/libref.s @@ -2,12 +2,13 @@ ; Oliver Schmidt, 2013-05-31 ; - .export em_libref, joy_libref, tgi_libref, ser_libref + .export em_libref, joy_libref, tgi_libref, ser_libref, mouse_libref .import _exit .import atari_ser_libref em_libref := _exit joy_libref := _exit +mouse_libref := _exit ser_libref := atari_ser_libref .ifdef __ATARIXL__ .import CIO_handler diff --git a/libsrc/atari/mcbdefault.s b/libsrc/atari/mcbdefault.s new file mode 100644 index 000000000..91e920ac4 --- /dev/null +++ b/libsrc/atari/mcbdefault.s @@ -0,0 +1,114 @@ +; +; Default mouse callbacks for the Ataris +; +; Christian Groessler, 03.01.2014 +; +; derived from Apple2 version by +; Oliver Schmidt, 22.09.2005 +; +; All functions in this module should be interrupt safe, because they may +; be called from an interrupt handler +; + + .export _mouse_def_callbacks + .importzp tmp4 + .import mul40,loc_tmp + + .include "atari.inc" + +; ------------------------------------------------------------------------ + + .bss + +backup: .res 1 +helper: .res 2 + +; ------------------------------------------------------------------------ + + .segment "EXTZP" : zeropage +scrptr: .res 2 + +; ------------------------------------------------------------------------ + + + .rodata + + ; Callback structure +_mouse_def_callbacks: + .addr hide + .addr show + .addr movex + .addr movey + +; ------------------------------------------------------------------------ + + .data + +cursor = 11 ; '+' screen code' + +; setcursor + +getcursor: +column: ldy #$00 ; Patched at runtime + lda (scrptr),y ; Patched at runtime + cmp #cursor + rts + +setcursor: + lda #cursor +setscr: sta (scrptr),y ; Patched at runtime + rts + +; ------------------------------------------------------------------------ + + .code + +done: + rts + +; Hide the mouse cursor. +hide: + jsr getcursor ; Cursor visible at current position? + bne done ; No, we're done + lda backup ; Get character at cursor position + jmp setscr ; Draw character + +; Show the mouse cursor. +show: + jsr getcursor ; Cursor visible at current position? + beq done ; Yes, we're done + sta backup ; Save character at cursor position + jmp setcursor ; Draw cursor + + +; Move the mouse cursor x position to the value in A/X. +movex: + cpx #0 + cpx #1 + ror a + lsr a ; convert to character position + lsr a + sta column+1 + rts + +; Move the mouse cursor y position to the value in A/X. +movey: + tax + ldy tmp4 ; mul40 uses tmp4 + lda loc_tmp ; and this local variable + pha + txa ; get parameter back + lsr a ; convert y position to character line + lsr a + lsr a + jsr mul40 + clc + adc SAVMSC + sta scrptr + txa + adc SAVMSC+1 + sta scrptr+1 + pla + sta loc_tmp + sty tmp4 + rts diff --git a/libsrc/atari/mou/atrjoy.s b/libsrc/atari/mou/atrjoy.s new file mode 100644 index 000000000..1a5afa71a --- /dev/null +++ b/libsrc/atari/mou/atrjoy.s @@ -0,0 +1,443 @@ +; +; Driver for a "joystick mouse". +; +; C128 version: Ullrich von Bassewitz, 2004-04-05, 2009-09-26 +; Adapted to Atari: Christian Groessler, 2014-01-02 +; + + .include "zeropage.inc" + .include "mouse-kernel.inc" + .include "atari.inc" + + .macpack generic + +; ------------------------------------------------------------------------ +; Header. Includes jump table + +.segment "JUMPTABLE" + +HEADER: + +; Driver signature + + .byte $6d, $6f, $75 ; "mou" + .byte MOUSE_API_VERSION ; Mouse driver API version number + +; Library reference + + .addr $0000 + +; Jump table + + .addr INSTALL + .addr UNINSTALL + .addr HIDE + .addr SHOW + .addr SETBOX + .addr GETBOX + .addr MOVE + .addr BUTTONS + .addr POS + .addr INFO + .addr IOCTL + .addr IRQ + +; Mouse driver flags + + .byte MOUSE_FLAG_LATE_IRQ + +; Callback table, set by the kernel before INSTALL is called + +CHIDE: jmp $0000 ; Hide the cursor +CSHOW: jmp $0000 ; Show the cursor +CMOVEX: jmp $0000 ; Move the cursor to X coord +CMOVEY: jmp $0000 ; Move the cursor to Y coord + + +;---------------------------------------------------------------------------- +; Constants + +SCREEN_HEIGHT = 191 +SCREEN_WIDTH = 319 + +.enum JOY + UP = $01 + DOWN = $02 + LEFT = $04 + RIGHT = $08 +.endenum + +;---------------------------------------------------------------------------- +; Global variables. The bounding box values are sorted so that they can be +; written with the least effort in the SETBOX and GETBOX routines, so don't +; reorder them. + +.bss + +Vars: +YPos: .res 2 ; Current mouse position, Y +XPos: .res 2 ; Current mouse position, X +XMin: .res 2 ; X1 value of bounding box +YMin: .res 2 ; Y1 value of bounding box +XMax: .res 2 ; X2 value of bounding box +YMax: .res 2 ; Y2 value of bounding box +Buttons: .res 1 ; Button mask + + +Temp: .res 1 ; Temporary value used in the int handler +visible: .res 1 + +; Default values for above variables + +.rodata + +.proc DefVars + .word SCREEN_HEIGHT/2 ; YPos + .word SCREEN_WIDTH/2 ; XPos + .word 0 ; XMin + .word 0 ; YMin + .word SCREEN_WIDTH ; XMax + .word SCREEN_HEIGHT ; YMax + .byte 0 ; Buttons +.endproc + +.code + +;---------------------------------------------------------------------------- +; INSTALL routine. Is called after the driver is loaded into memory. If +; possible, check if the hardware is present. +; Must return an MOUSE_ERR_xx code in a/x. + +INSTALL: + +; Initialize variables. Just copy the default stuff over + + ldx #.sizeof(DefVars)-1 +@L1: lda DefVars,x + sta Vars,x + dex + bpl @L1 + +; Be sure the mouse cursor is invisible and at the default location. We +; need to do that here, because our mouse interrupt handler doesn't set the +; mouse position if it hasn't changed. + + sei + jsr CHIDE + lda XPos + ldx XPos+1 + jsr CMOVEX + lda YPos + ldx YPos+1 + jsr CMOVEY + cli + +; Done, return zero (= MOUSE_ERR_OK) + + ldx #$00 + txa + rts + +;---------------------------------------------------------------------------- +; UNINSTALL routine. Is called before the driver is removed from memory. +; No return code required (the driver is removed from memory on return). + +UNINSTALL = HIDE ; Hide cursor on exit + +;---------------------------------------------------------------------------- +; HIDE routine. Is called to hide the mouse pointer. The mouse kernel manages +; a counter for calls to show/hide, and the driver entry point is only called +; if the mouse is currently visible and should get hidden. For most drivers, +; no special action is required besides hiding the mouse cursor. +; No return code required. + +HIDE: dec visible + sei + jsr CHIDE + cli + rts + +;---------------------------------------------------------------------------- +; SHOW routine. Is called to show the mouse pointer. The mouse kernel manages +; a counter for calls to show/hide, and the driver entry point is only called +; if the mouse is currently hidden and should become visible. For most drivers, +; no special action is required besides enabling the mouse cursor. +; No return code required. + +SHOW: inc visible + sei + jsr CSHOW + cli + rts + +;---------------------------------------------------------------------------- +; SETBOX: Set the mouse bounding box. The parameters are passed as they come +; from the C program, that is, a pointer to a mouse_box struct in a/x. +; No checks are done if the mouse is currently inside the box, this is the job +; of the caller. It is not necessary to validate the parameters, trust the +; caller and save some code here. No return code required. + +SETBOX: sta ptr1 + stx ptr1+1 ; Save data pointer + + ldy #.sizeof (MOUSE_BOX)-1 + sei + +@L1: lda (ptr1),y + sta XMin,y + dey + bpl @L1 + + cli + rts + +;---------------------------------------------------------------------------- +; GETBOX: Return the mouse bounding box. The parameters are passed as they +; come from the C program, that is, a pointer to a mouse_box struct in a/x. + +GETBOX: sta ptr1 + stx ptr1+1 ; Save data pointer + + ldy #.sizeof (MOUSE_BOX)-1 + sei + +@L1: lda XMin,y + sta (ptr1),y + dey + bpl @L1 + + cli + rts + +;---------------------------------------------------------------------------- +; MOVE: Move the mouse to a new position. The position is passed as it comes +; from the C program, that is: X on the stack and Y in a/x. The C wrapper will +; remove the parameter from the stack on return. +; No checks are done if the new position is valid (within the bounding box or +; the screen). No return code required. +; + +MOVE: sei ; No interrupts + + pha + txa + pha + jsr CHIDE + pla + tax + pla + + sta YPos + stx YPos+1 ; New Y position + jsr CMOVEY ; Set it + + ldy #$01 + lda (sp),y + sta XPos+1 + tax + dey + lda (sp),y + sta XPos ; New X position + + jsr CMOVEX ; Move the cursor + + lda visible + beq @Ret + + jsr CSHOW + +@Ret: cli ; Allow interrupts + rts + +;---------------------------------------------------------------------------- +; BUTTONS: Return the button mask in a/x. + +BUTTONS: + lda Buttons + ldx #$00 + rts + +;---------------------------------------------------------------------------- +; POS: Return the mouse position in the MOUSE_POS struct pointed to by ptr1. +; No return code required. + +POS: ldy #MOUSE_POS::XCOORD ; Structure offset + + sei ; Disable interrupts + lda XPos ; Transfer the position + sta (ptr1),y + lda XPos+1 + iny + sta (ptr1),y + lda YPos + iny + sta (ptr1),y + lda YPos+1 + cli ; Enable interrupts + + iny + sta (ptr1),y ; Store last byte + + rts ; Done + +;---------------------------------------------------------------------------- +; INFO: Returns mouse position and current button mask in the MOUSE_INFO +; struct pointed to by ptr1. No return code required. +; +; We're cheating here to keep the code smaller: The first fields of the +; mouse_info struct are identical to the mouse_pos struct, so we will just +; call _mouse_pos to initialize the struct pointer and fill the position +; fields. + +INFO: jsr POS + +; Fill in the button state + + lda Buttons + ldy #MOUSE_INFO::BUTTONS + sta (ptr1),y + + rts + +;---------------------------------------------------------------------------- +; IOCTL: Driver defined entry point. The wrapper will pass a pointer to ioctl +; specific data in ptr1, and the ioctl code in A. +; Must return an error code in a/x. +; + +IOCTL: lda #MOUSE_ERR_INV_IOCTL +hlprts: rts + +;---------------------------------------------------------------------------- +; IRQ: Irq handler entry point. Called as a subroutine but in IRQ context +; (so be careful). The routine MUST return carry set if the interrupt has been +; 'handled' - which means that the interrupt source is gone. Otherwise it +; MUST return carry clear. +; + +IRQ: + +; Check for a pressed button and place the result into Buttons + + ldx #0 + lda TRIG0 ; joystick #0 trigger + bne @L0 ; not pressed + ldx #MOUSE_BTN_LEFT +@L0: stx Buttons + + lda PORTA ; get joystick direction bits + and #15 ; clear joystick #1 bits + eor #15 + sta Temp + clc + beq hlprts ; no movement, do nothing + + jsr CHIDE + +; Check left/right + + lda Temp ; Read joystick #0 + and #(JOY::LEFT | JOY::RIGHT) + beq @SkipX ; + +; We will cheat here and rely on the fact that either the left, OR the right +; bit can be active + + and #JOY::RIGHT ; Check RIGHT bit + bne @Right + lda #$FF + tax + bne @AddX ; Branch always +@Right: lda #$01 + ldx #$00 + +; Calculate the new X coordinate (--> a/y) + +@AddX: add XPos + tay ; Remember low byte + txa + adc XPos+1 + tax + +; Limit the X coordinate to the bounding box + + cpy XMin + sbc XMin+1 + bpl @L1 + ldy XMin + ldx XMin+1 + jmp @L2 +@L1: txa + + cpy XMax + sbc XMax+1 + bmi @L2 + ldy XMax + ldx XMax+1 +@L2: sty XPos + stx XPos+1 + +; Move the mouse pointer to the new X pos + + tya + jsr CMOVEX + +; Calculate the Y movement vector + +@SkipX: lda Temp ; Read joystick #0 + and #(JOY::UP | JOY::DOWN) ; Check up/down + beq @SkipY ; + +; We will cheat here and rely on the fact that either the up, OR the down +; bit can be active + + lsr a + bcc @Down + lda #$FF + tax + bne @AddY +@Down: lda #$01 + ldx #$00 + +; Calculate the new Y coordinate (--> a/y) + +@AddY: add YPos + tay ; Remember low byte + txa + adc YPos+1 + tax + +; Limit the Y coordinate to the bounding box + + cpy YMin + sbc YMin+1 + bpl @L3 + ldy YMin + ldx YMin+1 + jmp @L4 +@L3: txa + + cpy YMax + sbc YMax+1 + bmi @L4 + ldy YMax + ldx YMax+1 +@L4: sty YPos + stx YPos+1 + +; Move the mouse pointer to the new X pos + + tya + jsr CMOVEY + +; Done + +@SkipY: lda visible + beq @Done + + jsr CSHOW + +@Done: clc ; Interrupt not "handled" + rts + diff --git a/libsrc/atari/mouse_stat_stddrv.s b/libsrc/atari/mouse_stat_stddrv.s new file mode 100644 index 000000000..18ebda9a2 --- /dev/null +++ b/libsrc/atari/mouse_stat_stddrv.s @@ -0,0 +1,22 @@ +; +; Address of the static standard mouse driver +; +; Christian Groessler, 2014-01-02 +; +; const void mouse_static_stddrv[]; +; + + .export _mouse_static_stddrv + .ifdef __ATARIXL__ + .import _atrxjoy_mou + .else + .import _atrjoy_mou + .endif + +.rodata + + .ifdef __ATARIXL__ +_mouse_static_stddrv := _atrxjoy_mou + .else +_mouse_static_stddrv := _atrjoy_mou + .endif diff --git a/libsrc/atari/mouse_stddrv.s b/libsrc/atari/mouse_stddrv.s new file mode 100644 index 000000000..443e53254 --- /dev/null +++ b/libsrc/atari/mouse_stddrv.s @@ -0,0 +1,18 @@ +; +; Name of the standard mouse driver +; +; Christian Groessler, 2014-01-02 +; +; const char mouse_stddrv[]; +; + + .export _mouse_stddrv + +.rodata + +_mouse_stddrv: + .ifdef __ATARIXL__ + .asciiz "ATRXJOY.MOU" + .else + .asciiz "ATRJOY.MOU" + .endif diff --git a/libsrc/atari/mul40.s b/libsrc/atari/mul40.s index b94ab5c52..96235bf6c 100644 --- a/libsrc/atari/mul40.s +++ b/libsrc/atari/mul40.s @@ -6,7 +6,7 @@ ; uses tmp4 .importzp tmp4 - .export mul40 + .export mul40,loc_tmp .proc mul40 From 95bf72f12397a02f550e1c60983163171604ed4e Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 4 Jan 2014 16:37:59 +0100 Subject: [PATCH 04/76] fix typo --- asminc/atari.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asminc/atari.inc b/asminc/atari.inc index c60f6642d..49a125efb 100644 --- a/asminc/atari.inc +++ b/asminc/atari.inc @@ -318,7 +318,7 @@ APPMHI = $0E ;APPLICATIONS MEMORY HI LIMIT INTZBS = $10 ;INTERRUPT HANDLER -POKMSK = $10 ;SYSTEM MASK FOR POKEY IRG ENABLE +POKMSK = $10 ;SYSTEM MASK FOR POKEY IRQ ENABLE BRKKEY = $11 ;BREAK KEY FLAG RTCLOK = $12 ;REAL TIME CLOCK (IN 16 MSEC UNITS> BUFADR = $15 ;INDIRECT BUFFER ADDRESS REGISTER From d742eeca9fd10158cdd08237975848917997b570 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 4 Jan 2014 18:28:24 +0100 Subject: [PATCH 05/76] Add drivers for ST mouse, Amiga mouse, and Atari trakball. Access routines taken from old mouse.s. --- libsrc/atari/mou/atrami.s | 2 + libsrc/atari/mou/atrst.s | 695 ++++++++++++++++++++++++++++++++++++ libsrc/atari/mou/atrtrk.s | 2 + libsrc/atari/mouse.s_ | 576 ------------------------------ libsrc/atari/mouse_stddrv.s | 4 +- 5 files changed, 701 insertions(+), 578 deletions(-) create mode 100644 libsrc/atari/mou/atrami.s create mode 100644 libsrc/atari/mou/atrst.s create mode 100644 libsrc/atari/mou/atrtrk.s delete mode 100644 libsrc/atari/mouse.s_ diff --git a/libsrc/atari/mou/atrami.s b/libsrc/atari/mou/atrami.s new file mode 100644 index 000000000..21e1b4c81 --- /dev/null +++ b/libsrc/atari/mou/atrami.s @@ -0,0 +1,2 @@ +AMIGA_MOUSE = 1 +.include "atrst.s" diff --git a/libsrc/atari/mou/atrst.s b/libsrc/atari/mou/atrst.s new file mode 100644 index 000000000..1e7e77b3a --- /dev/null +++ b/libsrc/atari/mou/atrst.s @@ -0,0 +1,695 @@ +; +; Mouse driver for ST & Amiga mouses and Atari trakball. +; +; Original access routines: 05/07/2000 Freddy Offenga +; Converted to driver: Christian Groessler, 2014-01-04 +; +; Defines: +; AMIGA_MOUSE - builds Amiga mouse version +; TRAK_MOUSE - builds trakball version +; If none of these defines are active, the ST mouse version +; is being built. +; + + .include "zeropage.inc" + .include "mouse-kernel.inc" + .include "atari.inc" + + .macpack generic + +.if .not ( .defined (AMIGA_MOUSE) .or .defined (TRAK_MOUSE)) + ST_MOUSE = 1 +.endif + +; ------------------------------------------------------------------------ +; Header. Includes jump table + +.segment "JUMPTABLE" + +HEADER: + +; Driver signature + + .byte $6d, $6f, $75 ; "mou" + .byte MOUSE_API_VERSION ; Mouse driver API version number + +; Library reference + + .addr $0000 + +; Jump table + + .addr INSTALL + .addr UNINSTALL + .addr HIDE + .addr SHOW + .addr SETBOX + .addr GETBOX + .addr MOVE + .addr BUTTONS + .addr POS + .addr INFO + .addr IOCTL + .addr IRQ + +; Mouse driver flags + + .byte MOUSE_FLAG_LATE_IRQ + +; Callback table, set by the kernel before INSTALL is called + +CHIDE: jmp $0000 ; Hide the cursor +CSHOW: jmp $0000 ; Show the cursor +CMOVEX: jmp $0000 ; Move the cursor to X coord +CMOVEY: jmp $0000 ; Move the cursor to Y coord + + +;---------------------------------------------------------------------------- +; Constants + +SCREEN_HEIGHT = 191 +SCREEN_WIDTH = 319 + +.enum JOY + UP = $01 + DOWN = $02 + LEFT = $04 + RIGHT = $08 +.endenum + +;---------------------------------------------------------------------------- +; Global variables. The bounding box values are sorted so that they can be +; written with the least effort in the SETBOX and GETBOX routines, so don't +; reorder them. + +.bss + +Vars: +YPos: .res 2 ; Current mouse position, Y +XPos: .res 2 ; Current mouse position, X +XMin: .res 2 ; X1 value of bounding box +YMin: .res 2 ; Y1 value of bounding box +XMax: .res 2 ; X2 value of bounding box +YMax: .res 2 ; Y2 value of bounding box +Buttons: .res 1 ; Button mask + +XPosWrk: .res 2 +YPosWrk: .res 2 + +OldT1: .res 2 +visible: .res 1 + +.if .defined (AMIGA_MOUSE) .or .defined (ST_MOUSE) +dumx: .res 1 +dumy: .res 1 +.endif + +.ifdef TRAK_MOUSE +oldval: .res 1 +.endif + + +; Default values for some of the above variables + +.rodata + +.proc DefVars + .word (SCREEN_HEIGHT+1)/2 ; YPos + .word (SCREEN_WIDTH+1)/2 ; XPos + .word 0 ; XMin + .word 0 ; YMin + .word SCREEN_WIDTH ; XMax + .word SCREEN_HEIGHT ; YMax + .byte 0 ; Buttons +.endproc + +.ifdef ST_MOUSE + +; ST mouse lookup table + +STTab: .byte $FF,$01,$00,$01 + .byte $00,$FF,$00,$01 + .byte $01,$00,$FF,$00 + .byte $01,$00,$01,$FF + +.endif + +.ifdef AMIGA_MOUSE + +; Amiga mouse lookup table + +AmiTab: .byte $FF,$01,$00,$FF + .byte $00,$FF,$FF,$01 + .byte $01,$FF,$FF,$00 + .byte $FF,$00,$01,$FF + +.endif + +.code + +;---------------------------------------------------------------------------- +; INSTALL routine. Is called after the driver is loaded into memory. If +; possible, check if the hardware is present. +; Must return an MOUSE_ERR_xx code in a/x. + +INSTALL: + +; Initialize variables. Just copy the default stuff over + + ldx #.sizeof(DefVars)-1 +@L1: lda DefVars,x + sta Vars,x + dex + bpl @L1 + +; Be sure the mouse cursor is invisible and at the default location. We +; need to do that here, because our mouse interrupt handler doesn't set the +; mouse position if it hasn't changed. + + sei + jsr CHIDE + lda XPos + sta XPosWrk + ldx XPos+1 + stx XPosWrk+1 + jsr CMOVEX + lda YPos + sta YPosWrk + ldx YPos+1 + stx YPosWrk+1 + jsr CMOVEY + cli + +; install timer irq routine to poll mouse + + lda VTIMR1 + sta OldT1 + lda VTIMR1+1 + sta OldT1+1 + + php + sei + lda #T1Han + sta VTIMR1+1 + plp + + lda #%00000001 + sta AUDCTL + + lda #0 + sta AUDC1 + + lda #15 + sta AUDF1 + sta STIMER + + lda POKMSK + ora #%00000001 ; timer 1 enable + sta POKMSK + sta IRQEN + +; Done, return zero (= MOUSE_ERR_OK) + + ldx #$00 + txa + rts + +;---------------------------------------------------------------------------- +; UNINSTALL routine. Is called before the driver is removed from memory. +; No return code required (the driver is removed from memory on return). + +UNINSTALL: + +; uninstall timer irq routine + + lda POKMSK + and #%11111110 ; timer 1 disable + sta IRQEN + sta POKMSK + + php + sei + lda OldT1 + sta VTIMR1 + lda OldT1+1 + sta VTIMR1+1 + plp + + ; fall thru... + +;---------------------------------------------------------------------------- +; HIDE routine. Is called to hide the mouse pointer. The mouse kernel manages +; a counter for calls to show/hide, and the driver entry point is only called +; if the mouse is currently visible and should get hidden. For most drivers, +; no special action is required besides hiding the mouse cursor. +; No return code required. + +HIDE: dec visible + php + sei + jsr CHIDE + plp + rts + +;---------------------------------------------------------------------------- +; SHOW routine. Is called to show the mouse pointer. The mouse kernel manages +; a counter for calls to show/hide, and the driver entry point is only called +; if the mouse is currently hidden and should become visible. For most drivers, +; no special action is required besides enabling the mouse cursor. +; No return code required. + +SHOW: inc visible + php + sei + jsr CSHOW + plp + rts + +;---------------------------------------------------------------------------- +; SETBOX: Set the mouse bounding box. The parameters are passed as they come +; from the C program, that is, a pointer to a mouse_box struct in a/x. +; No checks are done if the mouse is currently inside the box, this is the job +; of the caller. It is not necessary to validate the parameters, trust the +; caller and save some code here. No return code required. + +SETBOX: sta ptr1 + stx ptr1+1 ; Save data pointer + + ldy #.sizeof (MOUSE_BOX)-1 + php + sei + +@L1: lda (ptr1),y + sta XMin,y + dey + bpl @L1 + + plp + rts + +;---------------------------------------------------------------------------- +; GETBOX: Return the mouse bounding box. The parameters are passed as they +; come from the C program, that is, a pointer to a mouse_box struct in a/x. + +GETBOX: sta ptr1 + stx ptr1+1 ; Save data pointer + + ldy #.sizeof (MOUSE_BOX)-1 + php + sei + +@L1: lda XMin,y + sta (ptr1),y + dey + bpl @L1 + + plp + rts + +;---------------------------------------------------------------------------- +; MOVE: Move the mouse to a new position. The position is passed as it comes +; from the C program, that is: X on the stack and Y in a/x. The C wrapper will +; remove the parameter from the stack on return. +; No checks are done if the new position is valid (within the bounding box or +; the screen). No return code required. +; + +MOVE: php + sei ; No interrupts + + pha + txa + pha + + lda visible + beq @L01 + + jsr CHIDE + +@L01: pla + tax + pla + + sta YPos + sta YPosWrk + stx YPos+1 ; New Y position + stx YPosWrk+1 + jsr CMOVEY ; Set it + + ldy #$01 + lda (sp),y + sta XPos+1 + sta XPosWrk+1 + tax + dey + lda (sp),y + sta XPos ; New X position + sta XPosWrk + + jsr CMOVEX ; Move the cursor + + lda visible + beq @Ret + + jsr CSHOW + +@Ret: plp ; Restore interrupt flag + rts + +;---------------------------------------------------------------------------- +; BUTTONS: Return the button mask in a/x. + +BUTTONS: + lda Buttons + ldx #$00 + rts + +;---------------------------------------------------------------------------- +; POS: Return the mouse position in the MOUSE_POS struct pointed to by ptr1. +; No return code required. + +POS: ldy #MOUSE_POS::XCOORD ; Structure offset + + php + sei ; Disable interrupts + lda XPos ; Transfer the position + sta (ptr1),y + lda XPos+1 + iny + sta (ptr1),y + lda YPos + iny + sta (ptr1),y + lda YPos+1 + plp ; Restore interrupt flag + + iny + sta (ptr1),y ; Store last byte + + rts ; Done + +;---------------------------------------------------------------------------- +; INFO: Returns mouse position and current button mask in the MOUSE_INFO +; struct pointed to by ptr1. No return code required. +; +; We're cheating here to keep the code smaller: The first fields of the +; mouse_info struct are identical to the mouse_pos struct, so we will just +; call _mouse_pos to initialize the struct pointer and fill the position +; fields. + +INFO: jsr POS + +; Fill in the button state + + lda Buttons + ldy #MOUSE_INFO::BUTTONS + sta (ptr1),y + + rts + +;---------------------------------------------------------------------------- +; IOCTL: Driver defined entry point. The wrapper will pass a pointer to ioctl +; specific data in ptr1, and the ioctl code in A. +; Must return an error code in a/x. +; + +IOCTL: lda #MOUSE_ERR_INV_IOCTL + rts + +;---------------------------------------------------------------------------- +; IRQ: Irq handler entry point. Called as a subroutine but in IRQ context +; (so be careful). The routine MUST return carry set if the interrupt has been +; 'handled' - which means that the interrupt source is gone. Otherwise it +; MUST return carry clear. +; + +IRQ: + +; Check for a pressed button and place the result into Buttons + + ldx #0 + lda TRIG0 ; joystick #0 trigger + bne @L0 ; not pressed + ldx #MOUSE_BTN_LEFT +@L0: stx Buttons + +; Update coordinates if needed + + lda XPosWrk + cmp XPos + bne @Update + lda XPosWrk+1 + cmp XPos+1 + bne @Update + lda YPosWrk + cmp YPos + bne @Update + lda YPosWrk+1 + cmp YPos+1 + beq @Done + +@Update:ldx visible + beq @L1 + jsr CHIDE + +; Limit the X coordinate to the bounding box + +@L1: lda XPosWrk+1 + ldy XPosWrk + tax + cpy XMin + sbc XMin+1 + bpl @L2 + ldy XMin + ldx XMin+1 + jmp @L3 +@L2: txa + + cpy XMax + sbc XMax+1 + bmi @L3 + ldy XMax + ldx XMax+1 +@L3: sty XPos + stx XPos+1 + + tya + jsr CMOVEX + +; Limit the Y coordinate to the bounding box + + lda YPosWrk+1 + ldy YPosWrk + tax + cpy YMin + sbc YMin+1 + bpl @L4 + ldy YMin + ldx YMin+1 + jmp @L5 +@L4: txa + + cpy YMax + sbc YMax+1 + bmi @L5 + ldy YMax + ldx YMax+1 +@L5: sty YPos + stx YPos+1 + + tya + jsr CMOVEY + + ldx visible + beq @Done + + jsr CSHOW + +@Done: clc + rts + +;---------------------------------------------------------------------------- +; T1Han: Local IRQ routine to poll mouse +; + +T1Han: tya + pha + txa + pha + +.ifdef DEBUG + lda RANDOM + sta COLBK +.endif + + lda PORTA + tay + +.ifdef ST_MOUSE + +; ST mouse version + + and #%00000011 + ora dumx + tax + lda STTab,x + bmi nxst + + beq xist + + dec XPosWrk + lda XPosWrk + cmp #255 + bne nxst + dec XPosWrk+1 + jmp nxst + +xist: inc XPosWrk + bne nxst + inc XPosWrk+1 + +nxst: tya + and #%00001100 + ora dumy + tax + lda STTab,x + bmi nyst + + bne yst + + dec YPosWrk + lda YPosWrk + cmp #255 + bne nyst + dec YPosWrk+1 + jmp nyst + +yst: inc YPosWrk + bne nyst + inc YPosWrk+1 + +; store old readings + +nyst: tya + and #%00000011 + asl + asl + sta dumx + tya + and #%00001100 + lsr + lsr + sta dumy + +.elseif .defined (AMIGA_MOUSE) + +; Amiga mouse version + + lsr + and #%00000101 + ora dumx + tax + lda AmiTab,x + bmi nxami + + bne xiami + + dec XPosWrk + lda XPosWrk + cmp #255 + bne nxami + dec XPosWrk+1 + jmp nxami + +xiami: inc XPosWrk + bne nxami + inc XPosWrk+1 + +nxami: tya + + and #%00000101 + ora dumy + tax + lda AmiTab,x + bmi nyami + + bne yiami + + dec YPosWrk + lda YPosWrk + cmp #255 + bne nyami + dec YPosWrk+1 + jmp nyami + +yiami: inc YPosWrk + bne nyami + inc YPosWrk+1 + +; store old readings + +nyami: tya + and #%00001010 + sta dumx + tya + and #%00000101 + asl + sta dumy + +.elseif .defined (TRAK_MOUSE) + +; trakball version + + eor oldval + and #%00001000 + beq horiz + + tya + and #%00000100 + beq mmup + + inc YPosWrk + bne horiz + inc YPosWrk+1 + bne horiz + +mmup: dec YPosWrk + lda YPosWrk + cmp #255 + bne horiz + dec YPosWrk+1 + +horiz: tya + eor oldval + and #%00000010 + beq mmexit + + tya + and #%00000001 + beq mmleft + + inc XPosWrk + bne mmexit + inc XPosWrk+1 + bne mmexit + +mmleft: dec XPosWrk + lda XPosWrk + cmp #255 + bne mmexit + dec XPosWrk+1 + +mmexit: sty oldval + +.endif + + pla + tax + pla + tay + pla + rti + diff --git a/libsrc/atari/mou/atrtrk.s b/libsrc/atari/mou/atrtrk.s new file mode 100644 index 000000000..699d12a0d --- /dev/null +++ b/libsrc/atari/mou/atrtrk.s @@ -0,0 +1,2 @@ +TRAK_MOUSE = 1 +.include "atrst.s" diff --git a/libsrc/atari/mouse.s_ b/libsrc/atari/mouse.s_ deleted file mode 100644 index 9c722b49c..000000000 --- a/libsrc/atari/mouse.s_ +++ /dev/null @@ -1,576 +0,0 @@ -;-------------------------------------------------------------------- -; Atari 8-bit mouse routines -- 05/07/2000 Freddy Offenga -; Some changes by Christian Groessler, Ullrich von Bassewitz -; -; The following devices are supported: -; - Atari trak-ball -; - ST mouse -; - Amiga mouse -; -; Mouse checks are done in the timer 1 IRQ and the mouse arrow is -; drawn in player 0 during the vertical blank -;-------------------------------------------------------------------- - - .export _mouse_init, _mouse_done, _mouse_box - .export _mouse_show, _mouse_hide, _mouse_move - .export _mouse_buttons, _mouse_pos, _mouse_info - .constructor initmouse,27 - - .import popax - .importzp ptr1 - - .include "atari.inc" - -TRAK_BALL = 0 ; device Atari trak-ball -ST_MOUSE = 1 ; device ST mouse -AMIGA_MOUSE = 2 ; device Amiga mouse -MAX_TYPE = 3 ; first illegal device type - -; the default values force the mouse cursor inside the test screen (no access to border) -defxmin = 48 ; default x minimum -defymin = 31 ; default y minimum -defxmax = 204 ; default x maximum -defymax = 211 ; default y maximum - -pmsize = 16 ; y size pm shape - -xinit = defxmin ; init. x pos. -yinit = defymin ; init. y pos. - -;-------------------------------------------------------------------- -; reserve memory for the mouse pointer - -initmouse: - lda APPMHI+1 - and #%11111000 ; make 2k aligned - sec - sbc #%00001000 ; reserve 2k - tax - adc #3 ; add 4 (C = 1) - sta mouse_pm0 - lda #0 - sta APPMHI - stx APPMHI+1 - rts - - -;-------------------------------------------------------------------- -; Initialize mouse routines -; void __fastcall__ mouse_init (unsigned char type); - -_mouse_init: - cmp #MAX_TYPE+1 ; Check for a valid type - bcc setup - -ifail: lda #0 ; init. failed - tax - rts - -setup: tax - lda lvectab,x - sta mouse_vec+1 - lda hvectab,x - sta mouse_vec+2 - - jsr pminit - - lda VTIMR1 - sta old_t1 - lda VTIMR1+1 - sta old_t1+1 - - lda #t1_vec - sta VTIMR1+1 - - lda #%00000001 - sta AUDCTL - - lda #0 - sta AUDC1 - - lda #15 - sta AUDF1 - sta STIMER - - sei - lda POKMSK - ora #%00000001 ; timer 1 enable - sta POKMSK - sta IRQEN - cli - - lda VVBLKI - sta vbi_jmp+1 - lda VVBLKI+1 - sta vbi_jmp+2 - - lda #6 - ldy #vbi - jsr SETVBV - - lda #$C0 - sta NMIEN - - ldx #0 - lda #1 - sta mouse_off - rts - -;-------------------------------------------------------------------- -; Finish mouse routines -; void mouse_done(void) - -_mouse_done: - sei - lda POKMSK - and #%11111110 ; timer 1 disable - sta IRQEN - sta POKMSK - cli - - lda old_t1 - sta VTIMR1 - lda old_t1+1 - sta VTIMR1+1 - - lda #$40 - sta NMIEN - - lda #6 - ldy vbi_jmp+1 - ldx vbi_jmp+2 - jsr SETVBV - - ldx #0 - stx GRACTL - stx HPOSP0 - inx - stx mouse_off - rts - -;-------------------------------------------------------------------- -; Set mouse limits -; void __fastcall__ mouse_box(int xmin, int ymin, int xmax, int ymax) - -_mouse_box: - sta ymax - jsr popax ; always ignore high byte - sta xmax - jsr popax - sta ymin - jsr popax - sta xmin - rts - -;-------------------------------------------------------------------- -; Set mouse position -; void __fastcall__ mouse_move(int xpos, int ypos) - -_mouse_move: - sta mousey ; always ignore high byte - jsr popax - sta mousex - rts - -;-------------------------------------------------------------------- -; Show mouse arrow -; void mouse_show(void) - -_mouse_show: - lda mouse_off ; Already on? - beq @L1 - dec mouse_off -@L1: rts - -;-------------------------------------------------------------------- -; Hide mouse arrow -; void mouse_hide(void) - -_mouse_hide: - inc mouse_off - rts - -;-------------------------------------------------------------------- -; Ask mouse button -; unsigned char mouse_buttons(void) - -_mouse_buttons: - ldx #0 - lda STRIG0 - bne nobut -; lda #14 -;??? sta COLOR1 - lda #1 - rts -nobut: txa - rts - -;-------------------------------------------------------------------- -; Get the mouse position -; void mouse_pos (struct mouse_pos* pos); - -_mouse_pos: - sta ptr1 - stx ptr1+1 ; Store argument pointer - ldy #0 - lda mousex ; X position - sta (ptr1),y - lda #0 - iny - sta (ptr1),y - lda mousey ; Y position - iny - sta (ptr1),y - lda #0 - iny - sta (ptr1),y - rts - -;-------------------------------------------------------------------- -; Get the mouse position and button information -; void mouse_info (struct mouse_info* info); - -_mouse_info: - -; We're cheating here to keep the code smaller: The first fields of the -; mouse_info struct are identical to the mouse_pos struct, so we will just -; call _mouse_pos to initialize the struct pointer and fill the position -; fields. - - jsr _mouse_pos - -; Fill in the button state - - jsr _mouse_buttons ; Will not touch ptr1 - ldy #4 - sta (ptr1),y - - rts - -;-------------------------------------------------------------------- -; Atari trak-ball check, A,Y = 4-bit port value - -trak_check: - eor oldval - and #%00001000 - beq horiz - - tya - and #%00000100 - beq mmup - - inc mousey - bne horiz - -mmup: dec mousey - -horiz: tya - eor oldval - and #%00000010 - beq mmexit - - tya - and #%00000001 - beq mmleft - - inc mousex - bne mmexit - -mmleft: dec mousex - -mmexit: sty oldval - rts - -;-------------------------------------------------------------------- -; ST mouse check, A,Y = 4-bit port value - -st_check: - and #%00000011 - ora dumx - tax - lda sttab,x - bmi nxst - - beq xist - dec mousex ; 1 = left - bne nxst -xist: inc mousex ; 0 = right - -nxst: tya - and #%00001100 - ora dumy - tax - lda sttab,x - bmi nyst - - bne yst - dec mousey ; 0 = up - bne nyst -yst: inc mousey ; 1 = down - -; store old readings - -nyst: tya - and #%00000011 - asl - asl - sta dumx - tya - and #%00001100 - lsr - lsr - sta dumy - rts - -;-------------------------------------------------------------------- -; Amiga mouse check, A,Y = 4-bit port value - -amiga_check: - - lsr - and #%00000101 - ora dumx - tax - lda amitab,x - bmi nxami - - bne xiami - dec mousex ; 0 = left - bne nxami -xiami: inc mousex ; 1 = right - -nxami: tya - - and #%00000101 - ora dumy - tax - lda amitab,x - bmi nyami - - bne yiami - dec mousey ; 0 = up - bne nyami -yiami: inc mousey ; 1 = down - -; store old readings - -nyami: tya - and #%00001010 - sta dumx - tya - and #%00000101 - asl - sta dumy - rts - -;-------------------------------------------------------------------- -; timer 1 IRQ routine - check mouse - -t1_vec: tya - pha - txa - pha - -.ifdef DEBUG - lda RANDOM - sta COLBK ; debug -.endif - - lda PORTA - tay - -mouse_vec: - jsr st_check ; will be modified; won't be ROMmable - - pla - tax - pla - tay - pla - rti - -;-------------------------------------------------------------------- -; VBI - check mouse limits and display mouse arrow - -vbi: lda mousex - cmp xmin - bcs ok1 ; xmin <= mousex - lda xmin - sta mousex - -ok1: lda mousey - cmp ymin - bcs ok2 ; ymin <= mousey - lda ymin - sta mousey - -ok2: lda xmax - cmp mousex - bcs ok3 ; xmax >= mousex - lda xmax - sta mousex - -ok3: lda ymax - cmp mousey - bcs ok4 ; ymax >= mousey - lda ymax - sta mousey - -ok4: jsr clrpm - - lda mouse_off - beq mon - lda #0 - sta HPOSP0 - beq moff - -mon: jsr drwpm - lda mousey - sta omy - - lda #3 -moff: sta GRACTL - -vbi_jmp: - jmp SYSVBV ; will be modified; won't be ROMmable - -;-------------------------------------------------------------------- -; initialize mouse pm - -pminit: lda mouse_pm0 - sta mpatch1+2 - sta mpatch2+2 - sta mpatch3+2 - - ldx #0 - txa -mpatch1: -clpm: sta $1000,x ; will be patched - inx - bne clpm - - lda mouse_pm0 - sec - sbc #4 - sta PMBASE - - lda #62 - sta SDMCTL - - lda #1 - sta GPRIOR - - lda #0 - sta PCOLR0 - sta SIZEP0 - rts - -;-------------------------------------------------------------------- -; draw new mouse pm - -drwpm: lda mousex - sta HPOSP0 - - lda mousey - tax - - ldy #0 -fmp2: lda mskpm,y -mpatch2: - sta $1000,x ; will be patched - inx - iny - cpy #pmsize - bne fmp2 - rts - -;-------------------------------------------------------------------- -; clear old mouse pm - -clrpm: lda omy - tax - - ldy #0 - tya -mpatch3: -fmp1: sta $1000,x ; will be patched - inx - iny - cpy #pmsize - bne fmp1 - rts - -;-------------------------------------------------------------------- - .rodata - -; mouse arrow - pm shape - -mskpm: .byte %00000000 - .byte %10000000 - .byte %11000000 - .byte %11000000 - - .byte %11100000 - .byte %11100000 - .byte %11110000 - .byte %11100000 - - .byte %11100000 - .byte %00100000 - .byte %00100000 - .byte %00110000 - - .byte %00110000 - .byte %00000000 - .byte %00000000 - .byte %00000000 - -; ST mouse lookup table - -sttab: .byte $FF,$01,$00,$01 - .byte $00,$FF,$00,$01 - .byte $01,$00,$FF,$00 - .byte $01,$00,$01,$FF - -; Amiga mouse lookup table - -amitab: .byte $FF,$01,$00,$FF - .byte $00,$FF,$FF,$01 - .byte $01,$FF,$FF,$00 - .byte $FF,$00,$01,$FF - -; Device vectors - -lvectab: - .byte trak_check, >st_check, >amiga_check - -; default values - -xmin: .byte defxmin -ymin: .byte defymin -xmax: .byte defxmax -ymax: .byte defymax - -mousex: .byte xinit -mousey: .byte yinit - -;-------------------------------------------------------------------- - .bss - -; Misc. vars - -old_t1: .res 2 ; old timer interrupt vector -oldval: .res 1 ; used by trakball routines -dumx: .res 1 -dumy: .res 1 -omy: .res 1 ; old y pos - -mouse_off: - .res 1 -mouse_pm0: - .res 1 diff --git a/libsrc/atari/mouse_stddrv.s b/libsrc/atari/mouse_stddrv.s index 443e53254..493c90d77 100644 --- a/libsrc/atari/mouse_stddrv.s +++ b/libsrc/atari/mouse_stddrv.s @@ -12,7 +12,7 @@ _mouse_stddrv: .ifdef __ATARIXL__ - .asciiz "ATRXJOY.MOU" + .asciiz "ATRXST.MOU" .else - .asciiz "ATRJOY.MOU" + .asciiz "ATRST.MOU" .endif From d614fc4e6483d03e4ce4544e692ce4351d8418c4 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 4 Jan 2014 20:05:57 +0100 Subject: [PATCH 06/76] When disabling interrupts, restore original interrupt flag afterwards. --- libsrc/atari/mou/atrjoy.s | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/libsrc/atari/mou/atrjoy.s b/libsrc/atari/mou/atrjoy.s index 1a5afa71a..e1c745adf 100644 --- a/libsrc/atari/mou/atrjoy.s +++ b/libsrc/atari/mou/atrjoy.s @@ -122,6 +122,7 @@ INSTALL: ; need to do that here, because our mouse interrupt handler doesn't set the ; mouse position if it hasn't changed. + php sei jsr CHIDE lda XPos @@ -130,7 +131,7 @@ INSTALL: lda YPos ldx YPos+1 jsr CMOVEY - cli + plp ; Done, return zero (= MOUSE_ERR_OK) @@ -152,9 +153,10 @@ UNINSTALL = HIDE ; Hide cursor on exit ; No return code required. HIDE: dec visible + php sei jsr CHIDE - cli + plp rts ;---------------------------------------------------------------------------- @@ -165,9 +167,10 @@ HIDE: dec visible ; No return code required. SHOW: inc visible + php sei jsr CSHOW - cli + plp rts ;---------------------------------------------------------------------------- @@ -181,6 +184,7 @@ SETBOX: sta ptr1 stx ptr1+1 ; Save data pointer ldy #.sizeof (MOUSE_BOX)-1 + php sei @L1: lda (ptr1),y @@ -188,7 +192,7 @@ SETBOX: sta ptr1 dey bpl @L1 - cli + plp rts ;---------------------------------------------------------------------------- @@ -199,6 +203,7 @@ GETBOX: sta ptr1 stx ptr1+1 ; Save data pointer ldy #.sizeof (MOUSE_BOX)-1 + php sei @L1: lda XMin,y @@ -206,7 +211,7 @@ GETBOX: sta ptr1 dey bpl @L1 - cli + plp rts ;---------------------------------------------------------------------------- @@ -217,7 +222,8 @@ GETBOX: sta ptr1 ; the screen). No return code required. ; -MOVE: sei ; No interrupts +MOVE: php + sei ; No interrupts pha txa @@ -246,7 +252,7 @@ MOVE: sei ; No interrupts jsr CSHOW -@Ret: cli ; Allow interrupts +@Ret: plp ; Restore interrupt flag rts ;---------------------------------------------------------------------------- @@ -263,6 +269,7 @@ BUTTONS: POS: ldy #MOUSE_POS::XCOORD ; Structure offset + php sei ; Disable interrupts lda XPos ; Transfer the position sta (ptr1),y @@ -273,7 +280,7 @@ POS: ldy #MOUSE_POS::XCOORD ; Structure offset iny sta (ptr1),y lda YPos+1 - cli ; Enable interrupts + plp ; Restore interrupt flag iny sta (ptr1),y ; Store last byte From 24198a9ebbfd5f6541a948f021c3a07aed2fedc0 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sun, 5 Jan 2014 11:09:01 +0100 Subject: [PATCH 07/76] small cleanup --- libsrc/atari/mcbdefault.s | 1 - 1 file changed, 1 deletion(-) diff --git a/libsrc/atari/mcbdefault.s b/libsrc/atari/mcbdefault.s index 91e920ac4..8d60a9ef7 100644 --- a/libsrc/atari/mcbdefault.s +++ b/libsrc/atari/mcbdefault.s @@ -83,7 +83,6 @@ show: ; Move the mouse cursor x position to the value in A/X. movex: - cpx #0 cpx #1 ror a lsr a ; convert to character position From 09da71c5d913eba6e799c69c057fe6f67b6562fe Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sun, 5 Jan 2014 11:18:34 +0100 Subject: [PATCH 08/76] another small cleanup --- libsrc/atari/mcbdefault.s | 1 - 1 file changed, 1 deletion(-) diff --git a/libsrc/atari/mcbdefault.s b/libsrc/atari/mcbdefault.s index 8d60a9ef7..e68dba243 100644 --- a/libsrc/atari/mcbdefault.s +++ b/libsrc/atari/mcbdefault.s @@ -21,7 +21,6 @@ .bss backup: .res 1 -helper: .res 2 ; ------------------------------------------------------------------------ From c22b91e3c382e8bad5a62b9218b36d27d73f5c75 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 11 Jan 2014 01:05:13 +0100 Subject: [PATCH 09/76] align comment to the same column --- libsrc/atari/mcbdefault.s | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/atari/mcbdefault.s b/libsrc/atari/mcbdefault.s index e68dba243..e1b78f033 100644 --- a/libsrc/atari/mcbdefault.s +++ b/libsrc/atari/mcbdefault.s @@ -43,19 +43,19 @@ _mouse_def_callbacks: .data -cursor = 11 ; '+' screen code' +cursor = 11 ; '+' screen code' ; setcursor getcursor: column: ldy #$00 ; Patched at runtime - lda (scrptr),y ; Patched at runtime + lda (scrptr),y ; Patched at runtime cmp #cursor rts setcursor: lda #cursor -setscr: sta (scrptr),y ; Patched at runtime +setscr: sta (scrptr),y ; Patched at runtime rts ; ------------------------------------------------------------------------ From c78d7a82fb1d83a5ee34abdafb70abcdc95cc35f Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 11 Jan 2014 01:33:59 +0100 Subject: [PATCH 10/76] use ST mouse as static standard driver, too --- libsrc/atari/mouse_stat_stddrv.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libsrc/atari/mouse_stat_stddrv.s b/libsrc/atari/mouse_stat_stddrv.s index 18ebda9a2..55e29878b 100644 --- a/libsrc/atari/mouse_stat_stddrv.s +++ b/libsrc/atari/mouse_stat_stddrv.s @@ -8,15 +8,15 @@ .export _mouse_static_stddrv .ifdef __ATARIXL__ - .import _atrxjoy_mou + .import _atrxst_mou .else - .import _atrjoy_mou + .import _atrst_mou .endif .rodata .ifdef __ATARIXL__ -_mouse_static_stddrv := _atrxjoy_mou +_mouse_static_stddrv := _atrxst_mou .else -_mouse_static_stddrv := _atrjoy_mou +_mouse_static_stddrv := _atrst_mou .endif From 597c4a6b891a0145c223af00230fb66ffe83d469 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 11 Jan 2014 01:35:32 +0100 Subject: [PATCH 11/76] add comment --- libsrc/atari/mou/atrjoy.s | 2 ++ libsrc/atari/mou/atrst.s | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libsrc/atari/mou/atrjoy.s b/libsrc/atari/mou/atrjoy.s index e1c745adf..9915a4ff1 100644 --- a/libsrc/atari/mou/atrjoy.s +++ b/libsrc/atari/mou/atrjoy.s @@ -91,6 +91,8 @@ visible: .res 1 .rodata +; (We use ".proc" because we want to define both a label and a scope.) + .proc DefVars .word SCREEN_HEIGHT/2 ; YPos .word SCREEN_WIDTH/2 ; XPos diff --git a/libsrc/atari/mou/atrst.s b/libsrc/atari/mou/atrst.s index 1e7e77b3a..72808ad16 100644 --- a/libsrc/atari/mou/atrst.s +++ b/libsrc/atari/mou/atrst.s @@ -113,6 +113,8 @@ oldval: .res 1 .rodata +; (We use ".proc" because we want to define both a label and a scope.) + .proc DefVars .word (SCREEN_HEIGHT+1)/2 ; YPos .word (SCREEN_WIDTH+1)/2 ; XPos From 7a682cf71a1cfda82015eb41a94b9d49986850d0 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Mon, 13 Jan 2014 00:45:35 +0100 Subject: [PATCH 12/76] fix some typos --- asminc/atari.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/asminc/atari.inc b/asminc/atari.inc index 49a125efb..da926af81 100644 --- a/asminc/atari.inc +++ b/asminc/atari.inc @@ -485,10 +485,10 @@ VKEYBD = $0208 ;POKEY KEYBOARD IRQ VECTOR VSERIN = $020A ;POKEY SERIAL INPUT READY IRQ VSEROR = $020C ;POKEY SERIAL OUTPUT READY IRQ VSEROC = $020E ;POKEY SERIAL OUTPUT COMPLETE IRQ -VTIMR1 = $0210 ;POKEY TIMER 1 IRG -VTIMR2 = $0212 ;POKEY TIMER 2 IRG -VTIMR4 = $0214 ;POKEY TIMER 4 IRG -VIMIRQ = $0216 ;IMMEDIATE IRG VECTOR +VTIMR1 = $0210 ;POKEY TIMER 1 IRQ +VTIMR2 = $0212 ;POKEY TIMER 2 IRQ +VTIMR4 = $0214 ;POKEY TIMER 4 IRQ +VIMIRQ = $0216 ;IMMEDIATE IRQ VECTOR CDTMV1 = $0218 ;COUNT DOWN TIMER 1 CDTMV2 = $021A ;COUNT DOWN TIMER 2 CDTMV3 = $021C ;COUNT DOWN TIMER 3 From 77ba5b7e1c218b1294da14b8d9b1bb70337bfddb Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Tue, 14 Jan 2014 11:43:34 +0100 Subject: [PATCH 13/76] Fix timer IRQ hooking for atarixl target. --- libsrc/atari/libref.s | 4 +- libsrc/atari/mou/atrst.s | 49 ++++++++++++++--- libsrc/atari/shadow_ram_timerirq1.s | 81 +++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 8 deletions(-) create mode 100644 libsrc/atari/shadow_ram_timerirq1.s diff --git a/libsrc/atari/libref.s b/libsrc/atari/libref.s index e6b9df6a5..4f7cbbef6 100644 --- a/libsrc/atari/libref.s +++ b/libsrc/atari/libref.s @@ -8,11 +8,13 @@ em_libref := _exit joy_libref := _exit -mouse_libref := _exit ser_libref := atari_ser_libref .ifdef __ATARIXL__ .import CIO_handler tgi_libref := CIO_handler + .import set_VTIMR1_handler +mouse_libref := set_VTIMR1_handler .else +mouse_libref := _exit tgi_libref := _exit .endif diff --git a/libsrc/atari/mou/atrst.s b/libsrc/atari/mou/atrst.s index 72808ad16..04580f31a 100644 --- a/libsrc/atari/mou/atrst.s +++ b/libsrc/atari/mou/atrst.s @@ -35,7 +35,7 @@ HEADER: ; Library reference - .addr $0000 +libref: .addr $0000 ; Jump table @@ -96,7 +96,6 @@ Buttons: .res 1 ; Button mask XPosWrk: .res 2 YPosWrk: .res 2 -OldT1: .res 2 visible: .res 1 .if .defined (AMIGA_MOUSE) .or .defined (ST_MOUSE) @@ -108,11 +107,18 @@ dumy: .res 1 oldval: .res 1 .endif +.ifndef __ATARIXL__ +OldT1: .res 2 +.else -; Default values for some of the above variables +.data +set_VTIMR1_handler: + .byte $4C, 0, 0 +.endif .rodata +; Default values for some of the above variables ; (We use ".proc" because we want to define both a label and a scope.) .proc DefVars @@ -182,7 +188,23 @@ INSTALL: jsr CMOVEY cli -; install timer irq routine to poll mouse +; Install timer irq routine to poll mouse. + +.ifdef __ATARIXL__ + + ; Setup pointer to wrapper install/deinstall function. + lda libref + sta set_VTIMR1_handler+1 + lda libref+1 + sta set_VTIMR1_handler+2 + + ; Install my handler. + sec + lda #T1Han + jsr set_VTIMR1_handler + +.else lda VTIMR1 sta OldT1 @@ -197,6 +219,8 @@ INSTALL: sta VTIMR1+1 plp +.endif + lda #%00000001 sta AUDCTL @@ -231,6 +255,13 @@ UNINSTALL: sta IRQEN sta POKMSK +.ifdef __ATARIXL__ + + clc + jsr set_VTIMR1_handler + +.else + php sei lda OldT1 @@ -239,6 +270,7 @@ UNINSTALL: sta VTIMR1+1 plp +.endif ; fall thru... ;---------------------------------------------------------------------------- @@ -354,7 +386,7 @@ MOVE: php lda visible beq @Ret - + jsr CSHOW @Ret: plp ; Restore interrupt flag @@ -520,7 +552,7 @@ IRQ: T1Han: tya pha txa - pha + pha .ifdef DEBUG lda RANDOM @@ -692,6 +724,9 @@ mmexit: sty oldval tax pla tay +.ifdef __ATARIXL__ + rts +.else pla rti - +.endif diff --git a/libsrc/atari/shadow_ram_timerirq1.s b/libsrc/atari/shadow_ram_timerirq1.s new file mode 100644 index 000000000..f8a3e9b4d --- /dev/null +++ b/libsrc/atari/shadow_ram_timerirq1.s @@ -0,0 +1,81 @@ +; +; Atari XL shadow RAM timer IRQ #1 handler +; +; Christian Groessler, chris@groessler.org, 2014 +; + +;DEBUG = 1 + +.ifdef __ATARIXL__ + +SHRAM_HANDLERS = 1 + .include "atari.inc" + .include "romswitch.inc" + .export set_VTIMR1_handler + + +.segment "LOWBSS" + +VTIMR1_handler: .res 3 + + +.segment "BSS" + +old_VTIMR1_handler: + .res 2 + + +.segment "LOWCODE" + +; timer interrupt handler: +; disable ROM, call user handler, enable ROM again + +my_VTIMR1_handler: + disable_rom_quick + jsr VTIMR1_handler + enable_rom_quick + pla + rti + +.segment "CODE" + +; install or remove VTIMR1 handler +; input: CF - 0/1 for remove/install handler +; AX - pointer to handler (if CF=1) +; registers destroyed + +set_VTIMR1_handler: + + bcc @remove + +; install vector + + stx VTIMR1_handler+2 + sta VTIMR1_handler+1 ; save passed vector in low memory + lda #$4C ; "JMP" opcode + sta VTIMR1_handler + + lda VTIMR1 + sta old_VTIMR1_handler + lda VTIMR1+1 + sta old_VTIMR1_handler+1 + + lda #my_VTIMR1_handler + sta VTIMR1+1 + plp + rts + +@remove: php + sei + lda old_VTIMR1_handler + sta VTIMR1 + lda old_VTIMR1_handler+1 + sta VTIMR1+1 + plp + rts + +.endif ; .ifdef __ATARIXL__ From 2be7c7c88d278855aea59b146ff73e10c7330027 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Tue, 14 Jan 2014 13:57:47 +0100 Subject: [PATCH 14/76] Always print the mouse cursor, even if coordinates haven't changed. This makes sure that the cursor is always visible, even if the program has written text to the screen (only valid for non-P/M mouse callbacks). --- libsrc/atari/mou/atrjoy.s | 11 ++--------- libsrc/atari/mou/atrst.s | 23 ++--------------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/libsrc/atari/mou/atrjoy.s b/libsrc/atari/mou/atrjoy.s index 9915a4ff1..2c2d2c178 100644 --- a/libsrc/atari/mou/atrjoy.s +++ b/libsrc/atari/mou/atrjoy.s @@ -120,12 +120,8 @@ INSTALL: dex bpl @L1 -; Be sure the mouse cursor is invisible and at the default location. We -; need to do that here, because our mouse interrupt handler doesn't set the -; mouse position if it hasn't changed. +; Be sure the mouse cursor is invisible and at the default location. - php - sei jsr CHIDE lda XPos ldx XPos+1 @@ -133,7 +129,6 @@ INSTALL: lda YPos ldx YPos+1 jsr CMOVEY - plp ; Done, return zero (= MOUSE_ERR_OK) @@ -316,7 +311,7 @@ INFO: jsr POS IOCTL: lda #MOUSE_ERR_INV_IOCTL -hlprts: rts + rts ;---------------------------------------------------------------------------- ; IRQ: Irq handler entry point. Called as a subroutine but in IRQ context @@ -339,8 +334,6 @@ IRQ: and #15 ; clear joystick #1 bits eor #15 sta Temp - clc - beq hlprts ; no movement, do nothing jsr CHIDE diff --git a/libsrc/atari/mou/atrst.s b/libsrc/atari/mou/atrst.s index 04580f31a..03f9f0b53 100644 --- a/libsrc/atari/mou/atrst.s +++ b/libsrc/atari/mou/atrst.s @@ -170,11 +170,8 @@ INSTALL: dex bpl @L1 -; Be sure the mouse cursor is invisible and at the default location. We -; need to do that here, because our mouse interrupt handler doesn't set the -; mouse position if it hasn't changed. +; Be sure the mouse cursor is invisible and at the default location. - sei jsr CHIDE lda XPos sta XPosWrk @@ -186,7 +183,6 @@ INSTALL: ldx YPos+1 stx YPosWrk+1 jsr CMOVEY - cli ; Install timer irq routine to poll mouse. @@ -470,22 +466,7 @@ IRQ: ldx #MOUSE_BTN_LEFT @L0: stx Buttons -; Update coordinates if needed - - lda XPosWrk - cmp XPos - bne @Update - lda XPosWrk+1 - cmp XPos+1 - bne @Update - lda YPosWrk - cmp YPos - bne @Update - lda YPosWrk+1 - cmp YPos+1 - beq @Done - -@Update:ldx visible + ldx visible beq @L1 jsr CHIDE From 09aa007191b79fcf90ceea8e6d6bd74ba8ec8f67 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Tue, 14 Jan 2014 14:00:17 +0100 Subject: [PATCH 15/76] Change display logic of mouse cursor (hide and show functions). --- libsrc/atari/mcbdefault.s | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/libsrc/atari/mcbdefault.s b/libsrc/atari/mcbdefault.s index e1b78f033..11b7e07be 100644 --- a/libsrc/atari/mcbdefault.s +++ b/libsrc/atari/mcbdefault.s @@ -49,13 +49,12 @@ cursor = 11 ; '+' screen code' getcursor: column: ldy #$00 ; Patched at runtime - lda (scrptr),y ; Patched at runtime - cmp #cursor + lda (scrptr),y rts setcursor: - lda #cursor -setscr: sta (scrptr),y ; Patched at runtime +column2:ldy #$00 ; Patched at runtime + sta (scrptr),y rts ; ------------------------------------------------------------------------ @@ -67,16 +66,19 @@ done: ; Hide the mouse cursor. hide: - jsr getcursor ; Cursor visible at current position? - bne done ; No, we're done - lda backup ; Get character at cursor position - jmp setscr ; Draw character + jsr getcursor ; Get character at cursor position + cmp #cursor ; "mouse" character + bne overwr ; no, probably program has overwritten it + lda backup ; + jmp setcursor ; Draw character +overwr: sta backup + rts ; Show the mouse cursor. show: jsr getcursor ; Cursor visible at current position? - beq done ; Yes, we're done sta backup ; Save character at cursor position + lda #cursor jmp setcursor ; Draw cursor @@ -87,6 +89,7 @@ movex: lsr a ; convert to character position lsr a sta column+1 + sta column2+1 rts ; Move the mouse cursor y position to the value in A/X. From d61b8754fb522d815c60294fe10a8134de97df64 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 18 Jan 2014 00:02:29 +0100 Subject: [PATCH 16/76] Adapt to new mouse driver interface ('prep' and 'draw') --- libsrc/atari/mcbdefault.s | 11 ++++++++++ libsrc/atari/mou/atrjoy.s | 32 ++++++++++------------------ libsrc/atari/mou/atrst.s | 44 +++++++++++++-------------------------- 3 files changed, 36 insertions(+), 51 deletions(-) diff --git a/libsrc/atari/mcbdefault.s b/libsrc/atari/mcbdefault.s index 11b7e07be..ac5056cf9 100644 --- a/libsrc/atari/mcbdefault.s +++ b/libsrc/atari/mcbdefault.s @@ -21,6 +21,7 @@ .bss backup: .res 1 +visible:.res 1 ; ------------------------------------------------------------------------ @@ -36,6 +37,8 @@ scrptr: .res 2 _mouse_def_callbacks: .addr hide .addr show + .addr prep + .addr draw .addr movex .addr movey @@ -66,6 +69,9 @@ done: ; Hide the mouse cursor. hide: + dec visible + +prep: jsr getcursor ; Get character at cursor position cmp #cursor ; "mouse" character bne overwr ; no, probably program has overwritten it @@ -76,6 +82,11 @@ overwr: sta backup ; Show the mouse cursor. show: + inc visible + +draw: + lda visible + beq done jsr getcursor ; Cursor visible at current position? sta backup ; Save character at cursor position lda #cursor diff --git a/libsrc/atari/mou/atrjoy.s b/libsrc/atari/mou/atrjoy.s index 2c2d2c178..aa61615ad 100644 --- a/libsrc/atari/mou/atrjoy.s +++ b/libsrc/atari/mou/atrjoy.s @@ -50,6 +50,8 @@ HEADER: CHIDE: jmp $0000 ; Hide the cursor CSHOW: jmp $0000 ; Show the cursor +CPREP: jmp $0000 ; Prepare to move the cursor +CDRAW: jmp $0000 ; Draw the cursor CMOVEX: jmp $0000 ; Move the cursor to X coord CMOVEY: jmp $0000 ; Move the cursor to Y coord @@ -85,7 +87,6 @@ Buttons: .res 1 ; Button mask Temp: .res 1 ; Temporary value used in the int handler -visible: .res 1 ; Default values for above variables @@ -120,9 +121,8 @@ INSTALL: dex bpl @L1 -; Be sure the mouse cursor is invisible and at the default location. +; Make sure the mouse cursor is at the default location. - jsr CHIDE lda XPos ldx XPos+1 jsr CMOVEX @@ -149,8 +149,7 @@ UNINSTALL = HIDE ; Hide cursor on exit ; no special action is required besides hiding the mouse cursor. ; No return code required. -HIDE: dec visible - php +HIDE: php sei jsr CHIDE plp @@ -163,8 +162,7 @@ HIDE: dec visible ; no special action is required besides enabling the mouse cursor. ; No return code required. -SHOW: inc visible - php +SHOW: php sei jsr CSHOW plp @@ -225,7 +223,7 @@ MOVE: php pha txa pha - jsr CHIDE + jsr CPREP pla tax pla @@ -241,15 +239,11 @@ MOVE: php dey lda (sp),y sta XPos ; New X position - jsr CMOVEX ; Move the cursor - lda visible - beq @Ret - - jsr CSHOW + jsr CDRAW -@Ret: plp ; Restore interrupt flag + plp ; Restore interrupt flag rts ;---------------------------------------------------------------------------- @@ -335,7 +329,7 @@ IRQ: eor #15 sta Temp - jsr CHIDE + jsr CPREP ; Check left/right @@ -435,11 +429,7 @@ IRQ: ; Done -@SkipY: lda visible - beq @Done - - jsr CSHOW - -@Done: clc ; Interrupt not "handled" +@SkipY: jsr CDRAW + clc ; Interrupt not "handled" rts diff --git a/libsrc/atari/mou/atrst.s b/libsrc/atari/mou/atrst.s index 03f9f0b53..116cecee2 100644 --- a/libsrc/atari/mou/atrst.s +++ b/libsrc/atari/mou/atrst.s @@ -60,6 +60,8 @@ libref: .addr $0000 CHIDE: jmp $0000 ; Hide the cursor CSHOW: jmp $0000 ; Show the cursor +CPREP: jmp $0000 ; Prepare to move the cursor +CDRAW: jmp $0000 ; Draw the cursor CMOVEX: jmp $0000 ; Move the cursor to X coord CMOVEY: jmp $0000 ; Move the cursor to Y coord @@ -96,8 +98,6 @@ Buttons: .res 1 ; Button mask XPosWrk: .res 2 YPosWrk: .res 2 -visible: .res 1 - .if .defined (AMIGA_MOUSE) .or .defined (ST_MOUSE) dumx: .res 1 dumy: .res 1 @@ -170,9 +170,8 @@ INSTALL: dex bpl @L1 -; Be sure the mouse cursor is invisible and at the default location. +; Make sure the mouse cursor is at the default location. - jsr CHIDE lda XPos sta XPosWrk ldx XPos+1 @@ -276,8 +275,7 @@ UNINSTALL: ; no special action is required besides hiding the mouse cursor. ; No return code required. -HIDE: dec visible - php +HIDE: php sei jsr CHIDE plp @@ -290,8 +288,7 @@ HIDE: dec visible ; no special action is required besides enabling the mouse cursor. ; No return code required. -SHOW: inc visible - php +SHOW: php sei jsr CSHOW plp @@ -352,13 +349,8 @@ MOVE: php pha txa pha - - lda visible - beq @L01 - - jsr CHIDE - -@L01: pla + jsr CPREP + pla tax pla @@ -377,15 +369,11 @@ MOVE: php lda (sp),y sta XPos ; New X position sta XPosWrk - jsr CMOVEX ; Move the cursor - lda visible - beq @Ret + jsr CDRAW - jsr CSHOW - -@Ret: plp ; Restore interrupt flag + plp ; Restore interrupt flag rts ;---------------------------------------------------------------------------- @@ -466,13 +454,11 @@ IRQ: ldx #MOUSE_BTN_LEFT @L0: stx Buttons - ldx visible - beq @L1 - jsr CHIDE + jsr CPREP ; Limit the X coordinate to the bounding box -@L1: lda XPosWrk+1 + lda XPosWrk+1 ldy XPosWrk tax cpy XMin @@ -518,14 +504,12 @@ IRQ: tya jsr CMOVEY - ldx visible - beq @Done + jsr CDRAW - jsr CSHOW - -@Done: clc + clc rts + ;---------------------------------------------------------------------------- ; T1Han: Local IRQ routine to poll mouse ; From 6026776460e193551f9d1e186e3d8d4a9cf459c0 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sun, 5 Jan 2014 16:43:17 +0100 Subject: [PATCH 17/76] Trakball mouse driver --- libsrc/atari/mou/atrtt.s | 481 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 481 insertions(+) create mode 100644 libsrc/atari/mou/atrtt.s diff --git a/libsrc/atari/mou/atrtt.s b/libsrc/atari/mou/atrtt.s new file mode 100644 index 000000000..16ed32602 --- /dev/null +++ b/libsrc/atari/mou/atrtt.s @@ -0,0 +1,481 @@ +; +; Mouse driver for Atari Trakball +; +; Christian Groessler, 2014-01-05 +; + + .include "zeropage.inc" + .include "mouse-kernel.inc" + .include "atari.inc" + + .macpack generic + +; ------------------------------------------------------------------------ +; Header. Includes jump table + +.segment "JUMPTABLE" + +HEADER: + +; Driver signature + + .byte $6d, $6f, $75 ; "mou" + .byte MOUSE_API_VERSION ; Mouse driver API version number + +; Library reference + + .addr $0000 + +; Jump table + + .addr INSTALL + .addr UNINSTALL + .addr HIDE + .addr SHOW + .addr SETBOX + .addr GETBOX + .addr MOVE + .addr BUTTONS + .addr POS + .addr INFO + .addr IOCTL + .addr IRQ + +; Mouse driver flags + + .byte MOUSE_FLAG_LATE_IRQ + +; Callback table, set by the kernel before INSTALL is called + +CHIDE: jmp $0000 ; Hide the cursor +CSHOW: jmp $0000 ; Show the cursor +CMOVEX: jmp $0000 ; Move the cursor to X coord +CMOVEY: jmp $0000 ; Move the cursor to Y coord + + +;---------------------------------------------------------------------------- +; Constants + +SCREEN_HEIGHT = 191 +SCREEN_WIDTH = 319 + +.enum JOY + UP = $01 + DOWN = $02 + LEFT = $04 + RIGHT = $08 +.endenum + +;---------------------------------------------------------------------------- +; Global variables. The bounding box values are sorted so that they can be +; written with the least effort in the SETBOX and GETBOX routines, so don't +; reorder them. + +.bss + +Vars: +YPos: .res 2 ; Current mouse position, Y +XPos: .res 2 ; Current mouse position, X +XMin: .res 2 ; X1 value of bounding box +YMin: .res 2 ; Y1 value of bounding box +XMax: .res 2 ; X2 value of bounding box +YMax: .res 2 ; Y2 value of bounding box +Buttons: .res 1 ; Button mask + + +visible: .res 1 + +; Default values for above variables + +.rodata + +.proc DefVars + .word SCREEN_HEIGHT/2 ; YPos + .word SCREEN_WIDTH/2 ; XPos + .word 0 ; XMin + .word 0 ; YMin + .word SCREEN_WIDTH ; XMax + .word SCREEN_HEIGHT ; YMax + .byte 0 ; Buttons +.endproc + +.code + +;---------------------------------------------------------------------------- +; INSTALL routine. Is called after the driver is loaded into memory. If +; possible, check if the hardware is present. +; Must return an MOUSE_ERR_xx code in a/x. + +INSTALL: + +; Initialize variables. Just copy the default stuff over + + ldx #.sizeof(DefVars)-1 +@L1: lda DefVars,x + sta Vars,x + dex + bpl @L1 + +; Be sure the mouse cursor is invisible and at the default location. We +; need to do that here, because our mouse interrupt handler doesn't set the +; mouse position if it hasn't changed. + + php + sei + jsr CHIDE + lda XPos + ldx XPos+1 + jsr CMOVEX + lda YPos + ldx YPos+1 + jsr CMOVEY + plp + +; Done, return zero (= MOUSE_ERR_OK) + + ldx #$00 + txa + rts + +;---------------------------------------------------------------------------- +; UNINSTALL routine. Is called before the driver is removed from memory. +; No return code required (the driver is removed from memory on return). + +UNINSTALL = HIDE ; Hide cursor on exit + +;---------------------------------------------------------------------------- +; HIDE routine. Is called to hide the mouse pointer. The mouse kernel manages +; a counter for calls to show/hide, and the driver entry point is only called +; if the mouse is currently visible and should get hidden. For most drivers, +; no special action is required besides hiding the mouse cursor. +; No return code required. + +HIDE: dec visible + php + sei + jsr CHIDE + plp + rts + +;---------------------------------------------------------------------------- +; SHOW routine. Is called to show the mouse pointer. The mouse kernel manages +; a counter for calls to show/hide, and the driver entry point is only called +; if the mouse is currently hidden and should become visible. For most drivers, +; no special action is required besides enabling the mouse cursor. +; No return code required. + +SHOW: inc visible + php + sei + jsr CSHOW + plp + rts + +;---------------------------------------------------------------------------- +; SETBOX: Set the mouse bounding box. The parameters are passed as they come +; from the C program, that is, a pointer to a mouse_box struct in a/x. +; No checks are done if the mouse is currently inside the box, this is the job +; of the caller. It is not necessary to validate the parameters, trust the +; caller and save some code here. No return code required. + +SETBOX: sta ptr1 + stx ptr1+1 ; Save data pointer + + ldy #.sizeof (MOUSE_BOX)-1 + php + sei + +@L1: lda (ptr1),y + sta XMin,y + dey + bpl @L1 + + plp + rts + +;---------------------------------------------------------------------------- +; GETBOX: Return the mouse bounding box. The parameters are passed as they +; come from the C program, that is, a pointer to a mouse_box struct in a/x. + +GETBOX: sta ptr1 + stx ptr1+1 ; Save data pointer + + ldy #.sizeof (MOUSE_BOX)-1 + php + sei + +@L1: lda XMin,y + sta (ptr1),y + dey + bpl @L1 + + plp + rts + +;---------------------------------------------------------------------------- +; MOVE: Move the mouse to a new position. The position is passed as it comes +; from the C program, that is: X on the stack and Y in a/x. The C wrapper will +; remove the parameter from the stack on return. +; No checks are done if the new position is valid (within the bounding box or +; the screen). No return code required. +; + +MOVE: php + sei ; No interrupts + + pha + lda visible + beq @nohide + txa + pha + jsr CHIDE + pla + tax +@nohide:pla + + sta YPos + stx YPos+1 ; New Y position + jsr CMOVEY ; Set it + + ldy #$01 + lda (sp),y + sta XPos+1 + tax + dey + lda (sp),y + sta XPos ; New X position + + jsr CMOVEX ; Move the cursor + + lda visible + beq @Ret + + jsr CSHOW + +@Ret: plp ; Restore interrupt flag + rts + +;---------------------------------------------------------------------------- +; BUTTONS: Return the button mask in a/x. + +BUTTONS: + lda Buttons + ldx #$00 + rts + +;---------------------------------------------------------------------------- +; POS: Return the mouse position in the MOUSE_POS struct pointed to by ptr1. +; No return code required. + +POS: ldy #MOUSE_POS::XCOORD ; Structure offset + + php + sei ; Disable interrupts + lda XPos ; Transfer the position + sta (ptr1),y + lda XPos+1 + iny + sta (ptr1),y + lda YPos + iny + sta (ptr1),y + lda YPos+1 + plp ; Restore interrupt flag + + iny + sta (ptr1),y ; Store last byte + + rts ; Done + +;---------------------------------------------------------------------------- +; INFO: Returns mouse position and current button mask in the MOUSE_INFO +; struct pointed to by ptr1. No return code required. +; +; We're cheating here to keep the code smaller: The first fields of the +; mouse_info struct are identical to the mouse_pos struct, so we will just +; call _mouse_pos to initialize the struct pointer and fill the position +; fields. + +INFO: jsr POS + +; Fill in the button state + + lda Buttons + ldy #MOUSE_INFO::BUTTONS + sta (ptr1),y + + rts + +;---------------------------------------------------------------------------- +; IOCTL: Driver defined entry point. The wrapper will pass a pointer to ioctl +; specific data in ptr1, and the ioctl code in A. +; Must return an error code in a/x. +; + +IOCTL: lda #MOUSE_ERR_INV_IOCTL + rts + +;---------------------------------------------------------------------------- +; IRQ: Irq handler entry point. Called as a subroutine but in IRQ context +; (so be careful). The routine MUST return carry set if the interrupt has been +; 'handled' - which means that the interrupt source is gone. Otherwise it +; MUST return carry clear. +; + +IRQ: + +; Check for a pressed button and place the result into Buttons + + ldx #0 + stx XPos+1 + stx YPos+1 + lda TRIG0 ; joystick #0 trigger + bne @L00 ; not pressed + ldx #MOUSE_BTN_LEFT +@L00: stx Buttons + + lda PORTA ; get other buttons + eor #255 + tax + and #4 + beq @L01 + lda #MOUSE_BTN_LEFT + ora Buttons + sta Buttons +@L01: txa + and #8 + beq @L02 + lda #MOUSE_BTN_RIGHT + ora Buttons + sta Buttons + +@L02: lda visible + beq @L03 + jsr CHIDE + +; Get cursor position +; ------------------- +; The touchpad is read thru the paddle potentiometers. The possible +; values are 1..228. Since the maximum value is less than the X +; dimension we have to "stretch" this value. In order to use only +; divisions by powers of two, we use the following appoximation: +; 320/227 = 1.4096 +; 1+1/2-1/8+1/32 = 1.4062 +; For Y we subtract 1/8 of it to get in the YMax ballpark. +; 228-228/8=199.5 +; A small area in the Y dimension of the touchpad isn't used with +; this approximation. The Y value is inverted, (0,0) is the bottom +; left corner of the touchpad. + +; X + +@L03: ldx PADDL0 ; get X postion + dex ; decrement, since it's 1-based + stx XPos + txa + lsr a + tax + clc + adc XPos + sta XPos + bcc @L04 + inc XPos+1 +@L04: txa + lsr a ; port value / 4 + lsr a ; port value / 8 + tax + sec + lda XPos + stx XPos + sbc XPos + sta XPos + bcs @L05 + dec XPos+1 +@L05: txa + lsr a ; port value / 16 + lsr a ; port value / 32 + clc + adc XPos + sta XPos + bcc @L06 + inc XPos+1 + +@L06: tay + lda XPos+1 + tax + +; Limit the X coordinate to the bounding box + + cpy XMin + sbc XMin+1 + bpl @L07 + ldy XMin + ldx XMin+1 + jmp @L08 +@L07: txa + + cpy XMax + sbc XMax+1 + bmi @L08 + ldy XMax + ldx XMax+1 +@L08: sty XPos + stx XPos+1 + +; Move the mouse pointer to the new X pos + + tya + jsr CMOVEX + +; Y + + ldx PADDL1 ; get Y postion + dex ; decrement, since it's 1-based + stx YPos + lda #228 + sec + sbc YPos ; invert value + tax + lsr a + lsr a + lsr a + sta YPos + txa + sec + sbc YPos + sta YPos + tay + lda YPos+1 + tax + +; Limit the Y coordinate to the bounding box + + cpy YMin + sbc YMin+1 + bpl @L09 + ldy YMin + ldx YMin+1 + jmp @L10 +@L09: txa + + cpy YMax + sbc YMax+1 + bmi @L10 + ldy YMax + ldx YMax+1 +@L10: sty YPos + stx YPos+1 + +; Move the mouse pointer to the new X pos + + tya + jsr CMOVEY + + lda visible + beq @L11 + jsr CSHOW + +@L11: clc ; Interrupt not "handled" + rts + From 97d512a1e180c1c9faa64b04d42e59cc1c9ac1d7 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Mon, 6 Jan 2014 13:36:09 +0100 Subject: [PATCH 18/76] Detect pen button. If we read 228 for X or Y position, don't change cursor position, since the pen was probably lifted from the pad. --- libsrc/atari/mou/atrtt.s | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/libsrc/atari/mou/atrtt.s b/libsrc/atari/mou/atrtt.s index 16ed32602..5bf9e38a2 100644 --- a/libsrc/atari/mou/atrtt.s +++ b/libsrc/atari/mou/atrtt.s @@ -330,15 +330,12 @@ IRQ: ldx #0 stx XPos+1 stx YPos+1 - lda TRIG0 ; joystick #0 trigger - bne @L00 ; not pressed - ldx #MOUSE_BTN_LEFT -@L00: stx Buttons + stx Buttons lda PORTA ; get other buttons eor #255 tax - and #4 + and #5 ; pen button and left button are mapped to left mouse button beq @L01 lda #MOUSE_BTN_LEFT ora Buttons @@ -350,7 +347,18 @@ IRQ: ora Buttons sta Buttons -@L02: lda visible +; If we read 228 for X or Y positions, we assume the user has lifted the pen +; and don't change the cursor position. + +@L02: lda PADDL0 + cmp #228 + beq @Dont + lda PADDL1 + cmp #228 + bne @Do +@Dont: jmp @Done + +@Do: lda visible beq @L03 jsr CHIDE @@ -473,9 +481,9 @@ IRQ: jsr CMOVEY lda visible - beq @L11 + beq @Done jsr CSHOW -@L11: clc ; Interrupt not "handled" +@Done: clc ; Interrupt not "handled" rts From ecd10e632a65ea0cc256ed2797de15e6f776e231 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Wed, 8 Jan 2014 02:28:39 +0100 Subject: [PATCH 19/76] some comment fixes --- libsrc/atari/mou/atrtt.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/atari/mou/atrtt.s b/libsrc/atari/mou/atrtt.s index 5bf9e38a2..dc402db26 100644 --- a/libsrc/atari/mou/atrtt.s +++ b/libsrc/atari/mou/atrtt.s @@ -1,5 +1,5 @@ ; -; Mouse driver for Atari Trakball +; Mouse driver for Atari Touch Tablet ; ; Christian Groessler, 2014-01-05 ; @@ -364,7 +364,7 @@ IRQ: ; Get cursor position ; ------------------- -; The touchpad is read thru the paddle potentiometers. The possible +; The touch pad is read thru the paddle potentiometers. The possible ; values are 1..228. Since the maximum value is less than the X ; dimension we have to "stretch" this value. In order to use only ; divisions by powers of two, we use the following appoximation: From 1fd7c2b3182e83242cc030aed5df2cfc2a4353b3 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 11 Jan 2014 01:49:21 +0100 Subject: [PATCH 20/76] fix bug where the high byte of X and Y positions were destroyed of the user had lifted the pen --- libsrc/atari/mou/atrtt.s | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/libsrc/atari/mou/atrtt.s b/libsrc/atari/mou/atrtt.s index dc402db26..9d2dac1c9 100644 --- a/libsrc/atari/mou/atrtt.s +++ b/libsrc/atari/mou/atrtt.s @@ -89,6 +89,8 @@ visible: .res 1 .rodata +; (We use ".proc" because we want to define both a label and a scope.) + .proc DefVars .word SCREEN_HEIGHT/2 ; YPos .word SCREEN_WIDTH/2 ; XPos @@ -328,14 +330,12 @@ IRQ: ; Check for a pressed button and place the result into Buttons ldx #0 - stx XPos+1 - stx YPos+1 stx Buttons lda PORTA ; get other buttons eor #255 tax - and #5 ; pen button and left button are mapped to left mouse button + and #5 ; pen button and left button are mapped to left mouse button beq @L01 lda #MOUSE_BTN_LEFT ora Buttons @@ -350,18 +350,22 @@ IRQ: ; If we read 228 for X or Y positions, we assume the user has lifted the pen ; and don't change the cursor position. -@L02: lda PADDL0 - cmp #228 - beq @Dont - lda PADDL1 - cmp #228 - bne @Do -@Dont: jmp @Done +@L02: lda PADDL0 + cmp #228 + beq @Dont + lda PADDL1 + cmp #228 + bne @Do +@Dont: jmp @Done -@Do: lda visible +@Do: lda visible beq @L03 jsr CHIDE +@L03: ldx #0 + stx XPos+1 + stx YPos+1 + ; Get cursor position ; ------------------- ; The touch pad is read thru the paddle potentiometers. The possible @@ -378,7 +382,7 @@ IRQ: ; X -@L03: ldx PADDL0 ; get X postion + ldx PADDL0 ; get X postion dex ; decrement, since it's 1-based stx XPos txa From 9e155eb096412bc38e3bb71fbcf292743eb7c149 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Tue, 14 Jan 2014 13:59:42 +0100 Subject: [PATCH 21/76] Always print the mouse cursor, even if coordinates haven't changed. This makes sure that the cursor is always visible, even if the program has written text to the screen (only valid for non-P/M mouse callbacks). --- libsrc/atari/mou/atrtt.s | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/libsrc/atari/mou/atrtt.s b/libsrc/atari/mou/atrtt.s index 9d2dac1c9..f58838720 100644 --- a/libsrc/atari/mou/atrtt.s +++ b/libsrc/atari/mou/atrtt.s @@ -118,12 +118,8 @@ INSTALL: dex bpl @L1 -; Be sure the mouse cursor is invisible and at the default location. We -; need to do that here, because our mouse interrupt handler doesn't set the -; mouse position if it hasn't changed. +; Be sure the mouse cursor is invisible and at the default location. - php - sei jsr CHIDE lda XPos ldx XPos+1 @@ -131,7 +127,6 @@ INSTALL: lda YPos ldx YPos+1 jsr CMOVEY - plp ; Done, return zero (= MOUSE_ERR_OK) @@ -352,15 +347,18 @@ IRQ: @L02: lda PADDL0 cmp #228 - beq @Dont + beq @Cont ; CF set if equal lda PADDL1 - cmp #228 - bne @Do -@Dont: jmp @Done + cmp #228 ; CF set if equal -@Do: lda visible - beq @L03 +@Cont: lda visible + beq @Go + php ; remember CF jsr CHIDE + plp ; restore CF + +@Go: bcc @L03 + jmp @Show @L03: ldx #0 stx XPos+1 @@ -484,7 +482,7 @@ IRQ: tya jsr CMOVEY - lda visible +@Show: lda visible beq @Done jsr CSHOW From 63ce6e28fef215bd571cff9ef35306563d3dea9f Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 18 Jan 2014 00:02:40 +0100 Subject: [PATCH 22/76] Adapt to new mouse driver interface ('prep' and 'draw') --- libsrc/atari/mou/atrtt.s | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/libsrc/atari/mou/atrtt.s b/libsrc/atari/mou/atrtt.s index f58838720..e373ec015 100644 --- a/libsrc/atari/mou/atrtt.s +++ b/libsrc/atari/mou/atrtt.s @@ -49,6 +49,8 @@ HEADER: CHIDE: jmp $0000 ; Hide the cursor CSHOW: jmp $0000 ; Show the cursor +CPREP: jmp $0000 ; Prepare to move the cursor +CDRAW: jmp $0000 ; Draw the cursor CMOVEX: jmp $0000 ; Move the cursor to X coord CMOVEY: jmp $0000 ; Move the cursor to Y coord @@ -82,9 +84,6 @@ XMax: .res 2 ; X2 value of bounding box YMax: .res 2 ; Y2 value of bounding box Buttons: .res 1 ; Button mask - -visible: .res 1 - ; Default values for above variables .rodata @@ -118,9 +117,8 @@ INSTALL: dex bpl @L1 -; Be sure the mouse cursor is invisible and at the default location. +; Make sure the mouse cursor is at the default location. - jsr CHIDE lda XPos ldx XPos+1 jsr CMOVEX @@ -147,8 +145,7 @@ UNINSTALL = HIDE ; Hide cursor on exit ; no special action is required besides hiding the mouse cursor. ; No return code required. -HIDE: dec visible - php +HIDE: php sei jsr CHIDE plp @@ -161,8 +158,7 @@ HIDE: dec visible ; no special action is required besides enabling the mouse cursor. ; No return code required. -SHOW: inc visible - php +SHOW: php sei jsr CSHOW plp @@ -221,14 +217,12 @@ MOVE: php sei ; No interrupts pha - lda visible - beq @nohide txa pha - jsr CHIDE + jsr CPREP pla tax -@nohide:pla + pla sta YPos stx YPos+1 ; New Y position @@ -241,15 +235,11 @@ MOVE: php dey lda (sp),y sta XPos ; New X position - jsr CMOVEX ; Move the cursor - lda visible - beq @Ret - jsr CSHOW -@Ret: plp ; Restore interrupt flag + plp ; Restore interrupt flag rts ;---------------------------------------------------------------------------- @@ -351,13 +341,11 @@ IRQ: lda PADDL1 cmp #228 ; CF set if equal -@Cont: lda visible - beq @Go - php ; remember CF - jsr CHIDE +@Cont: php ; remember CF + jsr CPREP plp ; restore CF -@Go: bcc @L03 + bcc @L03 jmp @Show @L03: ldx #0 @@ -482,10 +470,8 @@ IRQ: tya jsr CMOVEY -@Show: lda visible - beq @Done - jsr CSHOW +@Show: jsr CDRAW -@Done: clc ; Interrupt not "handled" + clc ; Interrupt not "handled" rts From 478da8e51f1e294649b4ee2b861ff15e965b18af Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Thu, 20 Feb 2014 00:45:48 +0100 Subject: [PATCH 23/76] load CASHDR segment into RAM --- cfg/atari-cassette.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cfg/atari-cassette.cfg b/cfg/atari-cassette.cfg index ba640a54e..e69abfb4e 100644 --- a/cfg/atari-cassette.cfg +++ b/cfg/atari-cassette.cfg @@ -14,7 +14,7 @@ MEMORY { # HEADER: file = "", start = $0000, size = $0002; # CASHDR: file = %O, start = $3FD, size = 128, fill = yes; - CASHDR: file = %O, start = $0, size = 6; +# CASHDR: file = %O, start = $0, size = 6; # "main program" load chunk # MAINHDR: file = "", start = $0000, size = $0004; RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S; @@ -23,7 +23,8 @@ MEMORY { SEGMENTS { # EXEHDR: load = HEADER, type = ro; # MAINHDR: load = MAINHDR, type = ro; - CASHDR: load = CASHDR, type = ro; +# CASHDR: load = CASHDR, type = ro; + CASHDR: load = RAM, type = ro; CASINIT: load = RAM, type = ro; STARTUP: load = RAM, type = ro, define = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes; From 8178c71de1da66a8093a7a308541a5a1b75441fc Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Thu, 20 Feb 2014 00:56:22 +0100 Subject: [PATCH 24/76] add utility program to write files to cassette --- util/atari/w2cas.c | 186 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 util/atari/w2cas.c diff --git a/util/atari/w2cas.c b/util/atari/w2cas.c new file mode 100644 index 000000000..38c2f0fdf --- /dev/null +++ b/util/atari/w2cas.c @@ -0,0 +1,186 @@ +/* w2cas.c -- write file to cassette + * + * This program writes a boot file (typically linked with + * 'atari-cassette.cfg') to the cassette. + * Only files < 32K are supported, since the loading of + * larger files requires a special loader inside the program. + * + * Christian Groessler, chris@groessler.org, 2014 + */ + +#include +#include +#include +#include +#include <6502.h> +#include +#include + +static int verbose = 1; +static char C_dev[] = "C:"; + +static struct __iocb *findfreeiocb(void) +{ + struct __iocb *iocb = &IOCB; /* first IOCB (#0) */ + int i; + + for (i = 0; i < 8; i++) { + if (iocb->handler == 0xff) + return iocb; + iocb++; + } + return NULL; +} + +int main(int argc, char **argv) +{ + char *filename, *x; + char buf[20]; + FILE *file; + unsigned char *buffer; + size_t filen, buflen = 32768l + 1; + struct regs regs; + struct __iocb *iocb = findfreeiocb(); + int iocb_num; + + if (! iocb) { + fprintf(stderr, "couldn't find a free iocb\n"); + if (_dos_type != 1) + cgetc(); + return 1; + } + iocb_num = (iocb - &IOCB) * 16; + if (verbose) + printf("using iocb index $%02X ($%04X)\n", iocb_num, iocb); + + if (argc < 2) { + printf("\nfilename: "); + x = fgets(buf, 19, stdin); + printf("\n"); + if (! x) + return 1; + if (*x && *(x + strlen(x) - 1) == '\n') + *(x + strlen(x) - 1) = 0; + filename = x; + } + else { + filename = *(argv+1); + } + + /* allocate buffer */ + buffer = malloc(buflen); + if (! buffer) { + buflen = _heapmaxavail() - 8; /* get as much as we can */ + buffer = malloc(buflen); + if (! buffer) { + fprintf(stderr, "cannot alloc %ld bytes -- aborting...\n", (long)buflen); + if (_dos_type != 1) + cgetc(); + return 1; + } + } + if (verbose) + printf("buffer size: %ld bytes\n", (long)buflen); + + /* open file */ + file = fopen(filename, "rb"); + if (! file) { + free(buffer); + fprintf(stderr, "cannot open '%s': %s\n", filename, strerror(errno)); + if (_dos_type != 1) + cgetc(); + return 1; + } + + /* read file -- file length must be < 32K */ + if (verbose) + printf("reading input file...\n"); + filen = fread(buffer, 1, buflen, file); + if (! filen) { + fprintf(stderr, "read error\n"); + file_err: + fclose(file); + free(buffer); + if (_dos_type != 1) + cgetc(); + return 1; + } + if (filen > 32767l) { + fprintf(stderr, "file is too large (must be < 32768)\n"); + goto file_err; + } + if (filen == buflen) { /* we have a buffer < 32768 and the file fits into it (and is most probably larger) */ + fprintf(stderr, "not enough memory\n"); + goto file_err; + } + if (verbose) + printf("file size: %ld bytes\n", (long)filen); + + /* close input file */ + fclose(file); + + /* open cassette */ + if (verbose) + printf("opening cassette...\n"); + iocb->buffer = C_dev; + iocb->aux1 = 8; /* open for output */ + iocb->aux2 = 128; /* short breaks and no stop between data blocks */ + iocb->command = IOCB_OPEN; + regs.x = iocb_num; + regs.pc = 0xe456; /* CIOV */ + + _sys(®s); + if (regs.y != 1) { + fprintf(stderr, "CIO call to open cassette returned %d\n", regs.y); + free(buffer); + if (_dos_type != 1) + cgetc(); + return 1; + } + + /* write file */ + if (verbose) + printf("writing to cassette...\n"); + iocb->buffer = buffer; + iocb->buflen = filen; + iocb->command = IOCB_PUTCHR; + regs.x = iocb_num; + regs.pc = 0xe456; /* CIOV */ + + _sys(®s); + if (regs.y != 1) { + fprintf(stderr, "CIO call to write file returned %d\n", regs.y); + free(buffer); + + iocb->command = IOCB_CLOSE; + regs.x = iocb_num; + regs.pc = 0xe456; /* CIOV */ + _sys(®s); + + if (_dos_type != 1) + cgetc(); + return 1; + } + + /* free buffer */ + free(buffer); + + /* close cassette */ + iocb->command = IOCB_CLOSE; + regs.x = iocb_num; + regs.pc = 0xe456; /* CIOV */ + _sys(®s); + + if (regs.y != 1) { + fprintf(stderr, "CIO call to close cassette returned %d\n", regs.y); + if (_dos_type != 1) + cgetc(); + return 1; + } + + /* all is fine */ + printf("success\n"); + if (_dos_type != 1) + cgetc(); + return 0; +} From 09f7eb72c247d59d5f1a0bee80039f118e42c658 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 21 Feb 2014 22:42:09 +0100 Subject: [PATCH 25/76] remove workaround for _heapmaxavail --- util/atari/w2cas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/atari/w2cas.c b/util/atari/w2cas.c index 38c2f0fdf..050218cfe 100644 --- a/util/atari/w2cas.c +++ b/util/atari/w2cas.c @@ -70,7 +70,7 @@ int main(int argc, char **argv) /* allocate buffer */ buffer = malloc(buflen); if (! buffer) { - buflen = _heapmaxavail() - 8; /* get as much as we can */ + buflen = _heapmaxavail(); /* get as much as we can */ buffer = malloc(buflen); if (! buffer) { fprintf(stderr, "cannot alloc %ld bytes -- aborting...\n", (long)buflen); From 8b876b2ce50e1c5cb85e62280e9030b9597451fe Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 21 Feb 2014 22:42:54 +0100 Subject: [PATCH 26/76] document 'atari-cassette.cfg' --- doc/atari.sgml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/atari.sgml b/doc/atari.sgml index 9f7a3fbc4..908763a3f 100644 --- a/doc/atari.sgml +++ b/doc/atari.sgml @@ -221,6 +221,16 @@ that the cartridge doesn't prevent the booting of DOS. The option byte will be located at address $BFFD. For more information about its use, see e.g. "Mapping the Atari". + + +This config file can be used to create cassette boot files. It's suited both +for C and assembly language programs. + +The size of a cassette boot file is restricted to 32K. Larger programs +would need to be split in more parts and the parts to be loaded manually. + +To write the generated file to a cassette, an utility program to run +on an Atari is provided ( From 81fe7a38051030924a55ff278469a70c7e5b43c0 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 21 Feb 2014 22:43:44 +0100 Subject: [PATCH 27/76] cleanups; split 'header' and 'init' part into two source files --- cfg/atari-cassette.cfg | 42 ++++++++++++---------------------- libsrc/atari/cashdr.s | 51 ++++++++++++++++++++---------------------- libsrc/atari/casinit.s | 31 +++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 55 deletions(-) create mode 100644 libsrc/atari/casinit.s diff --git a/cfg/atari-cassette.cfg b/cfg/atari-cassette.cfg index e69abfb4e..1099bf91c 100644 --- a/cfg/atari-cassette.cfg +++ b/cfg/atari-cassette.cfg @@ -1,41 +1,27 @@ FEATURES { - STARTADDRESS: default = $1000; + STARTADDRESS: default = $0700; } SYMBOLS { -_cas_init: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __RESERVED_MEMORY__: type = weak, value = $0000; __STARTADDRESS__: type = export, value = %S; - __RESERVED_MEMORY__: type = weak, value = $0000; + _cas_hdr: type = import; } MEMORY { ZP: file = "", define = yes, start = $0082, size = $007E; - -# file header, just $FFFF -# HEADER: file = "", start = $0000, size = $0002; - -# CASHDR: file = %O, start = $3FD, size = 128, fill = yes; -# CASHDR: file = %O, start = $0, size = 6; -# "main program" load chunk -# MAINHDR: file = "", start = $0000, size = $0004; RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S; -# TRAILER: file = "", start = $0000, size = $0006; } SEGMENTS { -# EXEHDR: load = HEADER, type = ro; -# MAINHDR: load = MAINHDR, type = ro; -# CASHDR: load = CASHDR, type = ro; - CASHDR: load = RAM, type = ro; - CASINIT: load = RAM, type = ro; - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, define = yes, optional = yes; - INIT: load = RAM, type = ro, optional = yes; - CODE: load = RAM, type = ro, define = yes; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; -# AUTOSTRT: load = TRAILER, type = ro; + CASHDR: load = RAM, type = ro; + STARTUP: load = RAM, type = ro, define = yes, optional = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; + INIT: load = RAM, type = ro, optional = yes; + CODE: load = RAM, type = ro, define = yes; + RODATA: load = RAM, type = ro, optional = yes; + DATA: load = RAM, type = rw, optional = yes; + BSS: load = RAM, type = bss, define = yes, optional = yes; + ZEROPAGE: load = ZP, type = zp, optional = yes; + EXTZP: load = ZP, type = zp, optional = yes; } FEATURES { CONDES: type = constructor, diff --git a/libsrc/atari/cashdr.s b/libsrc/atari/cashdr.s index 8d3d0868a..99aefe68f 100644 --- a/libsrc/atari/cashdr.s +++ b/libsrc/atari/cashdr.s @@ -1,40 +1,37 @@ ; ; Cassette boot file header ; -; Christian Groessler, chris@groessler.org, 2013 +; Christian Groessler, chris@groessler.org, 2014 ; +;DEBUG = 1 + .ifndef __ATARIXL__ - .include "atari.inc" + .include "atari.inc" - .import __BSS_RUN__, __STARTADDRESS__, start - .export _cas_init + .import __BSS_RUN__, __STARTADDRESS__, _cas_init + .export _cas_hdr + +.assert ((__BSS_RUN__ - __STARTADDRESS__ + 127) / 128) < $101, error, "File to big to load from cassette" + + +; for a description of the cassette header, see De Re Atari, appendix C .segment "CASHDR" - .byte 0 ; ignored - .byte <((__BSS_RUN__ - __STARTADDRESS__ + 127 + 6) / 128) - .word __STARTADDRESS__ - .word _cas_init +_cas_hdr: + .byte 0 ; ignored + .byte <((__BSS_RUN__ - __STARTADDRESS__ + 127) / 128) ; # of 128-byte records to read + .word __STARTADDRESS__ ; load address + .word _cas_init ; init address -.segment "CASINIT" +.ifdef DEBUG + lda #33 + ldy #80 + sta (SAVMSC),y +.endif + clc + rts - lda #33 - ldy #80 - sta (SAVMSC),y - clc - rts - -_cas_init: - lda #34 - ldy #81 - sta (SAVMSC),y - - lda #start - sta DOSVEC+1 - rts - -.endif ; .ifdef __ATARIXL__ +.endif ; .ifdef __ATARIXL__ diff --git a/libsrc/atari/casinit.s b/libsrc/atari/casinit.s new file mode 100644 index 000000000..c91989aad --- /dev/null +++ b/libsrc/atari/casinit.s @@ -0,0 +1,31 @@ +; +; Cassette boot file init routine +; +; Christian Groessler, chris@groessler.org, 2014 +; + +;DEBUG = 1 + +.ifndef __ATARIXL__ + + .include "atari.inc" + + .import start + .export _cas_init + +.segment "INIT" + +_cas_init: +.ifdef DEBUG + lda #34 + ldy #81 + sta (SAVMSC),y +.endif + + lda #start + sta DOSVEC+1 + rts + +.endif ; .ifdef __ATARIXL__ From 4b58a20b8c414527af035ec37c32fc38621d8c2b Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 21 Feb 2014 23:34:05 +0100 Subject: [PATCH 28/76] Increase the default start address a bit in case BASIC is started ('OPTION' not pressed at power on). It would otherwise overwrite parts at the beginning. --- cfg/atari-cassette.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg/atari-cassette.cfg b/cfg/atari-cassette.cfg index 1099bf91c..2116aecd0 100644 --- a/cfg/atari-cassette.cfg +++ b/cfg/atari-cassette.cfg @@ -1,5 +1,5 @@ FEATURES { - STARTADDRESS: default = $0700; + STARTADDRESS: default = $0900; } SYMBOLS { __STACKSIZE__: type = weak, value = $0800; # 2k stack From dec2376195db1faf89aba3dba9c30373768f320d Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 1 Mar 2014 01:48:45 +0100 Subject: [PATCH 29/76] small wording change --- doc/atari.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/atari.sgml b/doc/atari.sgml index 908763a3f..781fdf03b 100644 --- a/doc/atari.sgml +++ b/doc/atari.sgml @@ -229,7 +229,7 @@ for C and assembly language programs. The size of a cassette boot file is restricted to 32K. Larger programs would need to be split in more parts and the parts to be loaded manually. -To write the generated file to a cassette, an utility program to run +To write the generated file to a cassette, a utility to run on an Atari is provided ( From 69f81f6d67a2fb3127adbca68f508c65c1d4dd33 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 1 Mar 2014 13:10:01 +0100 Subject: [PATCH 30/76] make 'w2cas' a targetutil --- doc/atari.sgml | 2 +- libsrc/Makefile | 1 + libsrc/atari/targetutil/Makefile.inc | 14 ++++++++++++++ {util/atari => libsrc/atari/targetutil}/w2cas.c | 0 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 libsrc/atari/targetutil/Makefile.inc rename {util/atari => libsrc/atari/targetutil}/w2cas.c (100%) diff --git a/doc/atari.sgml b/doc/atari.sgml index 781fdf03b..867f25c1d 100644 --- a/doc/atari.sgml +++ b/doc/atari.sgml @@ -230,7 +230,7 @@ The size of a cassette boot file is restricted to 32K. Larger programs would need to be split in more parts and the parts to be loaded manually. To write the generated file to a cassette, a utility to run -on an Atari is provided ( diff --git a/libsrc/Makefile b/libsrc/Makefile index 3d8277ae5..89f952376 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -102,6 +102,7 @@ MKINC = $(GEOS) \ nes TARGETUTIL = apple2 \ + atari \ geos-apple GEOSDIRS = common \ diff --git a/libsrc/atari/targetutil/Makefile.inc b/libsrc/atari/targetutil/Makefile.inc new file mode 100644 index 000000000..eb371e111 --- /dev/null +++ b/libsrc/atari/targetutil/Makefile.inc @@ -0,0 +1,14 @@ +ifeq ($(TARGET),atari) + +DEPS += ../wrk/$(TARGET)/w2cas.d + +../wrk/$(TARGET)/w2cas.o: CC65FLAGS:=-O -W error +../wrk/$(TARGET)/w2cas.o: $(SRCDIR)/targetutil/w2cas.c | ../wrk/$(TARGET) + $(COMPILE_recipe) + +../targetutil/W2CAS.COM: ../wrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../targetutil + $(LD65) -o $@ -t $(TARGET) $^ + +$(TARGET): ../targetutil/W2CAS.COM + +endif diff --git a/util/atari/w2cas.c b/libsrc/atari/targetutil/w2cas.c similarity index 100% rename from util/atari/w2cas.c rename to libsrc/atari/targetutil/w2cas.c From 7a9fa9d4cd69bebf10054f123c836cde768e6884 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Mon, 3 Mar 2014 18:12:11 +0100 Subject: [PATCH 31/76] rename W2CAS.COM to w2cas.com (lowercase) --- doc/atari.sgml | 2 +- libsrc/atari/targetutil/Makefile.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/atari.sgml b/doc/atari.sgml index 867f25c1d..79a3e3015 100644 --- a/doc/atari.sgml +++ b/doc/atari.sgml @@ -230,7 +230,7 @@ The size of a cassette boot file is restricted to 32K. Larger programs would need to be split in more parts and the parts to be loaded manually. To write the generated file to a cassette, a utility to run -on an Atari is provided ( diff --git a/libsrc/atari/targetutil/Makefile.inc b/libsrc/atari/targetutil/Makefile.inc index eb371e111..a54d96100 100644 --- a/libsrc/atari/targetutil/Makefile.inc +++ b/libsrc/atari/targetutil/Makefile.inc @@ -6,9 +6,9 @@ DEPS += ../wrk/$(TARGET)/w2cas.d ../wrk/$(TARGET)/w2cas.o: $(SRCDIR)/targetutil/w2cas.c | ../wrk/$(TARGET) $(COMPILE_recipe) -../targetutil/W2CAS.COM: ../wrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../targetutil +../targetutil/w2cas.com: ../wrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../targetutil $(LD65) -o $@ -t $(TARGET) $^ -$(TARGET): ../targetutil/W2CAS.COM +$(TARGET): ../targetutil/w2cas.com endif From 3f7cd3387f0d70716f8dcbc48f19b7b8dcd0d607 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 3 Mar 2014 21:08:35 +0100 Subject: [PATCH 32/76] Optimize for size instead for speed. --- libsrc/Makefile | 2 +- libsrc/atari/targetutil/Makefile.inc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libsrc/Makefile b/libsrc/Makefile index 89f952376..99da96f1e 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -91,7 +91,7 @@ endef else # TARGET CA65FLAGS = -CC65FLAGS = -Osir -W error +CC65FLAGS = -Or -W error EXTZP = cbm510 \ cbm610 \ diff --git a/libsrc/atari/targetutil/Makefile.inc b/libsrc/atari/targetutil/Makefile.inc index a54d96100..fc91f96a9 100644 --- a/libsrc/atari/targetutil/Makefile.inc +++ b/libsrc/atari/targetutil/Makefile.inc @@ -2,7 +2,6 @@ ifeq ($(TARGET),atari) DEPS += ../wrk/$(TARGET)/w2cas.d -../wrk/$(TARGET)/w2cas.o: CC65FLAGS:=-O -W error ../wrk/$(TARGET)/w2cas.o: $(SRCDIR)/targetutil/w2cas.c | ../wrk/$(TARGET) $(COMPILE_recipe) From fcc95f4c1c42c98fedcd643c4174594deaf08e6e Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 3 Mar 2014 21:16:30 +0100 Subject: [PATCH 33/76] There seems to be no desire for a doc install. --- doc/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 189fa60ee..8c2bb902c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -13,7 +13,7 @@ TOC_LEVEL = 2 GH_PAGES = ../../gh-pages -all: +all mostlyclean install: doc: html info @@ -21,8 +21,6 @@ html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png) info: $(addprefix ../info/,$(SGMLS:.sgml=.info)) -mostlyclean: - clean: $(RM) -r ../html ../info From 50c4fd1c4ce740c8e9ae1e416dc7daa3dbdb5e82 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 3 Mar 2014 22:12:14 +0100 Subject: [PATCH 34/76] Improve MinGW support. - Code specific to Windows was #ifdef'ed with _MSC_VER so it wasn't included with MinGW. So _MSC_VER is replaced with _WIN32. - MinGW doesn't support _get_pgmptr() so it is necessary to directly call the Win32 function GetModuleFileName(). This implies including windows.h which in turn causes a name clash with the Win32 function SearchPath(). So the cc65 type SearchPath is renamed to SearchPaths. --- src/ca65/incpath.c | 6 +++--- src/ca65/incpath.h | 4 ++-- src/cc65/incpath.c | 6 +++--- src/cc65/incpath.h | 4 ++-- src/cl65/main.c | 8 ++++---- src/common/filestat.c | 9 ++++----- src/common/filestat.h | 2 +- src/common/filetime.c | 21 ++++++--------------- src/common/filetime.h | 2 +- src/common/searchpath.c | 29 ++++++++++++++--------------- src/common/searchpath.h | 18 +++++++++--------- src/common/xsprintf.h | 4 ++++ src/ld65/filepath.c | 18 +++++++++--------- src/ld65/filepath.h | 12 ++++++------ src/sim65/paravirt.c | 7 +++++-- 15 files changed, 73 insertions(+), 77 deletions(-) diff --git a/src/ca65/incpath.c b/src/ca65/incpath.c index 76ad3111a..81422b059 100644 --- a/src/ca65/incpath.c +++ b/src/ca65/incpath.c @@ -44,8 +44,8 @@ -SearchPath* IncSearchPath; /* Standard include path */ -SearchPath* BinSearchPath; /* Binary include path */ +SearchPaths* IncSearchPath; /* Standard include path */ +SearchPaths* BinSearchPath; /* Binary include path */ @@ -75,7 +75,7 @@ void FinishIncludePaths (void) AddSubSearchPathFromEnv (IncSearchPath, "CC65_HOME", "asminc"); /* Add some compiled-in search paths if defined at compile time. */ -#ifdef CA65_INC +#if defined(CA65_INC) && !defined(_WIN32) AddSearchPath (IncSearchPath, STRINGIZE (CA65_INC)); #endif diff --git a/src/ca65/incpath.h b/src/ca65/incpath.h index 841767e4b..5e23ebc72 100644 --- a/src/ca65/incpath.h +++ b/src/ca65/incpath.h @@ -49,8 +49,8 @@ -extern SearchPath* IncSearchPath; /* Standard include path */ -extern SearchPath* BinSearchPath; /* Binary include path */ +extern SearchPaths* IncSearchPath; /* Standard include path */ +extern SearchPaths* BinSearchPath; /* Binary include path */ diff --git a/src/cc65/incpath.c b/src/cc65/incpath.c index 7a4b31e94..c74e167de 100644 --- a/src/cc65/incpath.c +++ b/src/cc65/incpath.c @@ -44,8 +44,8 @@ -SearchPath* SysIncSearchPath; /* System include path */ -SearchPath* UsrIncSearchPath; /* User include path */ +SearchPaths* SysIncSearchPath; /* System include path */ +SearchPaths* UsrIncSearchPath; /* User include path */ @@ -76,7 +76,7 @@ void FinishIncludePaths (void) AddSubSearchPathFromEnv (SysIncSearchPath, "CC65_HOME", "include"); /* Add some compiled-in search paths if defined at compile time. */ -#ifdef CC65_INC +#if defined(CC65_INC) && !defined(_WIN32) AddSearchPath (SysIncSearchPath, STRINGIZE (CC65_INC)); #endif diff --git a/src/cc65/incpath.h b/src/cc65/incpath.h index ed8ba50cc..4df8fca44 100644 --- a/src/cc65/incpath.h +++ b/src/cc65/incpath.h @@ -49,8 +49,8 @@ -extern SearchPath* SysIncSearchPath; /* System include path */ -extern SearchPath* UsrIncSearchPath; /* User include path */ +extern SearchPaths* SysIncSearchPath; /* System include path */ +extern SearchPaths* UsrIncSearchPath; /* User include path */ diff --git a/src/cl65/main.c b/src/cl65/main.c index e704d985c..d81a1bcc9 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -36,10 +36,10 @@ /* Check out if we have a spawn() function on the system, or if we must use * our own. */ -#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__MINGW32__) || defined(__DJGPP__) -# define HAVE_SPAWN 1 +#if defined(_WIN32) +# define HAVE_SPAWN 1 #else -# define NEED_SPAWN 1 +# define NEED_SPAWN 1 #endif #if defined(_MSC_VER) # pragma warning(disable : 4996) @@ -375,7 +375,7 @@ static void ExecProgram (CmdDesc* Cmd) } /* Call the program */ - Status = spawnvp (P_WAIT, Cmd->Name, Cmd->Args); + Status = spawnvp (P_WAIT, Cmd->Name, (const char* const *) Cmd->Args); /* Check the result code */ if (Status < 0) { diff --git a/src/common/filestat.c b/src/common/filestat.c index 0f5f5cd11..fd42c5ec0 100644 --- a/src/common/filestat.c +++ b/src/common/filestat.c @@ -2,7 +2,7 @@ /* */ /* filestat.c */ /* */ -/* Replacement for buggy Microsoft code */ +/* Replacement for Windows code */ /* */ /* */ /* */ @@ -46,8 +46,7 @@ #include #include -#if defined(__WATCOMC__) && defined(__NT__) -#define BUGGY_OS 1 +#if defined(_WIN32) #include #include #endif @@ -63,7 +62,7 @@ -#if defined(BUGGY_OS) +#if defined(_WIN32) @@ -77,7 +76,7 @@ static time_t FileTimeToUnixTime (const FILETIME* T) * way to express a number > 32 bit (known to me) but is able to do * calculations with 64 bit integers, so we need to do it this way. */ - static const ULARGE_INTEGER Offs = { 0xB6109100UL, 0x00000020UL }; + static const ULARGE_INTEGER Offs = { { 0xB6109100UL, 0x00000020UL } }; ULARGE_INTEGER V; V.LowPart = T->dwLowDateTime; V.HighPart = T->dwHighDateTime; diff --git a/src/common/filestat.h b/src/common/filestat.h index 50b7685ef..56ce2e9e0 100644 --- a/src/common/filestat.h +++ b/src/common/filestat.h @@ -2,7 +2,7 @@ /* */ /* filestat.h */ /* */ -/* Replacement for buggy Microsoft code */ +/* Replacement for Windows code */ /* */ /* */ /* */ diff --git a/src/common/filetime.c b/src/common/filetime.c index 025380759..88a79bf97 100644 --- a/src/common/filetime.c +++ b/src/common/filetime.c @@ -2,7 +2,7 @@ /* */ /* filetime.c */ /* */ -/* Replacement for buggy Microsoft code */ +/* Replacement for Windows code */ /* */ /* */ /* */ @@ -42,18 +42,12 @@ -#if defined(__WATCOMC__) && defined(__NT__) -#define BUGGY_OS 1 +#if defined(_WIN32) #include #include #else -#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__MINGW32__) -/* The Windows compilers have the file in the wrong directory */ -# include -#else -# include /* FreeBSD needs this */ -# include -#endif +#include /* FreeBSD needs this */ +#include #endif @@ -68,7 +62,7 @@ -#if defined(BUGGY_OS) +#if defined(_WIN32) @@ -82,7 +76,7 @@ static FILETIME* UnixTimeToFileTime (time_t T, FILETIME* FT) * way to express a number > 32 bit (known to me) but is able to do * calculations with 64 bit integers, so we need to do it this way. */ - static const ULARGE_INTEGER Offs = { 0xB6109100UL, 0x00000020UL }; + static const ULARGE_INTEGER Offs = { { 0xB6109100UL, 0x00000020UL } }; ULARGE_INTEGER V; V.QuadPart = ((unsigned __int64) T + Offs.QuadPart) * 10000000U; FT->dwLowDateTime = V.LowPart; @@ -150,6 +144,3 @@ int SetFileTimes (const char* Path, time_t T) #endif - - - diff --git a/src/common/filetime.h b/src/common/filetime.h index 8a27712d9..4d20c7d63 100644 --- a/src/common/filetime.h +++ b/src/common/filetime.h @@ -2,7 +2,7 @@ /* */ /* filetime.h */ /* */ -/* Replacement for buggy Microsoft code */ +/* Replacement for Windows code */ /* */ /* */ /* */ diff --git a/src/common/searchpath.c b/src/common/searchpath.c index 16945f36d..009deaded 100644 --- a/src/common/searchpath.c +++ b/src/common/searchpath.c @@ -35,6 +35,9 @@ #include #include +#if defined(_WIN32) +# include +#endif #if defined(_MSC_VER) /* Microsoft compiler */ # include @@ -83,7 +86,7 @@ static char* CleanupPath (const char* Path) -static void Add (SearchPath* P, const char* New) +static void Add (SearchPaths* P, const char* New) /* Cleanup a new search path and add it to the list */ { /* Add a clean copy of the path to the collection */ @@ -92,7 +95,7 @@ static void Add (SearchPath* P, const char* New) -SearchPath* NewSearchPath (void) +SearchPaths* NewSearchPath (void) /* Create a new, empty search path list */ { return NewCollection (); @@ -100,7 +103,7 @@ SearchPath* NewSearchPath (void) -void AddSearchPath (SearchPath* P, const char* NewPath) +void AddSearchPath (SearchPaths* P, const char* NewPath) /* Add a new search path to the end of an existing list */ { /* Allow a NULL path */ @@ -111,7 +114,7 @@ void AddSearchPath (SearchPath* P, const char* NewPath) -void AddSearchPathFromEnv (SearchPath* P, const char* EnvVar) +void AddSearchPathFromEnv (SearchPaths* P, const char* EnvVar) /* Add a search path from an environment variable to the end of an existing * list. */ @@ -121,7 +124,7 @@ void AddSearchPathFromEnv (SearchPath* P, const char* EnvVar) -void AddSubSearchPathFromEnv (SearchPath* P, const char* EnvVar, const char* SubDir) +void AddSubSearchPathFromEnv (SearchPaths* P, const char* EnvVar, const char* SubDir) /* Add a search path from an environment variable, adding a subdirectory to * the environment variable value. */ @@ -157,21 +160,20 @@ void AddSubSearchPathFromEnv (SearchPath* P, const char* EnvVar, const char* Sub -void AddSubSearchPathFromWinBin (SearchPath* P, const char* SubDir) +void AddSubSearchPathFromWinBin (SearchPaths* P, const char* SubDir) { /* Windows only: * Add a search path from the running binary, adding a subdirectory to * the parent directory of the directory containing the binary. */ -#if defined(_MSC_VER) +#if defined(_WIN32) char Dir[_MAX_PATH]; char* Ptr; - if (_get_pgmptr (&Ptr) != 0) { + if (GetModuleFileName (NULL, Dir, _MAX_PATH) == 0) { return; } - strcpy (Dir, Ptr); /* Remove binary name */ Ptr = strrchr (Dir, '\\'); @@ -204,7 +206,7 @@ void AddSubSearchPathFromWinBin (SearchPath* P, const char* SubDir) } -int PushSearchPath (SearchPath* P, const char* NewPath) +int PushSearchPath (SearchPaths* P, const char* NewPath) /* Add a new search path to the head of an existing search path list, provided * that it's not already there. If the path is already at the first position, * return zero, otherwise return a non zero value. @@ -227,7 +229,7 @@ int PushSearchPath (SearchPath* P, const char* NewPath) -void PopSearchPath (SearchPath* P) +void PopSearchPath (SearchPaths* P) /* Remove a search path from the head of an existing search path list */ { /* Remove the path at position 0 */ @@ -237,7 +239,7 @@ void PopSearchPath (SearchPath* P) -char* SearchFile (const SearchPath* P, const char* File) +char* SearchFile (const SearchPaths* P, const char* File) /* Search for a file in a list of directories. Return a pointer to a malloced * area that contains the complete path, if found, return 0 otherwise. */ @@ -271,6 +273,3 @@ char* SearchFile (const SearchPath* P, const char* File) SB_Done (&PathName); return Name; } - - - diff --git a/src/common/searchpath.h b/src/common/searchpath.h index 555a0e18e..33db0c779 100644 --- a/src/common/searchpath.h +++ b/src/common/searchpath.h @@ -53,7 +53,7 @@ #define STRINGIZE(arg) _STRINGIZE(arg) /* A search path is a pointer to the list */ -typedef struct Collection SearchPath; +typedef struct Collection SearchPaths; @@ -63,38 +63,38 @@ typedef struct Collection SearchPath; -SearchPath* NewSearchPath (void); +SearchPaths* NewSearchPath (void); /* Create a new, empty search path list */ -void AddSearchPath (SearchPath* P, const char* NewPath); +void AddSearchPath (SearchPaths* P, const char* NewPath); /* Add a new search path to the end of an existing list */ -void AddSearchPathFromEnv (SearchPath* P, const char* EnvVar); +void AddSearchPathFromEnv (SearchPaths* P, const char* EnvVar); /* Add a search path from an environment variable to the end of an existing * list. */ -void AddSubSearchPathFromEnv (SearchPath* P, const char* EnvVar, const char* SubDir); +void AddSubSearchPathFromEnv (SearchPaths* P, const char* EnvVar, const char* SubDir); /* Add a search path from an environment variable, adding a subdirectory to * the environment variable value. */ -void AddSubSearchPathFromWinBin (SearchPath* P, const char* SubDir); +void AddSubSearchPathFromWinBin (SearchPaths* P, const char* SubDir); /* Windows only: * Add a search path from the running binary, adding a subdirectory to * the parent directory of the directory containing the binary. */ -int PushSearchPath (SearchPath* P, const char* NewPath); +int PushSearchPath (SearchPaths* P, const char* NewPath); /* Add a new search path to the head of an existing search path list, provided * that it's not already there. If the path is already at the first position, * return zero, otherwise return a non zero value. */ -void PopSearchPath (SearchPath* P); +void PopSearchPath (SearchPaths* P); /* Remove a search path from the head of an existing search path list */ -char* SearchFile (const SearchPath* P, const char* File); +char* SearchFile (const SearchPaths* P, const char* File); /* Search for a file in a list of directories. Return a pointer to a malloced * area that contains the complete path, if found, return 0 otherwise. */ diff --git a/src/common/xsprintf.h b/src/common/xsprintf.h index 07672c5c4..2758e5bc2 100644 --- a/src/common/xsprintf.h +++ b/src/common/xsprintf.h @@ -41,7 +41,11 @@ * and precision to such a StrBuf, but *not* using %p would bring up a warning * about a wrong argument type each time. Maybe gcc will one day allow custom * format specifiers and we can change this ... + * However this cheat doesn't work with MinGW as there's no support for %m :-( */ +#if defined( __MINGW32__) +# pragma GCC diagnostic ignored "-Wformat" +#endif diff --git a/src/ld65/filepath.c b/src/ld65/filepath.c index 42357bb47..1010023f2 100644 --- a/src/ld65/filepath.c +++ b/src/ld65/filepath.c @@ -44,13 +44,13 @@ -SearchPath* LibSearchPath; /* Library path */ -SearchPath* ObjSearchPath; /* Object file path */ -SearchPath* CfgSearchPath; /* Config file path */ +SearchPaths* LibSearchPath; /* Library path */ +SearchPaths* ObjSearchPath; /* Object file path */ +SearchPaths* CfgSearchPath; /* Config file path */ -SearchPath* LibDefaultPath; /* Default Library path */ -SearchPath* ObjDefaultPath; /* Default Object file path */ -SearchPath* CfgDefaultPath; /* Default Config file path */ +SearchPaths* LibDefaultPath; /* Default Library path */ +SearchPaths* ObjDefaultPath; /* Default Object file path */ +SearchPaths* CfgDefaultPath; /* Default Config file path */ @@ -88,13 +88,13 @@ void InitSearchPaths (void) AddSubSearchPathFromEnv (CfgDefaultPath, "CC65_HOME", "cfg"); /* Add some compiled-in search paths if defined at compile time. */ -#if defined(LD65_LIB) +#if defined(LD65_LIB) && !defined(_WIN32) AddSearchPath (LibDefaultPath, STRINGIZE (LD65_LIB)); #endif -#if defined(LD65_OBJ) +#if defined(LD65_OBJ) && !defined(_WIN32) AddSearchPath (ObjDefaultPath, STRINGIZE (LD65_OBJ)); #endif -#if defined(LD65_CFG) +#if defined(LD65_CFG) && !defined(_WIN32) AddSearchPath (CfgDefaultPath, STRINGIZE (LD65_CFG)); #endif diff --git a/src/ld65/filepath.h b/src/ld65/filepath.h index 97e77068b..12032b165 100644 --- a/src/ld65/filepath.h +++ b/src/ld65/filepath.h @@ -49,13 +49,13 @@ -extern SearchPath* LibSearchPath; /* Library path */ -extern SearchPath* ObjSearchPath; /* Object file path */ -extern SearchPath* CfgSearchPath; /* Config file path */ +extern SearchPaths* LibSearchPath; /* Library path */ +extern SearchPaths* ObjSearchPath; /* Object file path */ +extern SearchPaths* CfgSearchPath; /* Config file path */ -extern SearchPath* LibDefaultPath; /* Default Library path */ -extern SearchPath* ObjDefaultPath; /* Default Object file path */ -extern SearchPath* CfgDefaultPath; /* Default Config file path */ +extern SearchPaths* LibDefaultPath; /* Default Library path */ +extern SearchPaths* ObjDefaultPath; /* Default Object file path */ +extern SearchPaths* CfgDefaultPath; /* Default Config file path */ diff --git a/src/sim65/paravirt.c b/src/sim65/paravirt.c index 29b8ea930..035bb1d87 100644 --- a/src/sim65/paravirt.c +++ b/src/sim65/paravirt.c @@ -36,15 +36,18 @@ #include #include #include +#if defined(_WIN32) +# define O_INITIAL O_BINARY +#else +# define O_INITIAL 0 +#endif #if defined(_MSC_VER) /* Microsoft compiler */ # include # pragma warning(disable : 4996) -# define O_INITIAL O_BINARY #else /* Anyone else */ # include -# define O_INITIAL 0 #endif /* common */ From 574bda3e4e075b18a9a956656b4dd91a19e23804 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 3 Mar 2014 22:26:08 +0100 Subject: [PATCH 35/76] Adjusted spawn files to recent change. --- src/cl65/spawn-amiga.inc | 2 +- src/cl65/spawn-unix.inc | 2 +- src/cl65/spawn.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cl65/spawn-amiga.inc b/src/cl65/spawn-amiga.inc index 4a0278cfa..b244a95ac 100644 --- a/src/cl65/spawn-amiga.inc +++ b/src/cl65/spawn-amiga.inc @@ -54,7 +54,7 @@ int spawnvp (int Mode attribute ((unused)), const char* File attribute ((unused)), - char* const argv []) + const char* const argv []) /* Execute the given program searching and wait til it terminates. The Mode * argument is ignored (compatibility only). The result of the function is * the return code of the program. The function will terminate the program diff --git a/src/cl65/spawn-unix.inc b/src/cl65/spawn-unix.inc index a0334b8db..093e35935 100644 --- a/src/cl65/spawn-unix.inc +++ b/src/cl65/spawn-unix.inc @@ -62,7 +62,7 @@ -int spawnvp (int Mode attribute ((unused)), const char* File, char* const argv []) +int spawnvp (int Mode attribute ((unused)), const char* File, const char* const argv []) /* Execute the given program searching and wait til it terminates. The Mode * argument is ignored (compatibility only). The result of the function is * the return code of the program. The function will terminate the program diff --git a/src/cl65/spawn.h b/src/cl65/spawn.h index 6e75f555d..a9f5d7c3f 100644 --- a/src/cl65/spawn.h +++ b/src/cl65/spawn.h @@ -59,7 +59,7 @@ -int spawnvp (int Mode, const char* File, char* const argv []); +int spawnvp (int Mode, const char* File, const char* const argv []); /* Execute the given program searching and wait til it terminates. The Mode * argument is ignored (compatibility only). The result of the function is * the return code of the program. The function will terminate the program From b68507d8a530efbcfa113d1e4627ec73ac0f9796 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 3 Mar 2014 22:38:41 +0100 Subject: [PATCH 36/76] Adjusted spawn files to recent change II. --- src/cl65/spawn-unix.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cl65/spawn-unix.inc b/src/cl65/spawn-unix.inc index 093e35935..1784123ac 100644 --- a/src/cl65/spawn-unix.inc +++ b/src/cl65/spawn-unix.inc @@ -81,7 +81,7 @@ int spawnvp (int Mode attribute ((unused)), const char* File, const char* const } else if (pid == 0) { /* The son - exec the program */ - if (execvp (File, argv) < 0) { + if (execvp (File, (char* const *) argv) < 0) { Error ("Cannot exec `%s': %s", File, strerror (errno)); } From 3e156bdd67d630d1bb141b7ef0242327fddb3896 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 3 Mar 2014 22:52:39 +0100 Subject: [PATCH 37/76] Removed unused header. --- src/cl65.vcxproj | 1 - src/cl65/spawn.h | 75 ------------------------------------------------ 2 files changed, 76 deletions(-) delete mode 100644 src/cl65/spawn.h diff --git a/src/cl65.vcxproj b/src/cl65.vcxproj index 0bea32f94..64c1126b1 100644 --- a/src/cl65.vcxproj +++ b/src/cl65.vcxproj @@ -82,7 +82,6 @@ - diff --git a/src/cl65/spawn.h b/src/cl65/spawn.h deleted file mode 100644 index a9f5d7c3f..000000000 --- a/src/cl65/spawn.h +++ /dev/null @@ -1,75 +0,0 @@ -/*****************************************************************************/ -/* */ -/* spawn.h */ -/* */ -/* Execute other external programs */ -/* */ -/* */ -/* */ -/* (C) 1999 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ -/* */ -/* */ -/* This software is provided 'as-is', without any expressed or implied */ -/* warranty. In no event will the authors be held liable for any damages */ -/* arising from the use of this software. */ -/* */ -/* Permission is granted to anyone to use this software for any purpose, */ -/* including commercial applications, and to alter it and redistribute it */ -/* freely, subject to the following restrictions: */ -/* */ -/* 1. The origin of this software must not be misrepresented; you must not */ -/* claim that you wrote the original software. If you use this software */ -/* in a product, an acknowledgment in the product documentation would be */ -/* appreciated but is not required. */ -/* 2. Altered source versions must be plainly marked as such, and must not */ -/* be misrepresented as being the original software. */ -/* 3. This notice may not be removed or altered from any source */ -/* distribution. */ -/* */ -/*****************************************************************************/ - - - -#ifndef SPAWN_H -#define SPAWN_H - - - -/*****************************************************************************/ -/* Data */ -/*****************************************************************************/ - - - -/* Mode argument for spawn. This value is ignored by the function and only - * provided for DOS/Windows compatibility. - */ -#ifndef P_WAIT -#define P_WAIT 0 -#endif - - - -/*****************************************************************************/ -/* Code */ -/*****************************************************************************/ - - - -int spawnvp (int Mode, const char* File, const char* const argv []); -/* Execute the given program searching and wait til it terminates. The Mode - * argument is ignored (compatibility only). The result of the function is - * the return code of the program. The function will terminate the program - * on errors. - */ - - - -/* End of spawn.h */ -#endif - - - From 4185caf8558690ae4720d4a83d829ed3ed087ae9 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Tue, 4 Mar 2014 01:11:19 +0100 Subject: [PATCH 38/76] Normalized code. --- src/ar65/add.c | 4 ---- src/ar65/add.h | 4 ---- src/ar65/del.c | 4 ---- src/ar65/del.h | 4 ---- src/ar65/error.c | 3 --- src/ar65/error.h | 3 --- src/ar65/exports.c | 3 --- src/ar65/exports.h | 3 --- src/ar65/extract.c | 3 --- src/ar65/extract.h | 4 ---- src/ar65/fileio.c | 51 ---------------------------------------- src/ar65/fileio.h | 3 --- src/ar65/global.c | 3 --- src/ar65/global.h | 3 --- src/ar65/library.c | 3 --- src/ar65/library.h | 3 --- src/ar65/list.c | 3 --- src/ar65/list.h | 4 ---- src/ar65/main.c | 3 --- src/ar65/objdata.c | 3 --- src/ar65/objdata.h | 3 --- src/ar65/objfile.c | 3 --- src/ar65/objfile.h | 3 --- src/ca65/anonname.c | 3 --- src/ca65/anonname.h | 4 +--- src/ca65/asserts.c | 5 ---- src/ca65/asserts.h | 3 --- src/ca65/condasm.c | 4 ---- src/ca65/condasm.h | 3 --- src/ca65/dbginfo.c | 3 --- src/ca65/dbginfo.h | 5 ---- src/ca65/ea.h | 3 --- src/ca65/ea65.c | 4 ---- src/ca65/ea65.h | 3 --- src/ca65/enum.c | 4 ---- src/ca65/enum.h | 3 --- src/ca65/error.c | 3 --- src/ca65/error.h | 4 ---- src/ca65/expr.c | 3 --- src/ca65/expr.h | 3 --- src/ca65/feature.c | 3 --- src/ca65/feature.h | 3 --- src/ca65/filetab.c | 2 -- src/ca65/filetab.h | 5 ---- src/ca65/fragment.c | 3 --- src/ca65/fragment.h | 5 +--- src/ca65/global.h | 3 --- src/ca65/incpath.c | 3 --- src/ca65/incpath.h | 3 --- src/ca65/instr.c | 3 --- src/ca65/instr.h | 5 ---- src/ca65/istack.c | 3 --- src/ca65/istack.h | 4 ---- src/ca65/lineinfo.c | 3 --- src/ca65/lineinfo.h | 5 +--- src/ca65/listing.c | 3 --- src/ca65/listing.h | 3 --- src/ca65/macro.c | 3 --- src/ca65/macro.h | 3 --- src/ca65/main.c | 3 --- src/ca65/nexttok.c | 3 --- src/ca65/nexttok.h | 4 ---- src/ca65/objcode.c | 3 --- src/ca65/objcode.h | 3 --- src/ca65/objfile.c | 3 --- src/ca65/objfile.h | 3 --- src/ca65/options.h | 3 --- src/ca65/pseudo.c | 3 --- src/ca65/pseudo.h | 3 --- src/ca65/repeat.c | 3 --- src/ca65/repeat.h | 4 ---- src/ca65/scanner.c | 4 ---- src/ca65/scanner.h | 4 ---- src/ca65/segdef.c | 4 ---- src/ca65/segdef.h | 3 --- src/ca65/segment.c | 4 ---- src/ca65/segment.h | 3 --- src/ca65/sizeof.c | 3 --- src/ca65/sizeof.h | 4 +--- src/ca65/span.c | 4 ---- src/ca65/span.h | 3 --- src/ca65/spool.c | 3 --- src/ca65/spool.h | 4 ---- src/ca65/struct.c | 3 --- src/ca65/struct.h | 3 --- src/ca65/studyexpr.c | 3 --- src/ca65/studyexpr.h | 4 +--- src/ca65/symbol.c | 3 --- src/ca65/symbol.h | 3 --- src/ca65/symentry.c | 3 --- src/ca65/symentry.h | 4 ---- src/ca65/symtab.c | 3 --- src/ca65/symtab.h | 3 --- src/ca65/token.c | 3 --- src/ca65/token.h | 3 --- src/ca65/toklist.c | 3 --- src/ca65/toklist.h | 4 ---- src/ca65/ulabel.c | 4 ---- src/ca65/ulabel.h | 3 --- src/cc65/anonname.c | 3 --- src/cc65/anonname.h | 4 +--- src/cc65/asmcode.c | 3 --- src/cc65/asmcode.h | 5 +--- src/cc65/asmlabel.c | 4 ---- src/cc65/asmlabel.h | 4 +--- src/cc65/asmstmt.c | 3 --- src/cc65/asmstmt.h | 3 --- src/cc65/assignment.c | 3 --- src/cc65/assignment.h | 4 +--- src/cc65/casenode.c | 3 --- src/cc65/casenode.h | 4 +--- src/cc65/codeent.c | 6 ----- src/cc65/codeent.h | 5 +--- src/cc65/codegen.c | 3 --- src/cc65/codegen.h | 3 +-- src/cc65/codeinfo.c | 3 --- src/cc65/codeinfo.h | 5 +--- src/cc65/codelab.c | 4 ---- src/cc65/codelab.h | 4 +--- src/cc65/codeopt.c | 3 --- src/cc65/codeopt.h | 4 +--- src/cc65/codeseg.c | 3 --- src/cc65/codeseg.h | 4 +--- src/cc65/compile.c | 3 --- src/cc65/compile.h | 3 --- src/cc65/coptadd.c | 3 --- src/cc65/coptadd.h | 3 --- src/cc65/coptc02.c | 3 --- src/cc65/coptc02.h | 4 +--- src/cc65/coptcmp.c | 3 --- src/cc65/coptcmp.h | 3 --- src/cc65/coptind.c | 3 --- src/cc65/coptind.h | 4 +--- src/cc65/coptneg.c | 3 --- src/cc65/coptneg.h | 3 --- src/cc65/coptptrload.c | 3 --- src/cc65/coptptrload.h | 4 +--- src/cc65/coptptrstore.c | 3 --- src/cc65/coptptrstore.h | 5 +--- src/cc65/coptpush.c | 3 --- src/cc65/coptpush.h | 3 --- src/cc65/coptshift.c | 3 --- src/cc65/coptshift.h | 4 +--- src/cc65/coptsize.c | 3 --- src/cc65/coptsize.h | 4 +--- src/cc65/coptstop.c | 3 --- src/cc65/coptstop.h | 4 +--- src/cc65/coptstore.c | 3 --- src/cc65/coptstore.h | 3 --- src/cc65/coptsub.c | 3 --- src/cc65/coptsub.h | 3 --- src/cc65/copttest.c | 3 --- src/cc65/copttest.h | 3 --- src/cc65/dataseg.c | 4 ---- src/cc65/dataseg.h | 4 +--- src/cc65/datatype.c | 3 --- src/cc65/datatype.h | 3 --- src/cc65/declare.c | 3 --- src/cc65/declare.h | 3 --- src/cc65/declattr.c | 3 --- src/cc65/declattr.h | 3 --- src/cc65/error.c | 3 --- src/cc65/error.h | 6 +---- src/cc65/expr.c | 3 --- src/cc65/expr.h | 4 ---- src/cc65/exprdesc.c | 3 --- src/cc65/exprdesc.h | 4 +--- src/cc65/funcdesc.c | 3 --- src/cc65/funcdesc.h | 4 +--- src/cc65/function.c | 3 --- src/cc65/function.h | 4 +--- src/cc65/global.c | 3 --- src/cc65/global.h | 4 ---- src/cc65/goto.c | 3 --- src/cc65/goto.h | 4 +--- src/cc65/hexval.c | 3 --- src/cc65/hexval.h | 6 +---- src/cc65/ident.c | 3 --- src/cc65/ident.h | 4 +--- src/cc65/incpath.c | 3 --- src/cc65/incpath.h | 4 +--- src/cc65/input.c | 2 -- src/cc65/input.h | 10 ++++---- src/cc65/lineinfo.c | 3 --- src/cc65/lineinfo.h | 5 +--- src/cc65/litpool.c | 3 --- src/cc65/litpool.h | 5 +--- src/cc65/loadexpr.c | 3 --- src/cc65/loadexpr.h | 4 +--- src/cc65/locals.c | 3 --- src/cc65/locals.h | 4 +--- src/cc65/loop.c | 3 --- src/cc65/loop.h | 3 --- src/cc65/macrotab.c | 3 --- src/cc65/macrotab.h | 4 +--- src/cc65/main.c | 3 --- src/cc65/opcodes.c | 4 ---- src/cc65/opcodes.h | 4 +--- src/cc65/output.c | 3 --- src/cc65/output.h | 4 +--- src/cc65/pragma.c | 3 --- src/cc65/pragma.h | 6 +---- src/cc65/preproc.c | 1 - src/cc65/preproc.h | 4 +--- src/cc65/reginfo.c | 3 --- src/cc65/reginfo.h | 5 +--- src/cc65/scanner.c | 3 --- src/cc65/scanner.h | 7 +----- src/cc65/scanstrbuf.c | 3 --- src/cc65/scanstrbuf.h | 6 +---- src/cc65/segments.c | 3 --- src/cc65/segments.h | 4 +--- src/cc65/shiftexpr.c | 3 --- src/cc65/shiftexpr.h | 4 ---- src/cc65/stackptr.c | 4 ---- src/cc65/stackptr.h | 3 --- src/cc65/standard.c | 3 --- src/cc65/standard.h | 4 ---- src/cc65/stdfunc.c | 3 --- src/cc65/stdfunc.h | 3 --- src/cc65/stdnames.c | 3 --- src/cc65/stdnames.h | 3 --- src/cc65/stmt.c | 4 ---- src/cc65/stmt.h | 3 --- src/cc65/swstmt.c | 3 --- src/cc65/swstmt.h | 4 +--- src/cc65/symentry.c | 3 --- src/cc65/symentry.h | 4 +--- src/cc65/symtab.c | 3 --- src/cc65/symtab.h | 3 --- src/cc65/testexpr.c | 4 ---- src/cc65/testexpr.h | 5 +--- src/cc65/textseg.c | 3 --- src/cc65/textseg.h | 4 +--- src/cc65/typecmp.c | 4 ---- src/cc65/typecmp.h | 4 ---- src/cc65/typeconv.c | 5 ---- src/cc65/typeconv.h | 4 +--- src/cc65/util.c | 3 --- src/cc65/util.h | 3 --- src/cl65/error.c | 2 -- src/cl65/error.h | 3 --- src/cl65/global.c | 3 --- src/cl65/global.h | 3 --- src/cl65/main.c | 3 --- src/cl65/spawn-amiga.inc | 3 --- src/cl65/spawn-unix.inc | 3 --- src/co65/convert.c | 3 --- src/co65/convert.h | 3 --- src/co65/error.c | 3 --- src/co65/error.h | 3 --- src/co65/fileio.c | 3 --- src/co65/fileio.h | 3 --- src/co65/global.c | 3 --- src/co65/global.h | 3 --- src/co65/main.c | 3 --- src/co65/model.c | 3 --- src/co65/model.h | 3 --- src/co65/o65.c | 3 --- src/co65/o65.h | 5 +--- src/common/abend.c | 3 --- src/common/abend.h | 3 --- src/common/addrsize.c | 3 --- src/common/addrsize.h | 3 --- src/common/alignment.c | 3 --- src/common/alignment.h | 3 --- src/common/assertion.c | 3 --- src/common/assertion.h | 3 --- src/common/attrib.h | 3 --- src/common/bitops.c | 3 --- src/common/bitops.h | 3 --- src/common/cddefs.h | 3 --- src/common/chartype.c | 3 --- src/common/chartype.h | 3 --- src/common/check.c | 3 --- src/common/check.h | 4 +--- src/common/cmdline.c | 4 ---- src/common/cmdline.h | 3 --- src/common/coll.c | 3 --- src/common/coll.h | 4 ---- src/common/cpu.c | 3 --- src/common/cpu.h | 3 --- src/common/debugflag.c | 3 --- src/common/debugflag.h | 4 +--- src/common/exprdefs.c | 3 --- src/common/exprdefs.h | 3 --- src/common/fileid.c | 3 --- src/common/fileid.h | 4 +--- src/common/filepos.c | 3 --- src/common/filepos.h | 3 --- src/common/filestat.c | 4 ++-- src/common/filestat.h | 3 --- src/common/filetime.c | 8 +++---- src/common/filetime.h | 3 --- src/common/filetype.c | 3 --- src/common/filetype.h | 4 +--- src/common/fname.c | 3 --- src/common/fname.h | 3 --- src/common/fp.c | 3 --- src/common/fp.h | 5 ---- src/common/fragdefs.h | 3 --- src/common/gentype.c | 3 --- src/common/gentype.h | 4 ---- src/common/hashfunc.c | 3 --- src/common/hashfunc.h | 3 --- src/common/hashtab.c | 3 --- src/common/hashtab.h | 3 --- src/common/hlldbgsym.h | 3 --- src/common/inline.h | 3 --- src/common/intstack.c | 3 --- src/common/intstack.h | 4 +--- src/common/inttypes.h | 4 +--- src/common/libdefs.h | 3 --- src/common/lidefs.h | 3 --- src/common/matchpat.c | 3 --- src/common/matchpat.h | 3 --- src/common/mmodel.c | 2 -- src/common/mmodel.h | 3 --- src/common/objdefs.h | 3 --- src/common/optdefs.h | 3 --- src/common/print.c | 3 --- src/common/print.h | 4 ---- src/common/scopedefs.h | 3 --- src/common/searchpath.h | 4 +--- src/common/segdefs.h | 3 --- src/common/segnames.c | 3 --- src/common/segnames.h | 3 --- src/common/shift.c | 3 --- src/common/shift.h | 3 --- src/common/strbuf.c | 3 --- src/common/strbuf.h | 3 --- src/common/strpool.c | 3 --- src/common/strpool.h | 3 --- src/common/strstack.c | 3 --- src/common/strstack.h | 4 +--- src/common/strutil.h | 3 --- src/common/symdefs.h | 3 --- src/common/target.c | 1 - src/common/target.h | 4 +--- src/common/tgttrans.c | 5 ---- src/common/tgttrans.h | 3 --- src/common/va_copy.h | 4 +--- src/common/version.c | 3 --- src/common/version.h | 4 ---- src/common/xmalloc.c | 3 --- src/common/xmalloc.h | 3 --- src/common/xsprintf.c | 3 --- src/common/xsprintf.h | 4 ---- src/da65/asminc.c | 3 --- src/da65/asminc.h | 4 +--- src/da65/attrtab.c | 3 --- src/da65/attrtab.h | 4 +--- src/da65/code.c | 3 --- src/da65/code.h | 4 +--- src/da65/comments.c | 3 --- src/da65/comments.h | 4 +--- src/da65/data.c | 3 --- src/da65/data.h | 4 +--- src/da65/error.c | 3 --- src/da65/error.h | 3 --- src/da65/global.c | 3 --- src/da65/global.h | 3 --- src/da65/handler.c | 3 --- src/da65/handler.h | 4 +--- src/da65/infofile.c | 6 ----- src/da65/infofile.h | 4 +--- src/da65/labels.c | 3 --- src/da65/labels.h | 4 +--- src/da65/main.c | 3 --- src/da65/opc6502.c | 3 --- src/da65/opc6502.h | 4 +--- src/da65/opc6502x.c | 4 ---- src/da65/opc65816.c | 3 --- src/da65/opc65816.h | 4 +--- src/da65/opc65c02.c | 3 --- src/da65/opc65c02.h | 4 +--- src/da65/opc65sc02.c | 3 --- src/da65/opc65sc02.h | 4 +--- src/da65/opcdesc.h | 4 +--- src/da65/opchuc6280.h | 4 +--- src/da65/opcm740.c | 3 --- src/da65/opcm740.h | 4 +--- src/da65/opctable.c | 4 ---- src/da65/opctable.h | 4 +--- src/da65/output.c | 3 --- src/da65/output.h | 5 +--- src/da65/scanner.c | 4 ---- src/da65/scanner.h | 4 +--- src/da65/segment.c | 3 --- src/da65/segment.h | 3 --- src/ld65/asserts.c | 3 --- src/ld65/asserts.h | 3 --- src/ld65/bin.c | 5 ---- src/ld65/bin.h | 3 --- src/ld65/binfmt.c | 3 --- src/ld65/binfmt.h | 3 --- src/ld65/cfgexpr.c | 3 --- src/ld65/cfgexpr.h | 4 +--- src/ld65/condes.c | 3 --- src/ld65/condes.h | 3 --- src/ld65/config.c | 3 --- src/ld65/config.h | 5 ---- src/ld65/dbgfile.c | 3 --- src/ld65/dbgfile.h | 3 --- src/ld65/dbgsyms.c | 4 ---- src/ld65/dbgsyms.h | 3 --- src/ld65/error.c | 3 --- src/ld65/error.h | 3 --- src/ld65/exports.c | 4 ---- src/ld65/exports.h | 4 ---- src/ld65/expr.c | 3 --- src/ld65/expr.h | 3 --- src/ld65/extsyms.c | 4 ---- src/ld65/extsyms.h | 4 ---- src/ld65/fileinfo.c | 3 --- src/ld65/fileinfo.h | 4 +--- src/ld65/fileio.c | 4 ---- src/ld65/fileio.h | 3 --- src/ld65/filepath.c | 3 --- src/ld65/filepath.h | 4 +--- src/ld65/fragment.c | 3 --- src/ld65/fragment.h | 4 ---- src/ld65/global.c | 3 --- src/ld65/global.h | 3 --- src/ld65/library.c | 4 ---- src/ld65/library.h | 3 --- src/ld65/lineinfo.c | 3 --- src/ld65/lineinfo.h | 4 +--- src/ld65/main.c | 3 --- src/ld65/mapfile.c | 3 --- src/ld65/mapfile.h | 3 --- src/ld65/memarea.c | 4 ---- src/ld65/memarea.h | 5 ---- src/ld65/o65.c | 4 ---- src/ld65/o65.h | 3 --- src/ld65/objdata.c | 4 ---- src/ld65/objdata.h | 5 ---- src/ld65/objfile.c | 4 ---- src/ld65/objfile.h | 3 --- src/ld65/scanner.c | 3 --- src/ld65/scanner.h | 4 +--- src/ld65/scopes.c | 3 --- src/ld65/scopes.h | 3 --- src/ld65/segments.c | 3 --- src/ld65/segments.h | 4 ---- src/ld65/span.c | 3 --- src/ld65/span.h | 4 +--- src/ld65/spool.c | 4 ---- src/ld65/spool.h | 4 ---- src/ld65/tpool.c | 3 --- src/ld65/tpool.h | 4 ---- src/od65/dump.c | 4 ---- src/od65/dump.h | 4 ---- src/od65/error.c | 3 --- src/od65/error.h | 3 --- src/od65/fileio.c | 3 --- src/od65/fileio.h | 3 --- src/od65/global.c | 3 --- src/od65/global.h | 3 --- src/od65/main.c | 3 --- src/sim65/error.c | 3 --- src/sim65/error.h | 3 --- src/sim65/memory.h | 4 ---- src/sp65/asm.c | 3 --- src/sp65/asm.h | 3 --- src/sp65/attr.c | 3 --- src/sp65/attr.h | 3 --- src/sp65/bin.c | 3 --- src/sp65/bin.h | 3 --- src/sp65/bitmap.c | 3 --- src/sp65/bitmap.h | 3 --- src/sp65/c.c | 3 --- src/sp65/c.h | 3 --- src/sp65/color.c | 3 --- src/sp65/color.h | 3 --- src/sp65/convert.c | 1 - src/sp65/convert.h | 3 --- src/sp65/error.c | 3 --- src/sp65/error.h | 3 --- src/sp65/fileio.c | 3 --- src/sp65/fileio.h | 3 --- src/sp65/geosbitmap.c | 3 --- src/sp65/geosicon.c | 3 --- src/sp65/geosicon.h | 3 --- src/sp65/input.c | 3 --- src/sp65/input.h | 3 --- src/sp65/koala.c | 3 --- src/sp65/koala.h | 3 --- src/sp65/lynxsprite.c | 3 --- src/sp65/lynxsprite.h | 3 --- src/sp65/main.c | 3 --- src/sp65/output.c | 3 --- src/sp65/output.h | 3 --- src/sp65/palette.c | 3 --- src/sp65/palette.h | 3 --- src/sp65/pcx.c | 3 --- src/sp65/pcx.h | 3 --- src/sp65/pixel.h | 3 --- src/sp65/raw.c | 3 --- src/sp65/raw.h | 4 +--- src/sp65/vic2sprite.c | 3 --- src/sp65/vic2sprite.h | 3 --- 502 files changed, 96 insertions(+), 1660 deletions(-) diff --git a/src/ar65/add.c b/src/ar65/add.c index cecb89292..a44524368 100644 --- a/src/ar65/add.c +++ b/src/ar65/add.c @@ -77,7 +77,3 @@ void AddObjFiles (int argc, char* argv []) /* Successful end */ exit (EXIT_SUCCESS); } - - - - diff --git a/src/ar65/add.h b/src/ar65/add.h index abaf017b6..c3de2bb0a 100644 --- a/src/ar65/add.h +++ b/src/ar65/add.h @@ -52,7 +52,3 @@ void AddObjFiles (int argc, char* argv []); /* End of add.h */ #endif - - - - diff --git a/src/ar65/del.c b/src/ar65/del.c index d95c012f9..0c1343de3 100644 --- a/src/ar65/del.c +++ b/src/ar65/del.c @@ -78,7 +78,3 @@ void DelObjFiles (int argc, char* argv []) /* Successful end */ exit (EXIT_SUCCESS); } - - - - diff --git a/src/ar65/del.h b/src/ar65/del.h index f25672609..6100fe60a 100644 --- a/src/ar65/del.h +++ b/src/ar65/del.h @@ -52,7 +52,3 @@ void DelObjFiles (int argc, char* argv []); /* End of del.h */ #endif - - - - diff --git a/src/ar65/error.c b/src/ar65/error.c index d21c9e9b7..47ee90aa5 100644 --- a/src/ar65/error.c +++ b/src/ar65/error.c @@ -89,6 +89,3 @@ void Internal (const char* Format, ...) va_end (ap); exit (EXIT_FAILURE); } - - - diff --git a/src/ar65/error.h b/src/ar65/error.h index abff5bd2a..4052ee3eb 100644 --- a/src/ar65/error.h +++ b/src/ar65/error.h @@ -63,6 +63,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - diff --git a/src/ar65/exports.c b/src/ar65/exports.c index 75a1986e8..11589a621 100644 --- a/src/ar65/exports.c +++ b/src/ar65/exports.c @@ -147,6 +147,3 @@ const ObjData* ExpFind (const char* Name) /* Not found */ return 0; } - - - diff --git a/src/ar65/exports.h b/src/ar65/exports.h index 272b19d63..2dcd8a49c 100644 --- a/src/ar65/exports.h +++ b/src/ar65/exports.h @@ -67,6 +67,3 @@ const struct ObjData* ExpFind (const char* Name); /* End of exports.h */ #endif - - - diff --git a/src/ar65/extract.c b/src/ar65/extract.c index 43d7c5b3b..c1a8fd82b 100644 --- a/src/ar65/extract.c +++ b/src/ar65/extract.c @@ -77,6 +77,3 @@ void ExtractObjFiles (int argc, char* argv []) /* Successful end */ exit (EXIT_SUCCESS); } - - - diff --git a/src/ar65/extract.h b/src/ar65/extract.h index 705d2c8e1..d09368c73 100644 --- a/src/ar65/extract.h +++ b/src/ar65/extract.h @@ -52,7 +52,3 @@ void ExtractObjFiles (int argc, char* argv []); /* End of extract.h */ #endif - - - - diff --git a/src/ar65/fileio.c b/src/ar65/fileio.c index 0bd925f15..5126d7fe2 100644 --- a/src/ar65/fileio.c +++ b/src/ar65/fileio.c @@ -201,54 +201,3 @@ void* ReadData (FILE* F, void* Data, unsigned Size) } return Data; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ar65/fileio.h b/src/ar65/fileio.h index 0c69f7c13..17a3d2d0d 100644 --- a/src/ar65/fileio.h +++ b/src/ar65/fileio.h @@ -89,6 +89,3 @@ void* ReadData (FILE* F, void* Data, unsigned Size); /* End of fileio.h */ #endif - - - diff --git a/src/ar65/global.c b/src/ar65/global.c index 02157f08b..75eadc0a7 100644 --- a/src/ar65/global.c +++ b/src/ar65/global.c @@ -40,6 +40,3 @@ /*****************************************************************************/ /* Data */ /*****************************************************************************/ - - - diff --git a/src/ar65/global.h b/src/ar65/global.h index f35452d5c..9b8f128f9 100644 --- a/src/ar65/global.h +++ b/src/ar65/global.h @@ -47,6 +47,3 @@ /* End of global.h */ #endif - - - diff --git a/src/ar65/library.c b/src/ar65/library.c index e68f23d3d..8d92a1ec6 100644 --- a/src/ar65/library.c +++ b/src/ar65/library.c @@ -405,6 +405,3 @@ void LibClose (void) Error ("Problem deleting temporary library file: %s", strerror (errno)); } } - - - diff --git a/src/ar65/library.h b/src/ar65/library.h index 3453f1ea5..f7b203aa4 100644 --- a/src/ar65/library.h +++ b/src/ar65/library.h @@ -83,6 +83,3 @@ void LibClose (void); /* End of library.h */ #endif - - - diff --git a/src/ar65/list.c b/src/ar65/list.c index a3536c7d2..656299860 100644 --- a/src/ar65/list.c +++ b/src/ar65/list.c @@ -84,6 +84,3 @@ void ListObjFiles (int argc, char* argv []) /* Successful end */ exit (EXIT_SUCCESS); } - - - diff --git a/src/ar65/list.h b/src/ar65/list.h index ea6a62512..f29323b2e 100644 --- a/src/ar65/list.h +++ b/src/ar65/list.h @@ -52,7 +52,3 @@ void ListObjFiles (int argc, char* argv []); /* End of list.h */ #endif - - - - diff --git a/src/ar65/main.c b/src/ar65/main.c index 9af480632..9b9097ea4 100644 --- a/src/ar65/main.c +++ b/src/ar65/main.c @@ -137,6 +137,3 @@ int main (int argc, char* argv []) /* Return an apropriate exit code */ return EXIT_SUCCESS; } - - - diff --git a/src/ar65/objdata.c b/src/ar65/objdata.c index b419fac4d..2a7cf4ed4 100644 --- a/src/ar65/objdata.c +++ b/src/ar65/objdata.c @@ -167,6 +167,3 @@ void DelObjData (const char* Module) /* Not found! */ Warning ("Module `%s' not found in library `%s'", Module, LibName); } - - - diff --git a/src/ar65/objdata.h b/src/ar65/objdata.h index 52e175e84..13590ee4d 100644 --- a/src/ar65/objdata.h +++ b/src/ar65/objdata.h @@ -108,6 +108,3 @@ void DelObjData (const char* Module); /* End of objdata.h */ #endif - - - diff --git a/src/ar65/objfile.c b/src/ar65/objfile.c index 4f937a5de..933a68852 100644 --- a/src/ar65/objfile.c +++ b/src/ar65/objfile.c @@ -337,6 +337,3 @@ void ObjExtract (const char* Name) Error ("Cannot set mod time on `%s': %s", Name, strerror (errno)); } } - - - diff --git a/src/ar65/objfile.h b/src/ar65/objfile.h index 3f24c7c50..f971d3ec6 100644 --- a/src/ar65/objfile.h +++ b/src/ar65/objfile.h @@ -74,6 +74,3 @@ void ObjExtract (const char* Name); /* End of objfile.h */ #endif - - - diff --git a/src/ca65/anonname.c b/src/ca65/anonname.c index d01ae2aa1..242486916 100644 --- a/src/ca65/anonname.c +++ b/src/ca65/anonname.c @@ -79,6 +79,3 @@ int IsAnonName (const StrBuf* Name) } return (strncmp (SB_GetConstBuf (Name), AnonTag, sizeof (AnonTag) - 1) == 0); } - - - diff --git a/src/ca65/anonname.h b/src/ca65/anonname.h index bfefc05b5..fdb64159a 100644 --- a/src/ca65/anonname.h +++ b/src/ca65/anonname.h @@ -61,7 +61,5 @@ int IsAnonName (const StrBuf* Name); /* End of anonname.h */ + #endif - - - diff --git a/src/ca65/asserts.c b/src/ca65/asserts.c index a1a61a117..0d4c856a3 100644 --- a/src/ca65/asserts.c +++ b/src/ca65/asserts.c @@ -176,8 +176,3 @@ void WriteAssertions (void) /* Done writing the assertions */ ObjEndAssertions (); } - - - - - diff --git a/src/ca65/asserts.h b/src/ca65/asserts.h index f860a1af3..c69fe3be1 100644 --- a/src/ca65/asserts.h +++ b/src/ca65/asserts.h @@ -74,6 +74,3 @@ void WriteAssertions (void); /* End of asserts.h */ #endif - - - diff --git a/src/ca65/condasm.c b/src/ca65/condasm.c index 8be5cb687..c9506c316 100644 --- a/src/ca65/condasm.c +++ b/src/ca65/condasm.c @@ -523,7 +523,3 @@ void CleanupIfStack (unsigned SP) /* Calculate the new overall .IF condition */ CalcOverallIfCond (); } - - - - diff --git a/src/ca65/condasm.h b/src/ca65/condasm.h index 3489310d5..fa1842bf3 100644 --- a/src/ca65/condasm.h +++ b/src/ca65/condasm.h @@ -80,6 +80,3 @@ void CleanupIfStack (unsigned SP); /* End of condasm.h */ #endif - - - diff --git a/src/ca65/dbginfo.c b/src/ca65/dbginfo.c index b1b845fc9..5e1bf912a 100644 --- a/src/ca65/dbginfo.c +++ b/src/ca65/dbginfo.c @@ -527,6 +527,3 @@ void WriteHLLDbgSyms (void) } } - - - diff --git a/src/ca65/dbginfo.h b/src/ca65/dbginfo.h index 32cb3ca51..9f8139f6c 100644 --- a/src/ca65/dbginfo.h +++ b/src/ca65/dbginfo.h @@ -67,8 +67,3 @@ void WriteHLLDbgSyms (void); /* End of dbginfo.h */ #endif - - - - - diff --git a/src/ca65/ea.h b/src/ca65/ea.h index 5a65638a0..9a038047c 100644 --- a/src/ca65/ea.h +++ b/src/ca65/ea.h @@ -63,6 +63,3 @@ struct EffAddr { /* End of ea.h */ #endif - - - diff --git a/src/ca65/ea65.c b/src/ca65/ea65.c index 7db71a185..71fea6296 100644 --- a/src/ca65/ea65.c +++ b/src/ca65/ea65.c @@ -200,7 +200,3 @@ void GetEA (EffAddr* A) /* Apply addressing mode overrides */ A->AddrModeSet &= Restrictions; } - - - - diff --git a/src/ca65/ea65.h b/src/ca65/ea65.h index f7f8c2018..066d9b0cc 100644 --- a/src/ca65/ea65.h +++ b/src/ca65/ea65.h @@ -62,6 +62,3 @@ void GetEA (EffAddr* A); /* End of ea65.h */ #endif - - - diff --git a/src/ca65/enum.c b/src/ca65/enum.c index 08ef52fa6..f0561b692 100644 --- a/src/ca65/enum.c +++ b/src/ca65/enum.c @@ -151,7 +151,3 @@ void DoEnum (void) /* Free the base expression */ FreeExpr (BaseExpr); } - - - - diff --git a/src/ca65/enum.h b/src/ca65/enum.h index 5e85255f0..7d73a97b8 100644 --- a/src/ca65/enum.h +++ b/src/ca65/enum.h @@ -52,6 +52,3 @@ void DoEnum (void); /* End of enum.h */ #endif - - - diff --git a/src/ca65/error.c b/src/ca65/error.c index ffda60ecd..6731aa0e5 100644 --- a/src/ca65/error.c +++ b/src/ca65/error.c @@ -400,6 +400,3 @@ void Internal (const char* Format, ...) exit (EXIT_FAILURE); } - - - diff --git a/src/ca65/error.h b/src/ca65/error.h index d86e68c42..776053678 100644 --- a/src/ca65/error.h +++ b/src/ca65/error.h @@ -98,7 +98,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - - diff --git a/src/ca65/expr.c b/src/ca65/expr.c index ecbd22a27..471700e46 100644 --- a/src/ca65/expr.c +++ b/src/ca65/expr.c @@ -1942,6 +1942,3 @@ ExprNode* BoundedExpr (ExprNode* (*ExprFunc) (void), unsigned Size) { return MakeBoundedExpr (ExprFunc (), Size); } - - - diff --git a/src/ca65/expr.h b/src/ca65/expr.h index 17f547beb..0105bb68f 100644 --- a/src/ca65/expr.h +++ b/src/ca65/expr.h @@ -179,6 +179,3 @@ ExprNode* BoundedExpr (ExprNode* (*ExprFunc) (void), unsigned Size); /* End of expr.h */ #endif - - - diff --git a/src/ca65/feature.c b/src/ca65/feature.c index c2532c595..9a6055cb9 100644 --- a/src/ca65/feature.c +++ b/src/ca65/feature.c @@ -125,6 +125,3 @@ feature_t SetFeature (const StrBuf* Key) /* Return the value found */ return Feature; } - - - diff --git a/src/ca65/feature.h b/src/ca65/feature.h index 53016b21c..563ef5c2d 100644 --- a/src/ca65/feature.h +++ b/src/ca65/feature.h @@ -94,6 +94,3 @@ feature_t SetFeature (const StrBuf* Key); /* End of feature.h */ #endif - - - diff --git a/src/ca65/filetab.c b/src/ca65/filetab.c index bf5b32503..0b7d7eb80 100644 --- a/src/ca65/filetab.c +++ b/src/ca65/filetab.c @@ -336,5 +336,3 @@ void CreateDependencies (void) FT_MAIN | FT_INCLUDE | FT_BINARY | FT_DBGINFO); } } - - diff --git a/src/ca65/filetab.h b/src/ca65/filetab.h index af5909c4c..b6fd2b6a5 100644 --- a/src/ca65/filetab.h +++ b/src/ca65/filetab.h @@ -90,8 +90,3 @@ void CreateDependencies (void); /* End of filetab.h */ #endif - - - - - diff --git a/src/ca65/fragment.c b/src/ca65/fragment.c index e1a55edb3..b4997cb6d 100644 --- a/src/ca65/fragment.c +++ b/src/ca65/fragment.c @@ -66,6 +66,3 @@ Fragment* NewFragment (unsigned char Type, unsigned short Len) /* And return it */ return F; } - - - diff --git a/src/ca65/fragment.h b/src/ca65/fragment.h index 99852202a..2420d332e 100644 --- a/src/ca65/fragment.h +++ b/src/ca65/fragment.h @@ -82,8 +82,5 @@ Fragment* NewFragment (unsigned char Type, unsigned short Len); /* End of fragment.h */ + #endif - - - - diff --git a/src/ca65/global.h b/src/ca65/global.h index 23bbe4884..378a776e6 100644 --- a/src/ca65/global.h +++ b/src/ca65/global.h @@ -90,6 +90,3 @@ extern unsigned char UnderlineInNumbers; /* Allow underlines in numbers */ /* End of global.h */ #endif - - - diff --git a/src/ca65/incpath.c b/src/ca65/incpath.c index 81422b059..ff21b175d 100644 --- a/src/ca65/incpath.c +++ b/src/ca65/incpath.c @@ -82,6 +82,3 @@ void FinishIncludePaths (void) /* Add paths relative to the parent directory of the Windows binary. */ AddSubSearchPathFromWinBin (IncSearchPath, "asminc"); } - - - diff --git a/src/ca65/incpath.h b/src/ca65/incpath.h index 5e23ebc72..818e36265 100644 --- a/src/ca65/incpath.h +++ b/src/ca65/incpath.h @@ -71,6 +71,3 @@ void FinishIncludePaths (void); /* End of incpath.h */ #endif - - - diff --git a/src/ca65/instr.c b/src/ca65/instr.c index e0e3fc08c..1c7be086b 100644 --- a/src/ca65/instr.c +++ b/src/ca65/instr.c @@ -1521,6 +1521,3 @@ void HandleInstruction (unsigned Index) /* Call the handler */ InsTab->Ins[Index].Emit (&InsTab->Ins[Index]); } - - - diff --git a/src/ca65/instr.h b/src/ca65/instr.h index ead36a0c2..28809500f 100644 --- a/src/ca65/instr.h +++ b/src/ca65/instr.h @@ -179,8 +179,3 @@ void HandleInstruction (unsigned Index); /* End of instr.h */ #endif - - - - - diff --git a/src/ca65/istack.c b/src/ca65/istack.c index 507d56ba5..14cae0ac9 100644 --- a/src/ca65/istack.c +++ b/src/ca65/istack.c @@ -156,6 +156,3 @@ void CheckInputStack (void) Error ("Open %s", IStack->Desc); } } - - - diff --git a/src/ca65/istack.h b/src/ca65/istack.h index 06ff066e4..dd982194a 100644 --- a/src/ca65/istack.h +++ b/src/ca65/istack.h @@ -68,7 +68,3 @@ void CheckInputStack (void); /* End of istack.h */ #endif - - - - diff --git a/src/ca65/lineinfo.c b/src/ca65/lineinfo.c index dbc5b4d41..acdaf04cc 100644 --- a/src/ca65/lineinfo.c +++ b/src/ca65/lineinfo.c @@ -501,6 +501,3 @@ void WriteLineInfos (void) /* End of line infos */ ObjEndLineInfos (); } - - - diff --git a/src/ca65/lineinfo.h b/src/ca65/lineinfo.h index 41b44c0bc..5998b1253 100644 --- a/src/ca65/lineinfo.h +++ b/src/ca65/lineinfo.h @@ -115,8 +115,5 @@ void WriteLineInfos (void); /* End of lineinfo.h */ + #endif - - - - diff --git a/src/ca65/listing.c b/src/ca65/listing.c index 8bd8833dd..dc10882ac 100644 --- a/src/ca65/listing.c +++ b/src/ca65/listing.c @@ -452,6 +452,3 @@ void CreateListing (void) /* Close the listing file */ (void) fclose (F); } - - - diff --git a/src/ca65/listing.h b/src/ca65/listing.h index bea716bf1..b1ae44291 100644 --- a/src/ca65/listing.h +++ b/src/ca65/listing.h @@ -123,6 +123,3 @@ void CreateListing (void); /* End of listing.h */ #endif - - - diff --git a/src/ca65/macro.c b/src/ca65/macro.c index 75741c479..c5c55228f 100644 --- a/src/ca65/macro.c +++ b/src/ca65/macro.c @@ -1049,6 +1049,3 @@ void EnableDefineStyleMacros (void) PRECONDITION (DisableDefines > 0); --DisableDefines; } - - - diff --git a/src/ca65/macro.h b/src/ca65/macro.h index 582b13524..a526d6119 100644 --- a/src/ca65/macro.h +++ b/src/ca65/macro.h @@ -110,6 +110,3 @@ void EnableDefineStyleMacros (void); /* End of macro.h */ #endif - - - diff --git a/src/ca65/main.c b/src/ca65/main.c index 4ec98b01d..6d146f6e6 100644 --- a/src/ca65/main.c +++ b/src/ca65/main.c @@ -1116,6 +1116,3 @@ int main (int argc, char* argv []) /* Return an apropriate exit code */ return (ErrorCount == 0)? EXIT_SUCCESS : EXIT_FAILURE; } - - - diff --git a/src/ca65/nexttok.c b/src/ca65/nexttok.c index d52a8babd..6d4af26af 100644 --- a/src/ca65/nexttok.c +++ b/src/ca65/nexttok.c @@ -816,6 +816,3 @@ void LeaveRawTokenMode (void) PRECONDITION (RawMode > 0); --RawMode; } - - - diff --git a/src/ca65/nexttok.h b/src/ca65/nexttok.h index d8d7c0101..b948e5054 100644 --- a/src/ca65/nexttok.h +++ b/src/ca65/nexttok.h @@ -90,7 +90,3 @@ void LeaveRawTokenMode (void); /* End of nexttok.h */ #endif - - - - diff --git a/src/ca65/objcode.c b/src/ca65/objcode.c index 3ab9b2ebe..d1ab4f6bd 100644 --- a/src/ca65/objcode.c +++ b/src/ca65/objcode.c @@ -278,6 +278,3 @@ void EmitFill (unsigned long Count) GenFragment (FRAG_FILL, Chunk); } } - - - diff --git a/src/ca65/objcode.h b/src/ca65/objcode.h index 68b967e3f..70a031164 100644 --- a/src/ca65/objcode.h +++ b/src/ca65/objcode.h @@ -94,6 +94,3 @@ void EmitFill (unsigned long Count); /* End of objcode.h */ #endif - - - diff --git a/src/ca65/objfile.c b/src/ca65/objfile.c index 818e5625b..c0e08996f 100644 --- a/src/ca65/objfile.c +++ b/src/ca65/objfile.c @@ -512,6 +512,3 @@ void ObjEndSpans (void) { Header.SpanSize = ftell (F) - Header.SpanOffs; } - - - diff --git a/src/ca65/objfile.h b/src/ca65/objfile.h index ab775ca24..c1d148725 100644 --- a/src/ca65/objfile.h +++ b/src/ca65/objfile.h @@ -160,6 +160,3 @@ void ObjEndSpans (void); /* End of objfile.h */ #endif - - - diff --git a/src/ca65/options.h b/src/ca65/options.h index 6b4184824..96eb90ba7 100644 --- a/src/ca65/options.h +++ b/src/ca65/options.h @@ -73,6 +73,3 @@ void WriteOptions (void); /* End of options.h */ #endif - - - diff --git a/src/ca65/pseudo.c b/src/ca65/pseudo.c index 3af192610..55b5cfe03 100644 --- a/src/ca65/pseudo.c +++ b/src/ca65/pseudo.c @@ -2145,6 +2145,3 @@ void CheckPseudo (void) Warning (1, "CPU stack is not empty"); } } - - - diff --git a/src/ca65/pseudo.h b/src/ca65/pseudo.h index 006b27909..6199f661e 100644 --- a/src/ca65/pseudo.h +++ b/src/ca65/pseudo.h @@ -55,6 +55,3 @@ void CheckPseudo (void); /* End of pseudo.h */ #endif - - - diff --git a/src/ca65/repeat.c b/src/ca65/repeat.c index 915c8a78f..a98d0c39d 100644 --- a/src/ca65/repeat.c +++ b/src/ca65/repeat.c @@ -175,6 +175,3 @@ Done: /* Switch out of raw token mode */ LeaveRawTokenMode (); } - - - diff --git a/src/ca65/repeat.h b/src/ca65/repeat.h index 1cdccc0e3..3230fb657 100644 --- a/src/ca65/repeat.h +++ b/src/ca65/repeat.h @@ -52,7 +52,3 @@ void ParseRepeat (void); /* End of repeat.h */ #endif - - - - diff --git a/src/ca65/scanner.c b/src/ca65/scanner.c index 1a1127778..79055399e 100644 --- a/src/ca65/scanner.c +++ b/src/ca65/scanner.c @@ -1505,7 +1505,3 @@ void DoneScanner (void) { DoneCharSource (); } - - - - diff --git a/src/ca65/scanner.h b/src/ca65/scanner.h index b0fc3411f..0985028fc 100644 --- a/src/ca65/scanner.h +++ b/src/ca65/scanner.h @@ -108,7 +108,3 @@ void DoneScanner (void); /* End of scanner.h */ #endif - - - - diff --git a/src/ca65/segdef.c b/src/ca65/segdef.c index 3c1a59992..bf735ef31 100644 --- a/src/ca65/segdef.c +++ b/src/ca65/segdef.c @@ -77,7 +77,3 @@ SegDef* DupSegDef (const SegDef* Def) { return NewSegDef (Def->Name, Def->AddrSize); } - - - - diff --git a/src/ca65/segdef.h b/src/ca65/segdef.h index c7431b9a2..824a59bed 100644 --- a/src/ca65/segdef.h +++ b/src/ca65/segdef.h @@ -81,6 +81,3 @@ SegDef* DupSegDef (const SegDef* D); /* End of segdef.h */ #endif - - - diff --git a/src/ca65/segment.c b/src/ca65/segment.c index 60a897324..742bbbbcd 100644 --- a/src/ca65/segment.c +++ b/src/ca65/segment.c @@ -627,7 +627,3 @@ void WriteSegments (void) /* Done writing segments */ ObjEndSegments (); } - - - - diff --git a/src/ca65/segment.h b/src/ca65/segment.h index 69a3eb833..d7e8b737c 100644 --- a/src/ca65/segment.h +++ b/src/ca65/segment.h @@ -174,6 +174,3 @@ void WriteSegments (void); /* End of segment.h */ #endif - - - diff --git a/src/ca65/sizeof.c b/src/ca65/sizeof.c index a29c83e9d..479a00ccf 100644 --- a/src/ca65/sizeof.c +++ b/src/ca65/sizeof.c @@ -130,6 +130,3 @@ SymEntry* DefSizeOfSymbol (SymEntry* Sym, long Size) SymDef (SizeSym, GenLiteralExpr (Size), ADDR_SIZE_DEFAULT, SF_NONE); return SizeSym; } - - - diff --git a/src/ca65/sizeof.h b/src/ca65/sizeof.h index 2bb400d83..5ca8fcd1a 100644 --- a/src/ca65/sizeof.h +++ b/src/ca65/sizeof.h @@ -95,7 +95,5 @@ struct SymEntry* DefSizeOfSymbol (struct SymEntry* Sym, long Size); /* End of sizeof.h */ + #endif - - - diff --git a/src/ca65/span.c b/src/ca65/span.c index ebec761fe..5b42d9eb5 100644 --- a/src/ca65/span.c +++ b/src/ca65/span.c @@ -407,7 +407,3 @@ void WriteSpans (void) /* Done writing the spans */ ObjEndSpans (); } - - - - diff --git a/src/ca65/span.h b/src/ca65/span.h index 3ca99ee8f..5eb3affdc 100644 --- a/src/ca65/span.h +++ b/src/ca65/span.h @@ -117,6 +117,3 @@ void WriteSpans (void); /* End of span.h */ #endif - - - diff --git a/src/ca65/spool.c b/src/ca65/spool.c index d30045195..a25702fdf 100644 --- a/src/ca65/spool.c +++ b/src/ca65/spool.c @@ -89,6 +89,3 @@ void InitStrPool (void) /* Insert an empty string. It will have string id 0 */ SP_AddStr (StrPool, ""); } - - - diff --git a/src/ca65/spool.h b/src/ca65/spool.h index 744e8e5bb..e8d115298 100644 --- a/src/ca65/spool.h +++ b/src/ca65/spool.h @@ -114,7 +114,3 @@ void InitStrPool (void); /* End of spool.h */ #endif - - - - diff --git a/src/ca65/struct.c b/src/ca65/struct.c index 1ad5832c0..683bd067c 100644 --- a/src/ca65/struct.c +++ b/src/ca65/struct.c @@ -299,6 +299,3 @@ void DoUnion (void) { DoStructInternal (0, UNION); } - - - diff --git a/src/ca65/struct.h b/src/ca65/struct.h index 9175a498c..1fdaf9d60 100644 --- a/src/ca65/struct.h +++ b/src/ca65/struct.h @@ -68,6 +68,3 @@ void DoUnion (void); /* End of struct.h */ #endif - - - diff --git a/src/ca65/studyexpr.c b/src/ca65/studyexpr.c index 5ff1cc369..cb2795bd3 100644 --- a/src/ca65/studyexpr.c +++ b/src/ca65/studyexpr.c @@ -1539,6 +1539,3 @@ void StudyExpr (ExprNode* Expr, ExprDesc* D) printf ("%u sections:\n", D->SecCount); #endif } - - - diff --git a/src/ca65/studyexpr.h b/src/ca65/studyexpr.h index 504323e13..389bce5a3 100644 --- a/src/ca65/studyexpr.h +++ b/src/ca65/studyexpr.h @@ -118,7 +118,5 @@ void StudyExpr (ExprNode* Expr, ExprDesc* D); /* End of studyexpr.h */ + #endif - - - diff --git a/src/ca65/symbol.c b/src/ca65/symbol.c index b9e2a6c16..5eed70beb 100644 --- a/src/ca65/symbol.c +++ b/src/ca65/symbol.c @@ -262,6 +262,3 @@ SymEntry* ParseAnySymName (SymFindAction Action) /* Return the symbol found */ return Sym; } - - - diff --git a/src/ca65/symbol.h b/src/ca65/symbol.h index 30964f0c0..8ea5d7d20 100644 --- a/src/ca65/symbol.h +++ b/src/ca65/symbol.h @@ -88,6 +88,3 @@ struct SymEntry* ParseAnySymName (SymFindAction Action); /* End of symbol.h */ #endif - - - diff --git a/src/ca65/symentry.c b/src/ca65/symentry.c index 612bc09f2..411f3ac33 100644 --- a/src/ca65/symentry.c +++ b/src/ca65/symentry.c @@ -744,6 +744,3 @@ unsigned GetSymInfoFlags (const SymEntry* S, long* ConstVal) /* Return the result */ return Flags; } - - - diff --git a/src/ca65/symentry.h b/src/ca65/symentry.h index a9b1386e3..a5900bcd0 100644 --- a/src/ca65/symentry.h +++ b/src/ca65/symentry.h @@ -359,7 +359,3 @@ unsigned GetSymInfoFlags (const SymEntry* Sym, long* ConstVal); /* End of symentry.h */ #endif - - - - diff --git a/src/ca65/symtab.c b/src/ca65/symtab.c index 2681605fa..001d564ea 100644 --- a/src/ca65/symtab.c +++ b/src/ca65/symtab.c @@ -1031,6 +1031,3 @@ void WriteScopes (void) /* Done writing the scopes */ ObjEndScopes (); } - - - diff --git a/src/ca65/symtab.h b/src/ca65/symtab.h index e7f7384d0..de5806124 100644 --- a/src/ca65/symtab.h +++ b/src/ca65/symtab.h @@ -178,6 +178,3 @@ void WriteScopes (void); /* End of symtab.h */ #endif - - - diff --git a/src/ca65/token.c b/src/ca65/token.c index b2d103dde..d3324d447 100644 --- a/src/ca65/token.c +++ b/src/ca65/token.c @@ -72,6 +72,3 @@ void CopyToken (Token* Dst, const Token* Src) SB_Copy (&Dst->SVal, &Src->SVal); Dst->Pos = Src->Pos; } - - - diff --git a/src/ca65/token.h b/src/ca65/token.h index 6499a14bd..56d780e56 100644 --- a/src/ca65/token.h +++ b/src/ca65/token.h @@ -314,6 +314,3 @@ void CopyToken (Token* Dst, const Token* Src); /* End of token.h */ #endif - - - diff --git a/src/ca65/toklist.c b/src/ca65/toklist.c index e6adf3d96..43b3f3c7d 100644 --- a/src/ca65/toklist.c +++ b/src/ca65/toklist.c @@ -283,6 +283,3 @@ void PushTokList (TokList* List, const char* Desc) ++PushCounter; PushInput (ReplayTokList, List, Desc); } - - - diff --git a/src/ca65/toklist.h b/src/ca65/toklist.h index 6e7a414cc..84b4291f4 100644 --- a/src/ca65/toklist.h +++ b/src/ca65/toklist.h @@ -129,7 +129,3 @@ void PushTokList (TokList* List, const char* Desc); /* End of toklist.h */ #endif - - - - diff --git a/src/ca65/ulabel.c b/src/ca65/ulabel.c index 140dad3d9..efebce56c 100644 --- a/src/ca65/ulabel.c +++ b/src/ca65/ulabel.c @@ -223,7 +223,3 @@ void ULabDone (void) ReleaseFullLineInfo (&L->LineInfos); } } - - - - diff --git a/src/ca65/ulabel.h b/src/ca65/ulabel.h index c7c172918..a925a5f87 100644 --- a/src/ca65/ulabel.h +++ b/src/ca65/ulabel.h @@ -74,6 +74,3 @@ void ULabDone (void); /* End of ulabel.h */ #endif - - - diff --git a/src/cc65/anonname.c b/src/cc65/anonname.c index 2c33b3f17..8e46269d2 100644 --- a/src/cc65/anonname.c +++ b/src/cc65/anonname.c @@ -78,6 +78,3 @@ int IsAnonName (const char* Name) { return (strncmp (Name, AnonTag, sizeof (AnonTag) - 1) == 0); } - - - diff --git a/src/cc65/anonname.h b/src/cc65/anonname.h index 43292505e..c7661f336 100644 --- a/src/cc65/anonname.h +++ b/src/cc65/anonname.h @@ -55,7 +55,5 @@ int IsAnonName (const char* Name); /* End of anonname.h */ + #endif - - - diff --git a/src/cc65/asmcode.c b/src/cc65/asmcode.c index ec0a8791e..46bce4bed 100644 --- a/src/cc65/asmcode.c +++ b/src/cc65/asmcode.c @@ -130,6 +130,3 @@ void WriteAsmOutput (void) Entry = Entry->NextSym; } } - - - diff --git a/src/cc65/asmcode.h b/src/cc65/asmcode.h index 5d70ae381..248381224 100644 --- a/src/cc65/asmcode.h +++ b/src/cc65/asmcode.h @@ -88,8 +88,5 @@ void WriteAsmOutput (void); /* End of asmcode.h */ + #endif - - - - diff --git a/src/cc65/asmlabel.c b/src/cc65/asmlabel.c index 46330c303..da986c5ff 100644 --- a/src/cc65/asmlabel.c +++ b/src/cc65/asmlabel.c @@ -98,7 +98,3 @@ int IsLocalLabelName (const char* Name) /* Local label name */ return 1; } - - - - diff --git a/src/cc65/asmlabel.h b/src/cc65/asmlabel.h index 44235c9d9..88cbcd622 100644 --- a/src/cc65/asmlabel.h +++ b/src/cc65/asmlabel.h @@ -59,7 +59,5 @@ int IsLocalLabelName (const char* Name); /* End of asmlabel.h */ + #endif - - - diff --git a/src/cc65/asmstmt.c b/src/cc65/asmstmt.c index ce2660e54..b3b452c1a 100644 --- a/src/cc65/asmstmt.c +++ b/src/cc65/asmstmt.c @@ -447,6 +447,3 @@ void AsmStatement (void) /* Closing paren needed */ ConsumeRParen (); } - - - diff --git a/src/cc65/asmstmt.h b/src/cc65/asmstmt.h index e3a6a0433..1d1936089 100644 --- a/src/cc65/asmstmt.h +++ b/src/cc65/asmstmt.h @@ -55,6 +55,3 @@ void AsmStatement (void); /* End of asmstmt.h */ #endif - - - diff --git a/src/cc65/assignment.c b/src/cc65/assignment.c index 81a189f36..7308fb693 100644 --- a/src/cc65/assignment.c +++ b/src/cc65/assignment.c @@ -266,6 +266,3 @@ void Assignment (ExprDesc* Expr) /* Value is still in primary and not an lvalue */ ED_MakeRValExpr (Expr); } - - - diff --git a/src/cc65/assignment.h b/src/cc65/assignment.h index 6273724ca..278c5ef72 100644 --- a/src/cc65/assignment.h +++ b/src/cc65/assignment.h @@ -55,7 +55,5 @@ void Assignment (ExprDesc* lval); /* End of assignment.h */ + #endif - - - diff --git a/src/cc65/casenode.c b/src/cc65/casenode.c index 0e1b37305..fd35a035b 100644 --- a/src/cc65/casenode.c +++ b/src/cc65/casenode.c @@ -182,6 +182,3 @@ unsigned InsertCaseValue (Collection* Nodes, unsigned long Val, unsigned Depth) /* Return the label of the node we found/created */ return CaseLabel; } - - - diff --git a/src/cc65/casenode.h b/src/cc65/casenode.h index aa1de2efa..1b5ff3834 100644 --- a/src/cc65/casenode.h +++ b/src/cc65/casenode.h @@ -128,7 +128,5 @@ unsigned InsertCaseValue (Collection* Nodes, unsigned long Val, unsigned Depth); /* End of casenode.h */ + #endif - - - diff --git a/src/cc65/codeent.c b/src/cc65/codeent.c index 21eef8fe5..e1ab965bc 100644 --- a/src/cc65/codeent.c +++ b/src/cc65/codeent.c @@ -1490,9 +1490,3 @@ void CE_Output (const CodeEntry* E) /* Terminate the line */ WriteOutput ("\n"); } - - - - - - diff --git a/src/cc65/codeent.h b/src/cc65/codeent.h index 72ce626bb..b2509863b 100644 --- a/src/cc65/codeent.h +++ b/src/cc65/codeent.h @@ -238,8 +238,5 @@ void CE_Output (const CodeEntry* E); /* End of codeent.h */ + #endif - - - - diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 2d41c4a95..7ee2a972e 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -4362,6 +4362,3 @@ void g_asmcode (struct StrBuf* B) { AddCodeLine ("%.*s", (int) SB_GetLen (B), SB_GetConstBuf (B)); } - - - diff --git a/src/cc65/codegen.h b/src/cc65/codegen.h index a2f91518d..256d1ff98 100644 --- a/src/cc65/codegen.h +++ b/src/cc65/codegen.h @@ -486,6 +486,5 @@ void g_asmcode (struct StrBuf* B); /* End of codegen.h */ + #endif - - diff --git a/src/cc65/codeinfo.c b/src/cc65/codeinfo.c index 5f549c4a6..161b44229 100644 --- a/src/cc65/codeinfo.c +++ b/src/cc65/codeinfo.c @@ -828,6 +828,3 @@ cmp_t FindTosCmpCond (const char* Name) return CMP_INV; } } - - - diff --git a/src/cc65/codeinfo.h b/src/cc65/codeinfo.h index 68a08b5c8..59fc8e05d 100644 --- a/src/cc65/codeinfo.h +++ b/src/cc65/codeinfo.h @@ -177,8 +177,5 @@ cmp_t FindTosCmpCond (const char* Name); /* End of codeinfo.h */ + #endif - - - - diff --git a/src/cc65/codelab.c b/src/cc65/codelab.c index 88de84dc1..f528f666d 100644 --- a/src/cc65/codelab.c +++ b/src/cc65/codelab.c @@ -132,7 +132,3 @@ void CL_Output (const CodeLabel* L) WriteOutput ("\n"); } } - - - - diff --git a/src/cc65/codelab.h b/src/cc65/codelab.h index d38a30e82..480d3a15b 100644 --- a/src/cc65/codelab.h +++ b/src/cc65/codelab.h @@ -117,7 +117,5 @@ void CL_Output (const CodeLabel* L); /* End of codelab.h */ + #endif - - - diff --git a/src/cc65/codeopt.c b/src/cc65/codeopt.c index a16364be4..566fdf954 100644 --- a/src/cc65/codeopt.c +++ b/src/cc65/codeopt.c @@ -1432,6 +1432,3 @@ void RunOpt (CodeSeg* S) WriteOptStats (StatFileName); } } - - - diff --git a/src/cc65/codeopt.h b/src/cc65/codeopt.h index 7ce2fa844..e0bc83731 100644 --- a/src/cc65/codeopt.h +++ b/src/cc65/codeopt.h @@ -64,7 +64,5 @@ void RunOpt (CodeSeg* S); /* End of codeopt.h */ + #endif - - - diff --git a/src/cc65/codeseg.c b/src/cc65/codeseg.c index c28f32651..50d893847 100644 --- a/src/cc65/codeseg.c +++ b/src/cc65/codeseg.c @@ -1680,6 +1680,3 @@ void CS_GenRegInfo (CodeSeg* S) } while (!Done); } - - - diff --git a/src/cc65/codeseg.h b/src/cc65/codeseg.h index 125ad31c0..da6b6a82e 100644 --- a/src/cc65/codeseg.h +++ b/src/cc65/codeseg.h @@ -297,7 +297,5 @@ void CS_GenRegInfo (CodeSeg* S); /* End of codeseg.h */ + #endif - - - diff --git a/src/cc65/compile.c b/src/cc65/compile.c index 17e9471b8..c84082f4b 100644 --- a/src/cc65/compile.c +++ b/src/cc65/compile.c @@ -428,6 +428,3 @@ void FinishCompile (void) /* Leave the main lexical level */ LeaveGlobalLevel (); } - - - diff --git a/src/cc65/compile.h b/src/cc65/compile.h index 74e294efe..2d15c8200 100644 --- a/src/cc65/compile.h +++ b/src/cc65/compile.h @@ -55,6 +55,3 @@ void FinishCompile (void); /* End of compile.h */ #endif - - - diff --git a/src/cc65/coptadd.c b/src/cc65/coptadd.c index fe050cef6..f0acdc4c7 100644 --- a/src/cc65/coptadd.c +++ b/src/cc65/coptadd.c @@ -553,6 +553,3 @@ unsigned OptAdd6 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptadd.h b/src/cc65/coptadd.h index f89ad016e..d61fd023c 100644 --- a/src/cc65/coptadd.h +++ b/src/cc65/coptadd.h @@ -153,6 +153,3 @@ unsigned OptAdd6 (CodeSeg* S); /* End of coptadd.h */ #endif - - - diff --git a/src/cc65/coptc02.c b/src/cc65/coptc02.c index 969f9fd6e..ecbafdcd2 100644 --- a/src/cc65/coptc02.c +++ b/src/cc65/coptc02.c @@ -214,6 +214,3 @@ unsigned Opt65C02Stores (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptc02.h b/src/cc65/coptc02.h index 7d010568b..205669376 100644 --- a/src/cc65/coptc02.h +++ b/src/cc65/coptc02.h @@ -61,7 +61,5 @@ unsigned Opt65C02Stores (CodeSeg* S); /* End of coptc02.h */ + #endif - - - diff --git a/src/cc65/coptcmp.c b/src/cc65/coptcmp.c index e1b80a71c..d365fb682 100644 --- a/src/cc65/coptcmp.c +++ b/src/cc65/coptcmp.c @@ -971,6 +971,3 @@ unsigned OptCmp9 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptcmp.h b/src/cc65/coptcmp.h index d54b8f5c6..dbfd74dd5 100644 --- a/src/cc65/coptcmp.h +++ b/src/cc65/coptcmp.h @@ -171,6 +171,3 @@ unsigned OptCmp9 (CodeSeg* S); /* End of coptcmp.h */ #endif - - - diff --git a/src/cc65/coptind.c b/src/cc65/coptind.c index 14f64590e..46debca37 100644 --- a/src/cc65/coptind.c +++ b/src/cc65/coptind.c @@ -2289,6 +2289,3 @@ unsigned OptIndLoads2 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptind.h b/src/cc65/coptind.h index 83a3f964c..509ae0080 100644 --- a/src/cc65/coptind.h +++ b/src/cc65/coptind.h @@ -174,7 +174,5 @@ unsigned OptIndLoads2 (CodeSeg* S); /* End of coptind.h */ + #endif - - - diff --git a/src/cc65/coptneg.c b/src/cc65/coptneg.c index 2bc0e6b2f..fe1683ceb 100644 --- a/src/cc65/coptneg.c +++ b/src/cc65/coptneg.c @@ -605,6 +605,3 @@ unsigned OptComplAX1 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptneg.h b/src/cc65/coptneg.h index 580faaa67..f4947bd92 100644 --- a/src/cc65/coptneg.h +++ b/src/cc65/coptneg.h @@ -183,6 +183,3 @@ unsigned OptComplAX1 (CodeSeg* S); /* End of coptneg.h */ #endif - - - diff --git a/src/cc65/coptptrload.c b/src/cc65/coptptrload.c index 43f3cc49c..1ab4b3259 100644 --- a/src/cc65/coptptrload.c +++ b/src/cc65/coptptrload.c @@ -1458,6 +1458,3 @@ unsigned OptPtrLoad17 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptptrload.h b/src/cc65/coptptrload.h index 3b8a83c7b..1a4124ccb 100644 --- a/src/cc65/coptptrload.h +++ b/src/cc65/coptptrload.h @@ -359,7 +359,5 @@ unsigned OptPtrLoad17 (CodeSeg* S); /* End of coptptrload.h */ + #endif - - - diff --git a/src/cc65/coptptrstore.c b/src/cc65/coptptrstore.c index 646cec07f..0f89ce9dc 100644 --- a/src/cc65/coptptrstore.c +++ b/src/cc65/coptptrstore.c @@ -757,6 +757,3 @@ unsigned OptPtrStore3 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptptrstore.h b/src/cc65/coptptrstore.h index c6798ea30..b784a889a 100644 --- a/src/cc65/coptptrstore.h +++ b/src/cc65/coptptrstore.h @@ -175,8 +175,5 @@ unsigned OptPtrStore3 (CodeSeg* S); /* End of coptptrstore.h */ + #endif - - - - diff --git a/src/cc65/coptpush.c b/src/cc65/coptpush.c index a1ed700f6..c17dd30df 100644 --- a/src/cc65/coptpush.c +++ b/src/cc65/coptpush.c @@ -166,6 +166,3 @@ unsigned OptPush2 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptpush.h b/src/cc65/coptpush.h index 0cd01dde8..60403486a 100644 --- a/src/cc65/coptpush.h +++ b/src/cc65/coptpush.h @@ -81,6 +81,3 @@ unsigned OptPush2 (CodeSeg* S); /* End of coptpush.h */ #endif - - - diff --git a/src/cc65/coptshift.c b/src/cc65/coptshift.c index 933c3dfa3..825a09577 100644 --- a/src/cc65/coptshift.c +++ b/src/cc65/coptshift.c @@ -742,6 +742,3 @@ NextEntry: /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptshift.h b/src/cc65/coptshift.h index ce63e0e1b..fa9788c19 100644 --- a/src/cc65/coptshift.h +++ b/src/cc65/coptshift.h @@ -120,7 +120,5 @@ unsigned OptShift6 (CodeSeg* S); /* End of coptshift.h */ + #endif - - - diff --git a/src/cc65/coptsize.c b/src/cc65/coptsize.c index 0848bab0e..8dd9cedee 100644 --- a/src/cc65/coptsize.c +++ b/src/cc65/coptsize.c @@ -1034,6 +1034,3 @@ unsigned OptSize2 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptsize.h b/src/cc65/coptsize.h index f1dc07e46..bece6db34 100644 --- a/src/cc65/coptsize.h +++ b/src/cc65/coptsize.h @@ -64,7 +64,5 @@ unsigned OptSize2 (CodeSeg* S); /* End of coptsize.h */ + #endif - - - diff --git a/src/cc65/coptstop.c b/src/cc65/coptstop.c index dfa14d3f8..f0075e8e4 100644 --- a/src/cc65/coptstop.c +++ b/src/cc65/coptstop.c @@ -2079,6 +2079,3 @@ unsigned OptStackOps (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptstop.h b/src/cc65/coptstop.h index 8abc25ece..4edf284c2 100644 --- a/src/cc65/coptstop.h +++ b/src/cc65/coptstop.h @@ -55,7 +55,5 @@ unsigned OptStackOps (CodeSeg* S); /* End of coptstop.h */ + #endif - - - diff --git a/src/cc65/coptstore.c b/src/cc65/coptstore.c index ea304e15d..fca153e96 100644 --- a/src/cc65/coptstore.c +++ b/src/cc65/coptstore.c @@ -435,6 +435,3 @@ unsigned OptStore5 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptstore.h b/src/cc65/coptstore.h index 0785566e0..1f5f0174b 100644 --- a/src/cc65/coptstore.h +++ b/src/cc65/coptstore.h @@ -109,6 +109,3 @@ unsigned OptStore5 (CodeSeg* S); /* End of coptstore.h */ #endif - - - diff --git a/src/cc65/coptsub.c b/src/cc65/coptsub.c index fdb167684..57606eea2 100644 --- a/src/cc65/coptsub.c +++ b/src/cc65/coptsub.c @@ -228,6 +228,3 @@ unsigned OptSub3 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/coptsub.h b/src/cc65/coptsub.h index c8249bdb2..724abaa3c 100644 --- a/src/cc65/coptsub.h +++ b/src/cc65/coptsub.h @@ -88,6 +88,3 @@ unsigned OptSub3 (CodeSeg* S); /* End of coptsub.h */ #endif - - - diff --git a/src/cc65/copttest.c b/src/cc65/copttest.c index 91ebdc7ad..9a8ed0508 100644 --- a/src/cc65/copttest.c +++ b/src/cc65/copttest.c @@ -169,6 +169,3 @@ unsigned OptTest2 (CodeSeg* S) /* Return the number of changes made */ return Changes; } - - - diff --git a/src/cc65/copttest.h b/src/cc65/copttest.h index f6af1da32..aa70dc0fe 100644 --- a/src/cc65/copttest.h +++ b/src/cc65/copttest.h @@ -81,6 +81,3 @@ unsigned OptTest2 (CodeSeg* S); /* End of copttest.h */ #endif - - - diff --git a/src/cc65/dataseg.c b/src/cc65/dataseg.c index c19791e9e..40ec6f793 100644 --- a/src/cc65/dataseg.c +++ b/src/cc65/dataseg.c @@ -130,7 +130,3 @@ void DS_Output (const DataSeg* S) /* Add an additional newline after the segment output */ WriteOutput ("\n"); } - - - - diff --git a/src/cc65/dataseg.h b/src/cc65/dataseg.h index c822120a8..dd99d4727 100644 --- a/src/cc65/dataseg.h +++ b/src/cc65/dataseg.h @@ -88,7 +88,5 @@ void DS_Output (const DataSeg* S); /* End of dataseg.h */ + #endif - - - diff --git a/src/cc65/datatype.c b/src/cc65/datatype.c index 88ec9ead6..6cdaaf84f 100644 --- a/src/cc65/datatype.c +++ b/src/cc65/datatype.c @@ -746,6 +746,3 @@ TypeCode AddrSizeQualifier (unsigned AddrSize) } } - - - diff --git a/src/cc65/datatype.h b/src/cc65/datatype.h index b49694da3..cfd0cb2be 100644 --- a/src/cc65/datatype.h +++ b/src/cc65/datatype.h @@ -691,6 +691,3 @@ INLINE TypeCode DataAddrSizeQualifier (void) /* End of datatype.h */ #endif - - - diff --git a/src/cc65/declare.c b/src/cc65/declare.c index c4debd8aa..558fc5519 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -2237,6 +2237,3 @@ unsigned ParseInit (Type* T) /* Return the size needed for the initialization */ return Size; } - - - diff --git a/src/cc65/declare.h b/src/cc65/declare.h index 3a21a59d9..ff092d87f 100644 --- a/src/cc65/declare.h +++ b/src/cc65/declare.h @@ -118,6 +118,3 @@ unsigned ParseInit (Type* T); /* End of declare.h */ #endif - - - diff --git a/src/cc65/declattr.c b/src/cc65/declattr.c index ac45db221..7fc7f4fb8 100644 --- a/src/cc65/declattr.c +++ b/src/cc65/declattr.c @@ -247,6 +247,3 @@ void ParseAttribute (Declaration* D) ConsumeRParen (); ConsumeRParen (); } - - - diff --git a/src/cc65/declattr.h b/src/cc65/declattr.h index e3826c77f..63669cee7 100644 --- a/src/cc65/declattr.h +++ b/src/cc65/declattr.h @@ -75,6 +75,3 @@ void ParseAttribute (struct Declaration* D); /* End of declattr.h */ #endif - - - diff --git a/src/cc65/error.c b/src/cc65/error.c index e15cd22ba..56750367a 100644 --- a/src/cc65/error.c +++ b/src/cc65/error.c @@ -321,6 +321,3 @@ void ErrorReport (void) { Print (stdout, 1, "%u errors, %u warnings\n", ErrorCount, WarningCount); } - - - diff --git a/src/cc65/error.h b/src/cc65/error.h index 5811e1b45..f85cdcae0 100644 --- a/src/cc65/error.h +++ b/src/cc65/error.h @@ -117,9 +117,5 @@ void ErrorReport (void); /* End of error.h */ + #endif - - - - - diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 2125eb430..a425c6602 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -3545,6 +3545,3 @@ void ConstAbsIntExpr (void (*Func) (ExprDesc*), ExprDesc* Expr) ED_MakeConstAbsInt (Expr, 1); } } - - - diff --git a/src/cc65/expr.h b/src/cc65/expr.h index c5d193e6b..193fe39eb 100644 --- a/src/cc65/expr.h +++ b/src/cc65/expr.h @@ -92,7 +92,3 @@ void hie0 (ExprDesc* Expr); /* End of expr.h */ #endif - - - - diff --git a/src/cc65/exprdesc.c b/src/cc65/exprdesc.c index 978aedfc6..a5787d967 100644 --- a/src/cc65/exprdesc.c +++ b/src/cc65/exprdesc.c @@ -373,6 +373,3 @@ Type* ReplaceType (ExprDesc* Expr, const Type* NewType) Expr->Type = TypeDup (NewType); return OldType; } - - - diff --git a/src/cc65/exprdesc.h b/src/cc65/exprdesc.h index f2d5ce322..021f9fcc2 100644 --- a/src/cc65/exprdesc.h +++ b/src/cc65/exprdesc.h @@ -379,7 +379,5 @@ Type* ReplaceType (ExprDesc* Expr, const Type* NewType); /* End of exprdesc.h */ + #endif - - - diff --git a/src/cc65/funcdesc.c b/src/cc65/funcdesc.c index 874dfb101..b9561a97c 100644 --- a/src/cc65/funcdesc.c +++ b/src/cc65/funcdesc.c @@ -73,6 +73,3 @@ void FreeFuncDesc (FuncDesc* F) /* Free the structure */ xfree (F); } - - - diff --git a/src/cc65/funcdesc.h b/src/cc65/funcdesc.h index 7232bca1d..b79c6a055 100644 --- a/src/cc65/funcdesc.h +++ b/src/cc65/funcdesc.h @@ -86,7 +86,5 @@ void FreeFuncDesc (FuncDesc* D); /* End of funcdesc.h */ + #endif - - - diff --git a/src/cc65/function.c b/src/cc65/function.c index ccf2adf49..97c421951 100644 --- a/src/cc65/function.c +++ b/src/cc65/function.c @@ -601,6 +601,3 @@ void NewFunc (SymEntry* Func) FreeFunction (CurrentFunc); CurrentFunc = 0; } - - - diff --git a/src/cc65/function.h b/src/cc65/function.h index b70389372..c5174c78b 100644 --- a/src/cc65/function.h +++ b/src/cc65/function.h @@ -124,7 +124,5 @@ void NewFunc (struct SymEntry* Func); /* End of function.h */ + #endif - - - diff --git a/src/cc65/global.c b/src/cc65/global.c index a6d752b27..e2800a65e 100644 --- a/src/cc65/global.c +++ b/src/cc65/global.c @@ -67,6 +67,3 @@ IntStack DataAlignment = INTSTACK(1); /* Alignment for data */ StrBuf DepName = STATIC_STRBUF_INITIALIZER; /* Name of dependencies file */ StrBuf FullDepName = STATIC_STRBUF_INITIALIZER; /* Name of full dependencies file */ StrBuf DepTarget = STATIC_STRBUF_INITIALIZER; /* Name of dependency target */ - - - diff --git a/src/cc65/global.h b/src/cc65/global.h index b9c15a26e..2abd78601 100644 --- a/src/cc65/global.h +++ b/src/cc65/global.h @@ -81,7 +81,3 @@ extern StrBuf DepTarget; /* Name of dependency target */ /* End of global.h */ #endif - - - - diff --git a/src/cc65/goto.c b/src/cc65/goto.c index 6f12c145b..6e282c636 100644 --- a/src/cc65/goto.c +++ b/src/cc65/goto.c @@ -86,6 +86,3 @@ void DoLabel (void) NextToken (); NextToken (); } - - - diff --git a/src/cc65/goto.h b/src/cc65/goto.h index a887b0eaa..3ca8223e2 100644 --- a/src/cc65/goto.h +++ b/src/cc65/goto.h @@ -53,7 +53,5 @@ void DoLabel (void); /* End of goto.h */ + #endif - - - diff --git a/src/cc65/hexval.c b/src/cc65/hexval.c index aaedf68ce..9830e1863 100644 --- a/src/cc65/hexval.c +++ b/src/cc65/hexval.c @@ -62,6 +62,3 @@ unsigned HexVal (int C) return toupper (C) - 'A' + 10; } } - - - diff --git a/src/cc65/hexval.h b/src/cc65/hexval.h index 770ed5ce5..b0e65be46 100644 --- a/src/cc65/hexval.h +++ b/src/cc65/hexval.h @@ -52,9 +52,5 @@ unsigned HexVal (int C); /* End of hexval.h */ + #endif - - - - - diff --git a/src/cc65/ident.c b/src/cc65/ident.c index fac69bd0a..7748095c7 100644 --- a/src/cc65/ident.c +++ b/src/cc65/ident.c @@ -52,6 +52,3 @@ int IsIdent (char c) { return (IsAlpha (c) || c == '_'); } - - - diff --git a/src/cc65/ident.h b/src/cc65/ident.h index d470e198b..36d5ae122 100644 --- a/src/cc65/ident.h +++ b/src/cc65/ident.h @@ -65,7 +65,5 @@ int IsIdent (char c); /* End of ident.h */ + #endif - - - diff --git a/src/cc65/incpath.c b/src/cc65/incpath.c index c74e167de..ab164d5ca 100644 --- a/src/cc65/incpath.c +++ b/src/cc65/incpath.c @@ -83,6 +83,3 @@ void FinishIncludePaths (void) /* Add paths relative to the parent directory of the Windows binary. */ AddSubSearchPathFromWinBin (SysIncSearchPath, "include"); } - - - diff --git a/src/cc65/incpath.h b/src/cc65/incpath.h index 4df8fca44..05824ac5e 100644 --- a/src/cc65/incpath.h +++ b/src/cc65/incpath.h @@ -69,7 +69,5 @@ void FinishIncludePaths (void); /* End of incpath.h */ + #endif - - - diff --git a/src/cc65/input.c b/src/cc65/input.c index a98c72e4f..f6554c483 100644 --- a/src/cc65/input.c +++ b/src/cc65/input.c @@ -661,5 +661,3 @@ void CreateDependencies (void) IT_MAIN | IT_SYSINC | IT_USRINC); } } - - diff --git a/src/cc65/input.h b/src/cc65/input.h index 4d2fd7fb1..e6fcc618c 100644 --- a/src/cc65/input.h +++ b/src/cc65/input.h @@ -55,9 +55,9 @@ * choosen so that it is possible to combine them to bitsets */ typedef enum { - IT_MAIN = 0x01, /* Main input file */ - IT_SYSINC = 0x02, /* System include file (using <>) */ - IT_USRINC = 0x04, /* User include file (using "") */ + IT_MAIN = 0x01, /* Main input file */ + IT_SYSINC = 0x02, /* System include file (using <>) */ + IT_USRINC = 0x04, /* User include file (using "") */ } InputType; /* Forward for an IFile structure */ @@ -116,7 +116,5 @@ void CreateDependencies (void); /* End of input.h */ + #endif - - - diff --git a/src/cc65/lineinfo.c b/src/cc65/lineinfo.c index 342fce969..97aee949b 100644 --- a/src/cc65/lineinfo.c +++ b/src/cc65/lineinfo.c @@ -192,6 +192,3 @@ unsigned GetInputLine (const LineInfo* LI) PRECONDITION (LI != 0); return LI->LineNum; } - - - diff --git a/src/cc65/lineinfo.h b/src/cc65/lineinfo.h index 3ecd0ce84..25c4e7556 100644 --- a/src/cc65/lineinfo.h +++ b/src/cc65/lineinfo.h @@ -104,8 +104,5 @@ unsigned GetInputLine (const LineInfo* LI); /* End of lineinfo.h */ + #endif - - - - diff --git a/src/cc65/litpool.c b/src/cc65/litpool.c index 013c6ad4a..171d8b5dd 100644 --- a/src/cc65/litpool.c +++ b/src/cc65/litpool.c @@ -498,6 +498,3 @@ Literal* AddLiteralStr (const StrBuf* S) { return AddLiteralBuf (SB_GetConstBuf (S), SB_GetLen (S)); } - - - diff --git a/src/cc65/litpool.h b/src/cc65/litpool.h index 7a771d5eb..9412beac8 100644 --- a/src/cc65/litpool.h +++ b/src/cc65/litpool.h @@ -130,8 +130,5 @@ Literal* AddLiteralStr (const StrBuf* S); /* End of litpool.h */ + #endif - - - - diff --git a/src/cc65/loadexpr.c b/src/cc65/loadexpr.c index d3c190b13..dfc898108 100644 --- a/src/cc65/loadexpr.c +++ b/src/cc65/loadexpr.c @@ -197,6 +197,3 @@ void LoadExpr (unsigned Flags, struct ExprDesc* Expr) } } - - - diff --git a/src/cc65/loadexpr.h b/src/cc65/loadexpr.h index acd570f1f..3f13311f1 100644 --- a/src/cc65/loadexpr.h +++ b/src/cc65/loadexpr.h @@ -60,7 +60,5 @@ void LoadExpr (unsigned Flags, struct ExprDesc* Expr); /* End of loadexpr.h */ + #endif - - - diff --git a/src/cc65/locals.c b/src/cc65/locals.c index bdc0df906..38f803607 100644 --- a/src/cc65/locals.c +++ b/src/cc65/locals.c @@ -545,6 +545,3 @@ void DeclareLocals (void) g_cstackcheck (); } } - - - diff --git a/src/cc65/locals.h b/src/cc65/locals.h index d47cb6725..e50c6c992 100644 --- a/src/cc65/locals.h +++ b/src/cc65/locals.h @@ -62,7 +62,5 @@ void RestoreRegVars (int HaveResult); /* End of locals.h */ + #endif - - - diff --git a/src/cc65/loop.c b/src/cc65/loop.c index 4a3cdd882..c15c37a79 100644 --- a/src/cc65/loop.c +++ b/src/cc65/loop.c @@ -98,6 +98,3 @@ void DelLoop (void) LoopStack = LoopStack->Next; xfree (L); } - - - diff --git a/src/cc65/loop.h b/src/cc65/loop.h index f24a3ef9f..fa2859f61 100644 --- a/src/cc65/loop.h +++ b/src/cc65/loop.h @@ -74,6 +74,3 @@ void DelLoop (void); /* End of loop.h */ #endif - - - diff --git a/src/cc65/macrotab.c b/src/cc65/macrotab.c index acb532ac4..44e209866 100644 --- a/src/cc65/macrotab.c +++ b/src/cc65/macrotab.c @@ -302,6 +302,3 @@ void PrintMacroStats (FILE* F) } } } - - - diff --git a/src/cc65/macrotab.h b/src/cc65/macrotab.h index c20ab81c4..746fc6f89 100644 --- a/src/cc65/macrotab.h +++ b/src/cc65/macrotab.h @@ -127,7 +127,5 @@ void PrintMacroStats (FILE* F); /* End of macrotab.h */ + #endif - - - diff --git a/src/cc65/main.c b/src/cc65/main.c index a27822ed8..8fca514cf 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -1012,6 +1012,3 @@ int main (int argc, char* argv[]) /* Return an apropriate exit code */ return (ErrorCount > 0)? EXIT_FAILURE : EXIT_SUCCESS; } - - - diff --git a/src/cc65/opcodes.c b/src/cc65/opcodes.c index d8a7fcb1f..c7661642f 100644 --- a/src/cc65/opcodes.c +++ b/src/cc65/opcodes.c @@ -812,7 +812,3 @@ bc_t GetInverseCond (bc_t BC) return 0; } } - - - - diff --git a/src/cc65/opcodes.h b/src/cc65/opcodes.h index 7dc5262c8..4635c4703 100644 --- a/src/cc65/opcodes.h +++ b/src/cc65/opcodes.h @@ -258,7 +258,5 @@ bc_t GetInverseCond (bc_t BC); /* End of opcodes.h */ + #endif - - - diff --git a/src/cc65/output.c b/src/cc65/output.c index 92a66108e..fdde36467 100644 --- a/src/cc65/output.c +++ b/src/cc65/output.c @@ -164,6 +164,3 @@ int WriteOutput (const char* Format, ...) /* Return the number of chars written */ return CharCount; } - - - diff --git a/src/cc65/output.h b/src/cc65/output.h index bcabba7a9..59a9defb3 100644 --- a/src/cc65/output.h +++ b/src/cc65/output.h @@ -91,7 +91,5 @@ int WriteOutput (const char* Format, ...) attribute ((format (printf, 1, 2))); /* End of output.h */ + #endif - - - diff --git a/src/cc65/pragma.c b/src/cc65/pragma.c index 980d46a20..01e4ea3cf 100644 --- a/src/cc65/pragma.c +++ b/src/cc65/pragma.c @@ -851,6 +851,3 @@ void DoPragma (void) /* Closing paren needed */ ConsumeRParen (); } - - - diff --git a/src/cc65/pragma.h b/src/cc65/pragma.h index d75273fa6..f12dbaa83 100644 --- a/src/cc65/pragma.h +++ b/src/cc65/pragma.h @@ -50,9 +50,5 @@ void DoPragma (void); /* End of pragma.h */ + #endif - - - - - diff --git a/src/cc65/preproc.c b/src/cc65/preproc.c index 199388deb..1885bc02e 100644 --- a/src/cc65/preproc.c +++ b/src/cc65/preproc.c @@ -1402,4 +1402,3 @@ Done: (int) SB_GetLen (Line), SB_GetConstBuf (Line)); } } - diff --git a/src/cc65/preproc.h b/src/cc65/preproc.h index 3b2722567..8d7b3c374 100644 --- a/src/cc65/preproc.h +++ b/src/cc65/preproc.h @@ -61,7 +61,5 @@ void Preprocess (void); /* End of preproc.h */ + #endif - - - diff --git a/src/cc65/reginfo.c b/src/cc65/reginfo.c index 65c073420..0bc8b5d64 100644 --- a/src/cc65/reginfo.c +++ b/src/cc65/reginfo.c @@ -145,6 +145,3 @@ void DumpRegInfo (const char* Desc, const RegInfo* RI) fprintf (stdout, "Out: "); RC_Dump (stdout, &RI->Out); } - - - diff --git a/src/cc65/reginfo.h b/src/cc65/reginfo.h index 31281675c..31dc536c5 100644 --- a/src/cc65/reginfo.h +++ b/src/cc65/reginfo.h @@ -127,8 +127,5 @@ void DumpRegInfo (const char* Desc, const RegInfo* RI); /* End of reginfo.h */ + #endif - - - - diff --git a/src/cc65/scanner.c b/src/cc65/scanner.c index 9d6553ae0..6bc6b8985 100644 --- a/src/cc65/scanner.c +++ b/src/cc65/scanner.c @@ -1142,6 +1142,3 @@ int ConsumeRCurly (void) { return Consume (TOK_RCURLY, "`}' expected"); } - - - diff --git a/src/cc65/scanner.h b/src/cc65/scanner.h index 77f2028b9..eb835fd84 100644 --- a/src/cc65/scanner.h +++ b/src/cc65/scanner.h @@ -304,10 +304,5 @@ int ConsumeRCurly (void); /* End of scanner.h */ + #endif - - - - - - diff --git a/src/cc65/scanstrbuf.c b/src/cc65/scanstrbuf.c index abddf06db..2749c1073 100644 --- a/src/cc65/scanstrbuf.c +++ b/src/cc65/scanstrbuf.c @@ -346,6 +346,3 @@ int SB_GetNumber (StrBuf* B, long* Val) *Val *= Sign; return 1; } - - - diff --git a/src/cc65/scanstrbuf.h b/src/cc65/scanstrbuf.h index a84bbd276..10f05c6e8 100644 --- a/src/cc65/scanstrbuf.h +++ b/src/cc65/scanstrbuf.h @@ -77,9 +77,5 @@ int SB_GetNumber (StrBuf* B, long* Val); /* End of scanstrbuf.h */ + #endif - - - - - diff --git a/src/cc65/segments.c b/src/cc65/segments.c index cdbd05e39..252399f0b 100644 --- a/src/cc65/segments.c +++ b/src/cc65/segments.c @@ -300,6 +300,3 @@ void OutputSegments (const Segments* S) /* Output the code segment epiloque */ CS_OutputEpilogue (S->Code); } - - - diff --git a/src/cc65/segments.h b/src/cc65/segments.h index cf6c72fba..f55be688b 100644 --- a/src/cc65/segments.h +++ b/src/cc65/segments.h @@ -156,7 +156,5 @@ void OutputSegments (const Segments* S); /* End of segments.h */ + #endif - - - diff --git a/src/cc65/shiftexpr.c b/src/cc65/shiftexpr.c index 44a42f304..a5e67fc66 100644 --- a/src/cc65/shiftexpr.c +++ b/src/cc65/shiftexpr.c @@ -235,6 +235,3 @@ Next: Expr->Type = ResultType; } } - - - diff --git a/src/cc65/shiftexpr.h b/src/cc65/shiftexpr.h index b4c50d44b..281710ff8 100644 --- a/src/cc65/shiftexpr.h +++ b/src/cc65/shiftexpr.h @@ -68,7 +68,3 @@ void ShiftExpr (struct ExprDesc* Expr); /* End of shiftexpr.h */ #endif - - - - diff --git a/src/cc65/stackptr.c b/src/cc65/stackptr.c index 26669fa57..1f10e8500 100644 --- a/src/cc65/stackptr.c +++ b/src/cc65/stackptr.c @@ -68,7 +68,3 @@ void SP_Pop (const Type* T) { StackPtr += SizeOf (T); } - - - - diff --git a/src/cc65/stackptr.h b/src/cc65/stackptr.h index 4232c0a46..4f90f8dcc 100644 --- a/src/cc65/stackptr.h +++ b/src/cc65/stackptr.h @@ -71,6 +71,3 @@ void SP_Pop (const Type* T); /* End of stackptr.h */ #endif - - - diff --git a/src/cc65/standard.c b/src/cc65/standard.c index e6a842d2c..91f39faaa 100644 --- a/src/cc65/standard.c +++ b/src/cc65/standard.c @@ -79,6 +79,3 @@ standard_t FindStandard (const char* Name) /* Not found */ return STD_UNKNOWN; } - - - diff --git a/src/cc65/standard.h b/src/cc65/standard.h index bebc154ee..587066cb4 100644 --- a/src/cc65/standard.h +++ b/src/cc65/standard.h @@ -82,7 +82,3 @@ standard_t FindStandard (const char* Name); /* End of standard.h */ #endif - - - - diff --git a/src/cc65/stdfunc.c b/src/cc65/stdfunc.c index 1c3c89483..1730ee08a 100644 --- a/src/cc65/stdfunc.c +++ b/src/cc65/stdfunc.c @@ -1326,6 +1326,3 @@ void HandleStdFunc (int Index, FuncDesc* F, ExprDesc* lval) /* Call the handler function */ D->Handler (F, lval); } - - - diff --git a/src/cc65/stdfunc.h b/src/cc65/stdfunc.h index 9716d2b3e..baac616c3 100644 --- a/src/cc65/stdfunc.h +++ b/src/cc65/stdfunc.h @@ -63,6 +63,3 @@ void HandleStdFunc (int Index, struct FuncDesc* F, ExprDesc* lval); /* End of stdfunc.h */ #endif - - - diff --git a/src/cc65/stdnames.c b/src/cc65/stdnames.c index aa58e3be4..687b53894 100644 --- a/src/cc65/stdnames.c +++ b/src/cc65/stdnames.c @@ -50,6 +50,3 @@ const char Func_memset[] = "memset"; /* Asm name of "memset" */ const char Func_strcmp[] = "strcmp"; /* Asm name of "strcmp" */ const char Func_strcpy[] = "strcpy"; /* Asm name of "strcpy" */ const char Func_strlen[] = "strlen"; /* Asm name of "strlen" */ - - - diff --git a/src/cc65/stdnames.h b/src/cc65/stdnames.h index d60de04a2..dcb323924 100644 --- a/src/cc65/stdnames.h +++ b/src/cc65/stdnames.h @@ -56,6 +56,3 @@ extern const char Func_strlen[]; /* Asm name of "strlen" */ /* End of stdnames.h */ #endif - - - diff --git a/src/cc65/stmt.c b/src/cc65/stmt.c index 34a314863..f59eca2e4 100644 --- a/src/cc65/stmt.c +++ b/src/cc65/stmt.c @@ -667,7 +667,3 @@ int Statement (int* PendingToken) } return 0; } - - - - diff --git a/src/cc65/stmt.h b/src/cc65/stmt.h index 4a9a72e42..31a7c5f19 100644 --- a/src/cc65/stmt.h +++ b/src/cc65/stmt.h @@ -59,6 +59,3 @@ int Statement (int* PendingToken); /* End of stmt.h */ #endif - - - diff --git a/src/cc65/swstmt.c b/src/cc65/swstmt.c index 7e48b58d2..d351738f5 100644 --- a/src/cc65/swstmt.c +++ b/src/cc65/swstmt.c @@ -315,6 +315,3 @@ void DefaultLabel (void) /* Skip the colon */ ConsumeColon (); } - - - diff --git a/src/cc65/swstmt.h b/src/cc65/swstmt.h index 1523217f1..b4facf2cd 100644 --- a/src/cc65/swstmt.h +++ b/src/cc65/swstmt.h @@ -56,7 +56,5 @@ void DefaultLabel (void); /* End of swstmt.h */ + #endif - - - diff --git a/src/cc65/symentry.c b/src/cc65/symentry.c index 41e14e673..aca0ac63a 100644 --- a/src/cc65/symentry.c +++ b/src/cc65/symentry.c @@ -262,6 +262,3 @@ int HasAnonName (const SymEntry* Entry) { return IsAnonName (Entry->Name); } - - - diff --git a/src/cc65/symentry.h b/src/cc65/symentry.h index 14d786995..e4a2c87e2 100644 --- a/src/cc65/symentry.h +++ b/src/cc65/symentry.h @@ -272,7 +272,5 @@ int HasAnonName (const SymEntry* Entry); /* End of symentry.h */ + #endif - - - diff --git a/src/cc65/symtab.c b/src/cc65/symtab.c index 4a44c770d..f0b5fefe2 100644 --- a/src/cc65/symtab.c +++ b/src/cc65/symtab.c @@ -984,6 +984,3 @@ void EmitDebugInfo (void) } } } - - - diff --git a/src/cc65/symtab.h b/src/cc65/symtab.h index 154dce55a..39782d6ab 100644 --- a/src/cc65/symtab.h +++ b/src/cc65/symtab.h @@ -196,6 +196,3 @@ void EmitDebugInfo (void); /* End of symtab.h */ #endif - - - diff --git a/src/cc65/testexpr.c b/src/cc65/testexpr.c index f95c94dd8..537ca784d 100644 --- a/src/cc65/testexpr.c +++ b/src/cc65/testexpr.c @@ -123,7 +123,3 @@ unsigned TestInParens (unsigned Label, int Invert) /* Return the result of the expression */ return Result; } - - - - diff --git a/src/cc65/testexpr.h b/src/cc65/testexpr.h index bfc033185..67613482f 100644 --- a/src/cc65/testexpr.h +++ b/src/cc65/testexpr.h @@ -72,8 +72,5 @@ unsigned TestInParens (unsigned Label, int Invert); /* End of testexpr.h */ + #endif - - - - diff --git a/src/cc65/textseg.c b/src/cc65/textseg.c index 2275261e0..cbb393b50 100644 --- a/src/cc65/textseg.c +++ b/src/cc65/textseg.c @@ -116,6 +116,3 @@ void TS_Output (const TextSeg* S) /* Add an additional newline after the segment output */ WriteOutput ("\n"); } - - - diff --git a/src/cc65/textseg.h b/src/cc65/textseg.h index 1c3aba53b..87b02ac87 100644 --- a/src/cc65/textseg.h +++ b/src/cc65/textseg.h @@ -90,7 +90,5 @@ void TS_Output (const TextSeg* S); /* End of textseg.h */ + #endif - - - diff --git a/src/cc65/typecmp.c b/src/cc65/typecmp.c index 139b3b3ff..310abe9f6 100644 --- a/src/cc65/typecmp.c +++ b/src/cc65/typecmp.c @@ -420,7 +420,3 @@ typecmp_t TypeCmp (const Type* lhs, const Type* rhs) /* Return the result */ return Result; } - - - - diff --git a/src/cc65/typecmp.h b/src/cc65/typecmp.h index 652585738..5f95e42a1 100644 --- a/src/cc65/typecmp.h +++ b/src/cc65/typecmp.h @@ -75,7 +75,3 @@ typecmp_t TypeCmp (const Type* lhs, const Type* rhs); /* End of typecmp.h */ #endif - - - - diff --git a/src/cc65/typeconv.c b/src/cc65/typeconv.c index 6d50aa5c6..9a6f3ab23 100644 --- a/src/cc65/typeconv.c +++ b/src/cc65/typeconv.c @@ -295,8 +295,3 @@ void TypeCast (ExprDesc* Expr) /* Convert the value. */ DoConversion (Expr, NewType); } - - - - - diff --git a/src/cc65/typeconv.h b/src/cc65/typeconv.h index 2407862e1..dd819e638 100644 --- a/src/cc65/typeconv.h +++ b/src/cc65/typeconv.h @@ -61,7 +61,5 @@ void TypeCast (ExprDesc* Expr); /* End of typeconv.h */ + #endif - - - diff --git a/src/cc65/util.c b/src/cc65/util.c index db26dd7d2..67cd9c7ba 100644 --- a/src/cc65/util.c +++ b/src/cc65/util.c @@ -59,6 +59,3 @@ int PowerOf2 (unsigned long Val) } return -1; } - - - diff --git a/src/cc65/util.h b/src/cc65/util.h index 9fc717339..213ebf28a 100644 --- a/src/cc65/util.h +++ b/src/cc65/util.h @@ -54,6 +54,3 @@ int PowerOf2 (unsigned long Val); /* End of util.h */ #endif - - - diff --git a/src/cl65/error.c b/src/cl65/error.c index c68b7fe64..ee2adcfcc 100644 --- a/src/cl65/error.c +++ b/src/cl65/error.c @@ -91,5 +91,3 @@ void Internal (const char* Format, ...) exit (EXIT_FAILURE); } - - diff --git a/src/cl65/error.h b/src/cl65/error.h index 38999faec..b1ff30660 100644 --- a/src/cl65/error.h +++ b/src/cl65/error.h @@ -58,6 +58,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - diff --git a/src/cl65/global.c b/src/cl65/global.c index 318020415..f522224ac 100644 --- a/src/cl65/global.c +++ b/src/cl65/global.c @@ -44,6 +44,3 @@ unsigned char Debug = 0; /* Debug mode enabled? */ - - - diff --git a/src/cl65/global.h b/src/cl65/global.h index fd85dc2d5..2d2d96921 100644 --- a/src/cl65/global.h +++ b/src/cl65/global.h @@ -51,6 +51,3 @@ extern unsigned char Debug; /* Debug mode enabled? */ /* End of global.h */ #endif - - - diff --git a/src/cl65/main.c b/src/cl65/main.c index d81a1bcc9..0c460eec9 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -1526,6 +1526,3 @@ int main (int argc, char* argv []) /* Return an apropriate exit code */ return EXIT_SUCCESS; } - - - diff --git a/src/cl65/spawn-amiga.inc b/src/cl65/spawn-amiga.inc index b244a95ac..f8a230950 100644 --- a/src/cl65/spawn-amiga.inc +++ b/src/cl65/spawn-amiga.inc @@ -82,6 +82,3 @@ int spawnvp (int Mode attribute ((unused)), /* Return the result */ return Status; } - - - diff --git a/src/cl65/spawn-unix.inc b/src/cl65/spawn-unix.inc index 1784123ac..558f2428d 100644 --- a/src/cl65/spawn-unix.inc +++ b/src/cl65/spawn-unix.inc @@ -103,6 +103,3 @@ int spawnvp (int Mode attribute ((unused)), const char* File, const char* const */ return WEXITSTATUS (Status); } - - - diff --git a/src/co65/convert.c b/src/co65/convert.c index 6ae051091..b5068d5c0 100644 --- a/src/co65/convert.c +++ b/src/co65/convert.c @@ -502,6 +502,3 @@ void Convert (const O65Data* D) fprintf (F, ".end\n"); fclose (F); } - - - diff --git a/src/co65/convert.h b/src/co65/convert.h index f000f55c4..22ef25424 100644 --- a/src/co65/convert.h +++ b/src/co65/convert.h @@ -63,6 +63,3 @@ void Convert (const struct O65Data* D); /* End of convert.h */ #endif - - - diff --git a/src/co65/error.c b/src/co65/error.c index 5ee75661b..1c1625207 100644 --- a/src/co65/error.c +++ b/src/co65/error.c @@ -89,6 +89,3 @@ void Internal (const char* Format, ...) va_end (ap); exit (EXIT_FAILURE); } - - - diff --git a/src/co65/error.h b/src/co65/error.h index 1b3060a84..4fb9d370d 100644 --- a/src/co65/error.h +++ b/src/co65/error.h @@ -63,6 +63,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - diff --git a/src/co65/fileio.c b/src/co65/fileio.c index 4846add3f..9241797c6 100644 --- a/src/co65/fileio.c +++ b/src/co65/fileio.c @@ -103,6 +103,3 @@ void* ReadData (FILE* F, void* Data, unsigned Size) } return Data; } - - - diff --git a/src/co65/fileio.h b/src/co65/fileio.h index ccae88020..c5e9a003c 100644 --- a/src/co65/fileio.h +++ b/src/co65/fileio.h @@ -71,6 +71,3 @@ void* ReadData (FILE* F, void* Data, unsigned Size); /* End of fileio.h */ #endif - - - diff --git a/src/co65/global.c b/src/co65/global.c index 38748cc0e..bc9b0099b 100644 --- a/src/co65/global.c +++ b/src/co65/global.c @@ -69,6 +69,3 @@ const char* ZeropageLabel = 0; /* Label for the zeropage segmen /* Flags */ unsigned char DebugInfo = 0; /* Enable debug info */ unsigned char NoOutput = 0; /* Suppress the actual conversion */ - - - diff --git a/src/co65/global.h b/src/co65/global.h index 247b9de45..29c17ca29 100644 --- a/src/co65/global.h +++ b/src/co65/global.h @@ -72,6 +72,3 @@ extern unsigned char NoOutput; /* Suppress the actual conversion */ /* End of global.h */ #endif - - - diff --git a/src/co65/main.c b/src/co65/main.c index 79aca87fa..5e0ee2ed7 100644 --- a/src/co65/main.c +++ b/src/co65/main.c @@ -412,6 +412,3 @@ int main (int argc, char* argv []) /* Return an apropriate exit code */ return EXIT_SUCCESS; } - - - diff --git a/src/co65/model.c b/src/co65/model.c index 365eed49d..36ec574d6 100644 --- a/src/co65/model.c +++ b/src/co65/model.c @@ -91,6 +91,3 @@ O65Model FindModel (const char* ModelName) } return O65_MODEL_INVALID; } - - - diff --git a/src/co65/model.h b/src/co65/model.h index 1f44b89b4..18ad136f1 100644 --- a/src/co65/model.h +++ b/src/co65/model.h @@ -81,6 +81,3 @@ O65Model FindModel (const char* ModelName); /* End of model.h */ #endif - - - diff --git a/src/co65/o65.c b/src/co65/o65.c index 187e4fc38..693dff447 100644 --- a/src/co65/o65.c +++ b/src/co65/o65.c @@ -434,6 +434,3 @@ const char* GetO65OptionText (const O65Option* O) Buf[I] = '\0'; return Buf; } - - - diff --git a/src/co65/o65.h b/src/co65/o65.h index 6fb8433c5..d2361d348 100644 --- a/src/co65/o65.h +++ b/src/co65/o65.h @@ -230,8 +230,5 @@ const char* GetO65OptionText (const O65Option* O); /* End of o65.h */ + #endif - - - - diff --git a/src/common/abend.c b/src/common/abend.c index 0213bdde7..f3a0f4195 100644 --- a/src/common/abend.c +++ b/src/common/abend.c @@ -69,6 +69,3 @@ void AbEnd (const char* Format, ...) /* Terminate the program */ exit (EXIT_FAILURE); } - - - diff --git a/src/common/abend.h b/src/common/abend.h index f32a3381d..e80db03a7 100644 --- a/src/common/abend.h +++ b/src/common/abend.h @@ -58,6 +58,3 @@ void AbEnd (const char* Format, ...) attribute ((format (printf, 1, 2), noreturn /* End of abend.h */ #endif - - - diff --git a/src/common/addrsize.c b/src/common/addrsize.c index ad54618e6..faa150b1d 100644 --- a/src/common/addrsize.c +++ b/src/common/addrsize.c @@ -92,6 +92,3 @@ unsigned char AddrSizeFromStr (const char* Str) /* Not found */ return ADDR_SIZE_INVALID; } - - - diff --git a/src/common/addrsize.h b/src/common/addrsize.h index d2c871e3f..ff61db413 100644 --- a/src/common/addrsize.h +++ b/src/common/addrsize.h @@ -72,6 +72,3 @@ unsigned char AddrSizeFromStr (const char* Str); /* End of addrsize.h */ #endif - - - diff --git a/src/common/alignment.c b/src/common/alignment.c index 9dad01d3e..5712fce32 100644 --- a/src/common/alignment.c +++ b/src/common/alignment.c @@ -182,6 +182,3 @@ unsigned long AlignCount (unsigned long Addr, unsigned long Alignment) { return AlignAddr (Addr, Alignment) - Addr; } - - - diff --git a/src/common/alignment.h b/src/common/alignment.h index 6e8ffa373..587225f00 100644 --- a/src/common/alignment.h +++ b/src/common/alignment.h @@ -83,6 +83,3 @@ unsigned long AlignCount (unsigned long Addr, unsigned long Alignment); /* End of alignment.h */ #endif - - - diff --git a/src/common/assertion.c b/src/common/assertion.c index d854c95f1..dbce8562f 100644 --- a/src/common/assertion.c +++ b/src/common/assertion.c @@ -58,6 +58,3 @@ int AssertAtAsmTime (AssertAction A) { return (A & 0x02U) == 0; } - - - diff --git a/src/common/assertion.h b/src/common/assertion.h index 3f41161be..7cb425e8c 100644 --- a/src/common/assertion.h +++ b/src/common/assertion.h @@ -71,6 +71,3 @@ int AssertAtAsmTime (AssertAction A); /* End of assertion.h */ #endif - - - diff --git a/src/common/attrib.h b/src/common/attrib.h index ff963f9c5..07e08b2df 100644 --- a/src/common/attrib.h +++ b/src/common/attrib.h @@ -55,6 +55,3 @@ /* End of attrib.h */ #endif - - - diff --git a/src/common/bitops.c b/src/common/bitops.c index 86633604b..9eba961b7 100644 --- a/src/common/bitops.c +++ b/src/common/bitops.c @@ -123,6 +123,3 @@ void BitMerge (void* Target, const void* Source, unsigned Size) *T++ |= *S++; } } - - - diff --git a/src/common/bitops.h b/src/common/bitops.h index ade1d1e4e..71186ba51 100644 --- a/src/common/bitops.h +++ b/src/common/bitops.h @@ -71,6 +71,3 @@ void BitMerge (void* Target, const void* Source, unsigned Size); /* End of bitops.h */ #endif - - - diff --git a/src/common/cddefs.h b/src/common/cddefs.h index 7b3dc5b99..f59ac06c7 100644 --- a/src/common/cddefs.h +++ b/src/common/cddefs.h @@ -76,6 +76,3 @@ /* End of cddefs.h */ #endif - - - diff --git a/src/common/chartype.c b/src/common/chartype.c index 4b8fa9e3d..b1571f3f7 100644 --- a/src/common/chartype.c +++ b/src/common/chartype.c @@ -147,6 +147,3 @@ int IsQuote (char C) { return (C == '"' || C == '\''); } - - - diff --git a/src/common/chartype.h b/src/common/chartype.h index 6c38d98c8..9a45b2add 100644 --- a/src/common/chartype.h +++ b/src/common/chartype.h @@ -112,6 +112,3 @@ int IsQuote (char C); /* End of chartype.h */ #endif - - - diff --git a/src/common/check.c b/src/common/check.c index cb4589bf9..c6c5d2d95 100644 --- a/src/common/check.c +++ b/src/common/check.c @@ -77,6 +77,3 @@ static void DefaultCheckFailed (const char* Msg, const char* Cond, /* Output a diagnostic and abort */ AbEnd ("%s%s, file `%s', line %u", Msg, Cond, File, Line); } - - - diff --git a/src/common/check.h b/src/common/check.h index 3f26be79c..a201a28a0 100644 --- a/src/common/check.h +++ b/src/common/check.h @@ -86,7 +86,5 @@ extern void (*CheckFailed) (const char* Msg, const char* Cond, /* End of check.h */ + #endif - - - diff --git a/src/common/cmdline.c b/src/common/cmdline.c index 13a9da061..a7485e0df 100644 --- a/src/common/cmdline.c +++ b/src/common/cmdline.c @@ -307,7 +307,3 @@ void LongOption (unsigned* ArgNum, const LongOpt* OptTab, unsigned OptCount) /* Invalid option */ UnknownOption (Opt); } - - - - diff --git a/src/common/cmdline.h b/src/common/cmdline.h index b3a483b6b..cd8d5e71e 100644 --- a/src/common/cmdline.h +++ b/src/common/cmdline.h @@ -102,6 +102,3 @@ void LongOption (unsigned* ArgNum, const LongOpt* OptTab, unsigned OptCount); /* End of cmdline.h */ #endif - - - diff --git a/src/common/coll.c b/src/common/coll.c index 5112157aa..2f321e287 100644 --- a/src/common/coll.c +++ b/src/common/coll.c @@ -504,6 +504,3 @@ void CollSort (Collection* C, QuickSort (C, 0, C->Count-1, Compare, Data); } } - - - diff --git a/src/common/coll.h b/src/common/coll.h index eacfac248..b0a64557d 100644 --- a/src/common/coll.h +++ b/src/common/coll.h @@ -301,7 +301,3 @@ void CollSort (Collection* C, /* End of coll.h */ #endif - - - - diff --git a/src/common/cpu.c b/src/common/cpu.c index 7b61ccdcc..b79c9c16f 100644 --- a/src/common/cpu.c +++ b/src/common/cpu.c @@ -134,6 +134,3 @@ cpu_t FindCPU (const char* Name) /* Not found */ return CPU_UNKNOWN; } - - - diff --git a/src/common/cpu.h b/src/common/cpu.h index 121a54b7a..ce3391f31 100644 --- a/src/common/cpu.h +++ b/src/common/cpu.h @@ -102,6 +102,3 @@ cpu_t FindCPU (const char* Name); /* End of cpu.h */ #endif - - - diff --git a/src/common/debugflag.c b/src/common/debugflag.c index d660018b5..7d2e80009 100644 --- a/src/common/debugflag.c +++ b/src/common/debugflag.c @@ -45,6 +45,3 @@ unsigned char Debug = 0; /* Debug mode */ - - - diff --git a/src/common/debugflag.h b/src/common/debugflag.h index f62e60e82..d325a9eb9 100644 --- a/src/common/debugflag.h +++ b/src/common/debugflag.h @@ -49,7 +49,5 @@ extern unsigned char Debug; /* Debug mode */ /* End of debugflag.h */ + #endif - - - diff --git a/src/common/exprdefs.c b/src/common/exprdefs.c index 69eda4c4d..d9a5adf6b 100644 --- a/src/common/exprdefs.c +++ b/src/common/exprdefs.c @@ -232,6 +232,3 @@ void DumpExpr (const ExprNode* Expr, const ExprNode* (*ResolveSym) (const struct InternalDumpExpr (Expr, ResolveSym); printf ("\n"); } - - - diff --git a/src/common/exprdefs.h b/src/common/exprdefs.h index 933677fa3..5465c4f25 100644 --- a/src/common/exprdefs.h +++ b/src/common/exprdefs.h @@ -145,6 +145,3 @@ void DumpExpr (const ExprNode* Expr, const ExprNode* (*ResolveSym) (const struct /* End of exprdefs.h */ #endif - - - diff --git a/src/common/fileid.c b/src/common/fileid.c index fe26aff79..a30a6b5e1 100644 --- a/src/common/fileid.c +++ b/src/common/fileid.c @@ -74,6 +74,3 @@ const FileId* GetFileId (const char* Name, const FileId* Table, unsigned Count) /* Search for a table entry and return it */ return bsearch (Ext+1, Table, Count, sizeof (FileId), CompareFileId); } - - - diff --git a/src/common/fileid.h b/src/common/fileid.h index 751c4ca17..9c5dd863c 100644 --- a/src/common/fileid.h +++ b/src/common/fileid.h @@ -74,7 +74,5 @@ const FileId* GetFileId (const char* Name, const FileId* Table, unsigned Count); /* End of fileid.h */ + #endif - - - diff --git a/src/common/filepos.c b/src/common/filepos.c index bf6888495..42097424c 100644 --- a/src/common/filepos.c +++ b/src/common/filepos.c @@ -76,6 +76,3 @@ int CompareFilePos (const FilePos* P1, const FilePos* P2) return 0; } } - - - diff --git a/src/common/filepos.h b/src/common/filepos.h index 21ef2e7b0..ad9b70aee 100644 --- a/src/common/filepos.h +++ b/src/common/filepos.h @@ -77,6 +77,3 @@ int CompareFilePos (const FilePos* P1, const FilePos* P2); /* End of filepos.h */ #endif - - - diff --git a/src/common/filestat.c b/src/common/filestat.c index fd42c5ec0..d592c60cf 100644 --- a/src/common/filestat.c +++ b/src/common/filestat.c @@ -47,8 +47,8 @@ #include #include #if defined(_WIN32) -#include -#include +# include +# include #endif /* common */ diff --git a/src/common/filestat.h b/src/common/filestat.h index 56ce2e9e0..2c13f2611 100644 --- a/src/common/filestat.h +++ b/src/common/filestat.h @@ -68,6 +68,3 @@ int FileStat (const char* Path, struct stat* Buf); /* End of filestat.h */ #endif - - - diff --git a/src/common/filetime.c b/src/common/filetime.c index 88a79bf97..cf7967da5 100644 --- a/src/common/filetime.c +++ b/src/common/filetime.c @@ -43,11 +43,11 @@ #if defined(_WIN32) -#include -#include +# include +# include #else -#include /* FreeBSD needs this */ -#include +# include /* FreeBSD needs this */ +# include #endif diff --git a/src/common/filetime.h b/src/common/filetime.h index 4d20c7d63..c4027e249 100644 --- a/src/common/filetime.h +++ b/src/common/filetime.h @@ -68,6 +68,3 @@ int SetFileTimes (const char* Path, time_t T); /* End of filestat.h */ #endif - - - diff --git a/src/common/filetype.c b/src/common/filetype.c index 3e5779eb8..7e7917a64 100644 --- a/src/common/filetype.c +++ b/src/common/filetype.c @@ -104,6 +104,3 @@ FILETYPE GetFileType (const char* Name) /* Return the result */ return F? F->Id : FILETYPE_UNKNOWN; } - - - diff --git a/src/common/filetype.h b/src/common/filetype.h index c1294d5f4..1a6a9aa34 100644 --- a/src/common/filetype.h +++ b/src/common/filetype.h @@ -71,7 +71,5 @@ FILETYPE GetFileType (const char* Name); /* End of filetype.h */ + #endif - - - diff --git a/src/common/fname.c b/src/common/fname.c index 5fd56338d..1c8c36f25 100644 --- a/src/common/fname.c +++ b/src/common/fname.c @@ -115,6 +115,3 @@ char* MakeFilename (const char* Origin, const char* Ext) } return Out; } - - - diff --git a/src/common/fname.h b/src/common/fname.h index c9c3848f7..1f5040c49 100644 --- a/src/common/fname.h +++ b/src/common/fname.h @@ -64,6 +64,3 @@ char* MakeFilename (const char* Origin, const char* Ext); /* End of fname.h */ #endif - - - diff --git a/src/common/fp.c b/src/common/fp.c index cfec86e42..602bfde8b 100644 --- a/src/common/fp.c +++ b/src/common/fp.c @@ -236,6 +236,3 @@ Double FP_D_Div (Double Left, Double Right) D.V = Left.V / Right.V; return D; } - - - diff --git a/src/common/fp.h b/src/common/fp.h index 8544c453f..f9444bbce 100644 --- a/src/common/fp.h +++ b/src/common/fp.h @@ -140,8 +140,3 @@ Double FP_D_Div (Double Left, Double Right); /* End of fp.h */ #endif - - - - - diff --git a/src/common/fragdefs.h b/src/common/fragdefs.h index c0a37ffcd..c3e589cb2 100644 --- a/src/common/fragdefs.h +++ b/src/common/fragdefs.h @@ -70,6 +70,3 @@ /* End of fragdefs.h */ #endif - - - diff --git a/src/common/gentype.c b/src/common/gentype.c index aa1471aa4..019569084 100644 --- a/src/common/gentype.c +++ b/src/common/gentype.c @@ -123,6 +123,3 @@ const char* GT_AsString (const StrBuf* Type, StrBuf* String) /* Return the contents of String */ return SB_GetConstBuf (String); } - - - diff --git a/src/common/gentype.h b/src/common/gentype.h index 1a2440f46..5294f9e05 100644 --- a/src/common/gentype.h +++ b/src/common/gentype.h @@ -152,7 +152,3 @@ const char* GT_AsString (const StrBuf* Type, StrBuf* String); /* End of gentype.h */ #endif - - - - diff --git a/src/common/hashfunc.c b/src/common/hashfunc.c index 6774c88fc..3730cb0ba 100644 --- a/src/common/hashfunc.c +++ b/src/common/hashfunc.c @@ -89,6 +89,3 @@ unsigned HashBuf (const StrBuf* S) } return H; } - - - diff --git a/src/common/hashfunc.h b/src/common/hashfunc.h index 4d8b5ac7b..2645474cf 100644 --- a/src/common/hashfunc.h +++ b/src/common/hashfunc.h @@ -64,6 +64,3 @@ unsigned HashBuf (const StrBuf* S) attribute ((const)); /* End of hashfunc.h */ #endif - - - diff --git a/src/common/hashtab.c b/src/common/hashtab.c index 376e26a28..36a3b389c 100644 --- a/src/common/hashtab.c +++ b/src/common/hashtab.c @@ -244,6 +244,3 @@ void HT_Walk (HashTable* T, int (*F) (void* Entry, void* Data), void* Data) } } } - - - diff --git a/src/common/hashtab.h b/src/common/hashtab.h index a8397db40..260a68b39 100644 --- a/src/common/hashtab.h +++ b/src/common/hashtab.h @@ -177,6 +177,3 @@ void HT_Walk (HashTable* T, int (*F) (void* Entry, void* Data), void* Data); /* End of hashtab.h */ #endif - - - diff --git a/src/common/hlldbgsym.h b/src/common/hlldbgsym.h index c1e6487ce..1f8d21de3 100644 --- a/src/common/hlldbgsym.h +++ b/src/common/hlldbgsym.h @@ -77,6 +77,3 @@ /* End of hlldbgsyms.h */ #endif - - - diff --git a/src/common/inline.h b/src/common/inline.h index 3857511a1..b90b3d1f4 100644 --- a/src/common/inline.h +++ b/src/common/inline.h @@ -54,6 +54,3 @@ /* End of inline.h */ #endif - - - diff --git a/src/common/intstack.c b/src/common/intstack.c index f5518e337..3f99e8854 100644 --- a/src/common/intstack.c +++ b/src/common/intstack.c @@ -87,6 +87,3 @@ long IS_Pop (IntStack* S) PRECONDITION (S->Count > 0); return S->Stack[--S->Count]; } - - - diff --git a/src/common/intstack.h b/src/common/intstack.h index f3fbf081b..313a846c1 100644 --- a/src/common/intstack.h +++ b/src/common/intstack.h @@ -116,7 +116,5 @@ long IS_Pop (IntStack* S); /* End of intstack.h */ + #endif - - - diff --git a/src/common/inttypes.h b/src/common/inttypes.h index 3c87eb7be..24f822a0d 100644 --- a/src/common/inttypes.h +++ b/src/common/inttypes.h @@ -62,7 +62,5 @@ typedef unsigned long uintmax_t; /* End of inttypes.h */ + #endif - - - diff --git a/src/common/libdefs.h b/src/common/libdefs.h index 19b3a8290..d91084c26 100644 --- a/src/common/libdefs.h +++ b/src/common/libdefs.h @@ -67,6 +67,3 @@ struct LibHeader { /* End of libdefs.h */ #endif - - - diff --git a/src/common/lidefs.h b/src/common/lidefs.h index 3c996f710..29d47b57a 100644 --- a/src/common/lidefs.h +++ b/src/common/lidefs.h @@ -62,6 +62,3 @@ /* End of lidefs.h */ #endif - - - diff --git a/src/common/matchpat.c b/src/common/matchpat.c index 9ea17cdb4..c84124491 100644 --- a/src/common/matchpat.c +++ b/src/common/matchpat.c @@ -238,6 +238,3 @@ int MatchPattern (const char* Source, const char* Pattern) /* Do the real thing */ return RecursiveMatch ((const unsigned char*) Source, (const unsigned char*) Pattern); } - - - diff --git a/src/common/matchpat.h b/src/common/matchpat.h index ddf431ff9..2612e378c 100644 --- a/src/common/matchpat.h +++ b/src/common/matchpat.h @@ -61,6 +61,3 @@ int MatchPattern (const char* Source, const char* Pattern); /* End of matchpat.h */ #endif - - - diff --git a/src/common/mmodel.c b/src/common/mmodel.c index 7ed0f9b3f..a51d900fd 100644 --- a/src/common/mmodel.c +++ b/src/common/mmodel.c @@ -124,5 +124,3 @@ void SetMemoryModel (mmodel_t Model) /* Zeropage is always zeropage */ ZpAddrSize = ADDR_SIZE_ZP; } - - diff --git a/src/common/mmodel.h b/src/common/mmodel.h index 043e93037..b3c3188d9 100644 --- a/src/common/mmodel.h +++ b/src/common/mmodel.h @@ -82,6 +82,3 @@ void SetMemoryModel (mmodel_t Model); /* End of mmodel.h */ #endif - - - diff --git a/src/common/objdefs.h b/src/common/objdefs.h index 608a4dc62..537ed2d57 100644 --- a/src/common/objdefs.h +++ b/src/common/objdefs.h @@ -92,6 +92,3 @@ struct ObjHeader { /* End of objdefs.h */ #endif - - - diff --git a/src/common/optdefs.h b/src/common/optdefs.h index 55264ca88..fae517667 100644 --- a/src/common/optdefs.h +++ b/src/common/optdefs.h @@ -72,6 +72,3 @@ struct Option { /* End of optdefs.h */ #endif - - - diff --git a/src/common/print.c b/src/common/print.c index 53b2aa210..70f43bc35 100644 --- a/src/common/print.c +++ b/src/common/print.c @@ -72,6 +72,3 @@ void Print (FILE* F, unsigned V, const char* Format, ...) vfprintf (F, Format, ap); va_end (ap); } - - - diff --git a/src/common/print.h b/src/common/print.h index 92b654910..d570d3ec6 100644 --- a/src/common/print.h +++ b/src/common/print.h @@ -70,7 +70,3 @@ void Print (FILE* F, unsigned V, const char* Format, ...) /* End of print.h */ #endif - - - - diff --git a/src/common/scopedefs.h b/src/common/scopedefs.h index 08a7f5ec8..31e493f2b 100644 --- a/src/common/scopedefs.h +++ b/src/common/scopedefs.h @@ -76,6 +76,3 @@ enum { /* End of scopedefs.h */ #endif - - - diff --git a/src/common/searchpath.h b/src/common/searchpath.h index 33db0c779..d1947d2be 100644 --- a/src/common/searchpath.h +++ b/src/common/searchpath.h @@ -102,7 +102,5 @@ char* SearchFile (const SearchPaths* P, const char* File); /* End of searchpath.h */ + #endif - - - diff --git a/src/common/segdefs.h b/src/common/segdefs.h index e8f6883f6..10a366582 100644 --- a/src/common/segdefs.h +++ b/src/common/segdefs.h @@ -52,6 +52,3 @@ /* End of segdefs.h */ #endif - - - diff --git a/src/common/segnames.c b/src/common/segnames.c index 2bed984ed..bb9aac351 100644 --- a/src/common/segnames.c +++ b/src/common/segnames.c @@ -65,6 +65,3 @@ int ValidSegName (const char* Name) /* Name is ok */ return 1; } - - - diff --git a/src/common/segnames.h b/src/common/segnames.h index 071cb387b..0d57d6ac3 100644 --- a/src/common/segnames.h +++ b/src/common/segnames.h @@ -68,6 +68,3 @@ int ValidSegName (const char* Name); /* End of segnames.h */ #endif - - - diff --git a/src/common/shift.c b/src/common/shift.c index 156dbd22c..f9a842a88 100644 --- a/src/common/shift.c +++ b/src/common/shift.c @@ -125,6 +125,3 @@ unsigned long shr_l (unsigned long l, unsigned count) } return l; } - - - diff --git a/src/common/shift.h b/src/common/shift.h index 4bf96e335..07c192acb 100644 --- a/src/common/shift.h +++ b/src/common/shift.h @@ -79,6 +79,3 @@ unsigned long shr_l (unsigned long l, unsigned count); /* End of shift.h */ #endif - - - diff --git a/src/common/strbuf.c b/src/common/strbuf.c index 029fe5ad4..600f2374a 100644 --- a/src/common/strbuf.c +++ b/src/common/strbuf.c @@ -493,6 +493,3 @@ void SB_Printf (StrBuf* S, const char* Format, ...) SB_VPrintf (S, Format, ap); va_end (ap); } - - - diff --git a/src/common/strbuf.h b/src/common/strbuf.h index 4d90637d5..c8ec1f10b 100644 --- a/src/common/strbuf.h +++ b/src/common/strbuf.h @@ -421,6 +421,3 @@ void SB_Printf (StrBuf* S, const char* Format, ...) attribute ((format (printf, /* End of strbuf.h */ #endif - - - diff --git a/src/common/strpool.c b/src/common/strpool.c index 963ecaf0a..c5661be75 100644 --- a/src/common/strpool.c +++ b/src/common/strpool.c @@ -281,6 +281,3 @@ unsigned SP_GetCount (const StringPool* P) { return CollCount (&P->Entries); } - - - diff --git a/src/common/strpool.h b/src/common/strpool.h index 60b8b3451..967bce4ab 100644 --- a/src/common/strpool.h +++ b/src/common/strpool.h @@ -101,6 +101,3 @@ unsigned SP_GetCount (const StringPool* P); /* End of strpool.h */ #endif - - - diff --git a/src/common/strstack.c b/src/common/strstack.c index c316399b2..508af178e 100644 --- a/src/common/strstack.c +++ b/src/common/strstack.c @@ -80,6 +80,3 @@ void SS_Push (StrStack* S, const char* Val) CHECK (S->Count < sizeof (S->Stack) / sizeof (S->Stack[0])); S->Stack[S->Count++] = xstrdup (Val); } - - - diff --git a/src/common/strstack.h b/src/common/strstack.h index 6331241de..d29a47993 100644 --- a/src/common/strstack.h +++ b/src/common/strstack.h @@ -100,7 +100,5 @@ void SS_Push (StrStack* S, const char* Val); /* End of strstack.h */ + #endif - - - diff --git a/src/common/strutil.h b/src/common/strutil.h index 24daa222a..2bdcc5686 100644 --- a/src/common/strutil.h +++ b/src/common/strutil.h @@ -62,6 +62,3 @@ int StrCaseCmp (const char* S1, const char* S2); /* End of strutil.h */ #endif - - - diff --git a/src/common/symdefs.h b/src/common/symdefs.h index fbe0bc168..1a487e0f3 100644 --- a/src/common/symdefs.h +++ b/src/common/symdefs.h @@ -103,6 +103,3 @@ /* End of symdefs.h */ #endif - - - diff --git a/src/common/target.c b/src/common/target.c index a4287ee56..ae575f2ad 100644 --- a/src/common/target.c +++ b/src/common/target.c @@ -232,4 +232,3 @@ const char* GetTargetName (target_t Target) /* Return the array entry */ return GetTargetProperties (Target)->Name; } - diff --git a/src/common/target.h b/src/common/target.h index e1675ad65..6384bf19e 100644 --- a/src/common/target.h +++ b/src/common/target.h @@ -118,7 +118,5 @@ const char* GetTargetName (target_t Target); /* End of target.h */ + #endif - - - diff --git a/src/common/tgttrans.c b/src/common/tgttrans.c index a1b61cbd3..7725cf285 100644 --- a/src/common/tgttrans.c +++ b/src/common/tgttrans.c @@ -127,8 +127,3 @@ void TgtTranslateSet (unsigned Index, unsigned char C) CHECK (Index > 0 && Index < sizeof (Tab)); Tab[Index] = C; } - - - - - diff --git a/src/common/tgttrans.h b/src/common/tgttrans.h index e4f08f71a..5b942e7f5 100644 --- a/src/common/tgttrans.h +++ b/src/common/tgttrans.h @@ -75,6 +75,3 @@ void TgtTranslateSet (unsigned Index, unsigned char C); /* End of tgttrans.h */ #endif - - - diff --git a/src/common/va_copy.h b/src/common/va_copy.h index 30f275461..2f56efa1a 100644 --- a/src/common/va_copy.h +++ b/src/common/va_copy.h @@ -74,7 +74,5 @@ /* End of va_copy.h */ + #endif - - - diff --git a/src/common/version.c b/src/common/version.c index e5d52c02d..c935d108b 100644 --- a/src/common/version.c +++ b/src/common/version.c @@ -77,6 +77,3 @@ unsigned GetVersionAsNumber (void) { return ((VER_MAJOR * 0x100) + (VER_MINOR * 0x10) + VER_PATCH); } - - - diff --git a/src/common/version.h b/src/common/version.h index edf5d2c56..145c2eddd 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -55,7 +55,3 @@ unsigned GetVersionAsNumber (void); /* End of version.h */ #endif - - - - diff --git a/src/common/xmalloc.c b/src/common/xmalloc.c index 1a7b915ab..327d378fe 100644 --- a/src/common/xmalloc.c +++ b/src/common/xmalloc.c @@ -125,6 +125,3 @@ void* xdup (const void* Buf, size_t Size) { return memcpy (xmalloc (Size), Buf, Size); } - - - diff --git a/src/common/xmalloc.h b/src/common/xmalloc.h index 3979a9617..eb196b6a1 100644 --- a/src/common/xmalloc.h +++ b/src/common/xmalloc.h @@ -68,6 +68,3 @@ void* xdup (const void* Buf, size_t Size); /* End of xmalloc.h */ #endif - - - diff --git a/src/common/xsprintf.c b/src/common/xsprintf.c index c33f32b24..ea63b6d7e 100644 --- a/src/common/xsprintf.c +++ b/src/common/xsprintf.c @@ -676,6 +676,3 @@ int xvsprintf (char* Buf, size_t BufSize, const char* Format, va_list ap) CHECK (Res >= 0 && (unsigned) (Res+1) < BufSize); return Res; } - - - diff --git a/src/common/xsprintf.h b/src/common/xsprintf.h index 2758e5bc2..7408177a5 100644 --- a/src/common/xsprintf.h +++ b/src/common/xsprintf.h @@ -92,7 +92,3 @@ int xvsprintf (char* Buf, size_t BufSize, const char* Format, va_list ap) /* End of xsprintf.h */ #endif - - - - diff --git a/src/da65/asminc.c b/src/da65/asminc.c index 079b751ba..4f496c79f 100644 --- a/src/da65/asminc.c +++ b/src/da65/asminc.c @@ -233,6 +233,3 @@ void AsmInc (const char* Filename, char CommentStart, int IgnoreUnknown) /* Close the include file ignoring errors (we were just reading). */ (void) fclose (F); } - - - diff --git a/src/da65/asminc.h b/src/da65/asminc.h index 8c375b67e..bf48710e9 100644 --- a/src/da65/asminc.h +++ b/src/da65/asminc.h @@ -50,7 +50,5 @@ void AsmInc (const char* Filename, char CommentStart, int IgnoreUnknown); /* End of asminc.h */ + #endif - - - diff --git a/src/da65/attrtab.c b/src/da65/attrtab.c index 07a47b72e..1cfb5ba45 100644 --- a/src/da65/attrtab.c +++ b/src/da65/attrtab.c @@ -178,6 +178,3 @@ attr_t GetLabelAttr (unsigned Addr) /* Return the attribute */ return (AttrTab[Addr] & atLabelMask); } - - - diff --git a/src/da65/attrtab.h b/src/da65/attrtab.h index b1caf083d..c9fb9c35f 100644 --- a/src/da65/attrtab.h +++ b/src/da65/attrtab.h @@ -114,7 +114,5 @@ attr_t GetLabelAttr (unsigned Addr); /* End of attrtab.h */ + #endif - - - diff --git a/src/da65/code.c b/src/da65/code.c index c94fa24cd..0cc158219 100644 --- a/src/da65/code.c +++ b/src/da65/code.c @@ -219,6 +219,3 @@ void ResetCode (void) { PC = CodeStart; } - - - diff --git a/src/da65/code.h b/src/da65/code.h index e4d95a03b..0d21e61e1 100644 --- a/src/da65/code.h +++ b/src/da65/code.h @@ -84,7 +84,5 @@ void ResetCode (void); /* End of code.h */ + #endif - - - diff --git a/src/da65/comments.c b/src/da65/comments.c index 4702cf9d7..64b64ca28 100644 --- a/src/da65/comments.c +++ b/src/da65/comments.c @@ -85,6 +85,3 @@ const char* GetComment (unsigned Addr) /* Return the label if any */ return CommentTab[Addr]; } - - - diff --git a/src/da65/comments.h b/src/da65/comments.h index 0e235d31d..1b8bc1771 100644 --- a/src/da65/comments.h +++ b/src/da65/comments.h @@ -57,7 +57,5 @@ const char* GetComment (unsigned Addr); /* End of comments.h */ + #endif - - - diff --git a/src/da65/data.c b/src/da65/data.c index 0e2f7f275..236241357 100644 --- a/src/da65/data.c +++ b/src/da65/data.c @@ -373,6 +373,3 @@ unsigned TextTable (void) /* Return the number of bytes output */ return ByteCount; } - - - diff --git a/src/da65/data.h b/src/da65/data.h index 37c0df04a..4cec14a03 100644 --- a/src/da65/data.h +++ b/src/da65/data.h @@ -68,7 +68,5 @@ unsigned TextTable (void); /* End of data.h */ + #endif - - - diff --git a/src/da65/error.c b/src/da65/error.c index e0d96c9fb..d09dadcbb 100644 --- a/src/da65/error.c +++ b/src/da65/error.c @@ -86,6 +86,3 @@ void Internal (const char* Format, ...) va_end (ap); exit (EXIT_FAILURE); } - - - diff --git a/src/da65/error.h b/src/da65/error.h index b8de97286..d0221bcc4 100644 --- a/src/da65/error.h +++ b/src/da65/error.h @@ -63,6 +63,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - diff --git a/src/da65/global.c b/src/da65/global.c index 14f9982d0..e2b1fd144 100644 --- a/src/da65/global.c +++ b/src/da65/global.c @@ -77,6 +77,3 @@ unsigned ACol = 17; /* Argument column */ unsigned CCol = 49; /* Comment column */ unsigned TCol = 81; /* Text bytes column */ unsigned BytesPerLine = 8; /* Max. number of data bytes per line */ - - - diff --git a/src/da65/global.h b/src/da65/global.h index b48805157..14b113399 100644 --- a/src/da65/global.h +++ b/src/da65/global.h @@ -112,6 +112,3 @@ extern unsigned BytesPerLine; /* End of global.h */ #endif - - - diff --git a/src/da65/handler.c b/src/da65/handler.c index 1b26fca7e..f4022ce37 100644 --- a/src/da65/handler.c +++ b/src/da65/handler.c @@ -662,6 +662,3 @@ void OH_JmpAbsoluteIndirect (const OpcDesc* D) } SeparatorLine (); } - - - diff --git a/src/da65/handler.h b/src/da65/handler.h index fddcfba25..77da618c1 100644 --- a/src/da65/handler.h +++ b/src/da65/handler.h @@ -103,7 +103,5 @@ void OH_JmpAbsoluteIndirect (const OpcDesc* D); /* End of handler.h */ + #endif - - - diff --git a/src/da65/infofile.c b/src/da65/infofile.c index 4b1857dc5..4ee1ffd79 100644 --- a/src/da65/infofile.c +++ b/src/da65/infofile.c @@ -837,9 +837,3 @@ void ReadInfoFile (void) InfoCloseInput (); } } - - - - - - diff --git a/src/da65/infofile.h b/src/da65/infofile.h index 0bfeb79b8..b8b3f53a8 100644 --- a/src/da65/infofile.h +++ b/src/da65/infofile.h @@ -50,7 +50,5 @@ void ReadInfoFile (void); /* End of infofile.h */ + #endif - - - diff --git a/src/da65/labels.c b/src/da65/labels.c index c837b17a6..6a1432104 100644 --- a/src/da65/labels.c +++ b/src/da65/labels.c @@ -410,6 +410,3 @@ void DefOutOfRangeLabels (void) SeparatorLine (); } - - - diff --git a/src/da65/labels.h b/src/da65/labels.h index 34735a54c..88ea8d88b 100644 --- a/src/da65/labels.h +++ b/src/da65/labels.h @@ -100,7 +100,5 @@ void DefOutOfRangeLabels (void); /* End of labels.h */ + #endif - - - diff --git a/src/da65/main.c b/src/da65/main.c index a0af30539..921951f3a 100644 --- a/src/da65/main.c +++ b/src/da65/main.c @@ -633,6 +633,3 @@ int main (int argc, char* argv []) /* Done */ return EXIT_SUCCESS; } - - - diff --git a/src/da65/opc6502.c b/src/da65/opc6502.c index b59db8d57..27f734d56 100644 --- a/src/da65/opc6502.c +++ b/src/da65/opc6502.c @@ -304,6 +304,3 @@ const OpcDesc OpcTable_6502[256] = { { "inc", 3, flUseLabel|flAbsOverride, OH_AbsoluteX }, /* $fe */ { "", 1, flIllegal, OH_Illegal, }, /* $ff */ }; - - - diff --git a/src/da65/opc6502.h b/src/da65/opc6502.h index 26171cf61..c890e241b 100644 --- a/src/da65/opc6502.h +++ b/src/da65/opc6502.h @@ -54,7 +54,5 @@ extern const OpcDesc OpcTable_6502[256]; /* End of opc6502.h */ + #endif - - - diff --git a/src/da65/opc6502x.c b/src/da65/opc6502x.c index ee2c4e0ec..01bef44b1 100644 --- a/src/da65/opc6502x.c +++ b/src/da65/opc6502x.c @@ -306,7 +306,3 @@ const OpcDesc OpcTable_6502X[256] = { { "inc", 3, flUseLabel|flAbsOverride, OH_AbsoluteX }, /* $fe */ { "isc", 3, flUseLabel|flAbsOverride, OH_AbsoluteX }, /* $ff */ }; - - - - diff --git a/src/da65/opc65816.c b/src/da65/opc65816.c index 520aafefb..2cd2aaee8 100644 --- a/src/da65/opc65816.c +++ b/src/da65/opc65816.c @@ -304,6 +304,3 @@ const OpcDesc OpcTable_65816[256] = { { "inc", 3, flUseLabel|flAbsOverride, OH_AbsoluteX }, /* $fe */ { "sbc", 4, flUseLabel, OH_AbsoluteLongX }, /* $ff */ }; - - - diff --git a/src/da65/opc65816.h b/src/da65/opc65816.h index 4b0ac21f4..12ffc4a37 100644 --- a/src/da65/opc65816.h +++ b/src/da65/opc65816.h @@ -54,7 +54,5 @@ extern const OpcDesc OpcTable_65816[256]; /* End of opc65816.h */ + #endif - - - diff --git a/src/da65/opc65c02.c b/src/da65/opc65c02.c index 5d29a36de..00520e729 100644 --- a/src/da65/opc65c02.c +++ b/src/da65/opc65c02.c @@ -304,6 +304,3 @@ const OpcDesc OpcTable_65C02[256] = { { "inc", 3, flUseLabel|flAbsOverride, OH_AbsoluteX }, /* $fe */ { "bbs7", 3, flUseLabel, OH_BitBranch }, /* $ff */ }; - - - diff --git a/src/da65/opc65c02.h b/src/da65/opc65c02.h index 2addf5861..38138aa51 100644 --- a/src/da65/opc65c02.h +++ b/src/da65/opc65c02.h @@ -54,7 +54,5 @@ extern const OpcDesc OpcTable_65C02[256]; /* End of opc65c02.h */ + #endif - - - diff --git a/src/da65/opc65sc02.c b/src/da65/opc65sc02.c index 236a9ee34..90549d00f 100644 --- a/src/da65/opc65sc02.c +++ b/src/da65/opc65sc02.c @@ -304,6 +304,3 @@ const OpcDesc OpcTable_65SC02[256] = { { "inc", 3, flUseLabel|flAbsOverride, OH_AbsoluteX }, /* $fe */ { "", 1, flIllegal, OH_Illegal, }, /* $ff */ }; - - - diff --git a/src/da65/opc65sc02.h b/src/da65/opc65sc02.h index e9cd30a21..391f425ea 100644 --- a/src/da65/opc65sc02.h +++ b/src/da65/opc65sc02.h @@ -54,7 +54,5 @@ extern const OpcDesc OpcTable_65SC02[256]; /* End of opc65sc02.h */ + #endif - - - diff --git a/src/da65/opcdesc.h b/src/da65/opcdesc.h index 093e71c9d..7913131cd 100644 --- a/src/da65/opcdesc.h +++ b/src/da65/opcdesc.h @@ -73,7 +73,5 @@ struct OpcDesc { /* End of opcdesc.h */ + #endif - - - diff --git a/src/da65/opchuc6280.h b/src/da65/opchuc6280.h index 26f5390a8..d0518dcc4 100644 --- a/src/da65/opchuc6280.h +++ b/src/da65/opchuc6280.h @@ -54,7 +54,5 @@ extern const OpcDesc OpcTable_HuC6280[256]; /* End of opchuc6280.h */ + #endif - - - diff --git a/src/da65/opcm740.c b/src/da65/opcm740.c index 2a2040515..67a36b48c 100644 --- a/src/da65/opcm740.c +++ b/src/da65/opcm740.c @@ -305,6 +305,3 @@ const OpcDesc OpcTable_M740[256] = { { "inc", 3, flUseLabel|flAbsOverride, OH_AbsoluteX }, /* $fe */ { "clb", 2, flUseLabel, OH_ZeroPageBit }, /* $ff */ }; - - - diff --git a/src/da65/opcm740.h b/src/da65/opcm740.h index edfa20c8d..07c49578b 100644 --- a/src/da65/opcm740.h +++ b/src/da65/opcm740.h @@ -55,7 +55,5 @@ extern const OpcDesc OpcTable_M740[256]; /* End of opcm740.h */ + #endif - - - diff --git a/src/da65/opctable.c b/src/da65/opctable.c index e44294b1e..c85805faf 100644 --- a/src/da65/opctable.c +++ b/src/da65/opctable.c @@ -76,7 +76,3 @@ void SetOpcTable (cpu_t CPU) default: Error ("Unsupported CPU"); } } - - - - diff --git a/src/da65/opctable.h b/src/da65/opctable.h index 2835fba01..d5c81b216 100644 --- a/src/da65/opctable.h +++ b/src/da65/opctable.h @@ -69,7 +69,5 @@ void SetOpcTable (cpu_t CPU); /* End of opctable.h */ + #endif - - - diff --git a/src/da65/output.c b/src/da65/output.c index 3bfebc428..2d967ec80 100644 --- a/src/da65/output.c +++ b/src/da65/output.c @@ -383,6 +383,3 @@ void OutputSettings (void) LineFeed (); LineFeed (); } - - - diff --git a/src/da65/output.h b/src/da65/output.h index 16e2ee3be..68d227350 100644 --- a/src/da65/output.h +++ b/src/da65/output.h @@ -111,8 +111,5 @@ void OutputSettings (void); /* End of output.h */ + #endif - - - - diff --git a/src/da65/scanner.c b/src/da65/scanner.c index dab5ffe98..8dc8d393a 100644 --- a/src/da65/scanner.c +++ b/src/da65/scanner.c @@ -533,7 +533,3 @@ void InfoCloseInput (void) InputFile = 0; } } - - - - diff --git a/src/da65/scanner.h b/src/da65/scanner.h index 46b9d29fc..f7f090fad 100644 --- a/src/da65/scanner.h +++ b/src/da65/scanner.h @@ -214,7 +214,5 @@ void InfoCloseInput (void); /* End of scanner.h */ + #endif - - - diff --git a/src/da65/segment.c b/src/da65/segment.c index 479f8f973..4a4f70a45 100644 --- a/src/da65/segment.c +++ b/src/da65/segment.c @@ -107,6 +107,3 @@ void AddAbsSegment (unsigned Start, unsigned End, const char* Name) /* Mark the addresses within the segment */ MarkRange (Start, End, atSegment); } - - - diff --git a/src/da65/segment.h b/src/da65/segment.h index b2dc26488..14700ba99 100644 --- a/src/da65/segment.h +++ b/src/da65/segment.h @@ -52,6 +52,3 @@ void AddAbsSegment (unsigned Start, unsigned End, const char* Name); /* End of segment.h */ #endif - - - diff --git a/src/ld65/asserts.c b/src/ld65/asserts.c index f84bdf3f4..276b13595 100644 --- a/src/ld65/asserts.c +++ b/src/ld65/asserts.c @@ -157,6 +157,3 @@ void CheckAssertions (void) } } } - - - diff --git a/src/ld65/asserts.h b/src/ld65/asserts.h index 94125294d..bce41aa15 100644 --- a/src/ld65/asserts.h +++ b/src/ld65/asserts.h @@ -76,6 +76,3 @@ void CheckAssertions (void); /* End of asserts.h */ #endif - - - diff --git a/src/ld65/bin.c b/src/ld65/bin.c index e86411241..568269b39 100644 --- a/src/ld65/bin.c +++ b/src/ld65/bin.c @@ -316,8 +316,3 @@ void BinWriteTarget (BinDesc* D, struct File* F) D->F = 0; D->Filename = 0; } - - - - - diff --git a/src/ld65/bin.h b/src/ld65/bin.h index 9cb5e7dd9..f53aec9c4 100644 --- a/src/ld65/bin.h +++ b/src/ld65/bin.h @@ -73,6 +73,3 @@ void BinWriteTarget (BinDesc* D, File* F); /* End of bin.h */ #endif - - - diff --git a/src/ld65/binfmt.c b/src/ld65/binfmt.c index 39a7ae3e2..a510f94b7 100644 --- a/src/ld65/binfmt.c +++ b/src/ld65/binfmt.c @@ -88,6 +88,3 @@ int RelocatableBinFmt (unsigned Format) /* Return the flag */ return Reloc; } - - - diff --git a/src/ld65/binfmt.h b/src/ld65/binfmt.h index 5c4bf5778..831e46d12 100644 --- a/src/ld65/binfmt.h +++ b/src/ld65/binfmt.h @@ -63,6 +63,3 @@ int RelocatableBinFmt (unsigned Format); /* End of binfmt.h */ #endif - - - diff --git a/src/ld65/cfgexpr.c b/src/ld65/cfgexpr.c index 65ff3dd67..d922f49ba 100644 --- a/src/ld65/cfgexpr.c +++ b/src/ld65/cfgexpr.c @@ -244,6 +244,3 @@ long CfgCheckedConstExpr (long Min, long Max) /* Return the value */ return Val; } - - - diff --git a/src/ld65/cfgexpr.h b/src/ld65/cfgexpr.h index 8a6e18c67..574f593e3 100644 --- a/src/ld65/cfgexpr.h +++ b/src/ld65/cfgexpr.h @@ -63,7 +63,5 @@ long CfgCheckedConstExpr (long Min, long Max); /* End of cfgexpr.h */ + #endif - - - diff --git a/src/ld65/condes.c b/src/ld65/condes.c index dc8383767..68828abbb 100644 --- a/src/ld65/condes.c +++ b/src/ld65/condes.c @@ -389,6 +389,3 @@ void ConDesDump (void) printf ("CONDES(%u): %u symbols\n", Type, CollCount (ExpList)); } } - - - diff --git a/src/ld65/condes.h b/src/ld65/condes.h index 3cec6bda9..662993dcc 100644 --- a/src/ld65/condes.h +++ b/src/ld65/condes.h @@ -121,6 +121,3 @@ void ConDesDump (void); /* End of condes.h */ #endif - - - diff --git a/src/ld65/config.c b/src/ld65/config.c index a5d6ff39b..b15dff5c6 100644 --- a/src/ld65/config.c +++ b/src/ld65/config.c @@ -2080,6 +2080,3 @@ void CfgWriteTarget (void) } } } - - - diff --git a/src/ld65/config.h b/src/ld65/config.h index 76104d2d8..8eb86133e 100644 --- a/src/ld65/config.h +++ b/src/ld65/config.h @@ -125,8 +125,3 @@ void CfgWriteTarget (void); /* End of config.h */ #endif - - - - - diff --git a/src/ld65/dbgfile.c b/src/ld65/dbgfile.c index aec560212..7eabd5198 100644 --- a/src/ld65/dbgfile.c +++ b/src/ld65/dbgfile.c @@ -169,6 +169,3 @@ void CreateDbgFile (void) Error ("Error closing debug file `%s': %s", DbgFileName, strerror (errno)); } } - - - diff --git a/src/ld65/dbgfile.h b/src/ld65/dbgfile.h index a5020101e..b8e1a534f 100644 --- a/src/ld65/dbgfile.h +++ b/src/ld65/dbgfile.h @@ -52,6 +52,3 @@ void CreateDbgFile (void); /* End of dbgfile.h */ #endif - - - diff --git a/src/ld65/dbgsyms.c b/src/ld65/dbgsyms.c index 808f04c44..a58ddcfe9 100644 --- a/src/ld65/dbgsyms.c +++ b/src/ld65/dbgsyms.c @@ -540,7 +540,3 @@ void PrintDbgSymLabels (FILE* F) } } } - - - - diff --git a/src/ld65/dbgsyms.h b/src/ld65/dbgsyms.h index 3d58579f6..f631dcb52 100644 --- a/src/ld65/dbgsyms.h +++ b/src/ld65/dbgsyms.h @@ -96,6 +96,3 @@ void PrintDbgSymLabels (FILE* F); /* End of dbgsyms.h */ #endif - - - diff --git a/src/ld65/error.c b/src/ld65/error.c index bfd7e0671..20dfd4537 100644 --- a/src/ld65/error.c +++ b/src/ld65/error.c @@ -107,6 +107,3 @@ void Internal (const char* Format, ...) exit (EXIT_FAILURE); } - - - diff --git a/src/ld65/error.h b/src/ld65/error.h index e144bb4fd..b49d8919c 100644 --- a/src/ld65/error.h +++ b/src/ld65/error.h @@ -63,6 +63,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - diff --git a/src/ld65/exports.c b/src/ld65/exports.c index c5533d318..9caa2ba57 100644 --- a/src/ld65/exports.c +++ b/src/ld65/exports.c @@ -1003,7 +1003,3 @@ void CircularRefError (const Export* E) GetSourceName (LI), GetSourceLine (LI)); } - - - - diff --git a/src/ld65/exports.h b/src/ld65/exports.h index 0d5337785..2b7c55bed 100644 --- a/src/ld65/exports.h +++ b/src/ld65/exports.h @@ -212,7 +212,3 @@ void CircularRefError (const Export* E); /* End of exports.h */ #endif - - - - diff --git a/src/ld65/expr.c b/src/ld65/expr.c index c5cfe9abd..0fa079f8e 100644 --- a/src/ld65/expr.c +++ b/src/ld65/expr.c @@ -714,6 +714,3 @@ int EqualExpr (ExprNode* E1, ExprNode* E2) } } - - - diff --git a/src/ld65/expr.h b/src/ld65/expr.h index bc3e8b216..f27120330 100644 --- a/src/ld65/expr.h +++ b/src/ld65/expr.h @@ -122,6 +122,3 @@ int EqualExpr (ExprNode* E1, ExprNode* E2); /* End of expr.h */ #endif - - - diff --git a/src/ld65/extsyms.c b/src/ld65/extsyms.c index b19c23100..642e031a2 100644 --- a/src/ld65/extsyms.c +++ b/src/ld65/extsyms.c @@ -233,7 +233,3 @@ const ExtSym* ExtSymNext (const ExtSym* E) { return E->List; } - - - - diff --git a/src/ld65/extsyms.h b/src/ld65/extsyms.h index c3c82b2e2..a394ad76a 100644 --- a/src/ld65/extsyms.h +++ b/src/ld65/extsyms.h @@ -94,7 +94,3 @@ const ExtSym* ExtSymNext (const ExtSym* E); /* End of extsyms.h */ #endif - - - - diff --git a/src/ld65/fileinfo.c b/src/ld65/fileinfo.c index cc0238166..047befa7c 100644 --- a/src/ld65/fileinfo.c +++ b/src/ld65/fileinfo.c @@ -261,6 +261,3 @@ void PrintDbgFileInfo (FILE* F) fputc ('\n', F); } } - - - diff --git a/src/ld65/fileinfo.h b/src/ld65/fileinfo.h index 038e2404c..978ef4ce2 100644 --- a/src/ld65/fileinfo.h +++ b/src/ld65/fileinfo.h @@ -87,7 +87,5 @@ void PrintDbgFileInfo (FILE* F); /* End of fileinfo.h */ + #endif - - - diff --git a/src/ld65/fileio.c b/src/ld65/fileio.c index 9edb911ab..19943ecad 100644 --- a/src/ld65/fileio.c +++ b/src/ld65/fileio.c @@ -332,7 +332,3 @@ void* ReadData (FILE* F, void* Data, unsigned Size) } return Data; } - - - - diff --git a/src/ld65/fileio.h b/src/ld65/fileio.h index f78f4a11b..f0121ef16 100644 --- a/src/ld65/fileio.h +++ b/src/ld65/fileio.h @@ -118,6 +118,3 @@ void* ReadData (FILE* F, void* Data, unsigned Size); /* End of fileio.h */ #endif - - - diff --git a/src/ld65/filepath.c b/src/ld65/filepath.c index 1010023f2..17cd451de 100644 --- a/src/ld65/filepath.c +++ b/src/ld65/filepath.c @@ -103,6 +103,3 @@ void InitSearchPaths (void) AddSubSearchPathFromWinBin (ObjDefaultPath, "lib"); AddSubSearchPathFromWinBin (CfgDefaultPath, "cfg"); } - - - diff --git a/src/ld65/filepath.h b/src/ld65/filepath.h index 12032b165..a2fcd4bb3 100644 --- a/src/ld65/filepath.h +++ b/src/ld65/filepath.h @@ -71,7 +71,5 @@ void InitSearchPaths (void); /* End of filepath.h */ + #endif - - - diff --git a/src/ld65/fragment.c b/src/ld65/fragment.c index 70ca3d037..e157fe28d 100644 --- a/src/ld65/fragment.c +++ b/src/ld65/fragment.c @@ -94,6 +94,3 @@ Fragment* NewFragment (unsigned char Type, unsigned Size, Section* S) /* Return the new fragment */ return F; } - - - diff --git a/src/ld65/fragment.h b/src/ld65/fragment.h index 98f90f568..7d6dd9201 100644 --- a/src/ld65/fragment.h +++ b/src/ld65/fragment.h @@ -112,7 +112,3 @@ INLINE unsigned GetFragmentSourceLine (const Fragment* F) /* End of fragment.h */ #endif - - - - diff --git a/src/ld65/global.c b/src/ld65/global.c index 985a5914f..dc0c8d521 100644 --- a/src/ld65/global.c +++ b/src/ld65/global.c @@ -56,6 +56,3 @@ unsigned char VerboseMap = 0; /* Verbose map file */ const char* MapFileName = 0; /* Name of the map file */ const char* LabelFileName = 0; /* Name of the label file */ const char* DbgFileName = 0; /* Name of the debug file */ - - - diff --git a/src/ld65/global.h b/src/ld65/global.h index 957d34041..4b873f027 100644 --- a/src/ld65/global.h +++ b/src/ld65/global.h @@ -62,6 +62,3 @@ extern const char* DbgFileName; /* Name of the debug file */ /* End of global.h */ #endif - - - diff --git a/src/ld65/library.c b/src/ld65/library.c index c81ee6f91..71dcc2a35 100644 --- a/src/ld65/library.c +++ b/src/ld65/library.c @@ -553,7 +553,3 @@ void PrintDbgLibraries (FILE* F) fprintf (F, "lib\tid=%u,name=\"%s\"\n", L->Id, GetString (L->Name)); } } - - - - diff --git a/src/ld65/library.h b/src/ld65/library.h index 19648630c..7eadf250f 100644 --- a/src/ld65/library.h +++ b/src/ld65/library.h @@ -92,6 +92,3 @@ void PrintDbgLibraries (FILE* F); /* End of library.h */ #endif - - - diff --git a/src/ld65/lineinfo.c b/src/ld65/lineinfo.c index cc54055c3..3daa2fd66 100644 --- a/src/ld65/lineinfo.c +++ b/src/ld65/lineinfo.c @@ -284,6 +284,3 @@ void PrintDbgLineInfo (FILE* F) } } } - - - diff --git a/src/ld65/lineinfo.h b/src/ld65/lineinfo.h index 5af9e5788..828a9ebd1 100644 --- a/src/ld65/lineinfo.h +++ b/src/ld65/lineinfo.h @@ -186,7 +186,5 @@ void PrintDbgLineInfo (FILE* F); /* End of lineinfo.h */ + #endif - - - diff --git a/src/ld65/main.c b/src/ld65/main.c index 84af34d54..b47831c39 100644 --- a/src/ld65/main.c +++ b/src/ld65/main.c @@ -722,6 +722,3 @@ int main (int argc, char* argv []) /* Return an apropriate exit code */ return EXIT_SUCCESS; } - - - diff --git a/src/ld65/mapfile.c b/src/ld65/mapfile.c index fa8d98efc..6b13e46ec 100644 --- a/src/ld65/mapfile.c +++ b/src/ld65/mapfile.c @@ -152,6 +152,3 @@ void CreateLabelFile (void) Error ("Error closing label file `%s': %s", LabelFileName, strerror (errno)); } } - - - diff --git a/src/ld65/mapfile.h b/src/ld65/mapfile.h index c2685e7aa..3473b4d64 100644 --- a/src/ld65/mapfile.h +++ b/src/ld65/mapfile.h @@ -71,6 +71,3 @@ void CreateLabelFile (void); /* End of mapfile.h */ #endif - - - diff --git a/src/ld65/memarea.c b/src/ld65/memarea.c index 5b562b34a..d143b9790 100644 --- a/src/ld65/memarea.c +++ b/src/ld65/memarea.c @@ -73,7 +73,3 @@ MemoryArea* NewMemoryArea (const FilePos* Pos, unsigned Name) /* ...and return it */ return M; } - - - - diff --git a/src/ld65/memarea.h b/src/ld65/memarea.h index 4e051871c..b6972a985 100644 --- a/src/ld65/memarea.h +++ b/src/ld65/memarea.h @@ -99,8 +99,3 @@ MemoryArea* NewMemoryArea (const FilePos* Pos, unsigned Name); /* End of memarea.h */ #endif - - - - - diff --git a/src/ld65/o65.c b/src/ld65/o65.c index 7373c23c7..ad793b48b 100644 --- a/src/ld65/o65.c +++ b/src/ld65/o65.c @@ -1424,7 +1424,3 @@ void O65WriteTarget (O65Desc* D, File* F) D->F = 0; D->Filename = 0; } - - - - diff --git a/src/ld65/o65.h b/src/ld65/o65.h index 7de0832a8..2112537ff 100644 --- a/src/ld65/o65.h +++ b/src/ld65/o65.h @@ -124,6 +124,3 @@ void O65WriteTarget (O65Desc* D, File* F); /* End of o65.h */ #endif - - - diff --git a/src/ld65/objdata.c b/src/ld65/objdata.c index 1bdef6bd7..222615c4c 100644 --- a/src/ld65/objdata.c +++ b/src/ld65/objdata.c @@ -309,7 +309,3 @@ void PrintDbgModules (FILE* F) } } - - - - diff --git a/src/ld65/objdata.h b/src/ld65/objdata.h index 4c477eee0..b17248b4c 100644 --- a/src/ld65/objdata.h +++ b/src/ld65/objdata.h @@ -175,8 +175,3 @@ void PrintDbgModules (FILE* F); /* End of objdata.h */ #endif - - - - - diff --git a/src/ld65/objfile.c b/src/ld65/objfile.c index 7b8dc4419..ac5e76a7c 100644 --- a/src/ld65/objfile.c +++ b/src/ld65/objfile.c @@ -372,7 +372,3 @@ void ObjAdd (FILE* Obj, const char* Name) */ FreeObjStrings (O); } - - - - diff --git a/src/ld65/objfile.h b/src/ld65/objfile.h index e982f90b5..4683638c7 100644 --- a/src/ld65/objfile.h +++ b/src/ld65/objfile.h @@ -92,6 +92,3 @@ void ObjAdd (FILE* F, const char* Name); /* End of objfile.h */ #endif - - - diff --git a/src/ld65/scanner.c b/src/ld65/scanner.c index b6d45354a..0f6ea58de 100644 --- a/src/ld65/scanner.c +++ b/src/ld65/scanner.c @@ -580,6 +580,3 @@ void CfgCloseInput (void) InputFile = 0; } } - - - diff --git a/src/ld65/scanner.h b/src/ld65/scanner.h index 9e27b6720..0f9a97c69 100644 --- a/src/ld65/scanner.h +++ b/src/ld65/scanner.h @@ -239,7 +239,5 @@ void CfgCloseInput (void); /* End of scanner.h */ + #endif - - - diff --git a/src/ld65/scopes.c b/src/ld65/scopes.c index b3acc0d7d..edf0d0da2 100644 --- a/src/ld65/scopes.c +++ b/src/ld65/scopes.c @@ -171,6 +171,3 @@ void PrintDbgScopes (FILE* F) } } } - - - diff --git a/src/ld65/scopes.h b/src/ld65/scopes.h index 142dc16bb..67d70148b 100644 --- a/src/ld65/scopes.h +++ b/src/ld65/scopes.h @@ -92,6 +92,3 @@ void PrintDbgScopes (FILE* F); /* End of scopes.h */ #endif - - - diff --git a/src/ld65/segments.c b/src/ld65/segments.c index e42a40d22..829435e4c 100644 --- a/src/ld65/segments.c +++ b/src/ld65/segments.c @@ -662,6 +662,3 @@ void CheckSegments (void) } } } - - - diff --git a/src/ld65/segments.h b/src/ld65/segments.h index 67006bcc1..5362c8744 100644 --- a/src/ld65/segments.h +++ b/src/ld65/segments.h @@ -168,7 +168,3 @@ void CheckSegments (void); /* End of segments.h */ #endif - - - - diff --git a/src/ld65/span.c b/src/ld65/span.c index 1b3f35e06..9ff1a8ec8 100644 --- a/src/ld65/span.c +++ b/src/ld65/span.c @@ -245,6 +245,3 @@ void PrintDbgSpans (FILE* F) /* Free the string buffer */ SB_Done (&SpanType); } - - - diff --git a/src/ld65/span.h b/src/ld65/span.h index 6e549189b..ccdc6799d 100644 --- a/src/ld65/span.h +++ b/src/ld65/span.h @@ -103,7 +103,5 @@ void PrintDbgSpans (FILE* F); /* End of span.h */ + #endif - - - diff --git a/src/ld65/spool.c b/src/ld65/spool.c index b3173eb17..fdd2f1c67 100644 --- a/src/ld65/spool.c +++ b/src/ld65/spool.c @@ -65,7 +65,3 @@ void InitStrPool (void) */ SP_AddStr (StrPool, ""); } - - - - diff --git a/src/ld65/spool.h b/src/ld65/spool.h index bd5a7a627..e376c5fe1 100644 --- a/src/ld65/spool.h +++ b/src/ld65/spool.h @@ -111,7 +111,3 @@ void InitStrPool (void); /* End of spool.h */ #endif - - - - diff --git a/src/ld65/tpool.c b/src/ld65/tpool.c index f943fa704..e6006e4e1 100644 --- a/src/ld65/tpool.c +++ b/src/ld65/tpool.c @@ -88,6 +88,3 @@ void InitTypePool (void) /* Allocate a type pool */ TypePool = NewStringPool (137); } - - - diff --git a/src/ld65/tpool.h b/src/ld65/tpool.h index d2a8510d9..c05408711 100644 --- a/src/ld65/tpool.h +++ b/src/ld65/tpool.h @@ -106,7 +106,3 @@ void InitTypePool (void); /* End of tpool.h */ #endif - - - - diff --git a/src/od65/dump.c b/src/od65/dump.c index ffca41907..c02f9a84f 100644 --- a/src/od65/dump.c +++ b/src/od65/dump.c @@ -951,7 +951,3 @@ void DumpObjSegSize (FILE* F, unsigned long Offset) /* Destroy the string pool */ DestroyStrPool (&StrPool); } - - - - diff --git a/src/od65/dump.h b/src/od65/dump.h index eafb86a3c..5371b7bdb 100644 --- a/src/od65/dump.h +++ b/src/od65/dump.h @@ -83,7 +83,3 @@ void DumpObjSegSize (FILE* F, unsigned long Offset); /* End of dump.h */ #endif - - - - diff --git a/src/od65/error.c b/src/od65/error.c index 2b5827571..364f52266 100644 --- a/src/od65/error.c +++ b/src/od65/error.c @@ -85,6 +85,3 @@ void Internal (const char* Format, ...) va_end (ap); exit (EXIT_FAILURE); } - - - diff --git a/src/od65/error.h b/src/od65/error.h index 16eabdb0e..8e1469a34 100644 --- a/src/od65/error.h +++ b/src/od65/error.h @@ -63,6 +63,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - diff --git a/src/od65/fileio.c b/src/od65/fileio.c index 9ddab17af..cc27b88ac 100644 --- a/src/od65/fileio.c +++ b/src/od65/fileio.c @@ -246,6 +246,3 @@ void ReadStrPool (FILE* F, Collection* C) CollAppend (C, ReadStr (F)); } } - - - diff --git a/src/od65/fileio.h b/src/od65/fileio.h index cf05a7dad..068c4d9a3 100644 --- a/src/od65/fileio.h +++ b/src/od65/fileio.h @@ -97,6 +97,3 @@ void ReadStrPool (FILE* F, Collection* C); /* End of fileio.h */ #endif - - - diff --git a/src/od65/global.c b/src/od65/global.c index eb6555154..bb56ceecf 100644 --- a/src/od65/global.c +++ b/src/od65/global.c @@ -44,6 +44,3 @@ unsigned What = 0; /* What should get dumped? */ - - - diff --git a/src/od65/global.h b/src/od65/global.h index 624fe2a84..22054d3f6 100644 --- a/src/od65/global.h +++ b/src/od65/global.h @@ -65,6 +65,3 @@ extern unsigned What; /* What should get dumped? */ /* End of global.h */ #endif - - - diff --git a/src/od65/main.c b/src/od65/main.c index aa0e6f86d..802290ffd 100644 --- a/src/od65/main.c +++ b/src/od65/main.c @@ -361,6 +361,3 @@ int main (int argc, char* argv []) /* Success */ return EXIT_SUCCESS; } - - - diff --git a/src/sim65/error.c b/src/sim65/error.c index 378403e55..3114951af 100644 --- a/src/sim65/error.c +++ b/src/sim65/error.c @@ -85,6 +85,3 @@ void Internal (const char* Format, ...) va_end (ap); exit (EXIT_FAILURE); } - - - diff --git a/src/sim65/error.h b/src/sim65/error.h index 507294b90..7bee4954c 100644 --- a/src/sim65/error.h +++ b/src/sim65/error.h @@ -63,6 +63,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - diff --git a/src/sim65/memory.h b/src/sim65/memory.h index 5e234c561..06da818de 100644 --- a/src/sim65/memory.h +++ b/src/sim65/memory.h @@ -67,7 +67,3 @@ void MemInit (void); /* End of memory.h */ #endif - - - - diff --git a/src/sp65/asm.c b/src/sp65/asm.c index c397d33d6..8f520cb9e 100644 --- a/src/sp65/asm.c +++ b/src/sp65/asm.c @@ -238,6 +238,3 @@ void WriteAsmFile (const StrBuf* Data, const Collection* A, const Bitmap* B) Error ("Error closing output file `%s': %s", Name, strerror (errno)); } } - - - diff --git a/src/sp65/asm.h b/src/sp65/asm.h index 06d16802e..18c55e8b5 100644 --- a/src/sp65/asm.h +++ b/src/sp65/asm.h @@ -61,6 +61,3 @@ void WriteAsmFile (const StrBuf* Data, const Collection* A, const Bitmap* B); /* End of asm.h */ #endif - - - diff --git a/src/sp65/attr.c b/src/sp65/attr.c index 8f0ddeaed..5de17ee26 100644 --- a/src/sp65/attr.c +++ b/src/sp65/attr.c @@ -304,6 +304,3 @@ void FreeAttrList (Collection* C) /* Free the collection itself */ FreeCollection (C); } - - - diff --git a/src/sp65/attr.h b/src/sp65/attr.h index 9a4f834fb..2658aa077 100644 --- a/src/sp65/attr.h +++ b/src/sp65/attr.h @@ -126,6 +126,3 @@ void FreeAttrList (Collection* C); /* End of attr.h */ #endif - - - diff --git a/src/sp65/bin.c b/src/sp65/bin.c index fddb8320f..48768b466 100644 --- a/src/sp65/bin.c +++ b/src/sp65/bin.c @@ -83,6 +83,3 @@ void WriteBinFile (const StrBuf* Data, const Collection* A, Error ("Error closing output file `%s': %s", Name, strerror (errno)); } } - - - diff --git a/src/sp65/bin.h b/src/sp65/bin.h index 476ae9a16..4a32a0a98 100644 --- a/src/sp65/bin.h +++ b/src/sp65/bin.h @@ -61,6 +61,3 @@ void WriteBinFile (const StrBuf* Data, const Collection* A, const Bitmap* B); /* End of bin.h */ #endif - - - diff --git a/src/sp65/bitmap.c b/src/sp65/bitmap.c index b6270d246..b67e329df 100644 --- a/src/sp65/bitmap.c +++ b/src/sp65/bitmap.c @@ -175,6 +175,3 @@ Pixel GetPixel (const Bitmap* B, unsigned X, unsigned Y) /* Return the pixel */ return B->Data[Y * B->Width + X]; } - - - diff --git a/src/sp65/bitmap.h b/src/sp65/bitmap.h index f5423f67f..e63a7570c 100644 --- a/src/sp65/bitmap.h +++ b/src/sp65/bitmap.h @@ -184,6 +184,3 @@ INLINE unsigned GetBitmapColors (const Bitmap* B) /* End of bitmap.h */ #endif - - - diff --git a/src/sp65/c.c b/src/sp65/c.c index 537333b67..0f86bec53 100644 --- a/src/sp65/c.c +++ b/src/sp65/c.c @@ -223,6 +223,3 @@ void WriteCFile (const StrBuf* Data, const Collection* A, const Bitmap* B) Error ("Error closing output file `%s': %s", Name, strerror (errno)); } } - - - diff --git a/src/sp65/c.h b/src/sp65/c.h index 8cf763144..113d0dee1 100644 --- a/src/sp65/c.h +++ b/src/sp65/c.h @@ -61,6 +61,3 @@ void WriteCFile (const StrBuf* Data, const Collection* A, const Bitmap* B); /* End of c.h */ #endif - - - diff --git a/src/sp65/color.c b/src/sp65/color.c index e1abd79be..0180865c6 100644 --- a/src/sp65/color.c +++ b/src/sp65/color.c @@ -64,6 +64,3 @@ Color RGBA (unsigned char R, unsigned char G, unsigned char B, unsigned char A) } #endif - - - diff --git a/src/sp65/color.h b/src/sp65/color.h index 3646837f5..31688bff4 100644 --- a/src/sp65/color.h +++ b/src/sp65/color.h @@ -94,6 +94,3 @@ Color RGBA (unsigned char R, unsigned char G, unsigned char B, unsigned char A); /* End of color.h */ #endif - - - diff --git a/src/sp65/convert.c b/src/sp65/convert.c index f5022246c..25e453eb7 100644 --- a/src/sp65/convert.c +++ b/src/sp65/convert.c @@ -123,4 +123,3 @@ void ListConversionTargets (FILE* F) fprintf (F, " %s\n", ConverterMap[I].Format); } } - diff --git a/src/sp65/convert.h b/src/sp65/convert.h index b0bc51ba8..4e6f7b9f6 100644 --- a/src/sp65/convert.h +++ b/src/sp65/convert.h @@ -70,6 +70,3 @@ void ListConversionTargets (FILE* F); /* End of convert.h */ #endif - - - diff --git a/src/sp65/error.c b/src/sp65/error.c index 70bc5bdb3..7a29cb551 100644 --- a/src/sp65/error.c +++ b/src/sp65/error.c @@ -85,6 +85,3 @@ void Internal (const char* Format, ...) va_end (ap); exit (EXIT_FAILURE); } - - - diff --git a/src/sp65/error.h b/src/sp65/error.h index 7643cefa9..41ee83b1b 100644 --- a/src/sp65/error.h +++ b/src/sp65/error.h @@ -63,6 +63,3 @@ void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2)) /* End of error.h */ #endif - - - diff --git a/src/sp65/fileio.c b/src/sp65/fileio.c index a43b7eb26..074a7b534 100644 --- a/src/sp65/fileio.c +++ b/src/sp65/fileio.c @@ -123,6 +123,3 @@ void* ReadData (FILE* F, void* Data, unsigned Size) } return Data; } - - - diff --git a/src/sp65/fileio.h b/src/sp65/fileio.h index de2cdd2ce..c17647d33 100644 --- a/src/sp65/fileio.h +++ b/src/sp65/fileio.h @@ -72,6 +72,3 @@ void* ReadData (FILE* F, void* Data, unsigned Size); /* End of fileio.h */ #endif - - - diff --git a/src/sp65/geosbitmap.c b/src/sp65/geosbitmap.c index f5770f720..05984cbdf 100644 --- a/src/sp65/geosbitmap.c +++ b/src/sp65/geosbitmap.c @@ -229,6 +229,3 @@ StrBuf* GenGeosBitmap (const Bitmap* B, const Collection* A attribute ((unused)) /* Return the converted bitmap */ return D; } - - - diff --git a/src/sp65/geosicon.c b/src/sp65/geosicon.c index 52a8945ee..a735c89fe 100644 --- a/src/sp65/geosicon.c +++ b/src/sp65/geosicon.c @@ -108,6 +108,3 @@ StrBuf* GenGeosIcon (const Bitmap* B, const Collection* A attribute ((unused))) /* Return the converted bitmap */ return D; } - - - diff --git a/src/sp65/geosicon.h b/src/sp65/geosicon.h index 3a54b70cc..8b1351db7 100644 --- a/src/sp65/geosicon.h +++ b/src/sp65/geosicon.h @@ -64,6 +64,3 @@ StrBuf* GenGeosIcon (const Bitmap* B, const Collection* A); /* End of geosicon.h */ #endif - - - diff --git a/src/sp65/input.c b/src/sp65/input.c index 85807752f..37514886d 100644 --- a/src/sp65/input.c +++ b/src/sp65/input.c @@ -119,6 +119,3 @@ Bitmap* ReadInputFile (const Collection* A) /* Call the format specific read */ return InputFormatTable[F->Id].Read (A); } - - - diff --git a/src/sp65/input.h b/src/sp65/input.h index cfbc6f63c..f4f4c6ea3 100644 --- a/src/sp65/input.h +++ b/src/sp65/input.h @@ -63,6 +63,3 @@ Bitmap* ReadInputFile (const Collection* A); /* End of input.h */ #endif - - - diff --git a/src/sp65/koala.c b/src/sp65/koala.c index d66969348..3f0875e81 100644 --- a/src/sp65/koala.c +++ b/src/sp65/koala.c @@ -101,6 +101,3 @@ StrBuf* GenKoala (const Bitmap* B, const Collection* A attribute ((unused))) /* Return the converted bitmap */ return D; } - - - diff --git a/src/sp65/koala.h b/src/sp65/koala.h index 57ea86ad5..b2bd35375 100644 --- a/src/sp65/koala.h +++ b/src/sp65/koala.h @@ -64,6 +64,3 @@ StrBuf* GenKoala (const Bitmap* B, const Collection* A); /* End of koala.h */ #endif - - - diff --git a/src/sp65/lynxsprite.c b/src/sp65/lynxsprite.c index 99d7a1bc1..2cce35ff3 100644 --- a/src/sp65/lynxsprite.c +++ b/src/sp65/lynxsprite.c @@ -552,6 +552,3 @@ StrBuf* GenLynxSprite (const Bitmap* B, const Collection* A) /* Return the converted bitmap */ return D; } - - - diff --git a/src/sp65/lynxsprite.h b/src/sp65/lynxsprite.h index c5611e036..1d6f998f5 100644 --- a/src/sp65/lynxsprite.h +++ b/src/sp65/lynxsprite.h @@ -64,6 +64,3 @@ StrBuf* GenLynxSprite (const Bitmap* B, const Collection* A); /* End of lynxsprite.h */ #endif - - - diff --git a/src/sp65/main.c b/src/sp65/main.c index 92cd71114..98049e891 100644 --- a/src/sp65/main.c +++ b/src/sp65/main.c @@ -405,6 +405,3 @@ int main (int argc, char* argv []) /* Success */ return EXIT_SUCCESS; } - - - diff --git a/src/sp65/output.c b/src/sp65/output.c index ac6f3db92..e4c2dd4c7 100644 --- a/src/sp65/output.c +++ b/src/sp65/output.c @@ -140,6 +140,3 @@ void WriteOutputFile (const StrBuf* Data, const Collection* A, const Bitmap* B) /* Call the format specific write */ OutputFormatTable[F->Id].Write (Data, A, B); } - - - diff --git a/src/sp65/output.h b/src/sp65/output.h index 6d3b4c16b..9956c31aa 100644 --- a/src/sp65/output.h +++ b/src/sp65/output.h @@ -65,6 +65,3 @@ void WriteOutputFile (const StrBuf* Data, const Collection* A, const Bitmap* B); /* End of output.h */ #endif - - - diff --git a/src/sp65/palette.c b/src/sp65/palette.c index b407b365c..333843af0 100644 --- a/src/sp65/palette.c +++ b/src/sp65/palette.c @@ -138,6 +138,3 @@ void DumpPalette (FILE* F, const Palette* P) (((unsigned long) C->R) << 0)); } } - - - diff --git a/src/sp65/palette.h b/src/sp65/palette.h index d7180e0f0..61eb6519d 100644 --- a/src/sp65/palette.h +++ b/src/sp65/palette.h @@ -85,6 +85,3 @@ void DumpPalette (FILE* F, const Palette* P); /* End of palette.h */ #endif - - - diff --git a/src/sp65/pcx.c b/src/sp65/pcx.c index 51767c931..a1d16b7ea 100644 --- a/src/sp65/pcx.c +++ b/src/sp65/pcx.c @@ -440,6 +440,3 @@ Bitmap* ReadPCXFile (const Collection* A) /* Return the bitmap */ return B; } - - - diff --git a/src/sp65/pcx.h b/src/sp65/pcx.h index c288a2514..038a947ba 100644 --- a/src/sp65/pcx.h +++ b/src/sp65/pcx.h @@ -60,6 +60,3 @@ Bitmap* ReadPCXFile (const Collection* A); /* End of pcx.h */ #endif - - - diff --git a/src/sp65/pixel.h b/src/sp65/pixel.h index f313ff302..3684b5530 100644 --- a/src/sp65/pixel.h +++ b/src/sp65/pixel.h @@ -67,6 +67,3 @@ union Pixel { /* End of pixel.h */ #endif - - - diff --git a/src/sp65/raw.c b/src/sp65/raw.c index 871200652..ff233596b 100644 --- a/src/sp65/raw.c +++ b/src/sp65/raw.c @@ -84,6 +84,3 @@ StrBuf* GenRaw (const Bitmap* B, const Collection* A attribute ((unused))) /* Return the converted bitmap */ return D; } - - - diff --git a/src/sp65/raw.h b/src/sp65/raw.h index d4c44f7ea..ffc3a6649 100644 --- a/src/sp65/raw.h +++ b/src/sp65/raw.h @@ -61,7 +61,5 @@ StrBuf* GenRaw (const Bitmap* B, const Collection* A); /* End of raw.h */ + #endif - - - diff --git a/src/sp65/vic2sprite.c b/src/sp65/vic2sprite.c index d32a9cc66..a9139d0a1 100644 --- a/src/sp65/vic2sprite.c +++ b/src/sp65/vic2sprite.c @@ -177,6 +177,3 @@ StrBuf* GenVic2Sprite (const Bitmap* B, const Collection* A) /* Return the converted bitmap */ return D; } - - - diff --git a/src/sp65/vic2sprite.h b/src/sp65/vic2sprite.h index 8b1407e64..f7c9a9d05 100644 --- a/src/sp65/vic2sprite.h +++ b/src/sp65/vic2sprite.h @@ -64,6 +64,3 @@ StrBuf* GenVic2Sprite (const Bitmap* B, const Collection* A); /* End of vic2sprite.h */ #endif - - - From 66f1a80f4ec6e32b2aaa20e7b364bc8b498c3d86 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Tue, 4 Mar 2014 01:20:38 +0100 Subject: [PATCH 39/76] Moved workaround for MinGW's missing %m support to a central place. --- src/ca65/error.h | 6 ++++++ src/common/xsprintf.h | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ca65/error.h b/src/ca65/error.h index 776053678..c6fb4f44e 100644 --- a/src/ca65/error.h +++ b/src/ca65/error.h @@ -38,6 +38,12 @@ +#if defined( __MINGW32__) +# pragma GCC diagnostic ignored "-Wformat" +#endif + + + /* common */ #include "attrib.h" #include "coll.h" diff --git a/src/common/xsprintf.h b/src/common/xsprintf.h index 7408177a5..c6ceb723c 100644 --- a/src/common/xsprintf.h +++ b/src/common/xsprintf.h @@ -41,11 +41,7 @@ * and precision to such a StrBuf, but *not* using %p would bring up a warning * about a wrong argument type each time. Maybe gcc will one day allow custom * format specifiers and we can change this ... - * However this cheat doesn't work with MinGW as there's no support for %m :-( */ -#if defined( __MINGW32__) -# pragma GCC diagnostic ignored "-Wformat" -#endif From bf8eb8c22e380aad6385ae44ac53892a1e69108d Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Tue, 4 Mar 2014 15:43:33 +0100 Subject: [PATCH 40/76] rename libsrc/atari/tvtype.s to libsrc/atari/get_tv.s --- libsrc/atari/{tvtype.s => get_tv.s} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename libsrc/atari/{tvtype.s => get_tv.s} (100%) diff --git a/libsrc/atari/tvtype.s b/libsrc/atari/get_tv.s similarity index 100% rename from libsrc/atari/tvtype.s rename to libsrc/atari/get_tv.s From 44ccb27549ffcf78f559cfa4fb252a45f94b310b Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Tue, 4 Mar 2014 21:45:55 +0100 Subject: [PATCH 41/76] Changed Makefile.inc handling. It seems more appropriate to trigger the inclusion of Makefile.inc via $TARGET (instead of $SRCDIR). This is btw. more consistent with extzp.s inclusion which is triggered via $TARGET too. --- libsrc/Makefile | 10 ++++++---- libsrc/atari/targetutil/Makefile.inc | 4 ---- src/cl65/main.c | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/libsrc/Makefile b/libsrc/Makefile index 99da96f1e..19fb5ac3f 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -99,10 +99,12 @@ EXTZP = cbm510 \ MKINC = $(GEOS) \ atari \ + atarixl \ nes -TARGETUTIL = apple2 \ - atari \ +TARGETUTIL = apple2 \ + apple2enh \ + atari \ geos-apple GEOSDIRS = common \ @@ -173,11 +175,11 @@ ifeq ($(TARGET),$(filter $(TARGET),$(EXTZP))) ZPOBJ += ../wrk/$(TARGET)/extzp.o endif -ifeq ($(SRCDIR),$(filter $(SRCDIR),$(MKINC))) +ifeq ($(TARGET),$(filter $(TARGET),$(MKINC))) include $(SRCDIR)/Makefile.inc endif -ifeq ($(SRCDIR),$(filter $(SRCDIR),$(TARGETUTIL))) +ifeq ($(TARGET),$(filter $(TARGET),$(TARGETUTIL))) include $(SRCDIR)/targetutil/Makefile.inc endif diff --git a/libsrc/atari/targetutil/Makefile.inc b/libsrc/atari/targetutil/Makefile.inc index fc91f96a9..01b5e7507 100644 --- a/libsrc/atari/targetutil/Makefile.inc +++ b/libsrc/atari/targetutil/Makefile.inc @@ -1,5 +1,3 @@ -ifeq ($(TARGET),atari) - DEPS += ../wrk/$(TARGET)/w2cas.d ../wrk/$(TARGET)/w2cas.o: $(SRCDIR)/targetutil/w2cas.c | ../wrk/$(TARGET) @@ -9,5 +7,3 @@ DEPS += ../wrk/$(TARGET)/w2cas.d $(LD65) -o $@ -t $(TARGET) $^ $(TARGET): ../targetutil/w2cas.com - -endif diff --git a/src/cl65/main.c b/src/cl65/main.c index 0c460eec9..7c8149660 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -51,7 +51,7 @@ #include #include #include -#ifdef HAVE_SPAWN +#if defined(HAVE_SPAWN) # include #endif From e7b437f1511687e50d34932c8d8e3f39679d385c Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Tue, 4 Mar 2014 22:17:21 +0100 Subject: [PATCH 42/76] Check out install of MinGW cross devel packages. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6415238fd..3bed0f2b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: - c install: - - sudo apt-get install linuxdoc-tools linuxdoc-tools-info + - sudo apt-get install linuxdoc-tools linuxdoc-tools-info mingw32 gcc-mingw32 script: - make all doc after_success: From 6ab56eaae80b251e1a0da847b2979c3da9f19bee Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 12:10:38 +0100 Subject: [PATCH 43/76] Maybe better when avoiding transition packages? --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3bed0f2b3..a4a8cff80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: - c install: - - sudo apt-get install linuxdoc-tools linuxdoc-tools-info mingw32 gcc-mingw32 + - sudo apt-get install linuxdoc-tools linuxdoc-tools-info gcc-mingw-w64-i686 script: - make all doc after_success: From 07f73cf092459abfe77b862702c2de7da406b428 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 12:14:09 +0100 Subject: [PATCH 44/76] Just playing to maybe understand more... --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a4a8cff80..9d28b817d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: - c install: - - sudo apt-get install linuxdoc-tools linuxdoc-tools-info gcc-mingw-w64-i686 + - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 script: - make all doc after_success: From 3bf14a629486bc67edfab940a82f9ee2c14ce943 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 12:19:59 +0100 Subject: [PATCH 45/76] The last one worked - why? What about this... --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9d28b817d..a37599071 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: - c install: - - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 + - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw script: - make all doc after_success: From 6c49fce59ee84f235e05e8723154978d46b528af Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 12:21:43 +0100 Subject: [PATCH 46/76] Fixed typo. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a37599071..a98833b5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: - c install: - - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw + - sudo apt-get install linuxdoc-tools linuxdoc-tools-info mingw32-binutils script: - make all doc after_success: From 3852218015b6c84c183744ff1e25ac4b7a266513 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 12:28:57 +0100 Subject: [PATCH 47/76] Check what we have. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index a98833b5b..bc70debf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,8 @@ language: - c install: - sudo apt-get install linuxdoc-tools linuxdoc-tools-info mingw32-binutils + - which gcc + - which i686-w64-mingw32-gcc script: - make all doc after_success: From 5b640abf9d246aee45f65c7da0bede18ec0da204 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 12:33:19 +0100 Subject: [PATCH 48/76] Moving on... --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bc70debf1..15dce804c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: - c install: - - sudo apt-get install linuxdoc-tools linuxdoc-tools-info mingw32-binutils + - sudo apt-get install linuxdoc-tools linuxdoc-tools-info gcc-mingw-w64 - which gcc - which i686-w64-mingw32-gcc script: From bbc7f48590558dbc7d4d7f41f8e6116d6420a701 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 12:35:20 +0100 Subject: [PATCH 49/76] One more... --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 15dce804c..44ac3f71c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: - c install: - - sudo apt-get install linuxdoc-tools linuxdoc-tools-info gcc-mingw-w64 + - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64 - which gcc - which i686-w64-mingw32-gcc script: From 15508cd36a9c6550f8eb9a210f14b35a0cb55c29 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 12:39:37 +0100 Subject: [PATCH 50/76] Okay, binutils-mingw-w64-i686 seems to have to be listed explicitly. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 44ac3f71c..e92420049 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: - c install: - - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64 + - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 - which gcc - which i686-w64-mingw32-gcc script: From 4f317d70c89743086b694419f5893c79ab23af62 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 13:03:33 +0100 Subject: [PATCH 51/76] Removed -std=c89. Using `struct stat` and `%m` surely doesn't qualify for ISO C90. --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 7bdd5206a..844f81ca4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -25,8 +25,8 @@ LD65_LIB = $(datadir)/lib LD65_OBJ = $(datadir)/lib LD65_CFG = $(datadir)/cfg -CFLAGS += -MMD -MP -O -std=c89 -I common \ - -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) \ +CFLAGS += -MMD -MP -O -I common $(USER_CFLAGS) \ + -Wall -Wextra -Wno-char-subscripts \ -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \ -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG) From 0f6564cb4e36ddd1e8d1513c7b44135f7b348b05 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 13:38:27 +0100 Subject: [PATCH 52/76] First attempt of MinGW cross build. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e92420049..457503ea0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,9 @@ language: - c install: - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 - - which gcc - - which i686-w64-mingw32-gcc script: - make all doc + - make clean bin CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar PROGEXT=.exe after_success: - make -C doc gh-pages env: From ee9c42bbf5b11392731867077a12d1260b4043f9 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 22:28:38 +0100 Subject: [PATCH 53/76] Support both MinGW and MinGW-w64. --- src/cl65/main.c | 18 +++++++++++++++--- src/cl65/spawn-amiga.inc | 2 +- src/cl65/spawn-unix.inc | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/cl65/main.c b/src/cl65/main.c index 7c8149660..b9b191dcd 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -41,8 +41,20 @@ #else # define NEED_SPAWN 1 #endif -#if defined(_MSC_VER) -# pragma warning(disable : 4996) + +/* GCC strictly follows http://c-faq.com/ansi/constmismatch.html and issues an + * 'incompatible pointer type' warning - that can't be suppressed via #pragma. + * The spawnvp() prototype of MinGW (http://www.mingw.org/) differs from the + * one of MinGW-w64 (http://mingw-w64.sourceforge.net/) regarding constness. + * So there's no alternative to actually distinguish these environments :-( + */ +#define SPAWN_ARGV_CONST_CAST +#if defined(__MINGW32__) +# include <_mingw.h> +# if !defined(__MINGW64_VERSION_MAJOR) +# undef SPAWN_ARGV_CONST_CAST +# define SPAWN_ARGV_CONST_CAST (const char* const *) +# endif #endif @@ -375,7 +387,7 @@ static void ExecProgram (CmdDesc* Cmd) } /* Call the program */ - Status = spawnvp (P_WAIT, Cmd->Name, (const char* const *) Cmd->Args); + Status = spawnvp (P_WAIT, Cmd->Name, SPAWN_ARGV_CONST_CAST Cmd->Args); /* Check the result code */ if (Status < 0) { diff --git a/src/cl65/spawn-amiga.inc b/src/cl65/spawn-amiga.inc index f8a230950..5d1b60ea3 100644 --- a/src/cl65/spawn-amiga.inc +++ b/src/cl65/spawn-amiga.inc @@ -54,7 +54,7 @@ int spawnvp (int Mode attribute ((unused)), const char* File attribute ((unused)), - const char* const argv []) + char* const argv []) /* Execute the given program searching and wait til it terminates. The Mode * argument is ignored (compatibility only). The result of the function is * the return code of the program. The function will terminate the program diff --git a/src/cl65/spawn-unix.inc b/src/cl65/spawn-unix.inc index 558f2428d..fc5125c34 100644 --- a/src/cl65/spawn-unix.inc +++ b/src/cl65/spawn-unix.inc @@ -62,7 +62,7 @@ -int spawnvp (int Mode attribute ((unused)), const char* File, const char* const argv []) +int spawnvp (int Mode attribute ((unused)), const char* File, char* const argv []) /* Execute the given program searching and wait til it terminates. The Mode * argument is ignored (compatibility only). The result of the function is * the return code of the program. The function will terminate the program @@ -81,7 +81,7 @@ int spawnvp (int Mode attribute ((unused)), const char* File, const char* const } else if (pid == 0) { /* The son - exec the program */ - if (execvp (File, (char* const *) argv) < 0) { + if (execvp (File, argv) < 0) { Error ("Cannot exec `%s': %s", File, strerror (errno)); } From 9e409a67d2cdf8f8d5ea9dc24e9cc32140b31815 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 22:43:01 +0100 Subject: [PATCH 54/76] Removed by now obsolete pragmas. The warnings in question are instead suppressed by command line options. --- src/common/searchpath.c | 1 - src/sim65/paravirt.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/common/searchpath.c b/src/common/searchpath.c index 009deaded..4aa703c80 100644 --- a/src/common/searchpath.c +++ b/src/common/searchpath.c @@ -41,7 +41,6 @@ #if defined(_MSC_VER) /* Microsoft compiler */ # include -# pragma warning(disable : 4996) #else /* Anyone else */ # include diff --git a/src/sim65/paravirt.c b/src/sim65/paravirt.c index 035bb1d87..0deb59a5f 100644 --- a/src/sim65/paravirt.c +++ b/src/sim65/paravirt.c @@ -44,7 +44,6 @@ #if defined(_MSC_VER) /* Microsoft compiler */ # include -# pragma warning(disable : 4996) #else /* Anyone else */ # include From 3f0af9b241e22d3d08772be66a01802b2ef65e65 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 5 Mar 2014 23:24:35 +0100 Subject: [PATCH 55/76] Have src/Makefile and libsrc/Make use disjoint work directories. Building the clean target in src or libsrc should only delete stuff created by the make in those directories. Having both separated allows the Travis CI build to replace the native binaries with cross built binaries while keeping everything else. --- .travis.yml | 2 +- libsrc/Makefile | 20 ++++++++++---------- libsrc/apple2/targetutil/Makefile.inc | 6 +++--- libsrc/atari/targetutil/Makefile.inc | 6 +++--- libsrc/geos-apple/targetutil/Makefile.inc | 8 ++++---- libsrc/nes/Makefile.inc | 16 ++++++++-------- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 457503ea0..3a0ee09a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ install: - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 script: - make all doc - - make clean bin CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar PROGEXT=.exe + - make -C src clean all CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar PROGEXT=.exe after_success: - make -C doc gh-pages env: diff --git a/libsrc/Makefile b/libsrc/Makefile index 19fb5ac3f..0a8c844b6 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -68,10 +68,10 @@ $(TARGETS): @$(MAKE) --no-print-directory $@ mostlyclean: - $(call RMDIR,../wrk) + $(call RMDIR,../libwrk) clean: - $(call RMDIR,../wrk ../lib ../targetutil $(addprefix ../,$(DRVTYPES))) + $(call RMDIR,../libwrk ../lib ../targetutil $(addprefix ../,$(DRVTYPES))) install: $(foreach dir,$(INSTALLDIRS),$(INSTALL_recipe)) @@ -162,7 +162,7 @@ vpath %.c $(SRCDIRS) OBJS := $(patsubst %.s,%.o,$(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.s))) OBJS += $(patsubst %.c,%.o,$(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c))) -OBJS := $(addprefix ../wrk/$(TARGET)/,$(sort $(notdir $(OBJS)))) +OBJS := $(addprefix ../libwrk/$(TARGET)/,$(sort $(notdir $(OBJS)))) DEPS = $(OBJS:.o=.d) @@ -170,9 +170,9 @@ EXTRA_SRCPAT = $(SRCDIR)/extra/%.s EXTRA_OBJPAT = ../lib/$(TARGET)-%.o EXTRA_OBJS := $(patsubst $(EXTRA_SRCPAT),$(EXTRA_OBJPAT),$(wildcard $(SRCDIR)/extra/*.s)) -ZPOBJ = ../wrk/$(TARGET)/zeropage.o +ZPOBJ = ../libwrk/$(TARGET)/zeropage.o ifeq ($(TARGET),$(filter $(TARGET),$(EXTZP))) - ZPOBJ += ../wrk/$(TARGET)/extzp.o + ZPOBJ += ../libwrk/$(TARGET)/extzp.o endif ifeq ($(TARGET),$(filter $(TARGET),$(MKINC))) @@ -188,12 +188,12 @@ endif define DRVTYPE_template $1_SRCDIR = $$(SRCDIR)/$1 -$1_OBJDIR = ../wrk/$$(TARGET)/$1 +$1_OBJDIR = ../libwrk/$$(TARGET)/$1 $1_DRVDIR = ../$1 $1_OBJPAT = $$($1_OBJDIR)/$$(OBJPFX)%.o $1_DRVPAT = $$($1_DRVDIR)/$$(DRVPFX)%.$1 -$1_STCPAT = ../wrk/$$(TARGET)/$$(DRVPFX)%-$1.o +$1_STCPAT = ../libwrk/$$(TARGET)/$$(DRVPFX)%-$1.o $1_OBJS := $$(patsubst $$($1_SRCDIR)/%.s,$$($1_OBJDIR)/%.o,$$(wildcard $$($1_SRCDIR)/*.s)) @@ -256,10 +256,10 @@ endef ########## -../wrk/$(TARGET)/%.o: %.s | ../wrk/$(TARGET) +../libwrk/$(TARGET)/%.o: %.s | ../libwrk/$(TARGET) $(ASSEMBLE_recipe) -../wrk/$(TARGET)/%.o: %.c | ../wrk/$(TARGET) +../libwrk/$(TARGET)/%.o: %.c | ../libwrk/$(TARGET) $(COMPILE_recipe) $(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib @@ -269,7 +269,7 @@ $(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../lib ../lib/$(TARGET).lib: $(OBJS) | ../lib $(AR65) a $@ $? -../wrk/$(TARGET) ../lib ../targetutil: +../libwrk/$(TARGET) ../lib ../targetutil: @$(call MKDIR,$@) $(TARGET): $(EXTRA_OBJS) ../lib/$(TARGET).lib diff --git a/libsrc/apple2/targetutil/Makefile.inc b/libsrc/apple2/targetutil/Makefile.inc index 7904607b3..105a5324f 100644 --- a/libsrc/apple2/targetutil/Makefile.inc +++ b/libsrc/apple2/targetutil/Makefile.inc @@ -1,9 +1,9 @@ -DEPS += ../wrk/$(TARGET)/loader.d +DEPS += ../libwrk/$(TARGET)/loader.d -../wrk/$(TARGET)/loader.o: $(SRCDIR)/targetutil/loader.s | ../wrk/$(TARGET) +../libwrk/$(TARGET)/loader.o: $(SRCDIR)/targetutil/loader.s | ../libwrk/$(TARGET) $(ASSEMBLE_recipe) -../targetutil/loader.system: ../wrk/$(TARGET)/loader.o $(SRCDIR)/targetutil/loader.cfg | ../targetutil +../targetutil/loader.system: ../libwrk/$(TARGET)/loader.o $(SRCDIR)/targetutil/loader.cfg | ../targetutil $(LD65) -o $@ -C $(filter %.cfg,$^) $(filter-out %.cfg,$^) $(TARGET): ../targetutil/loader.system diff --git a/libsrc/atari/targetutil/Makefile.inc b/libsrc/atari/targetutil/Makefile.inc index 01b5e7507..05405f2e6 100644 --- a/libsrc/atari/targetutil/Makefile.inc +++ b/libsrc/atari/targetutil/Makefile.inc @@ -1,9 +1,9 @@ -DEPS += ../wrk/$(TARGET)/w2cas.d +DEPS += ../libwrk/$(TARGET)/w2cas.d -../wrk/$(TARGET)/w2cas.o: $(SRCDIR)/targetutil/w2cas.c | ../wrk/$(TARGET) +../libwrk/$(TARGET)/w2cas.o: $(SRCDIR)/targetutil/w2cas.c | ../libwrk/$(TARGET) $(COMPILE_recipe) -../targetutil/w2cas.com: ../wrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../targetutil +../targetutil/w2cas.com: ../libwrk/$(TARGET)/w2cas.o ../lib/$(TARGET).lib | ../targetutil $(LD65) -o $@ -t $(TARGET) $^ $(TARGET): ../targetutil/w2cas.com diff --git a/libsrc/geos-apple/targetutil/Makefile.inc b/libsrc/geos-apple/targetutil/Makefile.inc index 01ae3f55c..fbe31981c 100644 --- a/libsrc/geos-apple/targetutil/Makefile.inc +++ b/libsrc/geos-apple/targetutil/Makefile.inc @@ -1,14 +1,14 @@ -DEPS += ../wrk/$(TARGET)/convert.d +DEPS += ../libwrk/$(TARGET)/convert.d -../wrk/$(TARGET)/convert.o: TARGET = apple2enh +../libwrk/$(TARGET)/convert.o: TARGET = apple2enh -../wrk/$(TARGET)/convert.o: $(SRCDIR)/targetutil/convert.c | ../wrk/$(TARGET) +../libwrk/$(TARGET)/convert.o: $(SRCDIR)/targetutil/convert.c | ../libwrk/$(TARGET) $(COMPILE_recipe) ../lib/apple2enh.lib: @$(MAKE) --no-print-directory apple2enh -../targetutil/convert.system: ../wrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../targetutil +../targetutil/convert.system: ../libwrk/$(TARGET)/convert.o ../lib/apple2enh.lib | ../targetutil $(LD65) -o $@ -C apple2enh-system.cfg $^ $(TARGET): ../targetutil/convert.system diff --git a/libsrc/nes/Makefile.inc b/libsrc/nes/Makefile.inc index 1be43497f..f1dcbf18e 100644 --- a/libsrc/nes/Makefile.inc +++ b/libsrc/nes/Makefile.inc @@ -1,8 +1,8 @@ -../tgi/nes-64-56-2.tgi: ../wrk/nes/clrscr.o \ - ../wrk/nes/cputc.o \ - ../wrk/nes/get_tv.o \ - ../wrk/nes/gotoxy.o \ - ../wrk/nes/popa.o \ - ../wrk/nes/ppu.o \ - ../wrk/nes/ppubuf.o \ - ../wrk/nes/setcursor.o +../tgi/nes-64-56-2.tgi: ../libwrk/nes/clrscr.o \ + ../libwrk/nes/cputc.o \ + ../libwrk/nes/get_tv.o \ + ../libwrk/nes/gotoxy.o \ + ../libwrk/nes/popa.o \ + ../libwrk/nes/ppu.o \ + ../libwrk/nes/ppubuf.o \ + ../libwrk/nes/setcursor.o From 30125afcc1e35059a815852656e8ab27b62e1be8 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Thu, 6 Mar 2014 22:32:24 +0100 Subject: [PATCH 56/76] Moved from VS2013 to MinGW(-w64). --- .gitignore | 1 + .travis.yml | 2 +- doc/Makefile | 26 +++++++----- libsrc/Makefile | 79 ++++++++++++++++++------------------ src/Makefile | 104 +++++++++++++++++++++++++----------------------- 5 files changed, 110 insertions(+), 102 deletions(-) diff --git a/.gitignore b/.gitignore index 5de976c32..3e65003e4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /html/ /joy/ /lib/ +/libwrk/ /mou/ /ser/ /targetutil/ diff --git a/.travis.yml b/.travis.yml index 3a0ee09a1..1ae62cd1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ install: - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 script: - make all doc - - make -C src clean all CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar PROGEXT=.exe + - make -C src clean all CROSS_COMPILE=i686-w64-mingw32- after_success: - make -C doc gh-pages env: diff --git a/doc/Makefile b/doc/Makefile index 8c2bb902c..02028e66e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,8 +1,18 @@ -.PHONY: all doc html info gh-pages mostlyclean clean install +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + +.PHONY: all mostlyclean clean install doc html info gh-pages .SUFFIXES: -ifeq ($(shell echo),) +all mostlyclean install: + +ifdef CMD_EXE + +clean doc: + +else # CMD_EXE SGMLS := $(wildcard *.sgml) @@ -13,7 +23,8 @@ TOC_LEVEL = 2 GH_PAGES = ../../gh-pages -all mostlyclean install: +clean: + $(RM) -r ../html ../info doc: html info @@ -21,9 +32,6 @@ html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png) info: $(addprefix ../info/,$(SGMLS:.sgml=.info)) -clean: - $(RM) -r ../html ../info - ../html ../info: @mkdir $@ @@ -50,8 +58,4 @@ ifdef GH_TOKEN git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git push endif -else # cmd.exe - -all doc mostlyclean clean install: - -endif # cmd.exe +endif # CMD_EXE diff --git a/libsrc/Makefile b/libsrc/Makefile index 0a8c844b6..24a958972 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -1,3 +1,11 @@ +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + +.PHONY: all mostlyclean clean install lib $(TARGETS) + +.SUFFIXES: + CBMS = c128 \ c16 \ c64 \ @@ -29,6 +37,15 @@ DRVTYPES = emd \ ser \ tgi +ifdef CMD_EXE + DIRLIST = $(strip $(foreach dir,$1,$(wildcard $(dir)))) + MKDIR = mkdir $(subst /,\,$1) + RMDIR = $(if $(DIRLIST),rmdir /s /q $(subst /,\,$(DIRLIST))) +else + MKDIR = mkdir -p $1 + RMDIR = $(RM) -r $1 +endif + # Every target requires its individual vpath setting but the vpath directive # acts globally. Therefore each target is built in a separate make instance. @@ -38,45 +55,29 @@ ifeq ($(words $(MAKECMDGOALS)),1) endif endif -DIRLIST = $(strip $(foreach dir,$1,$(wildcard $(dir)))) - -ifeq ($(shell echo),) - MKDIR = mkdir -p $1 - RMDIR = $(RM) -r $1 -else - MKDIR = mkdir $(subst /,\,$1) - RMDIR = $(if $(DIRLIST),rmdir /s /q $(subst /,\,$(DIRLIST))) -endif - -.SUFFIXES: - -.PHONY: all lib $(TARGETS) mostlyclean clean install - ifndef TARGET datadir = $(prefix)/share/cc65 -INSTALLDIRS = ../asminc ../cfg ../include \ - $(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)) \ - ../lib ../targetutil $(addprefix ../,$(DRVTYPES)) - -INSTALL = install - all lib: $(TARGETS) -$(TARGETS): - @$(MAKE) --no-print-directory $@ - mostlyclean: $(call RMDIR,../libwrk) clean: $(call RMDIR,../libwrk ../lib ../targetutil $(addprefix ../,$(DRVTYPES))) -install: - $(foreach dir,$(INSTALLDIRS),$(INSTALL_recipe)) +ifdef CMD_EXE -########## +install: + +else # CMD_EXE + +INSTALL = install + +INSTALLDIRS = ../asminc ../cfg ../include \ + $(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)) \ + ../lib ../targetutil $(addprefix ../,$(DRVTYPES)) define INSTALL_recipe @@ -84,9 +85,15 @@ $(if $(prefix),,$(error variable `prefix' must be set)) $(INSTALL) -d $(subst ..,$(DESTDIR)$(datadir),$(dir)) $(INSTALL) -m644 $(dir)/*.* $(subst ..,$(DESTDIR)$(datadir),$(dir)) -endef +endef # INSTALL_recipe -########## +install: + $(foreach dir,$(INSTALLDIRS),$(INSTALL_recipe)) + +endif # CMD_EXE + +$(TARGETS): + @$(MAKE) --no-print-directory $@ else # TARGET @@ -183,8 +190,6 @@ ifeq ($(TARGET),$(filter $(TARGET),$(TARGETUTIL))) include $(SRCDIR)/targetutil/Makefile.inc endif -########## - define DRVTYPE_template $1_SRCDIR = $$(SRCDIR)/$1 @@ -221,9 +226,7 @@ OBJS += $$($1_STCS) DEPS += $$($1_OBJS:.o=.d) -endef - -########## +endef # DRVTYPE_template $(foreach drvtype,$(DRVTYPES),$(eval $(call DRVTYPE_template,$(drvtype)))) @@ -235,16 +238,12 @@ LD65 := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65) export CC65_HOME := $(abspath ..) -########## - define ASSEMBLE_recipe $(if $(TRAVIS),,@echo $(TARGET) - $<) @$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $< -endef - -########## +endef # ASSEMBLE_recipe define COMPILE_recipe @@ -252,9 +251,7 @@ $(if $(TRAVIS),,@echo $(TARGET) - $<) @$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $< @$(CA65) -t $(TARGET) -o $@ $(@:.o=.s) -endef - -########## +endef # COMPILE_recipe ../libwrk/$(TARGET)/%.o: %.s | ../libwrk/$(TARGET) $(ASSEMBLE_recipe) diff --git a/src/Makefile b/src/Makefile index 844f81ca4..87548628b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,9 +1,11 @@ +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + +.PHONY: all mostlyclean clean install avail unavail bin $(PROGS) + .SUFFIXES: -.PHONY: all bin $(PROGS) mostlyclean clean install avail unavail - -ifeq ($(shell echo),) - PROGS = ar65 \ ca65 \ cc65 \ @@ -25,6 +27,9 @@ LD65_LIB = $(datadir)/lib LD65_OBJ = $(datadir)/lib LD65_CFG = $(datadir)/cfg +CC = $(CROSS_COMPILE)gcc +AR = $(CROSS_COMPILE)ar + CFLAGS += -MMD -MP -O -I common $(USER_CFLAGS) \ -Wall -Wextra -Wno-char-subscripts \ -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \ @@ -34,15 +39,50 @@ CFLAGS += $(if $(TRAVIS),-Werror) LDLIBS += -lm -INSTALL = install +ifdef CMD_EXE + EXE_SUFFIX=.exe +endif + +ifdef CROSS_COMPILE + EXE_SUFFIX=.exe +endif + +ifdef CMD_EXE + DIRLIST = $(strip $(foreach dir,$1,$(wildcard $(dir)))) + MKDIR = mkdir $(subst /,\,$1) + RMDIR = $(if $(DIRLIST),rmdir /s /q $(subst /,\,$(DIRLIST))) +else + MKDIR = mkdir -p $1 + RMDIR = $(RM) -r $1 +endif all bin: $(PROGS) mostlyclean: - $(RM) -r ../wrk + $(call RMDIR,../wrk) clean: - $(RM) -r ../wrk ../bin + $(call RMDIR,../wrk ../bin) + +ifdef CMD_EXE + +install avail unavail: + +else # CMD_EXE + +INSTALL = install + +define AVAIL_recipe + +ln -s $(abspath ../bin/$(prog)) /usr/local/bin/$(prog) + +endef # AVAIL_recipe + +define UNAVAIL_recipe + +$(RM) /usr/local/bin/$(prog) + +endef # UNAVAIL_recipe install: $(if $(prefix),,$(error variable `prefix' must be set)) @@ -55,23 +95,7 @@ avail: unavail: $(foreach prog,$(PROGS),$(UNAVAIL_recipe)) -########## - -define AVAIL_recipe - -ln -s $(abspath ../bin/$(prog)) /usr/local/bin/$(prog) - -endef - -########## - -define UNAVAIL_recipe - -$(RM) /usr/local/bin/$(prog) - -endef - -########## +endif # CMD_EXE define OBJS_template @@ -80,53 +104,35 @@ $1_OBJS := $$(patsubst %.c,../wrk/%.o,$$(wildcard $1/*.c)) $$($1_OBJS): | ../wrk/$1 ../wrk/$1: - @mkdir -p $$@ + @$$(call MKDIR,$$@) DEPS += $$($1_OBJS:.o=.d) -endef - -########## +endef # OBJS_template define PROG_template $$(eval $$(call OBJS_template,$1)) -../bin/$1$(PROGEXT): $$($1_OBJS) ../wrk/common/common.a | ../bin +../bin/$1$(EXE_SUFFIX): $$($1_OBJS) ../wrk/common/common.a | ../bin $$(CC) $$(LDFLAGS) -o $$@ $$^ $$(LDLIBS) -$1: ../bin/$1$(PROGEXT) +$1: ../bin/$1$(EXE_SUFFIX) -endef - -########## +endef # PROG_template ../wrk/%.o: %.c @echo $< @$(CC) -c $(CFLAGS) -o $@ $< ../bin: - @mkdir $@ + @$(call MKDIR,$@) $(eval $(call OBJS_template,common)) + ../wrk/common/common.a: $(common_OBJS) $(AR) r $@ $? $(foreach prog,$(PROGS),$(eval $(call PROG_template,$(prog)))) -include $(DEPS) - -else # cmd.exe - -all bin: - msbuild cc65.sln /p:configuration=release /consoleloggerparameters:disableconsolecolor - -mostlyclean: - $(if $(wildcard ../wrk),rmdir /s /q ..\wrk) - -clean: - msbuild cc65.sln /p:configuration=release /consoleloggerparameters:disableconsolecolor /target:$@ - -install avail unavail: - -endif # cmd.exe From 1c73fa0a00074a337a88a6af9a2742f805dd1526 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Thu, 6 Mar 2014 23:42:44 +0100 Subject: [PATCH 57/76] Moved .PHONY below definitions it refers to. I must admit that I don't understand why but obviously it is necessary to place .PHONY below the definition of variables it refers to - although those variables are recursively expanded ones! Not doing so made libsrc/Makefile build only three target libraries. --- libsrc/Makefile | 8 ++++---- src/Makefile | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libsrc/Makefile b/libsrc/Makefile index 24a958972..4cee7838b 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -2,10 +2,6 @@ ifneq ($(shell echo),) CMD_EXE = 1 endif -.PHONY: all mostlyclean clean install lib $(TARGETS) - -.SUFFIXES: - CBMS = c128 \ c16 \ c64 \ @@ -37,6 +33,10 @@ DRVTYPES = emd \ ser \ tgi +.PHONY: all mostlyclean clean install lib $(TARGETS) + +.SUFFIXES: + ifdef CMD_EXE DIRLIST = $(strip $(foreach dir,$1,$(wildcard $(dir)))) MKDIR = mkdir $(subst /,\,$1) diff --git a/src/Makefile b/src/Makefile index 87548628b..45c8f4363 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,10 +2,6 @@ ifneq ($(shell echo),) CMD_EXE = 1 endif -.PHONY: all mostlyclean clean install avail unavail bin $(PROGS) - -.SUFFIXES: - PROGS = ar65 \ ca65 \ cc65 \ @@ -18,6 +14,10 @@ PROGS = ar65 \ sim65 \ sp65 +.PHONY: all mostlyclean clean install avail unavail bin $(PROGS) + +.SUFFIXES: + bindir := $(prefix)/bin datadir := $(if $(prefix),$(prefix)/share/cc65,$(abspath ..)) From b40fe584d846decfcea989f5a800691cc19b8570 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Mon, 6 Jan 2014 15:12:20 +0100 Subject: [PATCH 58/76] fix typo --- libsrc/atari/crt0.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index fb434b5de..771b11d6d 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -100,8 +100,8 @@ start: ; Initialize conio stuff - dey ; Set X to $FF - sty CH + dey ; Set Y to $FF + sty CH ; remove keypress which might be in the input buffer ; Push arguments and call main From 73df73194a55b8cfe215fa3b566043d02eeffde4 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 7 Mar 2014 23:10:22 +0100 Subject: [PATCH 59/76] fix indentation --- libsrc/atari/crt0.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index 771b11d6d..ec41565b5 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -100,8 +100,8 @@ start: ; Initialize conio stuff - dey ; Set Y to $FF - sty CH ; remove keypress which might be in the input buffer + dey ; Set Y to $FF + sty CH ; remove keypress which might be in the input buffer ; Push arguments and call main From 8492a4eb718ac0640c49150489a417acc71579ae Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Sat, 8 Mar 2014 00:20:39 +0100 Subject: [PATCH 60/76] fix typo --- include/c128.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/c128.h b/include/c128.h index 2ca559d49..b1ef88fa3 100644 --- a/include/c128.h +++ b/include/c128.h @@ -129,7 +129,7 @@ extern void c128_reu_emd[]; extern void c128_vdc_emd[]; extern void c128_ptvjoy_joy[]; extern void c128_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */ -extern void c128_1351_mous[]; /* Referred to by mouse_static_stddrv[] */ +extern void c128_1351_mou[]; /* Referred to by mouse_static_stddrv[] */ extern void c128_joy_mou[]; extern void c128_inkwell_mou[]; extern void c128_pot_mou[]; From 80ca7eb4e4b8cc05a571d0e350a0b45cf84cf1ba Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sun, 9 Mar 2014 00:19:57 +0100 Subject: [PATCH 61/76] Create zip file. --- .travis.yml | 3 ++- Makefile | 4 ++-- doc/Makefile | 7 +++++-- libsrc/Makefile | 29 +++++++++++++++++++++-------- src/Makefile | 5 ++++- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ae62cd1c..088ee69aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,9 @@ language: install: - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 script: - - make all doc + - make - make -C src clean all CROSS_COMPILE=i686-w64-mingw32- + - make doc zip after_success: - make -C doc gh-pages env: diff --git a/Makefile b/Makefile index 5db00e7ad..e0530e9f0 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ -.PHONY: all mostlyclean clean install avail unavail bin lib doc +.PHONY: all mostlyclean clean install zip avail unavail bin lib doc .SUFFIXES: -all mostlyclean clean install: +all mostlyclean clean install zip: @$(MAKE) -C src --no-print-directory $@ @$(MAKE) -C libsrc --no-print-directory $@ @$(MAKE) -C doc --no-print-directory $@ diff --git a/doc/Makefile b/doc/Makefile index 02028e66e..207a331f3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -2,7 +2,7 @@ ifneq ($(shell echo),) CMD_EXE = 1 endif -.PHONY: all mostlyclean clean install doc html info gh-pages +.PHONY: all mostlyclean clean install zip doc html info gh-pages .SUFFIXES: @@ -10,7 +10,7 @@ all mostlyclean install: ifdef CMD_EXE -clean doc: +clean zip doc: else # CMD_EXE @@ -26,6 +26,9 @@ GH_PAGES = ../../gh-pages clean: $(RM) -r ../html ../info +zip: + cd .. && zip cc65 html/*.* + doc: html info html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png) diff --git a/libsrc/Makefile b/libsrc/Makefile index 4cee7838b..877a22950 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -33,7 +33,15 @@ DRVTYPES = emd \ ser \ tgi -.PHONY: all mostlyclean clean install lib $(TARGETS) +OUTPUTDIRS = lib \ + $(DRVTYPES) \ + targetutil \ + asminc \ + cfg \ + include \ + $(subst ../,,$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*))) + +.PHONY: all mostlyclean clean install zip lib $(TARGETS) .SUFFIXES: @@ -75,23 +83,28 @@ else # CMD_EXE INSTALL = install -INSTALLDIRS = ../asminc ../cfg ../include \ - $(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*)) \ - ../lib ../targetutil $(addprefix ../,$(DRVTYPES)) - define INSTALL_recipe $(if $(prefix),,$(error variable `prefix' must be set)) -$(INSTALL) -d $(subst ..,$(DESTDIR)$(datadir),$(dir)) -$(INSTALL) -m644 $(dir)/*.* $(subst ..,$(DESTDIR)$(datadir),$(dir)) +$(INSTALL) -d $(DESTDIR)$(datadir)/$(dir) +$(INSTALL) -m644 ../$(dir)/*.* $(DESTDIR)$(datadir)/$(dir) endef # INSTALL_recipe install: - $(foreach dir,$(INSTALLDIRS),$(INSTALL_recipe)) + $(foreach dir,$(OUTPUTDIRS),$(INSTALL_recipe)) endif # CMD_EXE +define ZIP_recipe + +cd .. && zip cc65 $(dir)/*.* + +endef # ZIP_recipe + +zip: + $(foreach dir,$(OUTPUTDIRS),$(ZIP_recipe)) + $(TARGETS): @$(MAKE) --no-print-directory $@ diff --git a/src/Makefile b/src/Makefile index 45c8f4363..17e3bc229 100644 --- a/src/Makefile +++ b/src/Makefile @@ -14,7 +14,7 @@ PROGS = ar65 \ sim65 \ sp65 -.PHONY: all mostlyclean clean install avail unavail bin $(PROGS) +.PHONY: all mostlyclean clean install zip avail unavail bin $(PROGS) .SUFFIXES: @@ -97,6 +97,9 @@ unavail: endif # CMD_EXE +zip: + cd .. && zip cc65 bin/* + define OBJS_template $1_OBJS := $$(patsubst %.c,../wrk/%.o,$$(wildcard $1/*.c)) From 8236b0dd74bbcd65d4420e5d810c4f93e69ccaac Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sun, 9 Mar 2014 01:20:39 +0100 Subject: [PATCH 62/76] Upload zip file. --- .travis.yml | 2 +- Makefile.gh-pages | 21 +++++++++++++++++++++ doc/Makefile | 18 +----------------- libsrc/Makefile | 2 +- src/Makefile | 2 +- 5 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 Makefile.gh-pages diff --git a/.travis.yml b/.travis.yml index 088ee69aa..3a9583e94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ script: - make -C src clean all CROSS_COMPILE=i686-w64-mingw32- - make doc zip after_success: - - make -C doc gh-pages + - make -f Makefile.gh-pages env: global: - secure: "h+hoQdEHGPLNwaqGKmSaM8NBRDLc2X+W05VsnNG2Feq/wPv/AiBjONNlzN7jRf6D6f3aoPXaQ2Lc3bYWdxGvFRCmwiofdxkJI9n5L8HPHLZ2lf37MQsXmGJzoTFOvjPLj73H6HlbI9Ux0El3zO6hvalxiXj6TfoZ41dbhNyvpYk=" diff --git a/Makefile.gh-pages b/Makefile.gh-pages new file mode 100644 index 000000000..573edfe9b --- /dev/null +++ b/Makefile.gh-pages @@ -0,0 +1,21 @@ +.PHONY: all + +.SUFFIXES: + +GH_PAGES = ../gh-pages + +all: + date +%D | zip -z cc65 +ifdef GH_TOKEN + git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES) + cd $(GH_PAGES) && git config user.name "Oliver Schmidt" + cd $(GH_PAGES) && git config user.email "ol.sc@web.de" + cd $(GH_PAGES) && git config push.default simple + cd $(GH_PAGES) && $(RM) -r doc download + cd $(GH_PAGES) && mkdir doc download + cp html/*.* $(GH_PAGES)/doc + cp cc65.zip $(GH_PAGES)/download/cc65-snapshot.zip + cd $(GH_PAGES) && git add -A doc download + cd $(GH_PAGES) && git commit -m "Updated from commit $(TRAVIS_COMMIT)." + cd $(GH_PAGES) && git push +endif diff --git a/doc/Makefile b/doc/Makefile index 207a331f3..159c30021 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -21,13 +21,11 @@ TOC_LEVEL = 0 TOC_LEVEL = 2 -GH_PAGES = ../../gh-pages - clean: $(RM) -r ../html ../info zip: - cd .. && zip cc65 html/*.* + @cd .. && zip cc65 html/*.* doc: html info @@ -47,18 +45,4 @@ info: $(addprefix ../info/,$(SGMLS:.sgml=.info)) ../info/%.info: %.sgml | ../info @cd ../info && linuxdoc -B info ../doc/$< -gh-pages: html -ifdef GH_TOKEN - git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES) - git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.name "Oliver Schmidt" - git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.email "ol.sc@web.de" - git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config push.default simple - $(RM) -r $(GH_PAGES)/doc - mkdir $(GH_PAGES)/doc - cp ../html/* $(GH_PAGES)/doc - git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A doc - -git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git commit -m "Updated doc from commit $(TRAVIS_COMMIT)." - git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git push -endif - endif # CMD_EXE diff --git a/libsrc/Makefile b/libsrc/Makefile index 877a22950..3a355b954 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -98,7 +98,7 @@ endif # CMD_EXE define ZIP_recipe -cd .. && zip cc65 $(dir)/*.* +@cd .. && zip cc65 $(dir)/*.* endef # ZIP_recipe diff --git a/src/Makefile b/src/Makefile index 17e3bc229..81f28dee5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -98,7 +98,7 @@ unavail: endif # CMD_EXE zip: - cd .. && zip cc65 bin/* + @cd .. && zip cc65 bin/* define OBJS_template From efa50b0258ad32087a18c86b2b48dfd0346b69da Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sun, 9 Mar 2014 13:56:32 +0100 Subject: [PATCH 63/76] Several minor adjustments. --- .travis.yml | 2 +- Makefile.gh-pages | 4 ++-- libsrc/Makefile | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a9583e94..e2f64a7b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ install: - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 script: - make - - make -C src clean all CROSS_COMPILE=i686-w64-mingw32- + - make -C src clean bin CROSS_COMPILE=i686-w64-mingw32- - make doc zip after_success: - make -f Makefile.gh-pages diff --git a/Makefile.gh-pages b/Makefile.gh-pages index 573edfe9b..872232666 100644 --- a/Makefile.gh-pages +++ b/Makefile.gh-pages @@ -5,7 +5,7 @@ GH_PAGES = ../gh-pages all: - date +%D | zip -z cc65 + date +%F | zip -z cc65 ifdef GH_TOKEN git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES) cd $(GH_PAGES) && git config user.name "Oliver Schmidt" @@ -14,7 +14,7 @@ ifdef GH_TOKEN cd $(GH_PAGES) && $(RM) -r doc download cd $(GH_PAGES) && mkdir doc download cp html/*.* $(GH_PAGES)/doc - cp cc65.zip $(GH_PAGES)/download/cc65-snapshot.zip + cp cc65.zip $(GH_PAGES)/download/cc65-snapshot-win32.zip cd $(GH_PAGES) && git add -A doc download cd $(GH_PAGES) && git commit -m "Updated from commit $(TRAVIS_COMMIT)." cd $(GH_PAGES) && git push diff --git a/libsrc/Makefile b/libsrc/Makefile index 3a355b954..86eb80b7c 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -33,13 +33,13 @@ DRVTYPES = emd \ ser \ tgi -OUTPUTDIRS = lib \ - $(DRVTYPES) \ - targetutil \ - asminc \ - cfg \ - include \ - $(subst ../,,$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*))) +OUTPUTDIRS := lib \ + $(DRVTYPES) \ + targetutil \ + asminc \ + cfg \ + include \ + $(subst ../,,$(filter-out $(wildcard ../include/*.*),$(wildcard ../include/*))) .PHONY: all mostlyclean clean install zip lib $(TARGETS) From a178c44acb01df32204c9a77f476debdfa9c702f Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sun, 9 Mar 2014 15:17:51 +0100 Subject: [PATCH 64/76] Moved USER_CFLAGS back to re-allow warning option overriding. --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 81f28dee5..0ab43081a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -30,8 +30,8 @@ LD65_CFG = $(datadir)/cfg CC = $(CROSS_COMPILE)gcc AR = $(CROSS_COMPILE)ar -CFLAGS += -MMD -MP -O -I common $(USER_CFLAGS) \ - -Wall -Wextra -Wno-char-subscripts \ +CFLAGS += -MMD -MP -O -I common \ + -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) \ -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \ -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG) From f12fbc4a3b4ff7a30cea4b484aa6f8ac77763b2b Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sun, 9 Mar 2014 17:40:51 +0100 Subject: [PATCH 65/76] Dropped VER_PATCH (and VER_RC) and added build date. --- src/common/version.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/common/version.c b/src/common/version.c index c935d108b..51921d190 100644 --- a/src/common/version.c +++ b/src/common/version.c @@ -46,9 +46,6 @@ #define VER_MAJOR 2U #define VER_MINOR 14U -#define VER_PATCH 0U -#define VER_RC 0U - @@ -61,12 +58,8 @@ const char* GetVersionAsString (void) /* Returns the version number as a string in a static buffer */ { - static char Buf[20]; -#if defined(VER_RC) && (VER_RC > 0U) - xsnprintf (Buf, sizeof (Buf), "%u.%u.%u-rc%u", VER_MAJOR, VER_MINOR, VER_PATCH, VER_RC); -#else - xsnprintf (Buf, sizeof (Buf), "%u.%u.%u", VER_MAJOR, VER_MINOR, VER_PATCH); -#endif + static char Buf[40]; + xsnprintf (Buf, sizeof (Buf), "%u.%u - %s", VER_MAJOR, VER_MINOR, __DATE__); return Buf; } @@ -75,5 +68,5 @@ const char* GetVersionAsString (void) unsigned GetVersionAsNumber (void) /* Returns the version number as a combined unsigned for use in a #define */ { - return ((VER_MAJOR * 0x100) + (VER_MINOR * 0x10) + VER_PATCH); + return ((VER_MAJOR * 0x100) + (VER_MINOR * 0x10)); } From e227a07c8fb05200275bdfdce1b8cdecfcde3105 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 10 Mar 2014 19:03:01 +0100 Subject: [PATCH 66/76] Adjusted doc to recent drop of VER_PATCH. --- doc/ca65.sgml | 4 ++-- doc/cc65.sgml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/ca65.sgml b/doc/ca65.sgml index 4d4b73d38..364790b52 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -1263,14 +1263,14 @@ writable. Reading this pseudo variable will give the assembler version according to the following formula: - VER_MAJOR*$100 + VER_MINOR*$10 + VER_PATCH + VER_MAJOR*$100 + VER_MINOR*$10 It may be used to encode the assembler version or check the assembler for special features not available with older versions. Example: - Version 2.11.1 of the assembler will return $2B1 as numerical constant when + Version 2.14 of the assembler will return $2E0 as numerical constant when reading the pseudo variable __CC65__ This macro is always defined. Its value is the version number of the - compiler in hex. For example, version 2.10.1 of the compiler has this macro - defined as __CC65_STD__ From 2cc4ff465f5479e8893fab46ea77bc2334c846e1 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sat, 15 Mar 2014 14:48:20 +0100 Subject: [PATCH 67/76] Updated URL. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54e6028a6..33101548b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[documentation](http://oliverschmidt.github.io/cc65/doc) +[documentation](http://cc65.github.io/cc65/doc) -[![build status](https://travis-ci.org/oliverschmidt/cc65.png)](https://travis-ci.org/oliverschmidt/cc65/builds) +[![build status](https://travis-ci.org/cc65/cc65.png)](https://travis-ci.org/cc65/cc65/builds) cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several From a0216473d51df38e8df31be13d7d7a131d98fe2d Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sat, 15 Mar 2014 14:53:33 +0100 Subject: [PATCH 68/76] Updated URL. --- Makefile.gh-pages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.gh-pages b/Makefile.gh-pages index 872232666..f90a34c33 100644 --- a/Makefile.gh-pages +++ b/Makefile.gh-pages @@ -7,7 +7,7 @@ GH_PAGES = ../gh-pages all: date +%F | zip -z cc65 ifdef GH_TOKEN - git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES) + git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/cc65/cc65.git $(GH_PAGES) cd $(GH_PAGES) && git config user.name "Oliver Schmidt" cd $(GH_PAGES) && git config user.email "ol.sc@web.de" cd $(GH_PAGES) && git config push.default simple From 9da0e8e600bd9173ca263b6a1a06f733994e4d63 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sat, 15 Mar 2014 18:09:55 +0100 Subject: [PATCH 69/76] Moved LOADER.SYSTEM description. The LOADER.SYSTEM description is now available in the cc65 Wiki (https://github.com/cc65/cc65/wiki/LOADER.SYSTEM). --- libsrc/apple2/targetutil/loader.txt | 80 ----------------------------- 1 file changed, 80 deletions(-) delete mode 100644 libsrc/apple2/targetutil/loader.txt diff --git a/libsrc/apple2/targetutil/loader.txt b/libsrc/apple2/targetutil/loader.txt deleted file mode 100644 index d3ec87266..000000000 --- a/libsrc/apple2/targetutil/loader.txt +++ /dev/null @@ -1,80 +0,0 @@ -LOADER.SYSTEM - an Apple][ ProDOS 8 loader for cc65 programs (Oliver Schmidt) -============================================================================= - - -Background ----------- - -Apple][ ProDOS 8 system programs (filetype SYS) are always loaded into memory -starting at location $2000. This poses the problem of how to make efficient -use of the memory in the range $0800-$2000. The usual approach of relocation -has two downsides: -- Relocating e.g. 30 kB from $2000-$9800 to $0800-$8000 takes a considerable - amount of time. -- Really large programs just don't fit into memory when loaded starting at - location $2000. - -The relocation can be eliminated by loading the major part(s) of the program -from disk right to the final location by a rather small system program. - -LOADER.SYSTEM is such a small program. In fact it's so small that it fits into -a single block in the ProDOS 8 file system making it a so-called seedling file, -which are loaded really fast. LOADER.SYSTEM can load cc65 programs into memory -anywhere in the range $0800-$BB00 (44,75 kB). - - -Usage ------ - -Link the cc65 program to the start address $0803 (or any other address) and -store it as binary program (filetype BIN). This is in fact no different from -a binary program to be run by BASIC.SYSTEM's BRUN command in the usual way. - -If however the cc65 program isn't run by BASIC.SYSTEM but is rather run by -LOADER.SYSTEM then it behaves like a system program which means: -- It uses memory up to the ProDOS 8 system global page located at $BF00. -- It supports the ProDOS 8 startup file mechanism (mapped to argv[1]). -- It quits to the ProDOS 8 dispatcher. - -Obviously LOADER.SYSTEM has to be told which cc65 program to run. Unfortunately -the ProDOS 8 dispatcher has no notion of system program parameters so the usual -approach would have been to make LOADER.SYSTEM bring up yet another menu to -select the cc65 program to run. - -But to allow to select the cc65 program directly from the ProDOS 8 dispatcher -anyway LOADER.SYSTEM detects the path to the cc65 program from its own path by -just removing the '.SYSTEM' from its name. So if you want to run the cc65 -program MYPROGRAM you'll need a copy of LOADER.SYSTEM in the same directory -being renamed to MYPROGRAM.SYSTEM. - -This means you will end up with a copy of LOADER.SYSTEM for every cc65 program -to be run by it. But as LOADER.SYSTEM is a ProDOS 8 seedling file using up only -a single block in the ProDOS 8 file system this should be no issue. - - -Build ------ - -In case you want to build 'loader.system' from the source code yourself you can -do so using the following commands: - -ca65 loader.s -ld65 -C loader.cfg -o loader.system loader.o - - -Installation ------------- - -The file 'loader.system' as generated by the cc65 linker with the command above -does NOT include the 4-byte address/length header that is generated for Apple][ -programs by default. This is because ProDOS 8 system programs are always loaded -into memory starting at location $2000. - -The recommended way to transfer 'loader.system' from your native file system to -a ProDOS 8 file system disk image is to use AppleCommander which is available at -http://applecommander.sourceforge.net/ - -If you want to put the file 'loader.system' onto a disk image 'mydisk.dsk' as -system program MYPROGRAM.SYSTEM you can do so using the following command: - -java -jar ac.jar -p mydisk.dsk MYPROGRAM.SYSTEM sys < loader.system From 3d8179df3057a56624e3b29ebfd14dcab042b788 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sat, 15 Mar 2014 18:53:30 +0100 Subject: [PATCH 70/76] Not splitting the docs anymore requires link adjustment. --- doc/apple2.sgml | 12 ++++++------ doc/apple2enh.sgml | 12 ++++++------ doc/grc65.sgml | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/apple2.sgml b/doc/apple2.sgml index ecab5c32b..531553778 100644 --- a/doc/apple2.sgml +++ b/doc/apple2.sgml @@ -45,7 +45,7 @@ containing DOS 3.3 as well as ProDOS 8. For ProDOS 8 system programs the load address is fixed to $2000 so there is no need for a header. Thus the linker configuration - for those programs + for those programs omits the DOS 3.3 header. The right AppleCommander option to put system files without a header on a ProDOS 8 disk image is . +on the chosen . @@ -231,7 +231,7 @@ range. The easiest (and for really large programs in fact the only) way to have a cc65 program use the memory from $800 to $2000 is to link it as binary (as opposed to system) program using the linker configuration - with start address + with start address $800 and load it with Heap

If the cc65 program can be successfully linked as system program using the linker -configuration but +configuration but uses the heap either explicitly or implicitly (i.e. by loading a driver) then the memory from $800 to $2000 can be added to the heap by calling . has the single + The function has the single parameter . so that for example slot 6 drive 2 is mapped to returns + The function returns the correct sector count for all ProDOS 8 disks. However for any non-ProDOS 8 disk it simply always returns 280 (which is only correct for a 140 KB disk). This condition is indicated by the for those programs + for those programs omits the DOS 3.3 header. The right AppleCommander option to put system files without a header on a ProDOS 8 disk image is . +on the chosen . @@ -231,7 +231,7 @@ range. The easiest (and for really large programs in fact the only) way to have a cc65 program use the memory from $800 to $2000 is to link it as binary (as opposed to system) program using the linker configuration - with start address + with start address $800 and load it with Heap

If the cc65 program can be successfully linked as system program using the linker -configuration but +configuration but uses the heap either explicitly or implicitly (i.e. by loading a driver) then the memory from $800 to $2000 can be added to the heap by calling . has the single + The function has the single parameter . so that for example slot 6 drive 2 is mapped to returns + The function returns the correct sector count for all ProDOS 8 disks. However for any non-ProDOS 8 disk it simply always returns 280 (which is only correct for a 140 KB disk). This condition is indicated by the . +url="intro.html#ss6.5">. Each project consists of four parts, two are provided by cc65. Those parts are: From c0b5be99445a50f83f2282ef2dbd3fe08912eb30 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sat, 15 Mar 2014 19:01:46 +0100 Subject: [PATCH 71/76] Reflect the fact that LOADER.SYSTEM is delivered as 'targetutil'. --- doc/apple2.sgml | 5 ++--- doc/apple2enh.sgml | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/apple2.sgml b/doc/apple2.sgml index 531553778..940496a41 100644 --- a/doc/apple2.sgml +++ b/doc/apple2.sgml @@ -232,9 +232,8 @@ The easiest (and for really large programs in fact the only) way to have a cc65 program use the memory from $800 to $2000 is to link it as binary (as opposed to system) program using the linker configuration with start address -$800 and load it with with start address -$800 and load it with Date: Sat, 15 Mar 2014 16:29:13 -0400 Subject: [PATCH 72/76] Added code that disables C128 BASIC's sprite-motion interrupt-handler. That lets the mouse drivers control a sprite directly through the VIC's registers. --- libsrc/c128/mou/c128-1351.s | 21 ++++++++++++++++++--- libsrc/c128/mou/c128-joy.s | 19 +++++++++++++++++-- libsrc/c128/mou/c128-pot.s | 23 +++++++++++++++++++---- 3 files changed, 54 insertions(+), 9 deletions(-) diff --git a/libsrc/c128/mou/c128-1351.s b/libsrc/c128/mou/c128-1351.s index b4d950cda..e1a8a5c8a 100644 --- a/libsrc/c128/mou/c128-1351.s +++ b/libsrc/c128/mou/c128-1351.s @@ -2,7 +2,8 @@ ; Driver for the 1351 proportional mouse. Parts of the code are from ; the Commodore 1351 mouse users guide. ; -; Ullrich von Bassewitz, 2003-12-29, 2009-09-26 +; 2009-09-26, Ullrich von Bassewitz +; 2014-03-15, Greg King ; .include "zeropage.inc" @@ -83,6 +84,8 @@ YMax: .res 2 ; Y2 value of bounding box OldValue: .res 1 ; Temp for MoveCheck routine NewValue: .res 1 ; Temp for MoveCheck routine +INIT_save: .res 1 + .rodata ; Default values for above variables @@ -107,6 +110,14 @@ NewValue: .res 1 ; Temp for MoveCheck routine INSTALL: +; Disable the BASIC interpreter's interrupt-driven sprite-motion code. +; That allows direct access to the VIC-IIe's sprite registers. + + lda INIT_STATUS + sta INIT_save + lda #%11000000 + sta INIT_STATUS + ; Initialize variables. Just copy the default stuff over ldx #.sizeof(DefVars)-1 @@ -133,13 +144,17 @@ INSTALL: ldx #$00 txa - rts ; Run into UNINSTALL instead + rts ;---------------------------------------------------------------------------- ; UNINSTALL routine. Is called before the driver is removed from memory. ; No return code required (the driver is removed from memory on return). -UNINSTALL = HIDE ; Hide cursor on exit +UNINSTALL: + jsr HIDE ; Hide cursor on exit + lda INIT_save + sta INIT_STATUS + rts ;---------------------------------------------------------------------------- ; HIDE routine. Is called to hide the mouse pointer. The mouse kernel manages diff --git a/libsrc/c128/mou/c128-joy.s b/libsrc/c128/mou/c128-joy.s index 2bbb4c79b..29689305b 100644 --- a/libsrc/c128/mou/c128-joy.s +++ b/libsrc/c128/mou/c128-joy.s @@ -1,7 +1,8 @@ ; ; Driver for a "joystick mouse". ; -; Ullrich von Bassewitz, 2004-04-05, 2009-09-26 +; 2009-09-26, Ullrich von Bassewitz +; 2014-03-15, Greg King ; .include "zeropage.inc" @@ -85,6 +86,8 @@ XMax: .res 2 ; X2 value of bounding box YMax: .res 2 ; Y2 value of bounding box Buttons: .res 1 ; Button mask +INIT_save: .res 1 + ; Temporary value used in the int handler Temp: .res 1 @@ -113,6 +116,14 @@ Temp: .res 1 INSTALL: +; Disable the BASIC interpreter's interrupt-driven sprite-motion code. +; That allows direct access to the VIC-IIe's sprite registers. + + lda INIT_STATUS + sta INIT_save + lda #%11000000 + sta INIT_STATUS + ; Initialize variables. Just copy the default stuff over ldx #.sizeof(DefVars)-1 @@ -145,7 +156,11 @@ INSTALL: ; UNINSTALL routine. Is called before the driver is removed from memory. ; No return code required (the driver is removed from memory on return). -UNINSTALL = HIDE ; Hide cursor on exit +UNINSTALL: + jsr HIDE ; Hide cursor on exit + lda INIT_save + sta INIT_STATUS + rts ;---------------------------------------------------------------------------- ; HIDE routine. Is called to hide the mouse pointer. The mouse kernel manages diff --git a/libsrc/c128/mou/c128-pot.s b/libsrc/c128/mou/c128-pot.s index 2568445f1..07058bf79 100644 --- a/libsrc/c128/mou/c128-pot.s +++ b/libsrc/c128/mou/c128-pot.s @@ -1,8 +1,9 @@ ; -; Driver for a potentiometer "mouse" e.g. Koala Pad +; Driver for a potentiometer "mouse", e.g. Koala Pad ; -; Ullrich von Bassewitz, 2004-03-29, 2009-09-26 -; Stefan Haubenthal, 2006-08-20 +; 2006-08-20, Stefan Haubenthal +; 2009-09-26, Ullrich von Bassewitz +; 2014-03-15, Greg King ; .include "zeropage.inc" @@ -82,6 +83,8 @@ XMax: .res 2 ; X2 value of bounding box YMax: .res 2 ; Y2 value of bounding box Buttons: .res 1 ; Button mask +INIT_save: .res 1 + ; Temporary value used in the int handler Temp: .res 1 @@ -110,6 +113,14 @@ Temp: .res 1 INSTALL: +; Disable the BASIC interpreter's interrupt-driven sprite-motion code. +; That allows direct access to the VIC-IIe's sprite registers. + + lda INIT_STATUS + sta INIT_save + lda #%11000000 + sta INIT_STATUS + ; Initialize variables. Just copy the default stuff over ldx #.sizeof(DefVars)-1 @@ -142,7 +153,11 @@ INSTALL: ; UNINSTALL routine. Is called before the driver is removed from memory. ; No return code required (the driver is removed from memory on return). -UNINSTALL = HIDE ; Hide cursor on exit +UNINSTALL: + jsr HIDE ; Hide cursor on exit + lda INIT_save + sta INIT_STATUS + rts ;---------------------------------------------------------------------------- ; HIDE routine. Is called to hide the mouse pointer. The mouse kernel manages From 1d6000213caac2286367392e45af3229b4378e79 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sun, 16 Mar 2014 21:31:00 +0100 Subject: [PATCH 73/76] Removed references to $TRAVIS from Makefiles. After all it seems much cleaner to explicitly control the behaviour from the .travis.yml file than to behave differently "under the hood" when detecting a Travis CI build. --- .travis.yml | 6 ++++-- libsrc/Makefile | 4 ++-- src/Makefile | 11 +++++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2f64a7b7..eae13f70e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,10 @@ language: install: - sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 script: - - make - - make -C src clean bin CROSS_COMPILE=i686-w64-mingw32- + - make bin USER_CFLAGS=-Werror + - make lib QUIET=1 + - make -C src clean + - make bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- - make doc zip after_success: - make -f Makefile.gh-pages diff --git a/libsrc/Makefile b/libsrc/Makefile index 86eb80b7c..f7afd498f 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -253,14 +253,14 @@ export CC65_HOME := $(abspath ..) define ASSEMBLE_recipe -$(if $(TRAVIS),,@echo $(TARGET) - $<) +$(if $(QUIET),,@echo $(TARGET) - $<) @$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $< endef # ASSEMBLE_recipe define COMPILE_recipe -$(if $(TRAVIS),,@echo $(TARGET) - $<) +$(if $(QUIET),,@echo $(TARGET) - $<) @$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $< @$(CA65) -t $(TARGET) -o $@ $(@:.o=.s) diff --git a/src/Makefile b/src/Makefile index 0ab43081a..17754190c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -30,13 +30,20 @@ LD65_CFG = $(datadir)/cfg CC = $(CROSS_COMPILE)gcc AR = $(CROSS_COMPILE)ar +ifdef CROSS_COMPILE + $(info CC: $(CC)) + $(info AR: $(AR)) +endif + +ifdef USER_CFLAGS + $(info USER_CFLAGS: $(USER_CFLAGS)) +endif + CFLAGS += -MMD -MP -O -I common \ -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) \ -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \ -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG) -CFLAGS += $(if $(TRAVIS),-Werror) - LDLIBS += -lm ifdef CMD_EXE From 3ef184bdd618bf9f8659bafe6ea3869aded07b01 Mon Sep 17 00:00:00 2001 From: Greg King Date: Tue, 18 Mar 2014 02:41:57 -0400 Subject: [PATCH 74/76] Corrected the default upper limits of some mouse drivers' bounding box. The upper limits need to be one less than the screen sizes because the minimum co-ordinate is zero instead of one. --- libsrc/c128/mou/c128-1351.s | 6 +++--- libsrc/c128/mou/c128-joy.s | 6 +++--- libsrc/c128/mou/c128-pot.s | 6 +++--- libsrc/c64/mou/c64-joy.s | 6 +++--- libsrc/c64/mou/c64-pot.s | 11 ++++++----- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/libsrc/c128/mou/c128-1351.s b/libsrc/c128/mou/c128-1351.s index e1a8a5c8a..8aec3b7b7 100644 --- a/libsrc/c128/mou/c128-1351.s +++ b/libsrc/c128/mou/c128-1351.s @@ -3,7 +3,7 @@ ; the Commodore 1351 mouse users guide. ; ; 2009-09-26, Ullrich von Bassewitz -; 2014-03-15, Greg King +; 2014-03-17, Greg King ; .include "zeropage.inc" @@ -97,8 +97,8 @@ INIT_save: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .endproc .code diff --git a/libsrc/c128/mou/c128-joy.s b/libsrc/c128/mou/c128-joy.s index 29689305b..be0cf227b 100644 --- a/libsrc/c128/mou/c128-joy.s +++ b/libsrc/c128/mou/c128-joy.s @@ -2,7 +2,7 @@ ; Driver for a "joystick mouse". ; ; 2009-09-26, Ullrich von Bassewitz -; 2014-03-15, Greg King +; 2014-03-17, Greg King ; .include "zeropage.inc" @@ -102,8 +102,8 @@ Temp: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .byte 0 ; Buttons .endproc diff --git a/libsrc/c128/mou/c128-pot.s b/libsrc/c128/mou/c128-pot.s index 07058bf79..4e549cc6d 100644 --- a/libsrc/c128/mou/c128-pot.s +++ b/libsrc/c128/mou/c128-pot.s @@ -3,7 +3,7 @@ ; ; 2006-08-20, Stefan Haubenthal ; 2009-09-26, Ullrich von Bassewitz -; 2014-03-15, Greg King +; 2014-03-17, Greg King ; .include "zeropage.inc" @@ -99,8 +99,8 @@ Temp: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .byte 0 ; Buttons .endproc diff --git a/libsrc/c64/mou/c64-joy.s b/libsrc/c64/mou/c64-joy.s index 57e5bebf1..431f4d29d 100644 --- a/libsrc/c64/mou/c64-joy.s +++ b/libsrc/c64/mou/c64-joy.s @@ -2,7 +2,7 @@ ; Driver for a "joystick mouse". ; ; Ullrich von Bassewitz, 2004-03-29, 2009-09-26 -; 2010-02-08, Greg King +; 2014-03-17, Greg King ; ; The driver prevents the keyboard from interfering by changing the ; keyboard's output port into an input port while the driver reads its @@ -118,8 +118,8 @@ Temp: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .byte 0 ; Buttons .endproc diff --git a/libsrc/c64/mou/c64-pot.s b/libsrc/c64/mou/c64-pot.s index d57feeeae..17308f6ac 100644 --- a/libsrc/c64/mou/c64-pot.s +++ b/libsrc/c64/mou/c64-pot.s @@ -1,8 +1,9 @@ ; -; Driver for a potentiometer "mouse" e.g. Koala Pad +; Driver for a potentiometer "mouse", e.g. Koala Pad ; -; Ullrich von Bassewitz, 2004-03-29, 2009-09-26 -; Stefan Haubenthal, 2006-08-20 +; 2006-08-20, Stefan Haubenthal +; 2009-09-26, Ullrich von Bassewitz +; 2014-03-17, Greg King ; .include "zeropage.inc" @@ -96,8 +97,8 @@ Temp: .res 1 .word SCREEN_WIDTH/2 ; XPos .word 0 ; XMin .word 0 ; YMin - .word SCREEN_WIDTH ; XMax - .word SCREEN_HEIGHT ; YMax + .word SCREEN_WIDTH - 1 ; XMax + .word SCREEN_HEIGHT - 1 ; YMax .byte 0 ; Buttons .endproc From 22c63e743a60c040d75902a0779f6d5f2862c9de Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Tue, 18 Mar 2014 22:40:30 +0100 Subject: [PATCH 75/76] Replaced date with Git hash. --- Makefile.gh-pages | 2 +- src/Makefile | 10 +++++++++- src/common/version.c | 12 +++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Makefile.gh-pages b/Makefile.gh-pages index f90a34c33..4c6734ca6 100644 --- a/Makefile.gh-pages +++ b/Makefile.gh-pages @@ -5,7 +5,7 @@ GH_PAGES = ../gh-pages all: - date +%F | zip -z cc65 + echo $(TRAVIS_COMMIT) | zip -z cc65 ifdef GH_TOKEN git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/cc65/cc65.git $(GH_PAGES) cd $(GH_PAGES) && git config user.name "Oliver Schmidt" diff --git a/src/Makefile b/src/Makefile index 17754190c..2c2267ae7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,9 +39,17 @@ ifdef USER_CFLAGS $(info USER_CFLAGS: $(USER_CFLAGS)) endif +ifndef GIT_SHA + GIT_SHA := $(if $(wildcard ../.git),$(shell git rev-parse --short HEAD)) + ifneq ($(words $(GIT_SHA)),1) + GIT_SHA := N/A + endif +endif +$(info GIT_SHA: $(GIT_SHA)) + CFLAGS += -MMD -MP -O -I common \ -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) \ - -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \ + -DGIT_SHA=$(GIT_SHA) -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \ -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG) LDLIBS += -lm diff --git a/src/common/version.c b/src/common/version.c index 51921d190..d2fcf4f40 100644 --- a/src/common/version.c +++ b/src/common/version.c @@ -33,8 +33,10 @@ -#include "version.h" +/* common */ #include "xsprintf.h" +#include "searchpath.h" +#include "version.h" @@ -58,8 +60,12 @@ const char* GetVersionAsString (void) /* Returns the version number as a string in a static buffer */ { - static char Buf[40]; - xsnprintf (Buf, sizeof (Buf), "%u.%u - %s", VER_MAJOR, VER_MINOR, __DATE__); + static char Buf[60]; +#if defined(GIT_SHA) + xsnprintf (Buf, sizeof (Buf), "%u.%u - Git %s", VER_MAJOR, VER_MINOR, STRINGIZE (GIT_SHA)); +#else + xsnprintf (Buf, sizeof (Buf), "%u.%u", VER_MAJOR, VER_MINOR); +#endif return Buf; } From 100ecb0a4501390c39687e205d940270492579ac Mon Sep 17 00:00:00 2001 From: Karri Kaksonen Date: Wed, 19 Mar 2014 11:32:44 +0200 Subject: [PATCH 76/76] Use LOWCODE segment --- cfg/lynx-bll.cfg | 2 +- cfg/lynx-coll.cfg | 2 +- cfg/lynx-uploader.cfg | 2 +- cfg/lynx.cfg | 2 +- libsrc/lynx/defdir.s | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cfg/lynx-bll.cfg b/cfg/lynx-bll.cfg index 3d6cf19aa..21967752f 100644 --- a/cfg/lynx-bll.cfg +++ b/cfg/lynx-bll.cfg @@ -12,7 +12,7 @@ MEMORY { SEGMENTS { BLLHDR: load = HEADER, type = ro; STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; INIT: load = RAM, type = ro, define = yes, optional = yes; CODE: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro, define = yes; diff --git a/cfg/lynx-coll.cfg b/cfg/lynx-coll.cfg index e7a220fb3..b7fd787e7 100644 --- a/cfg/lynx-coll.cfg +++ b/cfg/lynx-coll.cfg @@ -18,7 +18,7 @@ SEGMENTS { BOOTLDR: load = BOOT, type = ro; DIRECTORY: load = DIR, type = ro; STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; INIT: load = RAM, type = ro, define = yes, optional = yes; CODE: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro, define = yes; diff --git a/cfg/lynx-uploader.cfg b/cfg/lynx-uploader.cfg index 4a1e87bee..740a18b0a 100644 --- a/cfg/lynx-uploader.cfg +++ b/cfg/lynx-uploader.cfg @@ -20,7 +20,7 @@ SEGMENTS { BOOTLDR: load = BOOT, type = ro; DIRECTORY:load = DIR, type = ro; STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; INIT: load = RAM, type = ro, define = yes, optional = yes; CODE: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro, define = yes; diff --git a/cfg/lynx.cfg b/cfg/lynx.cfg index 77345bf49..2c9e76207 100644 --- a/cfg/lynx.cfg +++ b/cfg/lynx.cfg @@ -18,7 +18,7 @@ SEGMENTS { BOOTLDR: load = BOOT, type = ro; DIRECTORY: load = DIR, type = ro; STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; + LOWCODE: load = RAM, type = ro, define = yes, optional = yes; INIT: load = RAM, type = ro, define = yes, optional = yes; CODE: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro, define = yes; diff --git a/libsrc/lynx/defdir.s b/libsrc/lynx/defdir.s index 5ab61ac14..08358563b 100644 --- a/libsrc/lynx/defdir.s +++ b/libsrc/lynx/defdir.s @@ -7,7 +7,7 @@ .import __STARTOFDIRECTORY__ .import __RAM_START__ .import __CODE_SIZE__,__DATA_SIZE__,__RODATA_SIZE__ - .import __STARTUP_SIZE__,__INIT_SIZE__ + .import __STARTUP_SIZE__,__INIT_SIZE__,__LOWCODE_SIZE__ .import __BLOCKSIZE__ .export __DEFDIR__: absolute = 1 @@ -21,7 +21,7 @@ off0=__STARTOFDIRECTORY__+(__DIRECTORY_END__-__DIRECTORY_START__) blocka=off0/__BLOCKSIZE__ ; Entry 0 - first executable block0=off0/__BLOCKSIZE__ -len0=__STARTUP_SIZE__+__INIT_SIZE__+__CODE_SIZE__+__DATA_SIZE__+__RODATA_SIZE__ +len0=__STARTUP_SIZE__+__INIT_SIZE__+__CODE_SIZE__+__DATA_SIZE__+__RODATA_SIZE__+__LOWCODE_SIZE__ .byte