mirror of
https://github.com/QB64Official/qb64.git
synced 2024-05-12 12:00:14 +00:00
Compare commits
10 commits
12458c63bd
...
a62074f27b
Author | SHA1 | Date | |
---|---|---|---|
a62074f27b | |||
c7fd3bb5d9 | |||
53784f5296 | |||
60d2234540 | |||
3cef4b4088 | |||
04957e9b85 | |||
04546ae979 | |||
7ad1aac065 | |||
60e3bc4581 | |||
ab386e04f1 |
|
@ -11555,12 +11555,19 @@ void qbg_sub_locate(int32 row,int32 column,int32 cursor,int32 start,int32 stop,i
|
|||
HANDLE output = GetStdHandle (STD_OUTPUT_HANDLE);
|
||||
SetConsoleCursorPosition(output, pos);
|
||||
#else
|
||||
// We don't have a good way of getting the current cursor position, so we ignore any LOCATEs
|
||||
// that don't give an absolute position.
|
||||
if (!(passed & 1 && passed & 2))
|
||||
if (passed & 1 && passed & 2){
|
||||
printf("\033[%d;%dH", row, column);
|
||||
return;
|
||||
printf("\033[%d;%dH", row, column);
|
||||
#endif
|
||||
}
|
||||
if (passed & 1){
|
||||
printf("\033[%dd", row);
|
||||
return;
|
||||
}
|
||||
if (passed & 2){
|
||||
printf("\033[%d;%dG", column);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -19077,7 +19084,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
|||
if (new_error) return 0;
|
||||
|
||||
#ifdef QB64_WINDOWS
|
||||
if ((read_page->console && !passed)||i==console_image){
|
||||
if ((write_page->console && !passed)||i==console_image){
|
||||
SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1};
|
||||
HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0);
|
||||
CONSOLE_SCREEN_BUFFER_INFO cl_bufinfo;
|
||||
|
@ -19086,7 +19093,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
|||
}
|
||||
#endif
|
||||
#ifdef QB64_UNIX
|
||||
if ((read_page->console && !passed)||i==console_image){
|
||||
if ((write_page->console && !passed)||i==console_image){
|
||||
struct winsize w;
|
||||
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
|
||||
return w.ws_col;
|
||||
|
@ -19113,7 +19120,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
|||
if (new_error) return 0;
|
||||
|
||||
#ifdef QB64_WINDOWS
|
||||
if ((read_page->console && !passed)||i==console_image){
|
||||
if ((write_page->console && !passed)||i==console_image){
|
||||
SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1};
|
||||
HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0);
|
||||
CONSOLE_SCREEN_BUFFER_INFO cl_bufinfo;
|
||||
|
@ -19123,7 +19130,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
|||
}
|
||||
#endif
|
||||
#ifdef QB64_UNIX
|
||||
if ((read_page->console && !passed)||i==console_image){
|
||||
if ((write_page->console && !passed)||i==console_image){
|
||||
struct winsize w;
|
||||
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
|
||||
return w.ws_row;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
objcopy -Ibinary -Oelf32-i386 -Bi386
|
|
@ -1,3 +0,0 @@
|
|||
objcopy -Ibinary -Oelf64-x86-64 -Bi386:x86-64
|
||||
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
#error "Unknown system; refusing to build. Edit os.h if needed"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) || defined(QB64_MACOSX) || defined(__aarch64__)
|
||||
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) || defined(__PPC64__) || defined(QB64_MACOSX) || defined(__aarch64__)
|
||||
#define QB64_64
|
||||
#else
|
||||
#define QB64_32
|
||||
|
|
|
@ -13123,9 +13123,30 @@ IF os$ = "LNX" THEN
|
|||
|
||||
IF inline_DATA = 0 THEN
|
||||
IF DataOffset THEN
|
||||
IF INSTR(_OS$, "[32BIT]") THEN b$ = "32" ELSE b$ = "64"
|
||||
OPEN ".\internal\c\makedat_lnx" + b$ + ".txt" FOR BINARY AS #150: LINE INPUT #150, a$: CLOSE #150
|
||||
a$ = a$ + " " + tmpdir2$ + "data.bin " + tmpdir2$ + "data.o"
|
||||
SHELL _HIDE "ld --verbose >internal/temp/ld-output.txt"
|
||||
OPEN "internal/temp/ld-output.txt" FOR BINARY AS #150
|
||||
DO UNTIL EOF(150)
|
||||
LINE INPUT #150, a$
|
||||
IF LEN(a$) THEN
|
||||
s$ = "OUTPUT_FORMAT(" + CHR$(34)
|
||||
x1 = INSTR(a$, s$)
|
||||
IF x1 THEN
|
||||
x1 = x1 + LEN(s$)
|
||||
x2 = INSTR(x1, a$, CHR$(34))
|
||||
format$ = MID$(a$, x1, x2 - x1)
|
||||
ELSE
|
||||
s$ = "OUTPUT_ARCH("
|
||||
x1 = INSTR(a$, s$)
|
||||
IF x1 THEN
|
||||
x1 = x1 + LEN(s$)
|
||||
x2 = INSTR(x1, a$, ")")
|
||||
architecture$ = MID$(a$, x1, x2 - x1)
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
LOOP
|
||||
CLOSE #150
|
||||
a$ = "objcopy -Ibinary -O" + format$ + " -B" + architecture$ + " " + tmpdir2$ + "data.bin " + tmpdir2$ + "data.o"
|
||||
CHDIR ".\internal\c"
|
||||
SHELL _HIDE a$ + " 2>> ../../" + compilelog$
|
||||
CHDIR "..\.."
|
||||
|
@ -24924,14 +24945,14 @@ FUNCTION EvaluateNumbers$ (p, num() AS STRING)
|
|||
EXIT FUNCTION
|
||||
END IF
|
||||
|
||||
n1 = VAL(num(1)) \ FIX(VAL(num(2)))
|
||||
n1 = VAL(num(1)) \ VAL(num(2))
|
||||
CASE "MOD"
|
||||
IF FIX(VAL(num(2))) = 0 THEN
|
||||
EvaluateNumbers$ = "ERROR - Division By Zero"
|
||||
EXIT FUNCTION
|
||||
END IF
|
||||
|
||||
n1 = VAL(num(1)) MOD FIX(VAL(num(2)))
|
||||
n1 = VAL(num(1)) MOD VAL(num(2))
|
||||
|
||||
CASE "+": n1 = VAL(num(1)) + VAL(num(2))
|
||||
CASE "-":
|
||||
|
@ -26321,4 +26342,4 @@ SUB DebugPrint(text$)
|
|||
OPEN debugPath$ + "/qb64.log" FOR APPEND AS #fn
|
||||
PRINT #fn, text$
|
||||
CLOSE #fn
|
||||
END SUB
|
||||
END SUB
|
||||
|
|
Loading…
Reference in a new issue