From 2a56322783c4ff6cf05d2ae9b5596ba8ff63a297 Mon Sep 17 00:00:00 2001 From: SteveMcNeill Date: Wed, 27 Nov 2019 03:04:25 -0500 Subject: [PATCH] Patch to $IF UNDEFINED --- .gitignore | 1 + setup_win.bat | 6 ------ source/qb64.bas | 26 ++++++++++++++++---------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index eca482e34..6a3fa221d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ internal/version.txt tempfoldersearch.bin internal/c/mingw32 internal/c/mingw64 +internal/c/qbx2.cpp diff --git a/setup_win.bat b/setup_win.bat index 6929f1604..22928f5bc 100644 --- a/setup_win.bat +++ b/setup_win.bat @@ -35,12 +35,6 @@ if exist src.a del src.a call setup_build.bat cd ../../../../../.. -echo Building library 'Zlib' -cd internal/c/parts/zlib-1.2.11/os/win -if exist src.a del src.a -call setup_build.bat -cd ../../../../../.. - echo Building 'QB64' copy internal\source\*.* internal\temp\ >nul copy source\qb64.ico internal\temp\ >nul diff --git a/source/qb64.bas b/source/qb64.bas index f1afabd7b..d2b1529c9 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -1589,8 +1589,6 @@ DO temp$ = LTRIM$(RTRIM$(UCASE$(wholestv$))) - IF temp$ = "$COLOR:0" THEN GOTO finishedlinepp - IF temp$ = "$COLOR:32" THEN GOTO finishedlinepp IF LEFT$(temp$, 4) = "$IF " THEN IF RIGHT$(temp$, 5) <> " THEN" THEN a$ = "$IF without THEN": GOTO errmes @@ -1714,6 +1712,8 @@ DO GOTO finishedlinepp END IF + IF temp$ = "$COLOR:0" THEN GOTO finishedlinepp + IF temp$ = "$COLOR:32" THEN GOTO finishedlinepp cwholeline$ = wholeline$ @@ -2814,6 +2814,7 @@ subfuncn = 0 lastLineReturn = 0 lastLine = 0 firstLine = 1 +UserDefineCount = 6 ColorHackSet = 0 FOR i = 0 TO constlast: constdefined(i) = 0: NEXT 'undefine constants @@ -3058,11 +3059,6 @@ DO END IF END IF - IF ExecLevel(ExecCounter) THEN 'don't check for any more metacommands except the one's which worth with the precompiler - layoutdone = 0 - GOTO finishednonexec 'we don't check for anything inside lines that we've marked for skipping - END IF - IF LEFT$(a3u$, 5) = "$LET " THEN temp$ = a3u$ temp$ = LTRIM$(MID$(temp$, 5)) 'simply shorten our string to parse @@ -3084,6 +3080,12 @@ DO GOTO finishednonexec END IF + IF ExecLevel(ExecCounter) THEN 'don't check for any more metacommands except the one's which worth with the precompiler + layoutdone = 0 + GOTO finishednonexec 'we don't check for anything inside lines that we've marked for skipping + END IF + + IF a3u$ = "$COLOR:0" THEN IF NOT ColorHackSet THEN ColorHackSet = -1 @@ -24928,11 +24930,15 @@ FUNCTION EvalPreIF (text$, err$) NEXT END IF IF INSTR(symbol$, "=") THEN 'check to see if we're equal in any case with = + UserFound = 0 FOR i = 0 TO UserDefineCount - IF UserDefine(0, i) = l$ AND UserDefine(1, i) = r$ THEN result$ = " -1 ": GOTO finishedcheck + IF UserDefine(0, i) = l$ THEN + UserFound = -1 + IF UserDefine(1, i) = r$ THEN result$ = " -1 ": GOTO finishedcheck + END IF NEXT - IF NOT UserFound AND LTRIM$(RTRIM$(r$)) = "UNDEFINED" THEN result$ = " -1 ": GOTO finishedcheck - IF UserFound AND LTRIM$(RTRIM$(r$)) = "DEFINED" THEN result$ = " -1 ": GOTO finishedcheck + IF UserFound = 0 AND LTRIM$(RTRIM$(r$)) = "UNDEFINED" THEN result$ = " -1 ": GOTO finishedcheck + IF UserFound = -1 AND LTRIM$(RTRIM$(r$)) = "DEFINED" THEN result$ = " -1 ": GOTO finishedcheck END IF IF INSTR(symbol$, ">") THEN 'check to see if we're greater than in any case with >