1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-05-12 12:00:14 +00:00

Compare commits

...

6 commits

Author SHA1 Message Date
Cory Smith 12458c63bd
Merge pull request #43 from chfhhd/master
OS X clang standard set to C++11
2023-01-23 13:56:49 -08:00
Cory Smith 8f58d73a1b
Merge pull request #44 from visionmercer/master
_Width and _Height for Linux and Mac console
2023-01-23 13:55:50 -08:00
Christoph Hahn 97e5f20404
Merge pull request #1 from visionmercer/master
Update libqb.cpp _Width and _Height for Linux and Mac console
2023-01-03 03:40:39 +01:00
Christoph Hahn ed54288456 C++ standard set to C++11 for invoked C++ Compiler
This was done to support C++11 like initializations as used in libqb.
2023-01-03 03:17:38 +01:00
visionmercer 1a9f9dd6a9 Update libqb.cpp
Add support for _Width and _Height in Linux and Mac when _Dest is Console.
2023-01-02 18:10:11 +01:00
Christoph Hahn a9e2f4d03d
OS X clang standard set to C++11
This was done to support C++11 like initializations as used in libqb. 

Signed-off-by: Christoph Hahn <chrhhn@gmail.com>
2023-01-01 21:41:32 +01:00
3 changed files with 17 additions and 3 deletions

View file

@ -145,6 +145,7 @@ void setbits(uint32 bsize,uint8 *base,ptrszint i,int64 val){
#ifdef QB64_UNIX
#include <pthread.h>
#include <libgen.h> //required for dirname()
#include <sys/ioctl.h> //required for terminal width and height
#endif
#ifdef QB64_LINUX
@ -19084,6 +19085,13 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
return cl_bufinfo.srWindow.Right - cl_bufinfo.srWindow.Left + 1;
}
#endif
#ifdef QB64_UNIX
if ((read_page->console && !passed)||i==console_image){
struct winsize w;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
return w.ws_col;
}
#endif
if (passed){
if (i>=0){//validate i
@ -19114,6 +19122,13 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
return cl_bufinfo.dwMaximumWindowSize.Y;
}
#endif
#ifdef QB64_UNIX
if ((read_page->console && !passed)||i==console_image){
struct winsize w;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
return w.ws_row;
}
#endif
if (passed){
if (i>=0){//validate i

View file

@ -1,3 +1,2 @@
cd "$(dirname "$0")"
clang++ -c -w -Wall ../../../libqb.mm -D DEPENDENCY_LOADFONT -o libqb_setup.o
clang++ -c -std=c++11 -w -Wall ../../../libqb.mm -D DEPENDENCY_LOADFONT -o libqb_setup.o

View file

@ -53357,7 +53357,7 @@ S_14991:;
if ((*__LONG_MAC)||new_error){
if(qbevent){evnt(12673);if(r)goto S_14991;}
do{
sub_shell2(qbs_add(qbs_add(FUNC_GDB_FIX(qbs_add(qbs_add(qbs_add(qbs_add(qbs_add(qbs_add(qbs_new_txt_len("g++ -c -s -w -Wall libqb.mm ",28),__STRING_DEFINES),qbs_new_txt_len(" -o libqb/os/",13)),__STRING_O),qbs_new_txt_len("/libqb_",7)),__STRING_DEPSTR),qbs_new_txt_len(".o",2))),qbs_new_txt_len(" 2>> ../../",11)),__STRING_COMPILELOG),2);
sub_shell2(qbs_add(qbs_add(FUNC_GDB_FIX(qbs_add(qbs_add(qbs_add(qbs_add(qbs_add(qbs_add(qbs_new_txt_len("g++ -c -std=c++11 -s -w -Wall libqb.mm ",39),__STRING_DEFINES),qbs_new_txt_len(" -o libqb/os/",13)),__STRING_O),qbs_new_txt_len("/libqb_",7)),__STRING_DEPSTR),qbs_new_txt_len(".o",2))),qbs_new_txt_len(" 2>> ../../",11)),__STRING_COMPILELOG),2);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(12674);}while(r);
}else{