1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-05 20:30:24 +00:00

Expanded new config.txt file error checking routines to be more comprehensive.

This commit is contained in:
SMcNeill 2015-07-16 12:39:29 -04:00
parent f167d054b2
commit d7aad9cc49
2 changed files with 18630 additions and 18603 deletions

View file

@ -145,7 +145,12 @@ IF LoadedIDESettings = 0 THEN
IF UCASE$(value$) = "TRUE" OR ideautolayout <> 0 THEN
ideautolayout = 1
ELSE
IF UCASE$(value$) <> "FALSE" AND value$ <> "0" THEN WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoFormat", "TRUE"
IF UCASE$(value$) <> "FALSE" AND value$ <> "0" THEN
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoFormat", "TRUE"
ideautolayout = 1
else
ideautolayout = 0
end if
END IF
result = ReadConfigSetting("IDE_AutoIndent", value$)
@ -153,20 +158,39 @@ IF LoadedIDESettings = 0 THEN
IF UCASE$(value$) = "TRUE" OR ideautoindent <> 0 THEN
ideautoindent = 1
ELSE
IF UCASE$(value$) <> "FALSE" AND value$ <> "0" THEN WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoIndent", "TRUE"
IF UCASE$(value$) <> "FALSE" AND value$ <> "0" THEN
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoIndent", "TRUE"
ideautoindent = 1
else
ideautoindent = 0
end if
END IF
result = ReadConfigSetting("IDE_IndentSize", value$)
ideautoindentsize = VAL(value$)
IF ideautoindentsize < 0 OR ideautoindentsize > 64 THEN ideautoindentsize = 4: WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_IndentSize", "4"
if result = 0 then
ideautoindentsize = 4
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_IndentSize", "4"
else
IF ideautoindentsize < 0 OR ideautoindentsize > 64 THEN ideautoindentsize = 4
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_IndentSize", "4"
end if
result = ReadConfigSetting("IDE_CustomFont", value$)
idecustomfont = VAL(value$)
IF UCASE$(value$) = "TRUE" OR idecustomfont <> 0 THEN idecustomfont = 1 ELSE WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_CustomFont", "FALSE"
IF UCASE$(value$) = "TRUE" OR idecustomfont <> 0 THEN
idecustomfont = 1
ELSE
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_CustomFont", "FALSE"
idecustomfont = 0
END IF
result = ReadConfigSetting("IDE_CustomFont$", value$)
idecustomfontfile$ = value$
IF idecustomfontfile$ = "" THEN WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_CustomFont$", "c:\windows\fonts\lucon.ttf"
if result = 0 OR idecustomfont$ = "" then
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_CustomFont$", "c:\windows\fonts\lucon.ttf"
idecustomfontfile$ = "c:\windows\fonts\lucon.ttf"
end if
result = ReadConfigSetting("IDE_CustomFontSize", value$)
idecustomfontheight = VAL(value$)
@ -183,7 +207,10 @@ IF LoadedIDESettings = 0 THEN
result = ReadConfigSetting("DeBugInfo", value$)
idedebuginfo = VAL(value$)
IF UCASE$(LEFT$(value$, 4)) = "TRUE" THEN idedebuginfo = 1
IF idedebuginfo = 0 THEN WriteConfigSetting "'[GENERAL SETTINGS]", "DebugInfo", "FALSE 'INTERNAL VARIABLE USE ONLY!! DO NOT MANUALLY CHANGE!"
IF result = 0 OR idedebuginfo <> 1 THEN
WriteConfigSetting "'[GENERAL SETTINGS]", "DebugInfo", "FALSE 'INTERNAL VARIABLE USE ONLY!! DO NOT MANUALLY CHANGE!"
idedebuginfo = 0
END IF
Include_GDB_Debugging_Info = idedebuginfo
result = ReadConfigSetting("IDE_AndroidMenu", value$)

View file

@ -23984,7 +23984,7 @@ IF LOF(InFile) THEN
END IF
END IF
END IF
CLOSE #Infile
CLOSE #InFile
ReadConfigSetting = 0 'failed to find the setting
END FUNCTION