diff --git a/README.md b/README.md index 9f946b966..eca4ec713 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Download the appropriate package for your operating system over at https://githu Make sure to extract the package contents to a folder with full write permissions (failing to do so may result in IDE or compilation errors). -* It is advisable to to whitelist the 'qb64pe' folder in your antivirus/antimalware software * +* It is advisable to whitelist the 'qb64pe' folder in your antivirus/antimalware software * ## macOS diff --git a/docs/build-system.md b/docs/build-system.md index a1c182fe7..7894112a8 100644 --- a/docs/build-system.md +++ b/docs/build-system.md @@ -79,7 +79,7 @@ Repository Layout - `dist_tests.sh` - Verifies the output of `make-dist.sh` is a functioning distribution of QB64-PE - `run_dist_tests.sh` - - Runs the distribution test collecitons. + - Runs the distribution test collections. - `run_tests.sh` - Runs all individual test collections. - `run_c_tests.sh` diff --git a/docs/testing.md b/docs/testing.md index 5b6d46e40..2c0602988 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -11,7 +11,7 @@ QB64-based Tests The QB64-based tests live in `./tests/compile_tests`. Each folder in that directory represents a different category of tests, and within each of those category folders are `*.bas` files. Accompanying each `*.bas` file is either an -`*.output` or `*.err` file with the same base name as a coresponding `.bas` +`*.output` or `*.err` file with the same base name as a corresponding `.bas` file. For test with an `*.output`, the `*.output` file contains the text that the program compiled from the `*.bas` file should produce. For `*.err` tests, the `*.err` file contains the text of the error the QB64-PE compiler should diff --git a/internal/c/common.h b/internal/c/common.h index 8f533bb4f..a4abc0d55 100644 --- a/internal/c/common.h +++ b/internal/c/common.h @@ -242,7 +242,7 @@ struct img_struct { uint8 print_mode; // BEGIN apm ('active page migration') // everything between apm points is migrated during active page changes - // note: apm data is only relevent to graphics modes + // note: apm data is only relevant to graphics modes uint8 apm_p1; int32 view_x1, view_y1, view_x2, view_y2; int32 view_offset_x, view_offset_y; @@ -312,7 +312,7 @@ struct device_struct { int32 type; // 0=Unallocated // 1=Joystick/Gamepad - // 2=Keybaord + // 2=Keyboard // 3=Mouse char *name; int32 connected; diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index 993cb68c9..28384a584 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -166,7 +166,7 @@ int32 environment_2d__screen_x1 = 0; // offsets of 'screen' within the window int32 environment_2d__screen_y1 = 0; int32 environment_2d__screen_x2 = 0; int32 environment_2d__screen_y2 = 0; -int32 environment_2d__screen_scaled_width = 640; // inital values prevent _SCALEDWIDTH/_SCALEDHEIGHT returning 0 +int32 environment_2d__screen_scaled_width = 640; // initial values prevent _SCALEDWIDTH/_SCALEDHEIGHT returning 0 int32 environment_2d__screen_scaled_height = 400; float environment_2d__screen_x_scale = 1.0f; float environment_2d__screen_y_scale = 1.0f; @@ -2184,7 +2184,7 @@ int32 lprint_locked = 0; // set to 1 to deny access by QB64 program multiplatform compatibility. 'Pure' C-based routines may not allow certain functionality, such as partial file locking. GFS handles/indexes are independent of QB64 handles/indexes to allow for internal files - to be open but not intefere with the QB64 file handle numbers. + to be open but not interfere with the QB64 file handle numbers. GFS error codes: -1 non-specific fail @@ -4160,13 +4160,13 @@ void pset(int32 x, int32 y, uint32 col) { case 0x0: // 0%(0) alpha, so no pset (very fast) return; break; - case 0x80000000: //~50% alpha (optomized) + case 0x80000000: //~50% alpha (optimized) o32 = write_page->offset32 + (y * write_page->width + x); *o32 = (((*o32 & 0xFEFEFE) + (col & 0xFEFEFE)) >> 1) + (ablend128[*o32 >> 24] << 24); return; break; - case 0x7F000000: //~50% alpha (optomized) + case 0x7F000000: //~50% alpha (optimized) o32 = write_page->offset32 + (y * write_page->width + x); *o32 = (((*o32 & 0xFEFEFE) + (col & 0xFEFEFE)) >> 1) + (ablend127[*o32 >> 24] << 24); return; @@ -4534,7 +4534,7 @@ int32 imgnew(int32 x, int32 y, int32 bpp) { return i; } -void sub__font(int32 f, int32 i, int32 passed); // foward def +void sub__font(int32 f, int32 i, int32 passed); // forward def void flush_old_hardware_commands() { static int32 old_command; @@ -5242,7 +5242,7 @@ stretch: return; if (dy1 > dy2) return; - // all values are now within the boundries of the source & dest + // all values are now within the boundaries of the source & dest stretch_noreverse_noclip: w = dx2 - dx1 + 1; @@ -5635,7 +5635,7 @@ clip: return; if (dy1 > dy2) return; - // all values are now within the boundries of the source & dest + // all values are now within the boundaries of the source & dest // mirror put if (mirror) { @@ -7177,7 +7177,7 @@ int32 asciicode_reading = 0; int32 lock_display = 0; int32 lock_display_required = 0; -// cost delay, made obselete by managing thread priorities (consider removal) +// cost delay, made obsolete by managing thread priorities (consider removal) #define cost_limit 10000 #define cost_delay 0 uint32 cost = 0; @@ -7200,7 +7200,7 @@ uint64 build_uint64(uint32 val2, uint32 val1) { return val; } -// nb. abreviations are used in variable names to save typing, here are some of the expansions +// nb. abbreviations are used in variable names to save typing, here are some of the expansions // cmem=conventional memory // qbs=qbick basic string (refers to the emulation of quick basic strings) // sp=stack pointer @@ -7623,7 +7623,7 @@ extern uint8 *mem_static_limit; uint8 *mem_static_malloc(uint32 size) { size += 7; - size -= (size & 7); // align to 8 byte boundry + size -= (size & 7); // align to 8 byte boundary if ((mem_static_pointer += size) < mem_static_limit) return mem_static_pointer - size; mem_static_size = (mem_static_size << 1) + size; @@ -8214,7 +8214,7 @@ qbs *qbs_set(qbs *deststr, qbs *srcstr) { } // non-fixed deststr - // can srcstr be aquired by deststr? + // can srcstr be acquired by deststr? if (srcstr->tmp) { if (srcstr->fixed == 0) { if (srcstr->readonly == 0) { @@ -8289,7 +8289,7 @@ qbs *qbs_set(qbs *deststr, qbs *srcstr) { // all next indexes invalid! qbs_cmem_list_nexti = deststr->listi + 1; // adjust nexti if (((ptrszint)deststr->chr + srcstr->len) <= (dblock + cmem_sp)) { // space available - memmove(deststr->chr, srcstr->chr, srcstr->len); // overlap possible due to sometimes aquiring srcstr's space + memmove(deststr->chr, srcstr->chr, srcstr->len); // overlap possible due to sometimes acquiring srcstr's space deststr->len = srcstr->len; qbs_cmem_sp = ((ptrszint)deststr->chr) + (ptrszint)deststr->len - dblock; goto qbs_set_return; @@ -8346,7 +8346,7 @@ skippedtmpsrcindex2: qbs_list_nexti = deststr->listi + 1; // adjust nexti if (((ptrszint)deststr->chr + srcstr->len) <= ((ptrszint)qbs_data + qbs_data_size)) { // space available - memmove(deststr->chr, srcstr->chr, srcstr->len); // overlap possible due to sometimes aquiring srcstr's space + memmove(deststr->chr, srcstr->chr, srcstr->len); // overlap possible due to sometimes acquiring srcstr's space deststr->len = srcstr->len; qbs_sp = ((ptrszint)deststr->chr) + (ptrszint)deststr->len - (ptrszint)qbs_data; goto qbs_set_return; @@ -10972,7 +10972,7 @@ void qbsub_width(int32 option, int32 value1, int32 value2, int32 value3, int32 v if ((write_page->compatible_mode == 32) || (write_page->compatible_mode == 256)) { - if (!(passed & 1)) { // width ommited + if (!(passed & 1)) { // width omitted width = write_page->width; } else { if (width <= 0) @@ -10983,7 +10983,7 @@ void qbsub_width(int32 option, int32 value1, int32 value2, int32 value3, int32 v width *= i; } - if (!(passed & 2)) { // height ommited + if (!(passed & 2)) { // height omitted height = write_page->height; } else { if (height <= 0) @@ -11060,7 +11060,7 @@ void qbsub_width(int32 option, int32 value1, int32 value2, int32 value3, int32 v } // 32/256 - if (!(passed & 1)) { // width ommited + if (!(passed & 1)) { // width omitted if (height <= 0) goto error; @@ -11669,12 +11669,12 @@ void pset_and_clip(int32 x, int32 y, uint32 col) { case 0x0: // 0%(0) alpha, so no pset (very fast) return; break; - case 0x80000000: //~50% alpha (optomized) + case 0x80000000: //~50% alpha (optimized) o32 = write_page->offset32 + (y * write_page->width + x); *o32 = (((*o32 & 0xFEFEFE) + (col & 0xFEFEFE)) >> 1) + (ablend128[*o32 >> 24] << 24); return; break; - case 0x7F000000: //~50% alpha (optomized) + case 0x7F000000: //~50% alpha (optimized) o32 = write_page->offset32 + (y * write_page->width + x); *o32 = (((*o32 & 0xFEFEFE) + (col & 0xFEFEFE)) >> 1) + (ablend127[*o32 >> 24] << 24); return; @@ -11773,7 +11773,7 @@ void qb32_boxfill(float x1f, float y1f, float x2f, float y2f, uint32 col) { } // 1 // assume 32-bit - // optomized + // optimized // alpha disabled or full alpha? a = col >> 24; if ((write_page->alpha_disabled) || (a == 255)) { @@ -11870,7 +11870,7 @@ void fast_boxfill(int32 x1, int32 y1, int32 x2, int32 y2, uint32 col) { } // 1 // assume 32-bit - // optomized + // optimized // alpha disabled or full alpha? a = col >> 24; if ((write_page->alpha_disabled) || (a == 255)) { @@ -13201,7 +13201,7 @@ void sub_circle(double x, double y, double r, uint32 col, double start, double e write_page->x = x; write_page->y = y; // set graphics cursor position to circle's centre - r = x + r; // the differece between x & x+r in pixels will be the radius in pixels + r = x + r; // the difference between x & x+r in pixels will be the radius in pixels // resolve coordinates (but keep as floats) if (write_page->clipping_or_scaling) { if (write_page->clipping_or_scaling == 2) { @@ -14120,7 +14120,7 @@ void qbs_print(qbs *str, int32 finish_on_new_line) { if (character == 30) { // previous row, same column - // no change if cursor not within view print boundries + // no change if cursor not within view print boundaries if ((write_page->cursor_y > write_page->top_row) && (write_page->cursor_y <= write_page->bottom_row)) { write_page->cursor_y--; } @@ -14129,7 +14129,7 @@ void qbs_print(qbs *str, int32 finish_on_new_line) { if (character == 31) { // next row, same column - // no change if cursor not within view print boundries + // no change if cursor not within view print boundaries if ((write_page->cursor_y >= write_page->top_row) && (write_page->cursor_y < write_page->bottom_row)) { write_page->cursor_y++; } @@ -14599,7 +14599,7 @@ void qbg_sub_view(int32 x1, int32 y1, int32 x2, int32 y2, int32 fillcolor, int32 if (!write_page->clipping_or_scaling) write_page->clipping_or_scaling = 1; } else { - // no argurments passed + // no arguments passed write_page->view_x1 = 0; write_page->view_y1 = 0; write_page->view_x2 = write_page->width - 1; @@ -15271,8 +15271,8 @@ qbs_input_sep_arg_done: if (toomany) goto backspace; - // validate current arguements - // ASSUME LEADING & TRALING SPACES REMOVED! + // validate current arguments + // ASSUME LEADING & TRAILING SPACES REMOVED! uint8 valid; uint8 neg; int32 completewith; @@ -17225,7 +17225,7 @@ uint16 n_digits; uint8 n_digit[256]; int64 n_exp; // if 0, there is one digit in front of the decimal place uint8 n_neg; // if 1, the number is negative -uint8 n_hex; // if 1, the digits are in hexidecimal and n_exp should be ignored +uint8 n_hex; // if 1, the digits are in hexadecimal and n_exp should be ignored // if 2, the digits are in octal and n_exp should be ignored // if 3, the digits are in binary and n_exp should be ignored //(consider revising variable name n_hex) @@ -19176,7 +19176,7 @@ void sub_graphics_get(float x1f, float y1f, float x2f, float y2f, void *element, sx = read_page->width; sy = read_page->height; - // boundry checking (if no mask colour was passed) + // boundary checking (if no mask colour was passed) if (!(passed & 4)) { if ((x1 < 0) || (y1 < 0) || (x2 >= sx) || (y2 >= sy)) { error(5); @@ -19466,7 +19466,7 @@ void sub_graphics_put(float x1f, float y1f, void *element, int32 option, uint32 x2 = x1 + w - 1; y2 = y1 + h - 1; - // boundry checking (if CLIP option was not used) + // boundary checking (if CLIP option was not used) if (!clip) { if ((x1 < 0) || (y1 < 0) || (x2 >= sx) || (y2 >= sy)) { error(5); @@ -21061,7 +21061,7 @@ int32 func_eof(int32 i) { else if (sh->index == 2) return 0; - // Only report EOF() if the program had read all incomming data and + // Only report EOF() if the program had read all incoming data and // the connection is finished. if (libqb_http_connected(x)) return 0; @@ -23535,7 +23535,7 @@ void call_int(int32 i) { if (cpu.cx >= (display_page->width * 8)) cpu.cx = (display_page->width * 8) - 1; // note: a range from 0 to rows*8-1 is returned regardless of the number of actual pixels - // obselete line of code: + // obsolete line of code: // cpu.dx=(((float)cpu.dx)/((float)(display_page->height*fontheight[display_page->font])))*((float)(display_page->height*8));//(mouse_y/height_in_pixels)*(rows*8) cpu.dx = (my - 0.5) * 8.0; if (cpu.dx >= (display_page->height * 8)) @@ -24061,7 +24061,7 @@ void sub__setalpha(int32 a, uint32 c, uint32 c2, int32 i, int32 passed) { return; } -// Finding infomation about an image surface: +// Finding information about an image surface: int32 func__width(int32 i, int32 passed) { if (new_error) @@ -24697,7 +24697,7 @@ int32 func__printwidth(qbs *text, int32 screenhandle, int32 passed) { } auto fonthandle = img[screenhandle].font; // Get the font used in screenhandle - auto fwidth = func__fontwidth(fonthandle, 1); // Try and get the font width + auto fwidth = func__fontwidth(fonthandle, 1); // Try to get the font width if (fwidth) return fwidth * text->len; // if it's not a variable width font, return the width * the letter count @@ -24711,7 +24711,7 @@ int32 func__printwidth(qbs *text, int32 screenhandle, int32 passed) { /// @param requirements This can be monospace, dontblend, unicode, memory /// @param font_index The index of the font to load from a font collection /// @param passed Which optional arguments were passed -/// @return Retuns a valid handle on success or zero on failure +/// @return Returns a valid handle on success or zero on failure int32_t func__loadfont(qbs *file_name, int32_t size, qbs *requirements, int32_t font_index, int32_t passed) { // Some QB strings that we'll need static qbs *fileNameZ = nullptr; @@ -25656,7 +25656,7 @@ numeric_spacer: return 0; } - // reduce digits before point appropriatly + // reduce digits before point appropriately extra_sign_space = 0; if (exponent_digits) { if ((leading_plus == 0) && (trailing_plus == 0) && (trailing_minus == 0)) { @@ -34072,7 +34072,7 @@ void prepare_environment_2d() { // called prior to rendering 2D content can_scale = 1; if (full_screen == 2) need_square_pixels = 1; - // note: 'letter-boxing' is only requred where the size of the window + // note: 'letter-boxing' is only required where the size of the window // cannot be controlled, and the only place where this is the // case is full screen mode _SQUAREPIXELS environment_2d__screen_smooth = fullscreen_smooth; @@ -35301,7 +35301,7 @@ void GLUT_DISPLAY_REQUEST() { glutEnterGameMode(); fullscreen_width=display_frame[i].w; fullscreen_height=display_frame[i].h; reinit_glut_callbacks(); - full_screen=full_screen_set;//it's currently irrelavent if it is + full_screen=full_screen_set;//it's currently irrelevant if it is stretched or 1:1 full_screen_set=-1; return; }else{ //native dimensions not possible //attempt full screen using desktop dimensions @@ -36632,7 +36632,7 @@ uint8 *pixeldata = (uint8 *)malloc(1); int32 pixeldatasize = 1; uint32 paldata[256]; -// note: temporarily swapping a source palette is far more effecient than converting the resulting image pixels +// note: temporarily swapping a source palette is far more efficient than converting the resulting image pixels void swap_paldata_BGRA_with_RGBA() { static uint32 col; static uint32 *pos; @@ -36735,7 +36735,7 @@ void display() { z = 0; //? conversion_required = 0; - pixel = display_surface_offset; //<-will be made obselete + pixel = display_surface_offset; //<-will be made obsolete if (!display_page->compatible_mode) { // text @@ -36777,7 +36777,7 @@ void display() { // Check/Prepare palette-buffer if (!check_last) { - // set pal_last (no prev pal was avilable to compare to) + // set pal_last (no prev pal was available to compare to) memcpy(&paldata, display_page->pal, 256 * 4); } else { // if palette has changed, update paldata and draw all characters @@ -38262,7 +38262,7 @@ void keydown(uint32 x) { if (b2 = scancode_lookup[x * 10 + 1]) { // table entry exists scancodedown(b2); - // check for relevent table modifiers + // check for relevant table modifiers shift = 0; if (keyheld(VK + QBVK_LSHIFT) || keyheld(VK + QBVK_RSHIFT)) shift = 1; @@ -38327,7 +38327,7 @@ void keydown(uint32 x) { r = (x >> 8) + 256; if (scancode_lookup[r * 10 + 2]) { scancodedown(scancode_lookup[r * 10 + 1]); - // check relevent modifiers + // check relevant modifiers shift = 0; if (keyheld(VK + QBVK_LSHIFT) || keyheld(VK + QBVK_RSHIFT)) shift = 1; @@ -38739,7 +38739,7 @@ void sub__consolefont(qbs *FontName, int FontSize) { 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); static int OneTimePause; - if (!OneTimePause) { // a slight delay so the console can be properly created and registered with Windows, before we try and change fonts with it. + if (!OneTimePause) { // a slight delay so the console can be properly created and registered with Windows, before we try to change fonts with it. Sleep(500); OneTimePause = 1; // after the first pause, the console should be created, so we don't need any more delays in the future. } diff --git a/internal/c/libqb/include/condvar.h b/internal/c/libqb/include/condvar.h index 8d790df16..0f09784ea 100644 --- a/internal/c/libqb/include/condvar.h +++ b/internal/c/libqb/include/condvar.h @@ -14,10 +14,10 @@ void libqb_condvar_free(struct libqb_condvar *); // Mutex while checking the Condition Variable void libqb_condvar_wait(struct libqb_condvar *, struct libqb_mutex *); -// Singals a single thread waiting on the Condition Variable +// Signals a single thread waiting on the Condition Variable void libqb_condvar_signal(struct libqb_condvar *); -// Signals all threads waiting on the Condtiion Variable +// Signals all threads waiting on the Condition Variable void libqb_condvar_broadcast(struct libqb_condvar *); #endif diff --git a/internal/c/libqb/include/glut-thread.h b/internal/c/libqb/include/glut-thread.h index 0578e9efd..691aa9cce 100644 --- a/internal/c/libqb/include/glut-thread.h +++ b/internal/c/libqb/include/glut-thread.h @@ -22,7 +22,7 @@ void libqb_process_glut_queue(); // special care to not seg-fault when exiting the program. void libqb_exit(int); -// These functions perform the same actions as their coresponding glut* functions. +// These functions perform the same actions as their corresponding glut* functions. // They tell the GLUT thread to perform the command, returning the result if applicable void libqb_glut_set_cursor(int style); void libqb_glut_warp_pointer(int x, int y); @@ -34,7 +34,7 @@ void libqb_glut_hide_window(); void libqb_glut_set_window_title(const char *title); void libqb_glut_exit_program(int exitcode); -// Convinence macros, exists a function depending on the state of GLUT +// Convenience macros, exists a function depending on the state of GLUT #define NEEDS_GLUT(error_result) do { \ if (!libqb_is_glut_up()) { \ error(5); \ diff --git a/internal/c/libqb/include/http.h b/internal/c/libqb/include/http.h index d634e7ba6..584de0575 100644 --- a/internal/c/libqb/include/http.h +++ b/internal/c/libqb/include/http.h @@ -17,7 +17,7 @@ int libqb_http_connected(int handle); // Get length of bytes waiting to be read. // -// Note that more bytes may come in after calling function, but you're guarenteed to at least have this many bytes +// Note that more bytes may come in after calling function, but you're guaranteed to at least have this many bytes int libqb_http_get_length(int handle, size_t *length); // Gets the value from the Content-Length HTTP header. If none was provided, returns an error @@ -36,7 +36,7 @@ const char *libqb_http_get_url(int handle); // Reads up to length bytes into buf. Length is modified if less bytes than requested are returned int libqb_http_get(int handle, char *buf, size_t *length); -// Returns an error if less than length bytes are availiable to read +// Returns an error if less than length bytes are available to read int libqb_http_get_fixed(int handle, char *buf, size_t length); #endif diff --git a/internal/c/libqb/src/filesystem.cpp b/internal/c/libqb/src/filesystem.cpp index a8eaa03ce..062ca15a9 100644 --- a/internal/c/libqb/src/filesystem.cpp +++ b/internal/c/libqb/src/filesystem.cpp @@ -614,7 +614,7 @@ static const char *FS_GetDirectoryEntryName(const char *fileSpec) { /// @brief This mimics MS BASIC PDS 7.1 & VBDOS 1.0 DIR$() function /// @param qbsFileSpec This can be a path with wildcard for the final level (i.e. C:/Windows/*.* or /usr/lib/* etc.) /// @param passed Flags for optional parameters -/// @return Retuns a qbs with the directory entry name or an empty string if there are no more entries +/// @return Returns a qbs with the directory entry name or an empty string if there are no more entries qbs *func__files(qbs *qbsFileSpec, int32_t passed) { static std::string directory; std::string pathName; diff --git a/internal/c/libqb/src/glut-message.h b/internal/c/libqb/src/glut-message.h index c3c556740..be017e46a 100644 --- a/internal/c/libqb/src/glut-message.h +++ b/internal/c/libqb/src/glut-message.h @@ -23,9 +23,9 @@ class glut_message { public: // Calling this indicates to the creator of the message that it has been - // completed, and any response data is availiable to be read. + // completed, and any response data is available to be read. // - // If `finsihed` is NULL that means nobody is waiting for the response. In + // If `finished` is NULL that means nobody is waiting for the response. In // that situation we're free to simply delete the object. void finish() { if (finished) diff --git a/internal/c/parts/audio/audio.cpp b/internal/c/parts/audio/audio.cpp index 7de29be4a..2a4497752 100644 --- a/internal/c/parts/audio/audio.cpp +++ b/internal/c/parts/audio/audio.cpp @@ -100,8 +100,8 @@ struct RawStream { maEngine = pmaEngine; // Save the pointer to the ma_engine object (this should come from the QBPE sound engine) sampleRate = ma_engine_get_sample_rate(maEngine); // Save the sample rate buffer[0].cursor = buffer[1].cursor = 0; // reset the cursors - buffer[0].data.reserve(DEFAULT_SIZE); // ensure we have a contigious block to account for expansion without reallocation - buffer[1].data.reserve(DEFAULT_SIZE); // ensure we have a contigious block to account for expansion without reallocation + buffer[0].data.reserve(DEFAULT_SIZE); // ensure we have a contiguous block to account for expansion without reallocation + buffer[1].data.reserve(DEFAULT_SIZE); // ensure we have a contiguous block to account for expansion without reallocation consumer = &buffer[0]; // set default consumer producer = &buffer[1]; // set default producer stop = false; // by default we will send silent samples to keep the playback going @@ -1416,7 +1416,7 @@ struct AudioEngine { if (h >= vectorSize) { // Scan through the entire vector and return a slot that is not being used - // Ideally this should execute in extremely few (if at all) senarios + // Ideally this should execute in extremely few (if at all) scenarios // Also, this loop should not execute if size is 0 for (h = 0; h < vectorSize; h++) { if (!soundHandles[h]->isUsed) { @@ -1940,7 +1940,7 @@ void sub__sndplaycopy(int32_t src_handle, double volume, double x, double y, dou /// Playback starts asynchronously. /// /// The is the name of the file to be played -/// This paramater is ignored +/// This parameter is ignored /// This the sound playback volume (0 - silent ... 1 - full) /// How many parameters were passed? void sub__sndplayfile(qbs *fileName, int32_t sync, double volume, int32_t passed) { @@ -2139,7 +2139,7 @@ void sub__sndsetpos(int32_t handle, double seconds) { return; audioEngine.maResult = ma_sound_seek_to_pcm_frame(&audioEngine.soundHandles[handle]->maSound, - lengthSampleFrames * (seconds / lengthSeconds)); // Set the postion in PCM frames + lengthSampleFrames * (seconds / lengthSeconds)); // Set the position in PCM frames AUDIO_DEBUG_CHECK(audioEngine.maResult == MA_SUCCESS); } } @@ -2282,7 +2282,7 @@ int32_t func__sndnew(int32_t frames, int32_t channels, int32_t bits) { return INVALID_SOUND_HANDLE; } - // Alocate a sound handle + // Allocate a sound handle int32_t handle = audioEngine.CreateHandle(); if (handle < 1) return INVALID_SOUND_HANDLE; @@ -2382,10 +2382,10 @@ mem_block func__memsound(int32_t handle, int32_t targetChannel, int32_t passed) return mb; } - // Check if the data is one contigious buffer or a link list of decoded pages + // Check if the data is one contiguous buffer or a link list of decoded pages // We cannot have a mem object for a link list of decoded pages for obvious reasons if (ds->pNode->data.type != ma_resource_manager_data_supply_type::ma_resource_manager_data_supply_type_decoded) { - AUDIO_DEBUG_PRINT("Data is not a contigious buffer. Type = %u", ds->pNode->data.type); + AUDIO_DEBUG_PRINT("Data is not a contiguous buffer. Type = %u", ds->pNode->data.type); return mb; } @@ -2520,7 +2520,7 @@ void snd_un_init() { // Free all sound handles here for (size_t handle = 0; handle < audioEngine.soundHandles.size(); handle++) { - audioEngine.ReleaseHandle(handle); // let ReleaseHandle do it's thing + audioEngine.ReleaseHandle(handle); // let ReleaseHandle do its thing delete audioEngine.soundHandles[handle]; // now free the object created by CreateHandle() } @@ -2557,7 +2557,7 @@ void snd_mainloop() { case SoundHandle::Type::RAW: // Dispose the sound if it has finished playing // Note that this means that temporary looping sounds will never close - // Well thats on the programmer. Probably they want it that way + // Well that's on the programmer. Probably they want it that way if (!ma_sound_is_playing(&audioEngine.soundHandles[handle]->maSound)) audioEngine.ReleaseHandle(handle); diff --git a/internal/c/parts/audio/build.mk b/internal/c/parts/audio/build.mk index 5430b6fbb..5e10a0a7d 100644 --- a/internal/c/parts/audio/build.mk +++ b/internal/c/parts/audio/build.mk @@ -7,7 +7,7 @@ MINIAUDIO_STUB_SRCS := \ stub_audio.cpp # We always produce both lists so that `make clean` will clean them up even -# when not passed a paticular DEP_* flag +# when not passed a particular DEP_* flag MINIAUDIO_REAL_OBJS := $(patsubst %.cpp,$(PATH_INTERNAL_C)/parts/audio/%.o,$(MINIAUDIO_REAL_SRCS)) MINIAUDIO_STUB_OBJS := $(patsubst %.cpp,$(PATH_INTERNAL_C)/parts/audio/%.o,$(MINIAUDIO_STUB_SRCS)) diff --git a/internal/c/parts/audio/extras/hively_ma_vtable.cpp b/internal/c/parts/audio/extras/hively_ma_vtable.cpp index ff4487f2e..f01a8a2d6 100644 --- a/internal/c/parts/audio/extras/hively_ma_vtable.cpp +++ b/internal/c/parts/audio/extras/hively_ma_vtable.cpp @@ -22,7 +22,7 @@ #include "vtables.h" -constexpr auto MAX_HIVELY_FRAMES = 10 * 60 * 50; // maximium *hively* frames before timeout +constexpr auto MAX_HIVELY_FRAMES = 10 * 60 * 50; // maximum *hively* frames before timeout struct ma_hively { // This part is for miniaudio @@ -299,7 +299,7 @@ static ma_result ma_hively_init_internal(const ma_decoding_backend_config *pConf } // This help us calculate the total frame size of the tune -// Note that this must be called before rendering the tune as it actually "plays" it to a dummy buffer to calulate the length +// Note that this must be called before rendering the tune as it actually "plays" it to a dummy buffer to calculate the length static ma_uint64 ma_hively_get_length_in_pcm_frames_internal(ma_hively *pmaHively) { ma_uint64 totalFramesRead = 0; diff --git a/internal/c/parts/audio/extras/midi_ma_vtable.cpp b/internal/c/parts/audio/extras/midi_ma_vtable.cpp index 503746c49..ca81d5e7d 100644 --- a/internal/c/parts/audio/extras/midi_ma_vtable.cpp +++ b/internal/c/parts/audio/extras/midi_ma_vtable.cpp @@ -360,7 +360,7 @@ ma_result ma_tsf_load_memory(ma_tsf *pTsf) { // Attempt to load a SoundFont from memory pTsf->tinySoundFont = tsf_load_memory(SOUNDFONT_BIN, SOUNDFONT_SIZE); - // Return failue if loading from memory also failed. This should not happen though + // Return failure if loading from memory also failed. This should not happen though return pTsf->tinySoundFont ? MA_SUCCESS : MA_OUT_OF_MEMORY; } diff --git a/internal/c/parts/core/log.txt b/internal/c/parts/core/log.txt index bd41134f1..b6331c2e6 100644 --- a/internal/c/parts/core/log.txt +++ b/internal/c/parts/core/log.txt @@ -3,7 +3,7 @@ -copied headers in 'include' folder of download to src -created QB64 program to help locally build freeglut without makefiles note: this program is for reference purposes only, do not run it unless you fully understand it - note: for rebuilding edits to the exisiting source, simple run the batch/script file provided + note: for rebuilding edits to the existing source, simple run the batch/script file provided ########################### QB64 PROGRAM TO MANAGE FREEGLUT LIBRARY ###################################### 'FreeGLUT Source Manipulation diff --git a/internal/c/parts/core/src/freeglut_main.c b/internal/c/parts/core/src/freeglut_main.c index 0d1e43b79..2447133d1 100644 --- a/internal/c/parts/core/src/freeglut_main.c +++ b/internal/c/parts/core/src/freeglut_main.c @@ -1900,7 +1900,7 @@ void FGAPIENTRY glutLeaveMainLoop( void ) #if TARGET_HOST_MS_WINDOWS /* - * Determine a GLUT modifer mask based on MS-WINDOWS system info. + * Determine a GLUT modifier mask based on MS-WINDOWS system info. */ static int fghGetWin32Modifiers (void) { @@ -2118,7 +2118,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, } window->State.NeedToResize = GL_TRUE; - /* if we used CW_USEDEFAULT (thats a negative value) for the size + /* if we used CW_USEDEFAULT (that's a negative value) for the size * of the window, query the window now for the size at which it * was created. */ diff --git a/internal/c/parts/core/src/freeglut_window.c b/internal/c/parts/core/src/freeglut_window.c index b689668f7..ac35434d3 100644 --- a/internal/c/parts/core/src/freeglut_window.c +++ b/internal/c/parts/core/src/freeglut_window.c @@ -876,7 +876,7 @@ if (pixelformat==0) alert("noooo!"); if (acc2) alert("acc!"); */ - /* windows hack for multismapling/sRGB */ + /* windows hack for multisampling/sRGB */ if ( ( fgState.DisplayMode & GLUT_MULTISAMPLE ) || ( fgState.DisplayMode & GLUT_SRGB ) ) { diff --git a/internal/c/parts/gui/gui.cpp b/internal/c/parts/gui/gui.cpp index e67767983..56c25d813 100644 --- a/internal/c/parts/gui/gui.cpp +++ b/internal/c/parts/gui/gui.cpp @@ -17,7 +17,7 @@ #include #include -/// @brief Splits a string delimted by '|' into an array of strings +/// @brief Splits a string delimited by '|' into an array of strings /// @param input The string to be parsed /// @param count Point to an integer that will hold the count of tokens. This cannot be NULL /// @return Array of string tokens. This must be freed using gui_free_tokens() @@ -333,7 +333,7 @@ qbs *func__guiSaveFileDialog(qbs *qbsTitle, qbs *qbsDefaultPathAndFile, qbs *qbs /// @param message The message the will show inside the dialog box /// @param title The dialog box title /// @param type The type of dialog box (see tinyfd_messageBox) -/// @return returns the value retured by tinyfd_messageBox +/// @return returns the value returned by tinyfd_messageBox int gui_alert(const char *message, const char *title, const char *type) { return tinyfd_messageBox(title, message, type, "error", 1); } /// @brief This is used internally by libqb to show warning and failure messages diff --git a/internal/c/parts/gui/tinyfiledialogs.c b/internal/c/parts/gui/tinyfiledialogs.c index b726c6234..ea2e9108a 100644 --- a/internal/c/parts/gui/tinyfiledialogs.c +++ b/internal/c/parts/gui/tinyfiledialogs.c @@ -117,7 +117,7 @@ int tinyfd_winUtf8 = 1; /* on windows char strings can be 1:UTF-8(default) or 0: int tinyfd_verbose = 0 ; /* on unix: prints the command line calls */ int tinyfd_silent = 1 ; /* 1 (default) or 0 : on unix, hide errors and warnings from called dialogs */ -/* Curses dialogs are difficult to use, on windows they are only ascii and uses the unix backslah */ +/* Curses dialogs are difficult to use, on windows they are only ascii and uses the unix backslash */ int tinyfd_allowCursesDialogs = 0 ; /* 0 (default) or 1 */ int tinyfd_forceConsole = 0 ; /* 0 (default) or 1 */ /* for unix & windows: 0 (graphic mode) or 1 (console mode). @@ -1008,7 +1008,7 @@ static HWND CreateHiddenWindow() static HWND windowForDialogs = 0; -// Returns a window handle sutable for displaying dialogs and notifications +// Returns a window handle suitable for displaying dialogs and notifications // // We attempt to find a window associated with the program, if none exists then // we'll create a hidden one. @@ -1027,14 +1027,14 @@ static HWND GetDialogWindow() if (windowForDialogs) return windowForDialogs; - // No sutable window could be found, create a hidden one for us to use + // No suitable window could be found, create a hidden one for us to use windowForDialogs = CreateHiddenWindow(); return windowForDialogs; } #endif /* _WIN32 */ -/* source and destination can be the same or ovelap*/ +/* source and destination can be the same or overlap*/ static char * ensureFilesExist(char * aDestination, char const * aSourcePathsAndNames) { @@ -1346,7 +1346,7 @@ static LRESULT displayInputBox(HINSTANCE hinst, HWND hwndOwner, const wchar_t *t lpw = (LPWORD)lpwsz; //----------------------- - // Define a edit text control. + // Define an edit text control. //----------------------- lpw = lpwAlignDWORD(lpw); // Align DLGITEMTEMPLATE on DWORD boundary lpdit = (LPDLGITEMTEMPLATE)lpw; @@ -3907,13 +3907,13 @@ void tinyfd_beep(void) } // Concats the source string to the destination string, and escapes the single -// quotes in a way sutable for bash +// quotes in a way suitable for bash static void concatAndEscapeSingleQuote(char *dest, const char *source) { tfd_replaceSubStrConCat(source, "'", "'\\''", dest); } -// Concats the source string to the destination string, and escapes sutable for +// Concats the source string to the destination string, and escapes suitable for // osascript run via sh. // // This is achieved by first escaping double quotes, and then escaping single @@ -4775,7 +4775,7 @@ int tinyfd_notifyPopup( } else if ( (tfd_zenity3Present()>=5) ) { - /* zenity 2.32 & 3.14 has the notification but with a bug: it doesnt return from it */ + /* zenity 2.32 & 3.14 has the notification but with a bug: it doesn't return from it */ /* zenity 3.8 show the notification as an alert ok cancel box */ if ( tfd_zenity3Present()>=5 ) { diff --git a/internal/c/parts/gui/tinyfiledialogs.h b/internal/c/parts/gui/tinyfiledialogs.h index 2a94a4dc9..58a85e1f9 100644 --- a/internal/c/parts/gui/tinyfiledialogs.h +++ b/internal/c/parts/gui/tinyfiledialogs.h @@ -76,7 +76,7 @@ char * tinyfd_utf16to8(wchar_t const * aUtf16string); /******************************************************************************************************/ /******************************************************************************************************/ -/************* 3 funtions for C# (you don't need this in C or C++) : */ +/************* 3 functions for C# (you don't need this in C or C++) : */ char const * tinyfd_getGlobalChar(char const * aCharVariableName); /* returns NULL on error */ int tinyfd_getGlobalInt(char const * aIntVariableName); /* returns -1 on error */ int tinyfd_setGlobalInt(char const * aIntVariableName, int aValue); /* returns -1 on error */ @@ -91,7 +91,7 @@ extern char tinyfd_needs[]; /* info about requirements */ extern int tinyfd_verbose; /* 0 (default) or 1 : on unix, prints the command line calls */ extern int tinyfd_silent; /* 1 (default) or 0 : on unix, hide errors and warnings from called dialogs */ -/* Curses dialogs are difficult to use, on windows they are only ascii and uses the unix backslah */ +/* Curses dialogs are difficult to use, on windows they are only ascii and uses the unix backslash */ extern int tinyfd_allowCursesDialogs; /* 0 (default) or 1 */ extern int tinyfd_forceConsole; /* 0 (default) or 1 */ @@ -291,7 +291,7 @@ wchar_t * tinyfd_colorChooserW( - tinyfd_forceConsole=1; at run time, forces dialogs into console mode. - On windows, console mode only make sense for console applications. - On windows, console mode is not implemented for wchar_T UTF-16. -- Mutiple selects are not possible in console mode. +- Multiple selects are not possible in console mode. - The package dialog must be installed to run in curses dialogs in console mode. It is already installed on most unix systems. - On osx, the package dialog can be installed via diff --git a/internal/c/parts/input/game_controller/game_controller.cpp b/internal/c/parts/input/game_controller/game_controller.cpp index 6dd18b227..10686bb3d 100644 --- a/internal/c/parts/input/game_controller/game_controller.cpp +++ b/internal/c/parts/input/game_controller/game_controller.cpp @@ -127,7 +127,7 @@ static void onDeviceAttached(struct Gamepad_device *device, void *context) { int i, x, x2; - // re-aquire a potentially dropped device in its original index + // re-acquire a potentially dropped device in its original index for (i = 1; i <= device_last; i++) { if (devices[i].used) { if (devices[i].type == 1) { // it's a joystick/gamepad @@ -137,7 +137,7 @@ static void onDeviceAttached(struct Gamepad_device *device, void *context) { if (device->vendorID == devices[i].vendor_id) { if (device->numAxes == devices[i].axes) { if (device->numButtons == devices[i].buttons) { - //(sometimes when gamepads are re-plugged they receieve a generic name) + //(sometimes when gamepads are re-plugged they receive a generic name) // if (strlen(device->description)==strlen(devices[i].description)){//same name length // if (strcmp(device->description,devices[i].description)==0){//same name content // re-acquire device diff --git a/internal/c/parts/video/font/font.cpp b/internal/c/parts/video/font/font.cpp index 08931fa4d..22c9514e4 100644 --- a/internal/c/parts/video/font/font.cpp +++ b/internal/c/parts/video/font/font.cpp @@ -895,7 +895,7 @@ int32_t FontPrintWidthASCII(int32_t fh, const uint8_t *codepoint, int32_t codepo if (codepoints > 0) { FONT_DEBUG_CHECK(IS_VALID_FONT_HANDLE(fh)); - // Atempt to convert the string to UTF32 and get the actual width in pixels + // Attempt to convert the string to UTF32 and get the actual width in pixels auto count = utf32.ConvertASCII(codepoint, codepoints); return FontPrintWidthUTF32(fh, utf32.codepoints.data(), count); } @@ -998,7 +998,7 @@ bool FontRenderTextASCII(int32_t fh, const uint8_t *codepoint, int32_t codepoint if (codepoints > 0) { FONT_DEBUG_CHECK(IS_VALID_FONT_HANDLE(fh)); - // Atempt to convert the string to UTF32 and forward to FontRenderTextUTF32() + // Attempt to convert the string to UTF32 and forward to FontRenderTextUTF32() auto count = utf32.ConvertASCII(codepoint, codepoints); return FontRenderTextUTF32(fh, utf32.codepoints.data(), count, options, out_data, out_x, out_y); } diff --git a/internal/support/converter/QB45BIN.bas b/internal/support/converter/QB45BIN.bas index b5590c846..46e0e80b6 100644 --- a/internal/support/converter/QB45BIN.bas +++ b/internal/support/converter/QB45BIN.bas @@ -270,7 +270,7 @@ QB45TOKENS: ' declmod::=SHARED ' ' If a pipe symbol is used, the next rule will inherit the "declmod" (or -' whatever symbol), unless it explicitly defines it's own. Rules defined +' whatever symbol), unless it explicitly defines its own. Rules defined ' on separate lines use the default symbol which, initially, is nothing, but ' 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 @@ -369,7 +369,7 @@ DATA 0x012,2,"{0}.{#id} = {1}" DATA 0x015,4,"astype::={#tabi:2}AS {#type:0}" DATA 0x016,4,"astype::={#tabi:2}AS {#type:0}" -' 0x017 - used for unkown type assignments? +' 0x017 - used for unknown type assignments? DATA 0x017,0,"" DATA 0x018,"" @@ -1236,7 +1236,7 @@ END FUNCTION ' ' Reads a literal 64-bit float from the p-code and returns its string ' representation. Using the "{dbl}" tag in the SHIFT procedure is a more -' convienient method to extract literals. +' convenient method to extract literals. ' ' The IP is passed by reference, and will be incremented to the code ' following the literal. There is no radix option for floating point values. @@ -1264,7 +1264,7 @@ END FUNCTION ' ' Reads a literal 16-bit integer from the code and returns its string ' representation. Using the "{int}" tag in ExecuteParseRule is a more -' convienient method to extract literals. +' convenient method to extract literals. ' ' The Radix parameter may be 8, 10 or 16 to produce ' the desired number format, or use the "{int&o}" and "{int&h}" tags. @@ -1297,7 +1297,7 @@ END FUNCTION ' ' Reads a literal 32-bit integer from the code and returns its string ' representation. Using the "{lng}" tag in ExecuteParseRule is a more -' convienient method to extract literals. +' convenient method to extract literals. ' ' The Radix parameter may be 8, 10 or 16 to produce the desired number ' format, or use the "{lng&o}" and "{lng&h}" tags. @@ -1332,7 +1332,7 @@ END FUNCTION ' ' Reads a literal 32-bit float from the p-code and returns its string ' representation. Using the "{sng}" tag in the SHIFT procedure is a more -' convienient method to extract literals. +' convenient method to extract literals. ' ' The IP is passed by reference, and will be incremented to the code ' following the literal. There is no radix option for floating point values. @@ -1931,7 +1931,7 @@ END SUB ' ' Returns the token id of the next unprocessed token without modifying IP. -' Neccessary for REDIM, which causes an array expression to behave like +' Necessary for REDIM, which causes an array expression to behave like ' an array declaration, for reasons best known to the QB45 dev team. ' FUNCTION LookAhead @@ -2693,7 +2693,7 @@ FUNCTION ReadToken ' soldier on and parse the rest of the file '---------------------------------------------------------------------------- IF ParseRules(PCODE) = "" THEN - AOutput "REM ®QB45BIN¯ Unkown token - " + HEX$(PCODE) + AOutput "REM ®QB45BIN¯ Unknown token - " + HEX$(PCODE) IP = IP + 1 EXIT FUNCTION END IF @@ -3132,7 +3132,7 @@ FUNCTION SubstTagVERB$ END FUNCTION ' -' Splits a {ruletag} into it's constituent components. +' Splits a {ruletag} into its constituent components. ' FUNCTION TokenizeTag (TagTxt AS STRING, TagParam AS INTEGER) diff --git a/licenses/README.md b/licenses/README.md index 4b6080db3..a449b01cd 100644 --- a/licenses/README.md +++ b/licenses/README.md @@ -79,7 +79,7 @@ These libraries are pulled in if `_INFLATE$()` or `_DEFLATE$()` are used. ## Http Support -These libraries are pulled in if `_OPENCLIENT()` and `$Unstable:Http` areused: +These libraries are pulled in if `_OPENCLIENT()` and `$Unstable:Http` are used: | Library | License | License file | Location | | :------ | :-----: | :----------- | :------- | diff --git a/setup_lnx.sh b/setup_lnx.sh index 878de012b..0c3bec7ae 100755 --- a/setup_lnx.sh +++ b/setup_lnx.sh @@ -101,7 +101,7 @@ elif [ "$DISTRO" == "voidlinux" ]; then elif [ -z "$DISTRO" ]; then echo "Unable to detect distro, skipping package installation" echo "Please be aware that for QB64-PE to compile, you will need the following installed:" - echo " OpenGL developement libraries" + echo " OpenGL development libraries" echo " ALSA development libraries" echo " GNU C++ Compiler (g++)" echo " zlib" diff --git a/source/global/IDEsettings.bas b/source/global/IDEsettings.bas index 39fb78723..cc59d9a6e 100644 --- a/source/global/IDEsettings.bas +++ b/source/global/IDEsettings.bas @@ -444,14 +444,14 @@ IniSetAddQuotes 0 IF ReadConfigSetting(windowSettingsSection$, "IDE_TopPosition", value$) THEN IDE_TopPosition = VAL(value$) ELSE - IDE_BypassAutoPosition = -1 'If there's no position saved in the file, then we certainly don't need to try and auto-position to our last setting. + IDE_BypassAutoPosition = -1 'If there's no position saved in the file, then we certainly don't need to try to auto-position to our last setting. IDE_TopPosition = 0 END IF IF ReadConfigSetting(windowSettingsSection$, "IDE_LeftPosition", value$) THEN IDE_LeftPosition = VAL(value$) ELSE - IDE_BypassAutoPosition = -1 'If there's no position saved in the file, then we certainly don't need to try and auto-position to our last setting. + IDE_BypassAutoPosition = -1 'If there's no position saved in the file, then we certainly don't need to try to auto-position to our last setting. IDE_LeftPosition = 0 END IF diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 09db45d44..9247dc69b 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -13674,7 +13674,7 @@ FUNCTION idesubs$ SortedSubsFlag = o(3).sel IF SortedSubsFlag = 0 THEN - 'Replace list contents with unsorted version while mantaining current selection. + 'Replace list contents with unsorted version while maintaining current selection. PreviousSelection = -1 IF o(1).sel > 0 THEN TargetSourceLine$ = MID$(lySorted$, o(1).sel * 4 - 3, 4) @@ -13693,7 +13693,7 @@ FUNCTION idesubs$ o(1).sel = PreviousSelection focus = 1 ELSE - 'Replace list contents with sorted version while mantaining current selection. + 'Replace list contents with sorted version while maintaining current selection. PreviousSelection = -1 IF o(1).sel > 0 THEN TargetSourceLine$ = MID$(ly$, o(1).sel * 4 - 3, 4) @@ -14935,8 +14935,8 @@ END FUNCTION 'f$ is altered to only contain the name of the actual file 'root$ is the path to apply relative paths to FUNCTION idezgetfilepath$ (root$, f$) - 'step #1: seperate file's name from its path (if any) - p$ = ideztakepath$(f$) 'note: this is a simple seperation of the string + 'step #1: separate file's name from its path (if any) + p$ = ideztakepath$(f$) 'note: this is a simple separation of the string 'step #2: if path was undefined, set it to root IF LEN(p$) = 0 THEN p$ = root$ @@ -14944,7 +14944,7 @@ FUNCTION idezgetfilepath$ (root$, f$) 'step #3: if path is relative, make it relative to root$ IF _DIREXISTS(root$ + idepathsep$ + p$) THEN p$ = root$ + idepathsep$ + p$ - 'step #4: attempt a CHDIR to the path to (i) validate its existance + 'step #4: attempt a CHDIR to the path to (i) validate its existence ' & (ii) allow listing the paths full name ideerror = 4 'path not found p2$ = p$ @@ -19457,7 +19457,7 @@ FUNCTION idef1box$ (lnks$, lnks) END FUNCTION -'After Cormen, Leiserson, Rivest & Stein "Introduction To Algoritms" via Wikipedia +'After Cormen, Leiserson, Rivest & Stein "Introduction To Algorithms" via Wikipedia SUB sort (arr() AS STRING * 998) FOR i& = LBOUND(arr) + 1 TO UBOUND(arr) x$ = arr(i&) @@ -19472,7 +19472,7 @@ SUB sort (arr() AS STRING * 998) END SUB FUNCTION FindProposedTitle$ - 'Finds the first occurence of _TITLE to suggest a file name + 'Finds the first occurrence of _TITLE to suggest a file name 'when saving for the first time or saving as. DIM c AS _BYTE, q AS _BYTE, i @@ -20402,11 +20402,11 @@ END FUNCTION SUB ExportCodeAs (docFormat$) ' Get the current source code, convert it to the desired document format and ' then write the result into a file (program name or "Untitled" + extension). - ' Forum and Wiki exports are pushed directly to the Clipboard and can directy + ' Forum and Wiki exports are pushed directly to the Clipboard and can directly ' be pasted into the Forum post or Wiki page. The exported code is highlighted ' according to the internal keyword lists and the keywords are linked to its ' respective Wiki pages. Documents will use the current IDE colors, the Forum - ' and Wiki exports use its own fixed blue theme for higlighting. Further in + ' and Wiki exports use its own fixed blue theme for highlighting. Further in ' documents the extended ASCII codes (>127) are encoded as UTF-8 to get them ' displayed correctly. However, the Forum and Wiki exports keep the original ' codepage encoding. Note that this actually might cause wrong characters in @@ -20471,7 +20471,7 @@ SUB ExportCodeAs (docFormat$) nl% = -1 '=> new line indicator nt% = -1 '=> new token indicator '---------- - nc% = 0 '=> paranthesis nesting counter + nc% = 0 '=> parenthesis nesting counter in% = 0 '=> ignore next keyword sk% = 0 '=> skip copying current char '---------- diff --git a/source/qb64pe.bas b/source/qb64pe.bas index e37733179..a567247c8 100644 --- a/source/qb64pe.bas +++ b/source/qb64pe.bas @@ -173,7 +173,7 @@ REDIM SHARED T(1 TO OptMax) AS INTEGER 'The type of the entry ' t is 0 for ? opts ' ---------- 0 means ? , 1+ means a symbol or {}block ---------- ' t is 1 for symbol opts -' t is the number of rhs opt () index enteries for {READ|WRITE|READ WRITE} like opts +' t is the number of rhs opt () index entries for {READ|WRITE|READ WRITE} like opts REDIM SHARED Lev(1 TO OptMax) AS INTEGER 'The indwelling level of each opt () element (the lowest is 0) REDIM SHARED EntryLev(1 TO OptMax) AS INTEGER 'The level required from which this opt () can be validly be entered/checked-for REDIM SHARED DitchLev(1 TO OptMax) AS INTEGER 'The lowest level recorded between the previous Opt and this Opt @@ -1669,7 +1669,7 @@ DO IF a$ <> "" THEN GOTO errmes IF result <> 0 THEN ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'So we inherit the execlevel from above - IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and conditon found + IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and condition found END IF GOTO finishedlinepp 'and then we're finished -- and at this point we didn't make a match so we exit with a DONT READ type flag on our code. END IF @@ -1702,7 +1702,7 @@ DO IF a$ <> "" THEN GOTO errmes IF result <> 0 THEN ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'So we inherit the execlevel from above - IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and conditon found + IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and condition found END IF GOTO finishedlinepp 'and then we're finished -- and at this point we didn't make a match so we exit with a DONT READ type flag on our code. END IF @@ -2934,7 +2934,7 @@ DO IF a$ <> "" THEN GOTO errmes IF result <> 0 THEN ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'So we inherit the execlevel from above - IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and conditon found + IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and condition found END IF controllevel = controllevel + 1 @@ -2974,7 +2974,7 @@ DO IF a$ <> "" THEN GOTO errmes IF result <> 0 THEN ExecLevel(ExecCounter) = ExecLevel(ExecCounter - 1) 'So we inherit the execlevel from above - IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and conditon found + IF ExecLevel(ExecCounter) = 0 THEN DefineElse(ExecCounter) = DefineElse(ExecCounter) OR 4 'Else if used and condition found END IF END IF @@ -7692,7 +7692,7 @@ DO 'new dim syntax for SHARED! i = i - 1 'relocate back to "AS" - 'estabilish the data type: + 'establish the data type: t$ = "" ts$ = "" t3$ = "" @@ -8228,11 +8228,11 @@ DO dimgottyp: IF d$ <> "" AND d$ <> "," THEN a$ = "DIM: Expected ,": GOTO errmes - 'In QBASIC, if no type info is given it can refer to an expeicit/formally defined array + 'In QBASIC, if no type info is given it can refer to an explicit/formally defined array IF notype <> 0 AND dimoption <> 3 AND dimoption <> 1 THEN 'not DIM or STATIC which only create new content IF LEN(elements$) THEN 'an array IF FindArray(varname$) THEN - IF LEN(RTRIM$(id.mayhave)) THEN 'explict/formally defined + IF LEN(RTRIM$(id.mayhave)) THEN 'explicit/formally defined typ$ = id2fulltypename$ 'adopt type dimmethod = 0 'set as formally defined END IF @@ -8492,7 +8492,7 @@ DO IF x = 0 THEN x = idn + 1 - 'note: the following code only adds include directives, everything else is defered + 'note: the following code only adds include directives, everything else is deferred ChainTxtBuf = OpenBuffer%("A", tmpdir$ + "chain.txt") 'include directive WriteBufLine ChainTxtBuf, "#include " + CHR$(34) + "chain" + str2$(x) + ".txt" + CHR$(34) @@ -8696,7 +8696,7 @@ DO i = i + 1 'skip "AS" newDimSyntaxTypePassBack = 0 - 'estabilish the data type: + 'establish the data type: appendname$ = "" appendtype$ = sp + SCase$("As") typ$ = "" @@ -10610,9 +10610,9 @@ DO IF RTRIM$(id2.callname) = "sub_get" OR RTRIM$(id2.callname) = "sub_put" THEN IF passed AND 2 THEN 'regular GET/PUT call with variable provided - passed = passed - 2 'for complience with existing methods, remove 'passed' flag for the passing of a variable + passed = passed - 2 'for compliance with existing methods, remove 'passed' flag for the passing of a variable ELSE - 'FIELD GET/PUT call with variable omited + 'FIELD GET/PUT call with variable omitted IF RTRIM$(id2.callname) = "sub_get" THEN fieldcall = 1 subcall$ = "field_get(" @@ -10877,7 +10877,7 @@ DO 'pass by reference IF (targettyp AND ISPOINTER) THEN - IF dereference = 0 THEN 'check deferencing wasn't used + IF dereference = 0 THEN 'check dereferencing wasn't used 'note: array pointer IF (targettyp AND ISARRAY) THEN @@ -10927,7 +10927,7 @@ DO END IF IF id.linkid = 0 THEN - 'if id.linkid is 0, it means the number of array elements is definietly + 'if id.linkid is 0, it means the number of array elements is definitely 'known of the array being passed, this is not some "fake"/unknown array. 'using the numer of array elements of a fake array would be dangerous! @@ -11041,7 +11041,7 @@ DO END IF 'similar END IF 'reference ELSE 'not a string - 'its a string + 'it's a string IF (sourcetyp AND ISREFERENCE) THEN idnum = VAL(LEFT$(e$, INSTR(e$, sp3) - 1)) 'id# of sourcetyp IF MID$(sfcmemargs(targetid), i, 1) = CHR$(1) THEN 'cmem required? @@ -11051,7 +11051,7 @@ DO END IF END IF END IF 'reference - END IF 'its a string + END IF 'it's a string END IF 'dereference check END IF 'target is a pointer @@ -13103,7 +13103,7 @@ IF idemode AND qberrorhappenedvalue >= 0 THEN END IF IF qberrorhappenedvalue >= 0 THEN - a$ = "UNEXPECTED INTERNAL COMPILER ERROR!": GOTO errmes 'internal comiler error + a$ = "UNEXPECTED INTERNAL COMPILER ERROR!": GOTO errmes 'internal compiler error END IF @@ -13620,9 +13620,9 @@ FUNCTION allocarray (n2$, elements$, elementsize, udt) '__ARRAY_SINGLE_A[6]=1; IF cmem AND stringarray = 0 THEN 'Note: A string array's pointers are always stored in 64bit memory - '(static)CONVENTINAL memory + '(static)CONVENTIONAL memory WriteBufLine DataTxtBuf, n$ + "[0]=(ptrszint)cmem_static_pointer;" - 'alloc mem & check if static memory boundry has oversteped dynamic memory boundry + 'alloc mem & check if static memory boundary has overstepped dynamic memory boundary WriteBufLine DataTxtBuf, "if ((cmem_static_pointer+=((" + sizestr$ + ")+15)&-16)>cmem_dynamic_base) error(257);" '64K check WriteBufLine DataTxtBuf, "if ((" + sizestr$ + ")>65536) error(257);" @@ -15904,7 +15904,7 @@ FUNCTION evaluate$ (a2$, typ AS LONG) - 'identify any referencable values + 'identify any referenceable values FOR i = 1 TO blockn IF isoperator(block(i)) = 0 THEN IF evaledblock(i) = 0 THEN @@ -17459,7 +17459,7 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG) '------------------------------------------------------------------------------------------------------------ 'note: this comment makes no sense... - 'any numeric variable, but it must be type-speficied + 'any numeric variable, but it must be type-specified IF targettyp = -2 THEN e$ = evaluatetotyp(e2$, -2) @@ -17496,7 +17496,7 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG) 'pointer? IF (targettyp AND ISPOINTER) THEN - IF dereference = 0 THEN 'check deferencing wasn't used + IF dereference = 0 THEN 'check dereferencing wasn't used @@ -17552,7 +17552,7 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG) IF id.linkid = 0 THEN - 'if id.linkid is 0, it means the number of array elements is definietly + 'if id.linkid is 0, it means the number of array elements is definitely 'known of the array being passed, this is not some "fake"/unknown array. 'using the numer of array elements of a fake array would be dangerous! @@ -17693,7 +17693,7 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG) END IF 'source is a reference ELSE 'string - 'its a string + 'it's a string IF (sourcetyp AND ISREFERENCE) THEN idnum = VAL(LEFT$(e$, INSTR(e$, sp3) - 1)) 'id# of sourcetyp @@ -17860,7 +17860,7 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG) ' Add on any extra optional arguments that were not provided ' - ' Overloaded functions do not require the omited arguments to be provided + ' Overloaded functions do not require the omitted arguments to be provided IF curarg <= id2.args AND NOT id2.overloaded THEN FOR i = curarg TO id2.args IF i = 1 THEN r$ = r$ + "NULL" ELSE r$ = r$ + ",NULL" @@ -17873,7 +17873,7 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG) IF n$ = "UBOUND" THEN r2$ = "func_ubound(" ELSE r2$ = "func_lbound(" e$ = refer$(ulboundarray$, sourcetyp, 1) IF Error_Happened THEN EXIT FUNCTION - 'note: ID contins refer'ed array info + 'note: ID contains refer'ed array info arrayelements = id.arrayelements '2009 IF arrayelements = -1 THEN arrayelements = 1 '2009 @@ -19574,7 +19574,7 @@ FUNCTION fixoperationorder$ (savea$) '----------------I. Pass (){}bracketed items (if any) to fixoperationorder & build return---------------- - 'note: items seperated by commas are done seperately + 'note: items separated by commas are done separately ff$ = "" b = 0 @@ -20389,7 +20389,7 @@ FUNCTION lineformat$ (a$) IF c = 38 THEN Give_Error "Expected &H... or &O...": EXIT FUNCTION '----------------variable/name---------------- - '*trailing _ is treated as a seperate line extension* + '*trailing _ is treated as a separate line extension* IF (c >= 65 AND c <= 90) OR c = 95 THEN 'A-Z(a-z) or _ IF c = 95 THEN p2 = 0 ELSE p2 = i FOR i2 = i + 1 TO n diff --git a/source/subs_functions/extensions/opengl/opengl_methods.bas b/source/subs_functions/extensions/opengl/opengl_methods.bas index 923833831..512de671a 100644 --- a/source/subs_functions/extensions/opengl/opengl_methods.bas +++ b/source/subs_functions/extensions/opengl/opengl_methods.bas @@ -191,7 +191,7 @@ SUB gl_scan_header var_name$ = readchunk(a$, l$) IF LEFT$(var_name$, 1) = "*" THEN var_type$ = var_type$ + "*": var_name$ = RIGHT$(var_name$, LEN(var_name$) - 1) IF LEFT$(var_name$, 1) = "*" THEN var_type$ = var_type$ + "*": var_name$ = RIGHT$(var_name$, LEN(var_name$) - 1) - 'Note: could be a poiner to a pointer + 'Note: could be a pointer to a pointer ELSE var_name$ = "no_name" END IF diff --git a/source/subs_functions/subs_functions.bas b/source/subs_functions/subs_functions.bas index 710dc0ed3..81bb8acf8 100644 --- a/source/subs_functions/subs_functions.bas +++ b/source/subs_functions/subs_functions.bas @@ -2604,8 +2604,8 @@ id.subfunc = 2 id.callname = "sub_get" id.args = 3 id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(-4) -'id.specialformat = "[#]?,[?],?" 'non field complient definition -id.specialformat = "[#]?[,[?][,?]]" 'field complient definition +'id.specialformat = "[#]?,[?],?" 'non field compliant definition +id.specialformat = "[#]?[,[?][,?]]" 'field compliant definition id.hr_syntax = "GET #fileNumber&, [position][, targetVariable|targetArray()}]" regid @@ -2615,8 +2615,8 @@ id.subfunc = 2 id.callname = "sub_put" id.args = 3 id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(-4) -'id.specialformat = "[#]?,[?],?" 'non field complient definition -id.specialformat = "[#]?[,[?][,?]]" 'field complient definition +'id.specialformat = "[#]?,[?],?" 'non field compliant definition +id.specialformat = "[#]?[,[?][,?]]" 'field compliant definition id.hr_syntax = "PUT #filenumber&, [position][, {holdingvariable|holdingarray()}]" regid @@ -3489,7 +3489,7 @@ id.n = qb64prefix$ + "Atan2" 'The name of our new one id.subfunc = 1 'And this is a function id.callname = "std::atan2" 'The C name of the function id.args = 2 'It takes 2 parameters to work -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 patameters from what I can tell +id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 parameters from what I can tell id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value id.hr_syntax = "_ATAN2(y, x)" regid 'and we're finished with ID registration @@ -3499,7 +3499,7 @@ id.n = qb64prefix$ + "Hypot" 'The name of our new one id.subfunc = 1 'And this is a function id.callname = "std::hypot" 'The C name of the function id.args = 2 'It takes 2 parameters to work -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 patameters from what I can tell +id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 parameters from what I can tell id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value id.hr_syntax = "_HYPOT(x, y)" regid 'and we're finished with ID registration diff --git a/source/utilities/const_eval.bas b/source/utilities/const_eval.bas index f8396a9f5..bc798a57f 100644 --- a/source/utilities/const_eval.bas +++ b/source/utilities/const_eval.bas @@ -907,7 +907,7 @@ FUNCTION EvaluateFunction$ (p, args AS STRING) SELECT CASE ConstFuncs(p).nam 'Depending on our operator.. CASE "_PI" - 'Future compatable in case something ever stores extra digits for PI + 'Future compatible in case something ever stores extra digits for PI n1 = 3.14159265358979323846264338327950288## * args(1).f CASE "_ACOS": n1 = _ACOS(args(1).f) diff --git a/source/utilities/elements.bas b/source/utilities/elements.bas index 891a2342d..db0b09520 100644 --- a/source/utilities/elements.bas +++ b/source/utilities/elements.bas @@ -278,8 +278,8 @@ FUNCTION hasFunctionElement (a$, element) count = count + 1 IF element = count THEN - ' We have a element here if there's any elements - ' inbetween the previous comma and this one + ' We have an element here if there's any elements + ' in-between the previous comma and this one hasFunctionElement = (i <> 1) AND (i - 2 <> start) EXIT FUNCTION END IF diff --git a/source/utilities/strings.bas b/source/utilities/strings.bas index 777db5895..0ef08d14a 100644 --- a/source/utilities/strings.bas +++ b/source/utilities/strings.bas @@ -130,7 +130,7 @@ END FUNCTION ' ' Reads the integer setting at section:setting. If it is not there or invalid, writes the default value to it ' -' Verfies the value is positive and non-zero +' Verifies the value is positive and non-zero ' FUNCTION ReadWriteLongSettingValue& (section AS STRING, setting AS STRING, default AS LONG) DIM value AS STRING