1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-01 09:10:37 +00:00

Merge pull request #193 from QB64Team/patches

Patches
This commit is contained in:
Fellippe Heitor 2021-09-21 23:18:56 -03:00 committed by GitHub
commit e29e12204e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 10 deletions

View file

@ -961,6 +961,14 @@ void call_setbits(uint32 bsize,ptrszint *array,ptrszint i,int64 val) {
setbits(bsize,(uint8*)(*array),i,val);
}
int32 logical_drives() {
#ifdef QB64_WINDOWS
return GetLogicalDrives();
#else
return 0;
#endif
}
inline ptrszint array_check(uptrszint index,uptrszint limit){
//nb. forces signed index into an unsigned variable for quicker comparison
if (index<limit) return index;

View file

@ -373,7 +373,7 @@ SUB vwatch (globalVariables AS _OFFSET, localVariables AS _OFFSET)
IF INSTR(vw_varType$, "UNSIGNED") THEN
vw_buf$ = _MK$(_UNSIGNED _INTEGER64, call_getubits~&&(vw_i, vw_address, vw_realArrayIndex))
ELSE
vw_buf$ = _MK$(_UNSIGNED _INTEGER64, call_getbits&&(vw_i, vw_address, vw_realArrayIndex))
vw_buf$ = _MK$(_INTEGER64, call_getbits&&(vw_i, vw_address, vw_realArrayIndex))
END IF
IF vw_checkingWatchpoints THEN RETURN

View file

@ -145,7 +145,6 @@ FUNCTION ide2 (ignore)
'report any IDE errors which have occurred
IF ideerror THEN
IF IdeDebugMode THEN
IdeDebugMode = 0
COLOR 0, 7: _PRINTSTRING (1, 1), menubar$
END IF
mustdisplay = 1
@ -187,11 +186,15 @@ FUNCTION ide2 (ignore)
'a more serious error; let's report something that'll help bug reporting
inclerrorline = _INCLERRORLINE
IF inclerrorline THEN
errorat$ = errorat$ + CHR$(10) + " " + CHR$(10) + "(module: " + _
RemoveFileExtension$(LEFT$(_INCLERRORFILE$, 60))
errorat$ = errorat$ + ", on line: " + str2$(inclerrorline) + ", " + MID$(AutoBuildMsg$, 10) + ")"
errorat$ = errorat$ + CHR$(10) + " " + CHR$(10) + "(module: " + _
RemoveFileExtension$(LEFT$(_INCLERRORFILE$, 60))
errorat$ = errorat$ + ", on line: " + str2$(inclerrorline)
IF LEN(AutoBuildMsg$) THEN errorat$ = errorat$ + ", " + MID$(AutoBuildMsg$, 10)
errorat$ = errorat$ + ")"
ELSE
errorat$ = errorat$ + CHR$(10) + " " + CHR$(10) + "(on line: " + str2$(_ERRORLINE) + ", " + MID$(AutoBuildMsg$, 10) + ")"
errorat$ = errorat$ + CHR$(10) + " " + CHR$(10) + "(on line: " + str2$(_ERRORLINE)
IF LEN(AutoBuildMsg$) THEN errorat$ = errorat$ + ", " + MID$(AutoBuildMsg$, 10)
errorat$ = errorat$ + ")"
END IF
END IF
@ -746,6 +749,12 @@ FUNCTION ide2 (ignore)
changingTcpPort = 0
END IF
IF IdeDebugMode THEN
idecompiling = 0
ready = 1
GOSUB redrawItAll
GOTO ExitDebugMode 'IdeDebugMode must be 0 here, if not, DebugMode errored.
END IF
IF c$ = CHR$(254) THEN
'$DEBUG mode on
IdeDebugMode = 1
@ -767,6 +776,7 @@ FUNCTION ide2 (ignore)
ready = 1
_RESIZE OFF
DebugMode
ExitDebugMode:
IF WatchListToConsole THEN _CONSOLE OFF
UpdateMenuHelpLine ""
SELECT CASE IdeDebugMode
@ -8200,7 +8210,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
FOR y = 1 TO totalVisibleVariables
varType$ = usedVariableList(y).varType
IF INSTR(varType$, "STRING *") THEN varType$ = "STRING"
IF INSTR(varType$, "_BIT *") THEN varType$ = "_BIT"
IF INSTR(varType$, "BIT *") THEN varType$ = "_BIT"
IF (usedVariableList(varDlgList(y).index).isarray AND LEN(usedVariableList(varDlgList(y).index).watchRange) = 0) OR _
INSTR(nativeDataTypes$, varType$) = 0 THEN _CONTINUE
usedVariableList(varDlgList(y).index).watch = -1
@ -8291,7 +8301,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
varType$ = usedVariableList(tempIndex&).varType
tempVarType$ = varType$
IF INSTR(varType$, "STRING *") THEN tempVarType$ = "STRING"
IF INSTR(varType$, "_BIT *") THEN tempVarType$ = "_BIT"
IF INSTR(varType$, "BIT *") THEN tempVarType$ = "_BIT"
IF INSTR(nativeDataTypes$, tempVarType$) = 0 THEN
'It's a UDT
tempIsUDT& = -1
@ -8758,7 +8768,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
varType$ = usedVariableList(varDlgList(y).index).varType
IF INSTR(varType$, "STRING *") THEN varType$ = "STRING"
IF INSTR(varType$, "_BIT *") THEN varType$ = "_BIT"
IF INSTR(varType$, "BIT *") THEN varType$ = "_BIT"
IF INSTR(nativeDataTypes$, varType$) = 0 THEN
'It's a UDT
elementIndexes$ = ""
@ -14306,12 +14316,19 @@ FUNCTION idezpathlist$ (path$)
IF LEN(pathlist$) THEN pathlist$ = ".." + sep + pathlist$ ELSE pathlist$ = ".."
END IF
'add drive paths
DECLARE LIBRARY
FUNCTION logical_drives& ()
END DECLARE
d = logical_drives&
FOR i = 0 TO 25
IF RIGHT$(pathlist$, 1) <> sep AND LEN(pathlist$) > 0 THEN pathlist$ = pathlist$ + sep
IF _DIREXISTS(CHR$(65 + i) + ":\") THEN
IF _READBIT(d, i) THEN
pathlist$ = pathlist$ + CHR$(65 + i) + ":"
END IF
NEXT
idezpathlist$ = pathlist$
EXIT FUNCTION
END IF

View file

@ -792,6 +792,7 @@ DIM SHARED linefragment AS STRING
DIM SHARED arrayprocessinghappened AS INTEGER
DIM SHARED stringprocessinghappened AS INTEGER
DIM SHARED cleanupstringprocessingcall AS STRING
DIM SHARED inputfunctioncalled AS _BYTE
DIM SHARED recompile AS INTEGER 'forces recompilation
'COMMON SHARED cmemlist() AS INTEGER
DIM SHARED optionbase AS INTEGER
@ -1451,6 +1452,7 @@ linefragment$ = ""
idn = 0
arrayprocessinghappened = 0
stringprocessinghappened = 0
inputfunctioncalled = 0
subfuncn = 0
closedsubfunc = 0
subfunc = ""
@ -11206,6 +11208,13 @@ DO
THENGOTO = 0
finishedline2:
IF inputfunctioncalled THEN
inputfunctioncalled = 0
IF vWatchOn = 1 THEN
PRINT #12, "*__LONG_VWATCH_LINENUMBER= -5; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
END IF
END IF
IF arrayprocessinghappened = 1 THEN arrayprocessinghappened = 0
inclinenump$ = ""
@ -16582,6 +16591,12 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG)
targetid = currentid
IF RTRIM$(id2.callname) = "func_stub" THEN Give_Error "Command not implemented": EXIT FUNCTION
IF RTRIM$(id2.callname) = "func_input" AND inputfunctioncalled = 0 THEN
inputfunctioncalled = -1
IF vWatchOn = 1 THEN
PRINT #12, "*__LONG_VWATCH_LINENUMBER= -4; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);"
END IF
END IF
SetDependency id2.Dependency