From cf71beb7965c523e0654a93b982a79b29e769398 Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Wed, 7 Feb 2024 20:45:55 +0100 Subject: [PATCH 1/7] 1.) Some case corrections --- source/ide/ide_methods.bas | 10 +++++----- source/qb64pe.bas | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 09b6814c7..eb4b4ab37 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -5959,16 +5959,16 @@ FUNCTION ide2 (ignore) END IF IF menu$(m, s) = "#Start F5" THEN - _KeyClear - Do: _Limit 15: Loop Until _KeyHit = 0 'wait for user to remove finger from F5 key before running + _KEYCLEAR + DO: _LIMIT 15: LOOP UNTIL _KEYHIT = 0 'wait for user to remove finger from F5 key before running PCOPY 3, 0: SCREEN , , 3, 0 startPaused = 0 GOTO idemrun END IF IF menu$(m, s) = "Run #Only (No EXE)" THEN - _KeyClear - Do: _Limit 15: Loop Until _KeyHit = 0 'wait for user to remove finger from F5 key before running + _KEYCLEAR + DO: _LIMIT 15: LOOP UNTIL _KEYHIT = 0 'wait for user to remove finger from F5 key before running PCOPY 3, 0: SCREEN , , 3, 0 NoExeSaved = -1 startPaused = 0 @@ -6403,7 +6403,7 @@ FUNCTION ide2 (ignore) PCOPY 3, 0: SCREEN , , 3, 0 END IF '"Y" END IF 'unsaved - IF UseGuiDialogs Then + IF UseGuiDialogs THEN r$ = OpenFile$ (IdeOpenFile$) 'for new dialog file open routine. ELSE r$ = idefiledialog$("", 1) 'for old dialog file open routine. diff --git a/source/qb64pe.bas b/source/qb64pe.bas index 1ea88091d..d4a9c5313 100644 --- a/source/qb64pe.bas +++ b/source/qb64pe.bas @@ -2623,7 +2623,7 @@ DO IF inclevel = 0 THEN IF idemode THEN p$ = idepath$ + pathsep$ ELSE p$ = getfilepath$(sourcefile$) ELSE - p$ = getfilepath$(incname(inclevel)) + p$ = getfilepath$(incname$(inclevel)) END IF f$ = p$ + a$ END IF @@ -3413,8 +3413,8 @@ DO IF NOT _FILEEXISTS(MidiSoundFont$) THEN ' Just try to concatenate the path with the source or include path and check if we are able to find the file - IF inclevel > 0 AND _FILEEXISTS(getfilepath(incname(inclevel)) + MidiSoundFont$) THEN - MidiSoundFont$ = getfilepath(incname(inclevel)) + MidiSoundFont$ + IF inclevel > 0 AND _FILEEXISTS(getfilepath(incname$(inclevel)) + MidiSoundFont$) THEN + MidiSoundFont$ = getfilepath(incname$(inclevel)) + MidiSoundFont$ ELSEIF _FILEEXISTS(FixDirectoryName(path.source$) + MidiSoundFont$) THEN MidiSoundFont$ = FixDirectoryName(path.source$) + MidiSoundFont$ ELSEIF _FILEEXISTS(FixDirectoryName(idepath$) + MidiSoundFont$) THEN @@ -4403,7 +4403,7 @@ DO ' a740g: Fallback to source path IF inclevel > 0 THEN - libpath$ = getfilepath(incname(inclevel)) + og_libpath$ + libpath$ = getfilepath(incname$(inclevel)) + og_libpath$ ELSEIF NoIDEMode THEN libpath$ = FixDirectoryName(path.source$) + og_libpath$ ELSE @@ -4477,7 +4477,7 @@ DO ' a740g: Fallback to source path IF inclevel > 0 THEN - libpath$ = getfilepath(incname(inclevel)) + og_libpath$ + libpath$ = getfilepath(incname$(inclevel)) + og_libpath$ ELSEIF NoIDEMode THEN libpath$ = FixDirectoryName(path.source$) + og_libpath$ ELSE @@ -11381,7 +11381,7 @@ DO IF inclevel = 0 THEN IF idemode THEN p$ = idepath$ + pathsep$ ELSE p$ = getfilepath$(sourcefile$) ELSE - p$ = getfilepath$(incname(inclevel)) + p$ = getfilepath$(incname$(inclevel)) END IF f$ = p$ + a$ END IF From a7de88dfeed95f4c0459f483cfee3305dc51fb46 Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Wed, 7 Feb 2024 20:53:53 +0100 Subject: [PATCH 2/7] 2.) Steve's fixes - changes to Open/Save dialogs suggested by Steve to avoid adding a second extension --- source/ide/ide_methods.bas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index eb4b4ab37..da51a0db0 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -20317,7 +20317,7 @@ FUNCTION SaveFile$ (IdeOpenFile AS STRING) IF RIGHT$(Default_StartDir$, 1) <> idepathsep$ THEN Default_StartDir$ = Default_StartDir$ + idepathsep$ END IF - f$ = _SAVEFILEDIALOG$("Save Source File", Default_StartDir$ + IdeOpenFile, "*.bas|*.BAS|*.Bas", "QB64-PE BAS File") + f$ = _SAVEFILEDIALOG$("Save Source File", Default_StartDir$ + IdeOpenFile, "*.bas|*.BAS|*.Bas|*.bi|*.BI|*.Bi|*.bm|*.BM|*.Bm", "QB64(PE) Source Files") IF f$ = "" THEN SaveFile$ = "C" EXIT FUNCTION 'someone canceled the input. @@ -20353,7 +20353,7 @@ FUNCTION OpenFile$ (IdeOpenFile AS STRING) 'load routine copied/pasted from the END IF ideopenloop: - IF IdeOpenFile = "" THEN f$ = _OPENFILEDIALOG$("Open Source File", Default_StartDir$, "*.bas|*.BAS|*.Bas|*.bi|*.BI|*.Bi|*.bm|*.BM|*.Bm", "QB64-PE Source Files", 0) ELSE f$ = IdeOpenFile + IF IdeOpenFile = "" THEN f$ = _OPENFILEDIALOG$("Open Source File", Default_StartDir$, "*.bas|*.BAS|*.Bas|*.bi|*.BI|*.Bi|*.bm|*.BM|*.Bm", "QB64(PE) Source Files", 0) ELSE f$ = IdeOpenFile IF f$ = "" THEN OpenFile$ = "C": EXIT FUNCTION path$ = ideztakepath$(f$) From 21b9ad99f7b0f9e99844f0e9300d6e8d070d9816 Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Wed, 7 Feb 2024 21:04:39 +0100 Subject: [PATCH 3/7] 3.) Refactor external dependencies checks - adds filetype IDs - now includes DECLARE LIBRARY files - allows immediate recompile after error whitout the need to make a "fake" change to the program first --- source/ide/ide_methods.bas | 73 ++++++++++++++++++++++---------------- source/qb64pe.bas | 11 +++--- 2 files changed, 49 insertions(+), 35 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index da51a0db0..0c67d42df 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -1369,6 +1369,7 @@ FUNCTION ide2 (ignore) change = 0 waitforinput: + IF startPausedPending > 0 THEN startPausedPending = 0: GOTO idemrunspecial IF startPausedPending THEN GOTO idemrun IF idecurrentlinelayouti THEN IF idecy <> idecurrentlinelayouti THEN @@ -1735,42 +1736,54 @@ FUNCTION ide2 (ignore) PCOPY 3, 0: SCREEN , , 3, 0 'run program - IF ready <> 0 AND idechangemade = 0 THEN + IF (ready <> 0 AND idechangemade = 0) OR (statusarealink = 2) THEN LOCATE , , 0 clearStatusWindow 0 '=== BEGIN: checking external dependencies === - edFF = FREEFILE: edLD = -1 - '----- - nul& = SeekBuf&(ExtDepBuf, 0, SBM_BufStart) - IF ReadBufLine$(ExtDepBuf) <> "<<< LISTING DONE >>>" THEN - nul& = SeekBuf&(ExtDepBuf, 0, SBM_BufEnd): edLD = 0 - FOR i = 0 TO UBOUND(embedFileList$, 2) - IF embedFileList$(eflFile, i) <> "" AND embedFileList$(eflUsed, i) = "yes" THEN - WriteBufLine ExtDepBuf, _FULLPATH$(embedFileList$(eflFile, i)) - END IF - NEXT i + IF statusarealink <> 2 THEN + '----- + edFF = FREEFILE: edLD = -1: edCHG = 0 + '----- nul& = SeekBuf&(ExtDepBuf, 0, SBM_BufStart) - WriteBufLine ExtDepBuf, "<<< LISTING DONE >>>" - END IF - '----- - WHILE NOT EndOfBuf%(ExtDepBuf) - OPEN "B", #edFF, ReadBufLine$(ExtDepBuf) - edDAT$ = SPACE$(LOF(edFF)) - GET #edFF, , edDAT$ - CLOSE #edFF - IF edLD THEN DeleteBufLine ExtDepBuf - WriteBufLine ExtDepBuf, _MD5$(edDAT$) - WEND - nul& = SeekBuf&(ExtDepBuf, 0, SBM_BufStart) - '----- - OPEN "B", #edFF, tmpdir$ + "extdep.txt" - edDAT$ = SPACE$(LOF(edFF)) - GET #edFF, , edDAT$ - CLOSE #edFF - IF edDAT$ <> ReadBufRawData$(ExtDepBuf, GetBufLen&(ExtDepBuf)) THEN - idecompiled = 0: GOTO mustGenerateExe + IF ReadBufLine$(ExtDepBuf) <> "<<< LISTING DONE >>>" THEN + nul& = SeekBuf&(ExtDepBuf, 0, SBM_BufEnd): edLD = 0 + FOR i = 0 TO UBOUND(embedFileList$, 2) + IF embedFileList$(eflFile, i) <> "" AND embedFileList$(eflUsed, i) = "yes" THEN + WriteBufLine ExtDepBuf, "EMBE: " + _FULLPATH$(embedFileList$(eflFile, i)) + END IF + NEXT i + nul& = SeekBuf&(ExtDepBuf, 0, SBM_BufStart) + WriteBufLine ExtDepBuf, "<<< LISTING DONE >>>" + END IF + '----- + WHILE NOT EndOfBuf%(ExtDepBuf) + edDAT$ = ReadBufLine$(ExtDepBuf): edID$ = LEFT$(edDAT$, 5) + OPEN "B", #edFF, MID$(edDAT$, 7) + edDAT$ = SPACE$(LOF(edFF)): GET #edFF, , edDAT$: CLOSE #edFF + edMD5$ = _MD5$(edDAT$) + IF edLD THEN + IF edMD5$ <> ReadBufLine$(ExtDepBuf) THEN + 'changed declare library or include files require a recompile + IF edID$ = "DECL:" OR edID$ = "INCL:" GOTO edReCompile + 'for other changed files we just need to update the MD5 hash + nul& = SeekBuf&(ExtDepBuf, -32 - LEN(BufEolSeq$(ExtDepBuf)), SBM_BufCurrent) + edCHG = -1: DeleteBufLine ExtDepBuf 'old hash + ELSE + _CONTINUE + END IF + END IF + WriteBufLine ExtDepBuf, edMD5$ 'new hash + WEND + '----- + 'for non-include changes we only need to rebuild the EXE + IF edCHG THEN idecompiled = 0: GOTO mustGenerateExe + ELSE + edReCompile: + ideautorun = 0: startPausedPending = 1 + ideunsaved = -1: idechangemade = 1: statusarealink = 0 + GOTO ideloop END IF '=== END: checking external dependencies === diff --git a/source/qb64pe.bas b/source/qb64pe.bas index d4a9c5313..154878cb9 100644 --- a/source/qb64pe.bas +++ b/source/qb64pe.bas @@ -3361,7 +3361,7 @@ DO ExeIconSet = linenumber SetDependency DEPENDENCY_ICON - WriteBufLine ExtDepBuf, _FULLPATH$(ExeIconFile$) + WriteBufLine ExtDepBuf, "ICON: " + _FULLPATH$(ExeIconFile$) IF CheckingOn THEN WriteBufLine MainTxtBuf, "do{" WriteBufLine MainTxtBuf, "sub__icon(NULL,NULL,0);" GOTO finishedline2 @@ -3426,7 +3426,7 @@ DO GOTO errmes END IF END IF - WriteBufLine ExtDepBuf, _FULLPATH$(MidiSoundFont$) + WriteBufLine ExtDepBuf, "MIDI: " + _FULLPATH$(MidiSoundFont$) ELSE ' Constant values, only one for now SELECT CASE UCASE$(MidiSoundFont$) @@ -3435,7 +3435,7 @@ DO ' Clear MidiSoundFont$ to indicate the default should be used MidiSoundFont$ = "" - WriteBufLine ExtDepBuf, _FULLPATH$("internal/support/default_soundfont.sf2") + WriteBufLine ExtDepBuf, "MIDI: " + _FULLPATH$("internal/support/default_soundfont.sf2") CASE ELSE a$ = "Unrecognized Soundfont option " + AddQuotes$(MidiSoundFont$) @@ -4721,7 +4721,7 @@ DO mylib$ = mylib$ + " ../../" + libname$ + " " END IF END IF - + WriteBufLine ExtDepBuf, "DECL: " + _FULLPATH$(libname$) END IF ELSE @@ -4746,6 +4746,7 @@ DO IF ASC(x2$, x2) > 122 THEN ASC(x2$, x2) = 95 NEXT DLLname$ = x2$ + WriteBufLine ExtDepBuf, "DECL: " + _FULLPATH$(libname$) IF sfdeclare THEN @@ -4765,7 +4766,6 @@ DO WriteBufLine f, "}" END IF - END IF END IF 'no header @@ -4779,6 +4779,7 @@ DO ELSE WriteBufLine RegTxtBuf, "#include " + CHR$(34) + "../../" + headername$ + CHR$(34) END IF + WriteBufLine ExtDepBuf, "DECL: " + _FULLPATH$(headername$) END IF END IF From 7c50499c2f9760e19ad7fb09777366680953bcb2 Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Wed, 7 Feb 2024 21:17:46 +0100 Subject: [PATCH 4/7] 4.) Implements $INCLUDEONCE handling - placing $INCLUDEONCE in any line in an include file will prevent including the file multiple times (BAS synonym for #pragma once) - $INCLUDEONCE must be the only thing in the line - using it in the main program has no effect and will be ignored without error --- source/qb64pe.bas | 81 ++++++++++++++++--- .../syntax_highlighter_list.bas | 2 +- 2 files changed, 72 insertions(+), 11 deletions(-) diff --git a/source/qb64pe.bas b/source/qb64pe.bas index 154878cb9..27960447a 100644 --- a/source/qb64pe.bas +++ b/source/qb64pe.bas @@ -1506,8 +1506,8 @@ REDIM SHARED embedFileList$(3, 10) 'External dependencies buffer DIM SHARED ExtDepBuf: ExtDepBuf = OpenBuffer%("O", tmpdir$ + "extdep.txt") - - +'The $INCLUDEONCE check buffer +DIM SHARED IncOneBuf: IncOneBuf = OpenBuffer%("O", tmpdir$ + "incone.txt") 'begin compilation FOR closeall = 1 TO 255: CLOSE closeall: NEXT @@ -2629,12 +2629,37 @@ DO END IF IF try = 2 THEN f$ = a$ IF _FILEEXISTS(f$) THEN - qberrorhappened = -3 - 'We're using the faster LINE INPUT, which requires a BINARY open. + qberrorhappened = -3 '*** OPEN f$ FOR BINARY AS #fh - 'And another line below edited - qberrorhappened3: - IF qberrorhappened = -3 THEN EXIT FOR + qberrorhappened3: '*** + IF qberrorhappened = -3 THEN + '=== BEGIN: handling $INCLUDEONCE === + incDAT$ = SPACE$(LOF(fh)) + GET #fh, , incDAT$ + CLOSE #fh 'as we skip the regular CLOSE when $INCLUDEONCE + incDAT$ = UCASE$(incDAT$) + incPOS& = INSTR(incDAT$, "$INCLUDEONCE" + MKI$(&H0A0D)) + IF incPOS& = 0 OR incPOS& > 1 THEN + IF incPOS& = 0 THEN incPOS& = INSTR(incDAT$, "$INCLUDEONCE" + CHR$(10)) + IF incPOS& = 0 OR incPOS& > 1 THEN + incPOS& = INSTR(incDAT$, CHR$(10) + "$INCLUDEONCE" + MKI$(&H0A0D)) + IF incPOS& = 0 THEN incPOS& = INSTR(incDAT$, CHR$(10) + "$INCLUDEONCE" + CHR$(10)) + END IF + END IF + IF incPOS& > 0 THEN + nul& = SeekBuf&(IncOneBuf, 0, SBM_BufStart) + WHILE NOT EndOfBuf%(IncOneBuf) + IF _FULLPATH$(f$) = ReadBufLine$(IncOneBuf) THEN + qberrorhappened = 0 + GOTO skipInc1 + END IF + WEND + END IF + WriteBufLine IncOneBuf, _FULLPATH$(f$) + OPEN f$ FOR BINARY AS #fh 'reopen and continue + '=== END: handling $INCLUDEONCE === + EXIT FOR '*** + END IF END IF qberrorhappened = 0 NEXT @@ -2679,6 +2704,7 @@ DO '3. Close & return control CLOSE #fh inclevel = inclevel - 1 + skipInc1: IF forceIncludingFile = 1 AND inclevel = 0 THEN forceIncludingFile = 0 GOTO forceIncludeCompleted_prepass @@ -2712,6 +2738,7 @@ lineinput3index = 1 'reset input line ide3: addmetainclude$ = "" 'reset stray meta-includes +IncOneBuf = OpenBuffer%("O", tmpdir$ + "incone.txt") 'and $INCLUDEONCE buffer 'reset altered variables DataOffset = 0 @@ -3041,6 +3068,12 @@ DO GOTO finishednonexec END IF + IF a3u$ = "$INCLUDEONCE" THEN + 'just to catch it as keyword + layout$ = SCase$("$IncludeOnce") + GOTO finishednonexec + END IF + IF a3u$ = "$VIRTUALKEYBOARD:ON" THEN 'Deprecated; does nothing. layout$ = SCase$("$VirtualKeyboard:On") @@ -11389,10 +11422,37 @@ DO IF try = 2 THEN f$ = a$ IF _FILEEXISTS(f$) THEN qberrorhappened = -2 '*** - WriteBufLine ExtDepBuf, _FULLPATH$(f$) OPEN f$ FOR BINARY AS #fh qberrorhappened2: '*** - IF qberrorhappened = -2 THEN EXIT FOR '*** + IF qberrorhappened = -2 THEN + '=== BEGIN: handling $INCLUDEONCE === + incDAT$ = SPACE$(LOF(fh)) + GET #fh, , incDAT$ + CLOSE #fh 'as we skip the regular CLOSE when $INCLUDEONCE + incDAT$ = UCASE$(incDAT$) + incPOS& = INSTR(incDAT$, "$INCLUDEONCE" + MKI$(&H0A0D)) + IF incPOS& = 0 OR incPOS& > 1 THEN + IF incPOS& = 0 THEN incPOS& = INSTR(incDAT$, "$INCLUDEONCE" + CHR$(10)) + IF incPOS& = 0 OR incPOS& > 1 THEN + incPOS& = INSTR(incDAT$, CHR$(10) + "$INCLUDEONCE" + MKI$(&H0A0D)) + IF incPOS& = 0 THEN incPOS& = INSTR(incDAT$, CHR$(10) + "$INCLUDEONCE" + CHR$(10)) + END IF + END IF + IF incPOS& > 0 THEN + nul& = SeekBuf&(IncOneBuf, 0, SBM_BufStart) + WHILE NOT EndOfBuf%(IncOneBuf) + IF _FULLPATH$(f$) = ReadBufLine$(IncOneBuf) THEN + qberrorhappened = 0 + GOTO skipInc2 + END IF + WEND + END IF + WriteBufLine IncOneBuf, _FULLPATH$(f$) + WriteBufLine ExtDepBuf, "INCL: " + _FULLPATH$(f$) + OPEN f$ FOR BINARY AS #fh 'reopen and continue + '=== END: handling $INCLUDEONCE === + EXIT FOR '*** + END IF END IF qberrorhappened = 0 NEXT @@ -11433,6 +11493,7 @@ DO '3. Close & return control CLOSE #fh inclevel = inclevel - 1 + skipInc2: IF inclevel = 0 THEN IF forceIncludingFile = 1 THEN forceIncludingFile = 0 @@ -20671,7 +20732,7 @@ FUNCTION lineformat$ (a$) memmode = 1 ELSEIF MID$(c$, x, 8) = "$DYNAMIC" THEN memmode = 2 - ELSEIF MID$(c$, x, 8) = "$INCLUDE" THEN + ELSEIF MID$(c$, x, 8) = "$INCLUDE" AND MID$(c$, x + 8, 4) <> "ONCE" THEN 'note: INCLUDE adds the file AFTER the line it is on has been processed 'skip spaces until : FOR xx = x + 8 TO LEN(c$) diff --git a/source/subs_functions/syntax_highlighter_list.bas b/source/subs_functions/syntax_highlighter_list.bas index 2d3e7c023..49a54b850 100644 --- a/source/subs_functions/syntax_highlighter_list.bas +++ b/source/subs_functions/syntax_highlighter_list.bas @@ -4,6 +4,6 @@ listOfKeywords$ = listOfKeywords$ + "_ERRORLINE@_ERRORMESSAGE$@_EXIT@_EXPLICIT@_ listOfKeywords$ = listOfKeywords$ + "_GLCOPYTEXSUBIMAGE2D@_GLCULLFACE@_GLDELETELISTS@_GLDELETETEXTURES@_GLDEPTHFUNC@_GLDEPTHMASK@_GLDEPTHRANGE@_GLDISABLE@_GLDISABLECLIENTSTATE@_GLDRAWARRAYS@_GLDRAWBUFFER@_GLDRAWELEMENTS@_GLDRAWPIXELS@_GLEDGEFLAG@_GLEDGEFLAGPOINTER@_GLEDGEFLAGV@_GLENABLE@_GLENABLECLIENTSTATE@_GLEND@_GLENDLIST@_GLEVALCOORD1D@_GLEVALCOORD1DV@_GLEVALCOORD1F@_GLEVALCOORD1FV@_GLEVALCOORD2D@_GLEVALCOORD2DV@_GLEVALCOORD2F@_GLEVALCOORD2FV@_GLEVALMESH1@_GLEVALMESH2@_GLEVALPOINT1@_GLEVALPOINT2@_GLFEEDBACKBUFFER@_GLFINISH@_GLFLUSH@_GLFOGF@_GLFOGFV@_GLFOGI@_GLFOGIV@_GLFRONTFACE@_GLFRUSTUM@_GLGENLISTS@_GLGENTEXTURES@_GLGETBOOLEANV@_GLGETCLIPPLANE@_GLGETDOUBLEV@_GLGETERROR@_GLGETFLOATV@_GLGETINTEGERV@_GLGETLIGHTFV@_GLGETLIGHTIV@_GLGETMAPDV@_GLGETMAPFV@_GLGETMAPIV@_GLGETMATERIALFV@_GLGETMATERIALIV@_GLGETPIXELMAPFV@_GLGETPIXELMAPUIV@_GLGETPIXELMAPUSV@_GLGETPOINTERV@_GLGETPOLYGONSTIPPLE@_GLGETSTRING@_GLGETTEXENVFV@_GLGETTEXENVIV@_GLGETTEXGENDV@_GLGETTEXGENFV@_GLGETTEXGENIV@_GLGETTEXIMAGE@_GLGETTEXLEVELPARAMETERFV@_GLGETTEXLEVELPARAMETERIV@_GLGETTEXPARAMETERFV@_GLGETTEXPARAMETERIV@_GLHINT@_GLINDEXMASK@_GLINDEXPOINTER@_GLINDEXD@_GLINDEXDV@_GLINDEXF@_GLINDEXFV@_GLINDEXI@_GLINDEXIV@_GLINDEXS@_GLINDEXSV@_GLINDEXUB@_GLINDEXUBV@_GLINITNAMES@_GLINTERLEAVEDARRAYS@_GLISENABLED@_GLISLIST@_GLISTEXTURE@_GLLIGHTMODELF@_GLLIGHTMODELFV@_GLLIGHTMODELI@_GLLIGHTMODELIV@_GLLIGHTF@_GLLIGHTFV@_GLLIGHTI@_GLLIGHTIV@_GLLINESTIPPLE@_GLLINEWIDTH@_GLLISTBASE@_GLLOADIDENTITY@_GLLOADMATRIXD@_GLLOADMATRIXF@_GLLOADNAME@_GLLOGICOP@_GLMAP1D@_GLMAP1F@_GLMAP2D@_GLMAP2F@_GLMAPGRID1D@_GLMAPGRID1F@_GLMAPGRID2D@_GLMAPGRID2F@_GLMATERIALF@_GLMATERIALFV@_GLMATERIALI@_GLMATERIALIV@_GLMATRIXMODE@_GLMULTMATRIXD@_GLMULTMATRIXF@_GLNEWLIST@_GLNORMAL3B@_GLNORMAL3BV@_GLNORMAL3D@_GLNORMAL3DV@_GLNORMAL3F@_GLNORMAL3FV@_GLNORMAL3I@_GLNORMAL3IV@_GLNORMAL3S@_GLNORMAL3SV@_GLNORMALPOINTER@_GLORTHO@_GLPASSTHROUGH@_GLPIXELMAPFV@_GLPIXELMAPUIV@_GLPIXELMAPUSV@_GLPIXELSTOREF@_GLPIXELSTOREI@_GLPIXELTRANSFERF@_GLPIXELTRANSFERI@_GLPIXELZOOM@_GLPOINTSIZE@_GLPOLYGONMODE@_GLPOLYGONOFFSET@_GLPOLYGONSTIPPLE@" listOfKeywords$ = listOfKeywords$ + "_GLPOPATTRIB@_GLPOPCLIENTATTRIB@_GLPOPMATRIX@_GLPOPNAME@_GLPRIORITIZETEXTURES@_GLPUSHATTRIB@_GLPUSHCLIENTATTRIB@_GLPUSHMATRIX@_GLPUSHNAME@_GLRASTERPOS2D@_GLRASTERPOS2DV@_GLRASTERPOS2F@_GLRASTERPOS2FV@_GLRASTERPOS2I@_GLRASTERPOS2IV@_GLRASTERPOS2S@_GLRASTERPOS2SV@_GLRASTERPOS3D@_GLRASTERPOS3DV@_GLRASTERPOS3F@_GLRASTERPOS3FV@_GLRASTERPOS3I@_GLRASTERPOS3IV@_GLRASTERPOS3S@_GLRASTERPOS3SV@_GLRASTERPOS4D@_GLRASTERPOS4DV@_GLRASTERPOS4F@_GLRASTERPOS4FV@_GLRASTERPOS4I@_GLRASTERPOS4IV@_GLRASTERPOS4S@_GLRASTERPOS4SV@_GLREADBUFFER@_GLREADPIXELS@_GLRECTD@_GLRECTDV@_GLRECTF@_GLRECTFV@_GLRECTI@_GLRECTIV@_GLRECTS@_GLRECTSV@_GLRENDERMODE@_GLROTATED@_GLROTATEF@_GLSCALED@_GLSCALEF@_GLSCISSOR@_GLSELECTBUFFER@_GLSHADEMODEL@_GLSTENCILFUNC@_GLSTENCILMASK@_GLSTENCILOP@_GLTEXCOORD1D@_GLTEXCOORD1DV@_GLTEXCOORD1F@_GLTEXCOORD1FV@_GLTEXCOORD1I@_GLTEXCOORD1IV@_GLTEXCOORD1S@_GLTEXCOORD1SV@_GLTEXCOORD2D@_GLTEXCOORD2DV@_GLTEXCOORD2F@_GLTEXCOORD2FV@_GLTEXCOORD2I@_GLTEXCOORD2IV@_GLTEXCOORD2S@_GLTEXCOORD2SV@_GLTEXCOORD3D@_GLTEXCOORD3DV@_GLTEXCOORD3F@_GLTEXCOORD3FV@_GLTEXCOORD3I@_GLTEXCOORD3IV@_GLTEXCOORD3S@_GLTEXCOORD3SV@_GLTEXCOORD4D@_GLTEXCOORD4DV@_GLTEXCOORD4F@_GLTEXCOORD4FV@_GLTEXCOORD4I@_GLTEXCOORD4IV@_GLTEXCOORD4S@_GLTEXCOORD4SV@_GLTEXCOORDPOINTER@_GLTEXENVF@_GLTEXENVFV@_GLTEXENVI@_GLTEXENVIV@_GLTEXGEND@_GLTEXGENDV@_GLTEXGENF@_GLTEXGENFV@_GLTEXGENI@_GLTEXGENIV@_GLTEXIMAGE1D@_GLTEXIMAGE2D@_GLTEXPARAMETERF@_GLTEXPARAMETERFV@_GLTEXPARAMETERI@_GLTEXPARAMETERIV@_GLTEXSUBIMAGE1D@_GLTEXSUBIMAGE2D@_GLTRANSLATED@_GLTRANSLATEF@_GLVERTEX2D@_GLVERTEX2DV@_GLVERTEX2F@_GLVERTEX2FV@_GLVERTEX2I@_GLVERTEX2IV@_GLVERTEX2S@_GLVERTEX2SV@_GLVERTEX3D@_GLVERTEX3DV@_GLVERTEX3F@_GLVERTEX3FV@_GLVERTEX3I@_GLVERTEX3IV@_GLVERTEX3S@_GLVERTEX3SV@_GLVERTEX4D@_GLVERTEX4DV@_GLVERTEX4F@_GLVERTEX4FV@_GLVERTEX4I@_GLVERTEX4IV@_GLVERTEX4S@_GLVERTEX4SV@_GLVERTEXPOINTER@_GLVIEWPORT@SMOOTH@STRETCH@_ANTICLOCKWISE@_BEHIND@_CLEAR@_FILLBACKGROUND@_GLUPERSPECTIVE@_HARDWARE@_HARDWARE1@_KEEPBACKGROUND@_NONE@_OFF@_ONLY@_ONLYBACKGROUND@_ONTOP@_SEAMLESS@_SMOOTH@_SMOOTHSHRUNK@_SMOOTHSTRETCHED@" listOfKeywords$ = listOfKeywords$ + "_SOFTWARE@_SQUAREPIXELS@_STRETCH@_ALLOWFULLSCREEN@_ALL@_ECHO@_INSTRREV@_TRIM$@_ACCEPTFILEDROP@_FINISHDROP@_TOTALDROPPEDFILES@_DROPPEDFILE@_DROPPEDFILE$@_SHR@_SHL@_ROR@_ROL@" -listOfKeywords$ = listOfKeywords$ + "_ADLER32@_CRC32@_MD5$@_DEFLATE$@_INFLATE$@_READBIT@_RESETBIT@_SETBIT@_TOGGLEBIT@$ASSERTS@CONSOLE@_ASSERT@_CAPSLOCK@_NUMLOCK@_SCROLLLOCK@_TOGGLE@_CONSOLEFONT@_CONSOLECURSOR@_CONSOLEINPUT@_CINP@$NOPREFIX@$COLOR@$DEBUG@$EMBED@_EMBEDDED$@_ENVIRONCOUNT@$UNSTABLE@$MIDISOUNDFONT@" +listOfKeywords$ = listOfKeywords$ + "_ADLER32@_CRC32@_MD5$@_DEFLATE$@_INFLATE$@_READBIT@_RESETBIT@_SETBIT@_TOGGLEBIT@$INCLUDEONCE@$ASSERTS@CONSOLE@_ASSERT@_CAPSLOCK@_NUMLOCK@_SCROLLLOCK@_TOGGLE@_CONSOLEFONT@_CONSOLECURSOR@_CONSOLEINPUT@_CINP@$NOPREFIX@$COLOR@$DEBUG@$EMBED@_EMBEDDED$@_ENVIRONCOUNT@$UNSTABLE@$MIDISOUNDFONT@" listOfKeywords$ = listOfKeywords$ + "_NOTIFYPOPUP@_MESSAGEBOX@_INPUTBOX$@_SELECTFOLDERDIALOG$@_COLORCHOOSERDIALOG@_OPENFILEDIALOG$@_SAVEFILEDIALOG$@_SAVEIMAGE@_FILES$@_FULLPATH$@" listOfKeywords$ = listOfKeywords$ + "_STATUSCODE@_SNDNEW@_SCALEDWIDTH@_SCALEDHEIGHT@_UFONTHEIGHT@_UPRINTWIDTH@_ULINESPACING@_UPRINTSTRING@_UCHARPOS@" From 6d4975384b850aa42a74778f06e47497139557e8 Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Wed, 7 Feb 2024 21:27:14 +0100 Subject: [PATCH 5/7] 5.) Unify internal $COLOR includes - unify description and formatting - make them $INCLUDEONCE to avoid 100s of warnings if eg. multiple $COLOR:32 are used in a program --- internal/support/color/color0.bi | 3 + internal/support/color/color0_noprefix.bi | 6 +- internal/support/color/color32.bi | 4 + internal/support/color/color32_noprefix.bi | 546 +++++++++++---------- 4 files changed, 287 insertions(+), 272 deletions(-) diff --git a/internal/support/color/color0.bi b/internal/support/color/color0.bi index d57de4ee5..75461f3de 100644 --- a/internal/support/color/color0.bi +++ b/internal/support/color/color0.bi @@ -1,5 +1,8 @@ '$COLOR:0 'Color constants for text mode. + +$INCLUDEONCE + CONST Black~%% = 0 CONST Blue~%% = 1 CONST Green~%% = 2 diff --git a/internal/support/color/color0_noprefix.bi b/internal/support/color/color0_noprefix.bi index d11a0f026..8b332e7f6 100644 --- a/internal/support/color/color0_noprefix.bi +++ b/internal/support/color/color0_noprefix.bi @@ -1,5 +1,8 @@ '$COLOR:0 -'Color constants for text mode, when using $NOPREFIX +'Color constants for text mode, when using $NOPREFIX. + +$INCLUDEONCE + CONST Black~%% = 0 CONST NP_Blue~%% = 1 CONST NP_Green~%% = 2 @@ -17,3 +20,4 @@ CONST LightMagenta~%% = 13 CONST Yellow~%% = 14 CONST BrightWhite~%% = 15 CONST NP_Blink~%% = 16 + diff --git a/internal/support/color/color32.bi b/internal/support/color/color32.bi index 024c3aeba..ab6390027 100644 --- a/internal/support/color/color32.bi +++ b/internal/support/color/color32.bi @@ -1,5 +1,8 @@ '$COLOR:32 'Color constants for 32bit mode, based on HTML color names. + +$INCLUDEONCE + CONST AliceBlue~& = 4293982463 CONST Almond~& = 4293910221 CONST AntiqueBrass~& = 4291663221 @@ -270,3 +273,4 @@ CONST Wisteria~& = 4291667166 CONST Yellow~& = 4294967040 CONST YellowGreen~& = 4288335154 CONST YellowOrange~& = 4294946370 + diff --git a/internal/support/color/color32_noprefix.bi b/internal/support/color/color32_noprefix.bi index 0d5f5deaa..0ae4a02b1 100644 --- a/internal/support/color/color32_noprefix.bi +++ b/internal/support/color/color32_noprefix.bi @@ -1,272 +1,276 @@ '$COLOR:32 -'Color constants for 32bit mode, based on HTML color names, when using $NOPREFIX -Const AliceBlue~& = 4293982463 -Const Almond~& = 4293910221 -Const AntiqueBrass~& = 4291663221 -Const AntiqueWhite~& = 4294634455 -Const Apricot~& = 4294826421 -Const Aqua~& = 4278255615 -Const Aquamarine~& = 4286578644 -Const Asparagus~& = 4287080811 -Const AtomicTangerine~& = 4294943860 -Const Azure~& = 4293984255 -Const BananaMania~& = 4294633397 -Const Beaver~& = 4288643440 -Const Beige~& = 4294309340 -Const Bisque~& = 4294960324 -Const Bittersweet~& = 4294802542 -Const Black~& = 4278190080 -Const BlanchedAlmond~& = 4294962125 -Const BlizzardBlue~& = 4289521134 -Const NP_Blue~& = 4278190335 -Const BlueBell~& = 4288848592 -Const BlueGray~& = 4284914124 -Const BlueGreen~& = 4279081146 -Const BlueViolet~& = 4287245282 -Const Blush~& = 4292763011 -Const BrickRed~& = 4291510612 -Const Brown~& = 4289014314 -Const BurlyWood~& = 4292786311 -Const BurntOrange~& = 4294934345 -Const BurntSienna~& = 4293557853 -Const CadetBlue~& = 4284456608 -Const Canary~& = 4294967193 -Const CaribbeanGreen~& = 4280079266 -Const CarnationPink~& = 4294945484 -Const Cerise~& = 4292691090 -Const Cerulean~& = 4280134870 -Const ChartReuse~& = 4286578432 -Const Chestnut~& = 4290534744 -Const Chocolate~& = 4291979550 -Const Copper~& = 4292711541 -Const Coral~& = 4294934352 -Const Cornflower~& = 4288335595 -Const CornflowerBlue~& = 4284782061 -Const Cornsilk~& = 4294965468 -Const CottonCandy~& = 4294950105 -Const CrayolaAquamarine~& = 4286110690 -Const CrayolaBlue~& = 4280251902 -Const CrayolaBlueViolet~& = 4285753021 -Const CrayolaBrown~& = 4290013005 -Const CrayolaCadetBlue~& = 4289771462 -Const CrayolaForestGreen~& = 4285378177 -Const CrayolaGold~& = 4293379735 -Const CrayolaGoldenrod~& = 4294760821 -Const CrayolaGray~& = 4287992204 -Const CrayolaGreen~& = 4280069240 -Const CrayolaGreenYellow~& = 4293978257 -Const CrayolaIndigo~& = 4284315339 -Const CrayolaLavender~& = 4294751445 -Const CrayolaMagenta~& = 4294337711 -Const CrayolaMaroon~& = 4291311706 -Const CrayolaMidnightBlue~& = 4279912566 -Const CrayolaOrange~& = 4294931768 -Const CrayolaOrangeRed~& = 4294912811 -Const CrayolaOrchid~& = 4293306583 -Const CrayolaPlum~& = 4287513989 -Const CrayolaRed~& = 4293795917 -Const CrayolaSalmon~& = 4294941610 -Const CrayolaSeaGreen~& = 4288668351 -Const CrayolaSilver~& = 4291675586 -Const CrayolaSkyBlue~& = 4286634731 -Const CrayolaSpringGreen~& = 4293716670 -Const CrayolaTann~& = 4294616940 -Const CrayolaThistle~& = 4293642207 -Const CrayolaViolet~& = 4287786670 -Const CrayolaYellow~& = 4294764675 -Const CrayolaYellowGreen~& = 4291158916 -Const Crimson~& = 4292613180 -Const Cyan~& = 4278255615 -Const Dandelion~& = 4294826861 -Const DarkBlue~& = 4278190219 -Const DarkCyan~& = 4278225803 -Const DarkGoldenRod~& = 4290283019 -Const DarkGray~& = 4289309097 -Const DarkGreen~& = 4278215680 -Const DarkKhaki~& = 4290623339 -Const DarkMagenta~& = 4287299723 -Const DarkOliveGreen~& = 4283788079 -Const DarkOrange~& = 4294937600 -Const DarkOrchid~& = 4288230092 -Const DarkRed~& = 4287299584 -Const DarkSalmon~& = 4293498490 -Const DarkSeaGreen~& = 4287609999 -Const DarkSlateBlue~& = 4282924427 -Const DarkSlateGray~& = 4281290575 -Const DarkTurquoise~& = 4278243025 -Const DarkViolet~& = 4287889619 -Const DeepPink~& = 4294907027 -Const DeepSkyBlue~& = 4278239231 -Const Denim~& = 4281035972 -Const DesertSand~& = 4293905848 -Const DimGray~& = 4285098345 -Const DodgerBlue~& = 4280193279 -Const Eggplant~& = 4285419872 -Const ElectricLime~& = 4291755805 -Const Fern~& = 4285643896 -Const FireBrick~& = 4289864226 -Const Floralwhite~& = 4294966000 -Const ForestGreen~& = 4280453922 -Const Fuchsia~& = 4290995397 -Const FuzzyWuzzy~& = 4291585638 -Const Gainsboro~& = 4292664540 -Const GhostWhite~& = 4294506751 -Const Gold~& = 4294956800 -Const GoldenRod~& = 4292519200 -Const GrannySmithApple~& = 4289258656 -Const Gray~& = 4286611584 -Const NP_Green~& = 4278222848 -Const GreenBlue~& = 4279329972 -Const GreenYellow~& = 4289593135 -Const HoneyDew~& = 4293984240 -Const HotMagenta~& = 4294909390 -Const HotPink~& = 4294928820 -Const Inchworm~& = 4289915997 -Const IndianRed~& = 4291648604 -Const Indigo~& = 4283105410 -Const Ivory~& = 4294967280 -Const JazzberryJam~& = 4291442535 -Const JungleGreen~& = 4282101903 -Const Khaki~& = 4293977740 -Const LaserLemon~& = 4294901282 -Const Lavender~& = 4293322490 -Const LavenderBlush~& = 4294963445 -Const LawnGreen~& = 4286381056 -Const LemonChiffon~& = 4294965965 -Const LemonYellow~& = 4294964303 -Const LightBlue~& = 4289583334 -Const LightCoral~& = 4293951616 -Const LightCyan~& = 4292935679 -Const LightGoldenRodYellow~& = 4294638290 -Const LightGray~& = 4292072403 -Const LightGreen~& = 4287688336 -Const LightPink~& = 4294948545 -Const LightSalmon~& = 4294942842 -Const LightSeaGreen~& = 4280332970 -Const LightSkyBlue~& = 4287090426 -Const LightSlateGray~& = 4286023833 -Const LightSteelBlue~& = 4289774814 -Const LightYellow~& = 4294967264 -Const Lime~& = 4278255360 -Const LimeGreen~& = 4281519410 -Const Linen~& = 4294635750 -Const MacaroniAndCheese~& = 4294950280 -Const Magenta~& = 4294902015 -Const MagicMint~& = 4289392849 -Const Mahogany~& = 4291643980 -Const Maize~& = 4293775772 -Const Manatee~& = 4288125610 -Const MangoTango~& = 4294935107 -Const Maroon~& = 4286578688 -Const Mauvelous~& = 4293892266 -Const MediumAquamarine~& = 4284927402 -Const MediumBlue~& = 4278190285 -Const MediumOrchid~& = 4290401747 -Const MediumPurple~& = 4287852763 -Const MediumSeaGreen~& = 4282168177 -Const MediumSlateBlue~& = 4286277870 -Const MediumSpringGreen~& = 4278254234 -Const MediumTurquoise~& = 4282962380 -Const MediumVioletRed~& = 4291237253 -Const Melon~& = 4294818996 -Const MidnightBlue~& = 4279834992 -Const MintCream~& = 4294311930 -Const MistyRose~& = 4294960353 -Const Moccasin~& = 4294960309 -Const MountainMeadow~& = 4281383567 -Const Mulberry~& = 4291120012 -Const NavajoWhite~& = 4294958765 -Const Navy~& = 4278190208 -Const NavyBlue~& = 4279858386 -Const NeonCarrot~& = 4294943555 -Const OldLace~& = 4294833638 -Const Olive~& = 4286611456 -Const OliveDrab~& = 4285238819 -Const OliveGreen~& = 4290426988 -Const Orange~& = 4294944000 -Const OrangeRed~& = 4294919424 -Const OrangeYellow~& = 4294497640 -Const Orchid~& = 4292505814 -Const OuterSpace~& = 4282468940 -Const OutrageousOrange~& = 4294929994 -Const PacificBlue~& = 4280068553 -Const PaleGoldenRod~& = 4293847210 -Const PaleGreen~& = 4288215960 -Const PaleTurquoise~& = 4289720046 -Const PaleVioletRed~& = 4292571283 -Const PapayaWhip~& = 4294963157 -Const Peach~& = 4294954923 -Const PeachPuff~& = 4294957753 -Const Periwinkle~& = 4291154150 -Const Peru~& = 4291659071 -Const PiggyPink~& = 4294827494 -Const PineGreen~& = 4279599224 -Const Pink~& = 4294951115 -Const PinkFlamingo~& = 4294735101 -Const PinkSherbet~& = 4294414247 -Const Plum~& = 4292714717 -Const PowderBlue~& = 4289781990 -Const Purple~& = 4286578816 -Const PurpleHeart~& = 4285809352 -Const PurpleMountainsMajesty~& = 4288512442 -Const PurplePizzazz~& = 4294856410 -Const RadicalRed~& = 4294920556 -Const RawSienna~& = 4292250201 -Const RawUmber~& = 4285614883 -Const RazzleDazzleRose~& = 4294920400 -Const Razzmatazz~& = 4293076331 -Const NP_Red~& = 4294901760 -Const RedOrange~& = 4294923081 -Const RedViolet~& = 4290790543 -Const RobinsEggBlue~& = 4280274635 -Const RosyBrown~& = 4290547599 -Const RoyalBlue~& = 4282477025 -Const RoyalPurple~& = 4286075305 -Const SaddleBrown~& = 4287317267 -Const Salmon~& = 4294606962 -Const SandyBrown~& = 4294222944 -Const Scarlet~& = 4294715463 -Const ScreaminGreen~& = 4285988730 -Const SeaGreen~& = 4281240407 -Const SeaShell~& = 4294964718 -Const Sepia~& = 4289030479 -Const Shadow~& = 4287265117 -Const Shamrock~& = 4282764962 -Const ShockingPink~& = 4294672125 -Const Sienna~& = 4288696877 -Const Silver~& = 4290822336 -Const SkyBlue~& = 4287090411 -Const SlateBlue~& = 4285160141 -Const SlateGray~& = 4285563024 -Const Snow~& = 4294966010 -Const SpringGreen~& = 4278255487 -Const SteelBlue~& = 4282811060 -Const Sunglow~& = 4294954824 -Const SunsetOrange~& = 4294794835 -Const Tann~& = 4291998860 -Const Teal~& = 4278222976 -Const TealBlue~& = 4279805877 -Const Thistle~& = 4292394968 -Const TickleMePink~& = 4294740396 -Const Timberwolf~& = 4292597714 -Const Tomato~& = 4294927175 -Const TropicalRainForest~& = 4279730285 -Const Tumbleweed~& = 4292782728 -Const Turquoise~& = 4282441936 -Const TurquoiseBlue~& = 4286045671 -Const UnmellowYellow~& = 4294967142 -Const Violet~& = 4293821166 -Const VioletBlue~& = 4281486002 -Const VioletRed~& = 4294398868 -Const VividTangerine~& = 4294942857 -Const VividViolet~& = 4287582365 -Const Wheat~& = 4294303411 -Const White~& = 4294967295 -Const Whitesmoke~& = 4294309365 -Const WildBlueYonder~& = 4288851408 -Const WildStrawberry~& = 4294919076 -Const WildWatermelon~& = 4294732933 -Const Wisteria~& = 4291667166 -Const Yellow~& = 4294967040 -Const YellowGreen~& = 4288335154 -Const YellowOrange~& = 4294946370 +'Color constants for 32bit mode, based on HTML color names, when using $NOPREFIX. + +$INCLUDEONCE + +CONST AliceBlue~& = 4293982463 +CONST Almond~& = 4293910221 +CONST AntiqueBrass~& = 4291663221 +CONST AntiqueWhite~& = 4294634455 +CONST Apricot~& = 4294826421 +CONST Aqua~& = 4278255615 +CONST Aquamarine~& = 4286578644 +CONST Asparagus~& = 4287080811 +CONST AtomicTangerine~& = 4294943860 +CONST Azure~& = 4293984255 +CONST BananaMania~& = 4294633397 +CONST Beaver~& = 4288643440 +CONST Beige~& = 4294309340 +CONST Bisque~& = 4294960324 +CONST Bittersweet~& = 4294802542 +CONST Black~& = 4278190080 +CONST BlanchedAlmond~& = 4294962125 +CONST BlizzardBlue~& = 4289521134 +CONST NP_Blue~& = 4278190335 +CONST BlueBell~& = 4288848592 +CONST BlueGray~& = 4284914124 +CONST BlueGreen~& = 4279081146 +CONST BlueViolet~& = 4287245282 +CONST Blush~& = 4292763011 +CONST BrickRed~& = 4291510612 +CONST Brown~& = 4289014314 +CONST BurlyWood~& = 4292786311 +CONST BurntOrange~& = 4294934345 +CONST BurntSienna~& = 4293557853 +CONST CadetBlue~& = 4284456608 +CONST Canary~& = 4294967193 +CONST CaribbeanGreen~& = 4280079266 +CONST CarnationPink~& = 4294945484 +CONST Cerise~& = 4292691090 +CONST Cerulean~& = 4280134870 +CONST ChartReuse~& = 4286578432 +CONST Chestnut~& = 4290534744 +CONST Chocolate~& = 4291979550 +CONST Copper~& = 4292711541 +CONST Coral~& = 4294934352 +CONST Cornflower~& = 4288335595 +CONST CornflowerBlue~& = 4284782061 +CONST Cornsilk~& = 4294965468 +CONST CottonCandy~& = 4294950105 +CONST CrayolaAquamarine~& = 4286110690 +CONST CrayolaBlue~& = 4280251902 +CONST CrayolaBlueViolet~& = 4285753021 +CONST CrayolaBrown~& = 4290013005 +CONST CrayolaCadetBlue~& = 4289771462 +CONST CrayolaForestGreen~& = 4285378177 +CONST CrayolaGold~& = 4293379735 +CONST CrayolaGoldenrod~& = 4294760821 +CONST CrayolaGray~& = 4287992204 +CONST CrayolaGreen~& = 4280069240 +CONST CrayolaGreenYellow~& = 4293978257 +CONST CrayolaIndigo~& = 4284315339 +CONST CrayolaLavender~& = 4294751445 +CONST CrayolaMagenta~& = 4294337711 +CONST CrayolaMaroon~& = 4291311706 +CONST CrayolaMidnightBlue~& = 4279912566 +CONST CrayolaOrange~& = 4294931768 +CONST CrayolaOrangeRed~& = 4294912811 +CONST CrayolaOrchid~& = 4293306583 +CONST CrayolaPlum~& = 4287513989 +CONST CrayolaRed~& = 4293795917 +CONST CrayolaSalmon~& = 4294941610 +CONST CrayolaSeaGreen~& = 4288668351 +CONST CrayolaSilver~& = 4291675586 +CONST CrayolaSkyBlue~& = 4286634731 +CONST CrayolaSpringGreen~& = 4293716670 +CONST CrayolaTann~& = 4294616940 +CONST CrayolaThistle~& = 4293642207 +CONST CrayolaViolet~& = 4287786670 +CONST CrayolaYellow~& = 4294764675 +CONST CrayolaYellowGreen~& = 4291158916 +CONST Crimson~& = 4292613180 +CONST Cyan~& = 4278255615 +CONST Dandelion~& = 4294826861 +CONST DarkBlue~& = 4278190219 +CONST DarkCyan~& = 4278225803 +CONST DarkGoldenRod~& = 4290283019 +CONST DarkGray~& = 4289309097 +CONST DarkGreen~& = 4278215680 +CONST DarkKhaki~& = 4290623339 +CONST DarkMagenta~& = 4287299723 +CONST DarkOliveGreen~& = 4283788079 +CONST DarkOrange~& = 4294937600 +CONST DarkOrchid~& = 4288230092 +CONST DarkRed~& = 4287299584 +CONST DarkSalmon~& = 4293498490 +CONST DarkSeaGreen~& = 4287609999 +CONST DarkSlateBlue~& = 4282924427 +CONST DarkSlateGray~& = 4281290575 +CONST DarkTurquoise~& = 4278243025 +CONST DarkViolet~& = 4287889619 +CONST DeepPink~& = 4294907027 +CONST DeepSkyBlue~& = 4278239231 +CONST Denim~& = 4281035972 +CONST DesertSand~& = 4293905848 +CONST DimGray~& = 4285098345 +CONST DodgerBlue~& = 4280193279 +CONST Eggplant~& = 4285419872 +CONST ElectricLime~& = 4291755805 +CONST Fern~& = 4285643896 +CONST FireBrick~& = 4289864226 +CONST Floralwhite~& = 4294966000 +CONST ForestGreen~& = 4280453922 +CONST Fuchsia~& = 4290995397 +CONST FuzzyWuzzy~& = 4291585638 +CONST Gainsboro~& = 4292664540 +CONST GhostWhite~& = 4294506751 +CONST Gold~& = 4294956800 +CONST GoldenRod~& = 4292519200 +CONST GrannySmithApple~& = 4289258656 +CONST Gray~& = 4286611584 +CONST NP_Green~& = 4278222848 +CONST GreenBlue~& = 4279329972 +CONST GreenYellow~& = 4289593135 +CONST HoneyDew~& = 4293984240 +CONST HotMagenta~& = 4294909390 +CONST HotPink~& = 4294928820 +CONST Inchworm~& = 4289915997 +CONST IndianRed~& = 4291648604 +CONST Indigo~& = 4283105410 +CONST Ivory~& = 4294967280 +CONST JazzberryJam~& = 4291442535 +CONST JungleGreen~& = 4282101903 +CONST Khaki~& = 4293977740 +CONST LaserLemon~& = 4294901282 +CONST Lavender~& = 4293322490 +CONST LavenderBlush~& = 4294963445 +CONST LawnGreen~& = 4286381056 +CONST LemonChiffon~& = 4294965965 +CONST LemonYellow~& = 4294964303 +CONST LightBlue~& = 4289583334 +CONST LightCoral~& = 4293951616 +CONST LightCyan~& = 4292935679 +CONST LightGoldenRodYellow~& = 4294638290 +CONST LightGray~& = 4292072403 +CONST LightGreen~& = 4287688336 +CONST LightPink~& = 4294948545 +CONST LightSalmon~& = 4294942842 +CONST LightSeaGreen~& = 4280332970 +CONST LightSkyBlue~& = 4287090426 +CONST LightSlateGray~& = 4286023833 +CONST LightSteelBlue~& = 4289774814 +CONST LightYellow~& = 4294967264 +CONST Lime~& = 4278255360 +CONST LimeGreen~& = 4281519410 +CONST Linen~& = 4294635750 +CONST MacaroniAndCheese~& = 4294950280 +CONST Magenta~& = 4294902015 +CONST MagicMint~& = 4289392849 +CONST Mahogany~& = 4291643980 +CONST Maize~& = 4293775772 +CONST Manatee~& = 4288125610 +CONST MangoTango~& = 4294935107 +CONST Maroon~& = 4286578688 +CONST Mauvelous~& = 4293892266 +CONST MediumAquamarine~& = 4284927402 +CONST MediumBlue~& = 4278190285 +CONST MediumOrchid~& = 4290401747 +CONST MediumPurple~& = 4287852763 +CONST MediumSeaGreen~& = 4282168177 +CONST MediumSlateBlue~& = 4286277870 +CONST MediumSpringGreen~& = 4278254234 +CONST MediumTurquoise~& = 4282962380 +CONST MediumVioletRed~& = 4291237253 +CONST Melon~& = 4294818996 +CONST MidnightBlue~& = 4279834992 +CONST MintCream~& = 4294311930 +CONST MistyRose~& = 4294960353 +CONST Moccasin~& = 4294960309 +CONST MountainMeadow~& = 4281383567 +CONST Mulberry~& = 4291120012 +CONST NavajoWhite~& = 4294958765 +CONST Navy~& = 4278190208 +CONST NavyBlue~& = 4279858386 +CONST NeonCarrot~& = 4294943555 +CONST OldLace~& = 4294833638 +CONST Olive~& = 4286611456 +CONST OliveDrab~& = 4285238819 +CONST OliveGreen~& = 4290426988 +CONST Orange~& = 4294944000 +CONST OrangeRed~& = 4294919424 +CONST OrangeYellow~& = 4294497640 +CONST Orchid~& = 4292505814 +CONST OuterSpace~& = 4282468940 +CONST OutrageousOrange~& = 4294929994 +CONST PacificBlue~& = 4280068553 +CONST PaleGoldenRod~& = 4293847210 +CONST PaleGreen~& = 4288215960 +CONST PaleTurquoise~& = 4289720046 +CONST PaleVioletRed~& = 4292571283 +CONST PapayaWhip~& = 4294963157 +CONST Peach~& = 4294954923 +CONST PeachPuff~& = 4294957753 +CONST Periwinkle~& = 4291154150 +CONST Peru~& = 4291659071 +CONST PiggyPink~& = 4294827494 +CONST PineGreen~& = 4279599224 +CONST Pink~& = 4294951115 +CONST PinkFlamingo~& = 4294735101 +CONST PinkSherbet~& = 4294414247 +CONST Plum~& = 4292714717 +CONST PowderBlue~& = 4289781990 +CONST Purple~& = 4286578816 +CONST PurpleHeart~& = 4285809352 +CONST PurpleMountainsMajesty~& = 4288512442 +CONST PurplePizzazz~& = 4294856410 +CONST RadicalRed~& = 4294920556 +CONST RawSienna~& = 4292250201 +CONST RawUmber~& = 4285614883 +CONST RazzleDazzleRose~& = 4294920400 +CONST Razzmatazz~& = 4293076331 +CONST NP_Red~& = 4294901760 +CONST RedOrange~& = 4294923081 +CONST RedViolet~& = 4290790543 +CONST RobinsEggBlue~& = 4280274635 +CONST RosyBrown~& = 4290547599 +CONST RoyalBlue~& = 4282477025 +CONST RoyalPurple~& = 4286075305 +CONST SaddleBrown~& = 4287317267 +CONST Salmon~& = 4294606962 +CONST SandyBrown~& = 4294222944 +CONST Scarlet~& = 4294715463 +CONST ScreaminGreen~& = 4285988730 +CONST SeaGreen~& = 4281240407 +CONST SeaShell~& = 4294964718 +CONST Sepia~& = 4289030479 +CONST Shadow~& = 4287265117 +CONST Shamrock~& = 4282764962 +CONST ShockingPink~& = 4294672125 +CONST Sienna~& = 4288696877 +CONST Silver~& = 4290822336 +CONST SkyBlue~& = 4287090411 +CONST SlateBlue~& = 4285160141 +CONST SlateGray~& = 4285563024 +CONST Snow~& = 4294966010 +CONST SpringGreen~& = 4278255487 +CONST SteelBlue~& = 4282811060 +CONST Sunglow~& = 4294954824 +CONST SunsetOrange~& = 4294794835 +CONST Tann~& = 4291998860 +CONST Teal~& = 4278222976 +CONST TealBlue~& = 4279805877 +CONST Thistle~& = 4292394968 +CONST TickleMePink~& = 4294740396 +CONST Timberwolf~& = 4292597714 +CONST Tomato~& = 4294927175 +CONST TropicalRainForest~& = 4279730285 +CONST Tumbleweed~& = 4292782728 +CONST Turquoise~& = 4282441936 +CONST TurquoiseBlue~& = 4286045671 +CONST UnmellowYellow~& = 4294967142 +CONST Violet~& = 4293821166 +CONST VioletBlue~& = 4281486002 +CONST VioletRed~& = 4294398868 +CONST VividTangerine~& = 4294942857 +CONST VividViolet~& = 4287582365 +CONST Wheat~& = 4294303411 +CONST White~& = 4294967295 +CONST Whitesmoke~& = 4294309365 +CONST WildBlueYonder~& = 4288851408 +CONST WildStrawberry~& = 4294919076 +CONST WildWatermelon~& = 4294732933 +CONST Wisteria~& = 4291667166 +CONST Yellow~& = 4294967040 +CONST YellowGreen~& = 4288335154 +CONST YellowOrange~& = 4294946370 + From e09c4a9ec940eb3ec9de2b9bf5294544b7010312 Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Wed, 7 Feb 2024 21:33:32 +0100 Subject: [PATCH 6/7] 6.) Add a test case for $INCLUDEONCE --- tests/compile_tests/include_once/incl.bm | 7 +++++++ tests/compile_tests/include_once/once.bm | 7 +++++++ tests/compile_tests/include_once/test.bas | 11 +++++++++++ tests/compile_tests/include_once/test.output | 7 +++++++ 4 files changed, 32 insertions(+) create mode 100644 tests/compile_tests/include_once/incl.bm create mode 100644 tests/compile_tests/include_once/once.bm create mode 100644 tests/compile_tests/include_once/test.bas create mode 100644 tests/compile_tests/include_once/test.output diff --git a/tests/compile_tests/include_once/incl.bm b/tests/compile_tests/include_once/incl.bm new file mode 100644 index 000000000..fd4eafa6c --- /dev/null +++ b/tests/compile_tests/include_once/incl.bm @@ -0,0 +1,7 @@ +'included 2 times by test.bas + +PRINT +PRINT "This prints from file incl.bm, it should appear 2 times on screen." + +'$INCLUDE: 'once.bm' + diff --git a/tests/compile_tests/include_once/once.bm b/tests/compile_tests/include_once/once.bm new file mode 100644 index 000000000..f422e317a --- /dev/null +++ b/tests/compile_tests/include_once/once.bm @@ -0,0 +1,7 @@ +'included by test.bas and incl.bm + +$INCLUDEONCE + +PRINT +PRINT "This prints from file once.bm, and should appear only once on screen." + diff --git a/tests/compile_tests/include_once/test.bas b/tests/compile_tests/include_once/test.bas new file mode 100644 index 000000000..7821750b8 --- /dev/null +++ b/tests/compile_tests/include_once/test.bas @@ -0,0 +1,11 @@ +'this is a test for $INCLUDEONCE behavior + +$CONSOLE +_DEST _CONSOLE + +PRINT "This prints from the test.bas main program." + +'$INCLUDE: 'incl.bm' +'$INCLUDE: 'once.bm' +'$INCLUDE: 'incl.bm' + diff --git a/tests/compile_tests/include_once/test.output b/tests/compile_tests/include_once/test.output new file mode 100644 index 000000000..d8894d7f5 --- /dev/null +++ b/tests/compile_tests/include_once/test.output @@ -0,0 +1,7 @@ +This prints from the test.bas main program. + +This prints from file incl.bm, it should appear 2 times on screen. + +This prints from file once.bm, and should appear only once on screen. + +This prints from file incl.bm, it should appear 2 times on screen. From 36af0b292a1abadc62be2bff26f711cd341d924d Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Wed, 7 Feb 2024 22:01:34 +0100 Subject: [PATCH 7/7] 7.) Fix test case - add SYSTEM to avoid deadlock of workflow --- tests/compile_tests/include_once/test.bas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/compile_tests/include_once/test.bas b/tests/compile_tests/include_once/test.bas index 7821750b8..01c80f594 100644 --- a/tests/compile_tests/include_once/test.bas +++ b/tests/compile_tests/include_once/test.bas @@ -9,3 +9,5 @@ PRINT "This prints from the test.bas main program." '$INCLUDE: 'once.bm' '$INCLUDE: 'incl.bm' +SYSTEM +