1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-09 21:15:12 +00:00
Commit graph

1293 commits

Author SHA1 Message Date
Matthew Kilgore e810229d11 Fix _RGB32() optional arguments
The new optional arguments for functions broke _RGB32() because it uses
some custom flags ('overloaded' and 'minargs' on the id Type) to control
its parameter passing. You are allowed passing any number from 1 to 4 args
to `func__rgb32` and there are 4 overloaded C++ functions that will get
picked from. This is different from how this typically would work, with
all 4 parameters always passed and an extra argument to specify the
parameters that were passed.

Rather than change `func__rgb32` I simply adjusted the optional argument
logic to account for the flags used by `_RGB32()` - if the `overloaded`
flag is set, then we don't need to add extra `NULL` parameters for any
parameter that wasn't specified in the argument list. Instead we simply
don't emit anything for those.
2023-02-13 00:25:51 -05:00
Matthew Kilgore 0836cf31eb Format source, apply Option _Explicit in tests 2023-02-12 22:38:50 -05:00
Matthew Kilgore 83533dc319 Add support for optional function arguments
Currently functions only have very limited optional argument support,
this expands it so that we can have more complex sets of optional
arguments for functions, such as multiple arguments where not all need
to be provided. This will be used in the future for some upcoming
functionality.

Note that this does not support any generic optional argument format,
the commas always have to be provided unless an optional argument is at
the end of the parameter list. Thus, if you have a format with two
optional arguments and you want to omit the second, then you need to call
it as 'foo(2, , 3)`, rather than `foo(2, 3)`. This is important for
avoiding ambiguous situations, and is how many SUBs currently function.

The two functions that violate that requirement are INSTR() and
_INSTRREV(), which use the format `[?],?,?` and allow omitting the comma
for the first argument. This format is simply handled as a special case.

Fixes: #303
2023-02-12 22:38:50 -05:00
Roland Heyder 275ca24c9a General refactoring
- things not fitting into the previous commits
2023-02-12 19:47:01 +01:00
Roland Heyder b1c9733420 Removes old code
- unused (commented) code
- no longer needed HTML tag handling (eliminated from Wiki pages)
- #toc/#top link filters removed (those links are supported now)
2023-02-12 19:41:25 +01:00
Roland Heyder dacff9e1b8 Improve local linking for #toc/#top links
- designate the help page header as target for #toc/#top links (Return to Top, Return to Table of Contents in the Wiki)
- include bottom {{PageNavigation}} links
- implement <h4> headings (==== in the Wiki), used as letter anchors in the alphabetic index
2023-02-12 19:32:47 +01:00
Roland Heyder 08b000b71c Skip more useless line feeds
- ignore line feeds after HTML comments and <br> and <br /> tags
2023-02-12 19:20:50 +01:00
Roland Heyder dfa65b8fdd Add more Entities/UTF-8 chars
- adds some 20+ more chars to the list
- re-grouping and some comment changes
2023-02-12 19:13:05 +01:00
Roland Heyder 174a95b052 Change flow logic (Entity/UTF-8 related)
- targets especially links, templates and centered text
- every char must properly run through the Entity/UTF-8 substitution stage
2023-02-12 15:01:21 +01:00
Roland Heyder 6399068293 Change line end detection
- use color bit 7 instead of the CR char to mark the end of a help line
2023-02-12 14:37:51 +01:00
Samuel Gomes 4c548822d3 Fix arg count for _SNDNEW and type for _COLORCHOOSERDIALOG 2023-02-06 18:50:03 +05:30
Roland Heyder 9c7e067990 Improve Entity/UTF-8 handling
- UTF-8 handling changed to signal missing/unknown chars
- old entity handling (see 1st commit) removed and replaced by a similar method as UTF-8 handling incl. signalling missing/unknown entities
- added dynamic warnings at the top of pages which are using missing/unknown entities or UTF-8
2023-02-02 00:10:31 +01:00
Roland Heyder 01ed59c1d3 Add Interwiki link support
- wikipedia pages can be linked simply as Winkipedia:page instead of the full URL
- advantage: the new syntax can be used in internal links as well and will automatically expanded into external links when clicked
2023-02-02 00:02:05 +01:00
Roland Heyder ceb3d18c1e General refactoring 2023-02-01 23:52:13 +01:00
Roland Heyder 61513cbcd8 Remove obsolete code
- wiki pages have been fixed, so the handling for these old things is no longer required
2023-02-01 23:48:43 +01:00
Roland Heyder 163f6eb6e2 Availability gallery
- add handling for the new separator image
2023-01-19 23:48:22 +01:00
Roland Heyder 12e63da7a4 Fix "Update all pages" process
- ignore local link targets here, only the page name is relevant for download
2023-01-19 23:46:51 +01:00
Roland Heyder 7ad57f5c30 Fix F1 key context help
- fully implements local link targets
2023-01-19 23:45:18 +01:00
Roland Heyder fbc6c128e7 Context work
- rewording of some labels for better spelling and context
2023-01-19 23:41:38 +01:00
Roland Heyder c61757f689 Wiki download refactoring
- removed the old (commented out) curl stuff
- add another note to the error message
- simplified the libcurl download loop to use only EOF and not LOF anymore
- add a hidden external curl fallback option, read comments from line 1140 for more info
2023-01-17 18:41:44 +01:00
Roland Heyder af7dffb88c Local links support improved
- former versions did simply link to the top of the referenced page, ignoring the link anchor value (#)
- now links can point to any page section heading and the section (if found) is placed in the visible area
- to try use the links in the bottom nav section on the alphabetical index
2023-01-17 18:22:28 +01:00
Roland Heyder e2674f0157 Add code to handle Wiki galleries
- Availability sections will become icon galleries in the future
- as the IDE can't display it as images, we need to substitute it by text
2023-01-17 18:05:32 +01:00
Roland Heyder eeb6ca3f11 Fix some minor newline issues
- just a wrong branch
2023-01-17 17:58:29 +01:00
SteveMcNeill 9338d40921 Add missing words to syntax highlighter
_ScaledWidth and _ScaledHeight are two keywords which never got added to the syntax highlighter.  This corrects that.
2023-01-10 05:57:56 -05:00
Matthew Kilgore 95fa515aca Version 3.5.0 2023-01-08 21:56:40 -05:00
Matthew Kilgore 4a2808905c Delete qbx.o before every compile
This helps when compiling several files in a row very quickly, Mac OS
only has a one second accuracy on the file modification time which can
cause Make to not notice a file has been modified. With the changes to
avoid startup delays it's possible to have compiles happen that quickly
in succession now.
2023-01-08 20:24:25 -05:00
Samuel Gomes 061bf6af3d Rename _NEWSOUND to _SNDNEW to align with _SND* APIs 2022-12-31 12:00:38 +05:30
Samuel Gomes 4c80f6bcea Implement feature request #28 2022-12-31 01:49:23 +05:30
Roland Heyder 764996499c nm output buffering
- file is loaded on first access and then kept in buffer
2022-12-20 02:59:52 +01:00
Roland Heyder d243ff4b74 Wiki changes
- allow word wrap in text blocks
- add <pre> block handling
2022-12-20 01:18:56 +01:00
Luke Ceddia 4086cda00d
Clean up nm commands 2022-12-19 22:36:58 +11:00
Luke Ceddia ed0b6b12a5 Use tmpdir$ instead of internal/temp/ when invoking nm 2022-12-18 21:45:06 +11:00
Luke Ceddia ab0c2b189d Only run nm once per library 2022-12-18 20:45:58 +11:00
Steve McNeill 7894b8eec3
Merge branch 'main' into main 2022-11-27 14:50:00 -05:00
Matthew Kilgore 816126be08 Fix the Beginning C++ message being printed when using the IDE
This was overlooked in #258, previously this printing was being skipped
over via a check of idemode, but after changing where it was located so
it only prints once it now runs when using the IDE, which screwed up the
drawing of the IDE screen.

The simple fix is to check for idemode before doing the printing, which
is effectively what it was doing before anyway.

Fixes: #266
2022-11-27 12:41:07 -05:00
Steve McNeill d3f12be83b
Merge branch 'main' into main 2022-11-27 02:38:15 -05:00
SteveMcNeill 4e08c25057 Restore a little too much cut from last update. :P 2022-11-27 01:13:54 -05:00
SteveMcNeill 093396d538 Remove some redundancy in color dialog code 2022-11-27 01:06:25 -05:00
SteveMcNeill d0c7b5abb2 Bump to IDE size
As talked about in the Discord Chat, a bump up to 120x40 for the IDE size, if the user hasn't set something custom.
2022-11-27 00:33:48 -05:00
SteveMcNeill 4a078a1595 Add IDEErrorColor setting to config file 2022-11-27 00:26:46 -05:00
Matthew Kilgore 77c5e6c39c -x should create executable relative to _StartDir$ when -o is not provided
Starting with #201, source files relative to `_StartDir$` are allowed to
be passed to `-x` and compile as expected. Additionally as part of that
change, when the `-x` parameter is relative to `_StartDir$`, the `-o`
argument is _also_ treated relative to `_StartDir$`. This is simply the
behavior everyone using the compiler would expect - that the source file
and `-o` are relative to the same location.

An overlooked behavior was the executable location when `-o` is not
provided. It still writes to compiler directory, but it really should be
writing to `_Startdir$` since the output executable is intended to be
relative to the same location the source file is relative too. Overall
this is fairly straight forward to fix as the logic is the same, we just
need to make use of it when the `-o` flag is not provided.

Fixes: #257
2022-11-26 21:25:33 -05:00
Matthew Kilgore ae6602ecaf Prevent commands like NoPrefix duplicating commandline output
Some commands like NoPrefix trigger a complete "recompile" due to how
they work. This has the accidental effect of duplicating the command
line output, which should still only be printed once. Moving the
printing logic up a bit is a simple solution.

Fixes: #256
2022-11-26 21:25:33 -05:00
Steve McNeill 8bb2aefcb6
Merge branch 'main' into main 2022-11-26 20:33:48 -05:00
Roland Heyder ec6e648007 Simplify #include
Solving #119
2022-11-27 00:11:04 +01:00
SteveMcNeill 62cafd7a14 Redo and expand Version Compare Logic 2022-11-26 15:59:49 -05:00
SteveMcNeill 7576dc46fe Fix to Issue #233 with $IF and VERSION
https://github.com/QB64-Phoenix-Edition/QB64pe/issues/233

This should fix the comparisons with $IF and VERSION.   A few things of note here, which might affect future version labeling:

This expects to find version numbers which follow our current style -- ##.##.##   -- 3 numbers, separated by periods.

Adding in alphabetic characters will basically get ignored, and versions with less than 3 values will generate FALSE results in all comparisons.
2022-11-26 05:18:29 -05:00
SteveMcNeill b32059f155 Change to Open File Dialog
Change to open file dialog so that it initially opens in the user's StartDir$, and then from whatever folder they navigate to after that.
2022-11-26 03:06:36 -05:00
Roland Heyder 65371dad0f Wiki download finalized
- restore default back to https:
- ask user for fallback, if required
- final adjustments for new behavior
2022-11-23 22:54:04 +01:00
Roland Heyder b153a86d7e
Merge branch 'main' into wiki-dev 2022-11-23 11:02:28 +01:00
Roland Heyder 81d4983219 Wiki update refactoring
Some changes/fixes in the update flow.
2022-11-22 18:22:10 +01:00