-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into audio-ma_vfs-test
- Loading branch information
Showing
735 changed files
with
105,495 additions
and
104,297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
|
||
#include "libqb-common.h" | ||
|
||
#include <inttypes.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
#include "error_handle.h" | ||
#include "qbs.h" | ||
|
||
// modern _TOSTR() functions (no leading space and no QB4.5 compatible rounding) | ||
// signed integers | ||
qbs *qbs__tostr(int64_t value, int32_t digits, int32_t passed) { | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%" PRId64, value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
qbs *qbs__tostr(int32_t value, int32_t digits, int32_t passed) { | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%i", value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
qbs *qbs__tostr(int16_t value, int32_t digits, int32_t passed) { | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%i", value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
qbs *qbs__tostr(int8_t value, int32_t digits, int32_t passed) { | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%i", value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
// unsigned integers | ||
qbs *qbs__tostr(uint64_t value, int32_t digits, int32_t passed) { | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%" PRIu64, value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
qbs *qbs__tostr(uint32_t value, int32_t digits, int32_t passed) { | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%u", value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
qbs *qbs__tostr(uint16_t value, int32_t digits, int32_t passed) { | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%u", value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
qbs *qbs__tostr(uint8_t value, int32_t digits, int32_t passed) { | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%u", value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
// floating points | ||
qbs *qbs__tostr(float value, int32_t digits, int32_t passed) { | ||
if (passed) { | ||
if (digits < 0) { | ||
error(QB_ERROR_ILLEGAL_FUNCTION_CALL); | ||
return qbs_new_txt(""); | ||
} | ||
if (digits < 1) digits = 1; | ||
if (digits > 7) digits = 7; | ||
} else { | ||
digits = 7; | ||
} | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%.*G", digits, value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} | ||
return tqbs; | ||
} | ||
qbs *qbs__tostr(double value, int32_t digits, int32_t passed) { | ||
if (passed) { | ||
if (digits < 0) { | ||
error(QB_ERROR_ILLEGAL_FUNCTION_CALL); | ||
return qbs_new_txt(""); | ||
} | ||
if (digits < 1) digits = 1; | ||
if (digits > 16) digits = 16; | ||
} else { | ||
digits = 16; | ||
} | ||
qbs *tqbs = qbs_new(32, 1); | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%.*G", digits, value); | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} else { | ||
char *ex = strrchr((char*)tqbs->chr, (int)'E'); | ||
if (ex != NULL) ex[0] = 'D'; | ||
} | ||
return tqbs; | ||
} | ||
qbs *qbs__tostr(long double value, int32_t digits, int32_t passed) { | ||
if (passed) { | ||
if (digits < 0) { | ||
error(QB_ERROR_ILLEGAL_FUNCTION_CALL); | ||
return qbs_new_txt(""); | ||
} | ||
if (digits < 1) digits = 1; | ||
if (digits > 19) digits = 19; | ||
} else { | ||
digits = 19; | ||
} | ||
qbs *tqbs = qbs_new(32, 1); | ||
#ifdef QB64_MINGW | ||
tqbs->len = __mingw_snprintf((char *)tqbs->chr, 32, "%.*LG", digits, value); | ||
#else | ||
tqbs->len = snprintf((char *)tqbs->chr, 32, "%.*LG", digits, value); | ||
#endif | ||
if (tqbs->len < 0 || tqbs->len >= 32) { | ||
error(QB_ERROR_INTERNAL_ERROR); | ||
tqbs->len = 0; | ||
} else { | ||
char *ex = strrchr((char*)tqbs->chr, (int)'E'); | ||
if (ex != NULL) ex[0] = 'F'; | ||
} | ||
return tqbs; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
g++ -no-pie -std=gnu++17 -fno-strict-aliasing -Wno-conversion-null -DFREEGLUT_STATIC -I./internal/c/libqb/include -I./internal/c/parts/core/freeglut/include -I./internal/c/parts/core/glew/include -DDEPENDENCY_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_ICON -DDEPENDENCY_NO_SCREENIMAGE internal/c/qbx.cpp -c -o internal/c/qbx.o | ||
g++ -no-pie -std=gnu++17 -fno-strict-aliasing -Wno-conversion-null -DFREEGLUT_STATIC -I./internal/c/libqb/include -I./internal/c/parts/core/freeglut/include -I./internal/c/parts/core/glew/include -DDEPENDENCY_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_ICON -DDEPENDENCY_NO_SCREENIMAGE ./internal/c/libqb_make_00010100.o ./internal/c/qbx.o -o "/home/runner/work/QB64pe/QB64pe/qb64pe" ./internal/c/libqb/src/threading.o ./internal/c/libqb/src/buffer.o ./internal/c/libqb/src/bitops.o ./internal/c/libqb/src/command.o ./internal/c/libqb/src/environ.o ./internal/c/libqb/src/file-fields.o ./internal/c/libqb/src/filepath.o ./internal/c/libqb/src/filesystem.o ./internal/c/libqb/src/datetime.o ./internal/c/libqb/src/error_handle.o ./internal/c/libqb/src/gfs.o ./internal/c/libqb/src/qblist.o ./internal/c/libqb/src/hexoctbin.o ./internal/c/libqb/src/mem.o ./internal/c/libqb/src/math.o ./internal/c/libqb/src/shell.o ./internal/c/libqb/src/qbs.o ./internal/c/libqb/src/qbs_str.o ./internal/c/libqb/src/qbs_cmem.o ./internal/c/libqb/src/qbs_mk_cv.o ./internal/c/libqb/src/string_functions.o ./internal/c/libqb/src/http.o ./internal/c/libqb/src/threading-posix.o ./internal/c/libqb/src/glut-main-thread.o ./internal/c/libqb/src/glut-message.o ./internal/c/libqb/src/glut-msg-queue.o ./internal/c/parts/gui/tinyfiledialogs.o ./internal/c/parts/gui/gui.o ./internal/c/parts/os/clipboard/clipboard.a ./internal/c/parts/video/font/font.o ./internal/c/parts/video/font/freetype/freetype.a ./internal/c/parts/audio/stub_audio.o ./internal/c/parts/compression/compression.a ./internal/c/parts/core/freeglut.a ./internal/c/parts/core/glew/glew.o -lGL -lGLU -lX11 -lpthread -ldl -lrt -lxcb -lpng -lcurl | ||
g++ -no-pie -std=gnu++17 -fno-strict-aliasing -Wno-conversion-null -DFREEGLUT_STATIC -I./internal/c/libqb/include -I./internal/c/parts/core/freeglut/include -I./internal/c/parts/core/glew/include -DDEPENDENCY_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_ICON -DDEPENDENCY_NO_SCREENIMAGE ./internal/c/libqb_make_00010100.o ./internal/c/qbx.o -o "/home/runner/work/QB64pe/QB64pe/qb64pe" ./internal/c/libqb/src/threading.o ./internal/c/libqb/src/buffer.o ./internal/c/libqb/src/bitops.o ./internal/c/libqb/src/command.o ./internal/c/libqb/src/environ.o ./internal/c/libqb/src/file-fields.o ./internal/c/libqb/src/filepath.o ./internal/c/libqb/src/filesystem.o ./internal/c/libqb/src/datetime.o ./internal/c/libqb/src/error_handle.o ./internal/c/libqb/src/gfs.o ./internal/c/libqb/src/qblist.o ./internal/c/libqb/src/hexoctbin.o ./internal/c/libqb/src/mem.o ./internal/c/libqb/src/math.o ./internal/c/libqb/src/shell.o ./internal/c/libqb/src/qbs.o ./internal/c/libqb/src/qbs_str.o ./internal/c/libqb/src/qbs__tostr.o ./internal/c/libqb/src/qbs_cmem.o ./internal/c/libqb/src/qbs_mk_cv.o ./internal/c/libqb/src/string_functions.o ./internal/c/libqb/src/http.o ./internal/c/libqb/src/threading-posix.o ./internal/c/libqb/src/glut-main-thread.o ./internal/c/libqb/src/glut-message.o ./internal/c/libqb/src/glut-msg-queue.o ./internal/c/parts/gui/tinyfiledialogs.o ./internal/c/parts/gui/gui.o ./internal/c/parts/os/clipboard/clipboard.a ./internal/c/parts/video/font/font.o ./internal/c/parts/video/font/freetype/freetype.a ./internal/c/parts/audio/stub_audio.o ./internal/c/parts/compression/compression.a ./internal/c/parts/core/freeglut.a ./internal/c/parts/core/glew/glew.o -lGL -lGLU -lX11 -lpthread -ldl -lrt -lxcb -lpng -lcurl | ||
objcopy --only-keep-debug "/home/runner/work/QB64pe/QB64pe/qb64pe" "./internal/temp/qb64pe.sym" | ||
objcopy --strip-unneeded "/home/runner/work/QB64pe/QB64pe/qb64pe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
qbs *_FUNC_GETPREVELEMENT_STRING_GETPREVELEMENT=NULL; | ||
if (!_FUNC_GETPREVELEMENT_STRING_GETPREVELEMENT)_FUNC_GETPREVELEMENT_STRING_GETPREVELEMENT=qbs_new(0,0); | ||
qbs*oldstr3709=NULL; | ||
qbs*oldstr3713=NULL; | ||
if(_FUNC_GETPREVELEMENT_STRING_A->tmp||_FUNC_GETPREVELEMENT_STRING_A->fixed||_FUNC_GETPREVELEMENT_STRING_A->readonly){ | ||
oldstr3709=_FUNC_GETPREVELEMENT_STRING_A; | ||
if (oldstr3709->cmem_descriptor){ | ||
_FUNC_GETPREVELEMENT_STRING_A=qbs_new_cmem(oldstr3709->len,0); | ||
oldstr3713=_FUNC_GETPREVELEMENT_STRING_A; | ||
if (oldstr3713->cmem_descriptor){ | ||
_FUNC_GETPREVELEMENT_STRING_A=qbs_new_cmem(oldstr3713->len,0); | ||
}else{ | ||
_FUNC_GETPREVELEMENT_STRING_A=qbs_new(oldstr3709->len,0); | ||
_FUNC_GETPREVELEMENT_STRING_A=qbs_new(oldstr3713->len,0); | ||
} | ||
memcpy(_FUNC_GETPREVELEMENT_STRING_A->chr,oldstr3709->chr,oldstr3709->len); | ||
memcpy(_FUNC_GETPREVELEMENT_STRING_A->chr,oldstr3713->chr,oldstr3713->len); | ||
} | ||
int32 *_FUNC_GETPREVELEMENT_LONG_I=NULL; | ||
if(_FUNC_GETPREVELEMENT_LONG_I==NULL){ | ||
_FUNC_GETPREVELEMENT_LONG_I=(int32*)mem_static_malloc(4); | ||
*_FUNC_GETPREVELEMENT_LONG_I=0; | ||
} | ||
byte_element_struct *byte_element_3710=NULL; | ||
if (!byte_element_3710){ | ||
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_3710=(byte_element_struct*)(mem_static_pointer-12); else byte_element_3710=(byte_element_struct*)mem_static_malloc(12); | ||
byte_element_struct *byte_element_3714=NULL; | ||
if (!byte_element_3714){ | ||
if ((mem_static_pointer+=12)<mem_static_limit) byte_element_3714=(byte_element_struct*)(mem_static_pointer-12); else byte_element_3714=(byte_element_struct*)mem_static_malloc(12); | ||
} |
Oops, something went wrong.