mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-28 22:25:52 +00:00
commit
35bed6a084
|
@ -14416,7 +14416,7 @@ void qbg_sub_window(float x1, float y1, float x2, float y2, int32 passed) {
|
||||||
if (write_page->text)
|
if (write_page->text)
|
||||||
goto qbg_sub_window_error;
|
goto qbg_sub_window_error;
|
||||||
if ((!(passed & 1)) && (passed & 2))
|
if ((!(passed & 1)) && (passed & 2))
|
||||||
goto qbg_sub_window_error; // SCREEEN passed without any other arguements!
|
goto qbg_sub_window_error; // SCREEN passed without any other arguments!
|
||||||
|
|
||||||
// backup current qbg_x & qbg_y coordinates relative to viewport, not window
|
// backup current qbg_x & qbg_y coordinates relative to viewport, not window
|
||||||
if (write_page->clipping_or_scaling == 2) {
|
if (write_page->clipping_or_scaling == 2) {
|
||||||
|
@ -23472,7 +23472,7 @@ float func__mousey(int32 context, int32 passed) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 func__mousepipeopen() {
|
int32 func__mousepipeopen() {
|
||||||
// creates a new mouse pipe, routing all mouse input into it before any preceeding pipes receive access to the data
|
// creates a new mouse pipe, routing all mouse input into it before any preceding pipes receive access to the data
|
||||||
|
|
||||||
// create new queue
|
// create new queue
|
||||||
int32 context = list_add(mouse_message_queue_handles);
|
int32 context = list_add(mouse_message_queue_handles);
|
||||||
|
@ -28035,7 +28035,7 @@ expand_and_retry:
|
||||||
if (errno != EAGAIN && errno != EWOULDBLOCK)
|
if (errno != EAGAIN && errno != EWOULDBLOCK)
|
||||||
tcp->connected = 0;
|
tcp->connected = 0;
|
||||||
# endif
|
# endif
|
||||||
} else if (bytes == 0) { // graceful shutdown occured
|
} else if (bytes == 0) { // graceful shutdown occurred
|
||||||
tcp->connected = 0;
|
tcp->connected = 0;
|
||||||
} else {
|
} else {
|
||||||
stream->in_size += bytes;
|
stream->in_size += bytes;
|
||||||
|
|
|
@ -49,7 +49,7 @@ int64_t GetTicks() { return ((((int64_t)clock()) * ((int64_t)1000)) / ((int64_t)
|
||||||
static uint64_t millis_since_midnight() {
|
static uint64_t millis_since_midnight() {
|
||||||
auto currenttime = std::chrono::system_clock::now();
|
auto currenttime = std::chrono::system_clock::now();
|
||||||
|
|
||||||
// Gives us the number of miliseconds past the current second
|
// Gives us the number of milliseconds past the current second
|
||||||
uint64_t millis_only = std::chrono::duration_cast<std::chrono::milliseconds>(currenttime.time_since_epoch()).count() % 1000;
|
uint64_t millis_only = std::chrono::duration_cast<std::chrono::milliseconds>(currenttime.time_since_epoch()).count() % 1000;
|
||||||
|
|
||||||
// Convert to time_t and then hour/min/sec. localtime() takes the current
|
// Convert to time_t and then hour/min/sec. localtime() takes the current
|
||||||
|
|
|
@ -177,7 +177,7 @@ void libqb_start_main_thread(int argc, char **argv) {
|
||||||
// from that thread (not doing that can result in a segfault due to using GLUT
|
// from that thread (not doing that can result in a segfault due to using GLUT
|
||||||
// from two threads at the same time).
|
// from two threads at the same time).
|
||||||
//
|
//
|
||||||
// This is acomplished by simply queuing a GLUT message that calls exit() for us.
|
// This is accomplished by simply queuing a GLUT message that calls exit() for us.
|
||||||
void libqb_exit(int exitcode)
|
void libqb_exit(int exitcode)
|
||||||
{
|
{
|
||||||
// If GLUT isn't running then we're free to do the exit() call from here
|
// If GLUT isn't running then we're free to do the exit() call from here
|
||||||
|
|
|
@ -270,7 +270,7 @@ static void libqb_curl_thread_handler(void *arg) {
|
||||||
static struct curl_state curl_state;
|
static struct curl_state curl_state;
|
||||||
static struct libqb_thread *curl_thread;
|
static struct libqb_thread *curl_thread;
|
||||||
|
|
||||||
// This callback services the data recevied from the http connection.
|
// This callback services the data received from the http connection.
|
||||||
static size_t receive_http_block(void *ptr, size_t size, size_t nmemb, void *data) {
|
static size_t receive_http_block(void *ptr, size_t size, size_t nmemb, void *data) {
|
||||||
struct handle *handle = (struct handle *)data;
|
struct handle *handle = (struct handle *)data;
|
||||||
size_t length = size * nmemb;
|
size_t length = size * nmemb;
|
||||||
|
@ -279,7 +279,7 @@ static size_t receive_http_block(void *ptr, size_t size, size_t nmemb, void *dat
|
||||||
|
|
||||||
libqb_buffer_write(&handle->out, (const char *)ptr, length);
|
libqb_buffer_write(&handle->out, (const char *)ptr, length);
|
||||||
|
|
||||||
// The first time this connection starts to recieve data we fill out the
|
// The first time this connection starts to receive data we fill out the
|
||||||
// connection info.
|
// connection info.
|
||||||
__fillout_curl_info(handle);
|
__fillout_curl_info(handle);
|
||||||
|
|
||||||
|
@ -304,8 +304,8 @@ int libqb_http_get_length(int id, size_t *length) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Waits for handle to have valid info, which is availiable after the
|
// Waits for handle to have valid info, which is available after the
|
||||||
// connection headers have been recieved.
|
// connection headers have been received.
|
||||||
static void wait_for_info(struct handle *handle) {
|
static void wait_for_info(struct handle *handle) {
|
||||||
struct completion comp;
|
struct completion comp;
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ t64 time_64(t64 *pt) {
|
||||||
assert(abs((long)(t2 - (int)t)) <= 1);
|
assert(abs((long)(t2 - (int)t)) <= 1);
|
||||||
|
|
||||||
// the <=1 here is in case the seconds get incremented
|
// the <=1 here is in case the seconds get incremented
|
||||||
// betweeen the GetSystemTime(..) call and the time(..) call
|
// between the GetSystemTime(..) call and the time(..) call
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (pt)
|
if (pt)
|
||||||
|
|
|
@ -261,8 +261,8 @@ QB45TOKENS:
|
||||||
' followed by a word indicating the length of the token.
|
' followed by a word indicating the length of the token.
|
||||||
'
|
'
|
||||||
' The final column is the parse rule itself. A token may have multiple
|
' The final column is the parse rule itself. A token may have multiple
|
||||||
' parse rules. Multiple parse rules may be specified on a seperate line
|
' parse rules. Multiple parse rules may be specified on a separate line
|
||||||
' (without a PCODE or LENGTH field), or seperated by a pipe ('|') symbol.
|
' (without a PCODE or LENGTH field), or separated by a pipe ('|') symbol.
|
||||||
'
|
'
|
||||||
' There is one important difference between the two methods. Some rules
|
' There is one important difference between the two methods. Some rules
|
||||||
' define a symbol which can be used to reference the rule, such as:
|
' define a symbol which can be used to reference the rule, such as:
|
||||||
|
@ -270,8 +270,8 @@ QB45TOKENS:
|
||||||
' declmod::=SHARED
|
' declmod::=SHARED
|
||||||
'
|
'
|
||||||
' If a pipe symbol is used, the next rule will inherit the "declmod" (or
|
' If a pipe symbol is used, the next rule will inherit the "declmod" (or
|
||||||
' whatever symbol), unless it exlicitly defines it's own. Rules defined
|
' whatever symbol), unless it explicitly defines it's own. Rules defined
|
||||||
' on seperate lines use the default symbol which, initially, is nothing, but
|
' on separate lines use the default symbol which, initially, is nothing, but
|
||||||
' may be overridden using the ".default" directive. This is only really used
|
' may be overridden using the ".default" directive. This is only really used
|
||||||
' in the second half of the rule list, where almost every token is an
|
' in the second half of the rule list, where almost every token is an
|
||||||
' expression ('expr').
|
' expression ('expr').
|
||||||
|
@ -291,7 +291,7 @@ QB45TOKENS:
|
||||||
' {$-1}
|
' {$-1}
|
||||||
' {rulename:$+1}
|
' {rulename:$+1}
|
||||||
'
|
'
|
||||||
' The first type will be substituded for the text located 1 item from the
|
' The first type will be substituted for the text located 1 item from the
|
||||||
' top of the parse stack. If the stack isn't that deep, it will be replaced
|
' top of the parse stack. If the stack isn't that deep, it will be replaced
|
||||||
' with the null string.
|
' with the null string.
|
||||||
'
|
'
|
||||||
|
@ -319,7 +319,7 @@ QB45TOKENS:
|
||||||
'
|
'
|
||||||
' Format tokens usually have two '#' symbols, such as {##id(decl)}. The
|
' Format tokens usually have two '#' symbols, such as {##id(decl)}. The
|
||||||
' extra '#' causes the parser to re-scan the tag for other tags once it
|
' extra '#' causes the parser to re-scan the tag for other tags once it
|
||||||
' has been subsituted, allowing these tags to generate stack tags which can
|
' has been substituted, allowing these tags to generate stack tags which can
|
||||||
' then be parsed.
|
' then be parsed.
|
||||||
'
|
'
|
||||||
' See the function GetTaggedItem for a list of tag names which can be used.
|
' See the function GetTaggedItem for a list of tag names which can be used.
|
||||||
|
|
|
@ -3639,7 +3639,7 @@ FUNCTION ide2 (ignore)
|
||||||
IF x = 0 THEN x = x2
|
IF x = 0 THEN x = x2
|
||||||
IF x2 = 0 THEN x2 = x
|
IF x2 = 0 THEN x2 = x
|
||||||
IF x2 < x THEN SWAP x, x2
|
IF x2 < x THEN SWAP x, x2
|
||||||
IF x2 > x + 1 THEN x2 = x 'if seperated by more than one character, they are seperate line terminators
|
IF x2 > x + 1 THEN x2 = x 'if separated by more than one character, they are separate line terminators
|
||||||
'x to x2 is the range of the next line terminator (1 or 2 characters)
|
'x to x2 is the range of the next line terminator (1 or 2 characters)
|
||||||
|
|
||||||
IF x THEN
|
IF x THEN
|
||||||
|
|
|
@ -447,7 +447,7 @@ TYPE HashListItem
|
||||||
NextItem AS LONG
|
NextItem AS LONG
|
||||||
PrevItem AS LONG
|
PrevItem AS LONG
|
||||||
LastItem AS LONG 'note: this value is only valid on the first item in the list
|
LastItem AS LONG 'note: this value is only valid on the first item in the list
|
||||||
'note: name is stored in a seperate array of strings
|
'note: name is stored in a separate array of strings
|
||||||
END TYPE
|
END TYPE
|
||||||
DIM SHARED HashFind_NextListItem AS LONG
|
DIM SHARED HashFind_NextListItem AS LONG
|
||||||
DIM SHARED HashFind_Reverse AS LONG
|
DIM SHARED HashFind_Reverse AS LONG
|
||||||
|
@ -18510,7 +18510,7 @@ FUNCTION findid& (n2$)
|
||||||
'(the above should never happen)
|
'(the above should never happen)
|
||||||
findid& = 2 '2=not finished searching all indexes
|
findid& = 2 '2=not finished searching all indexes
|
||||||
|
|
||||||
'seperate symbol from name (if a symbol has been added), this is the only way symbols can be passed to findid
|
'separate symbol from name (if a symbol has been added), this is the only way symbols can be passed to findid
|
||||||
i = 0
|
i = 0
|
||||||
i = INSTR(n$, "~"): IF i THEN GOTO gotsc
|
i = INSTR(n$, "~"): IF i THEN GOTO gotsc
|
||||||
i = INSTR(n$, "`"): IF i THEN GOTO gotsc
|
i = INSTR(n$, "`"): IF i THEN GOTO gotsc
|
||||||
|
|
|
@ -29,7 +29,7 @@ void test_single_rw() {
|
||||||
libqb_buffer_clear(&buffer);
|
libqb_buffer_clear(&buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multple writes and reads of the same size from the buffer
|
// Multiple writes and reads of the same size from the buffer
|
||||||
void test_multiple_rw() {
|
void test_multiple_rw() {
|
||||||
int count = 10;
|
int count = 10;
|
||||||
struct libqb_buffer buffer;
|
struct libqb_buffer buffer;
|
||||||
|
|
Loading…
Reference in a new issue