Skip to content

Commit

Permalink
Finish implement $INCLUDEONCE
Browse files Browse the repository at this point in the history
  • Loading branch information
grymmjack committed Feb 14, 2024
1 parent 98ec6f8 commit 2a73102
Show file tree
Hide file tree
Showing 44 changed files with 39 additions and 17,865 deletions.
1 change: 1 addition & 0 deletions ANSI/ANSI.BM
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
' @uses ANSI.BI
' @see https://gist.github.com/grymmjack/9dae29a60ea65f086d0b35df96fe2291
'
$INCLUDEONCE

''
' Clamps a value from going below 0
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_BYTE.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_DBL.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_FLT.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_INT.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_INT64.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_LONG.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_SNG.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_STR.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_TEMPLATE.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_UBYTE.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_UINT.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_UINT64.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 1 addition & 0 deletions ARR/ARR_ULONG.BAS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'$DYNAMIC
$INCLUDEONCE

''
' Slice an array from source to destination starting at index and count slices
Expand Down
2 changes: 1 addition & 1 deletion ARR/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# generate was used on MacOS - so gnu-sed is needed on MacOS:
# brew install gnu-sed
# on linux, just replace $SED with sed
SED=sed
SED=gsed

TYPES=(
BYTE
Expand Down
1 change: 1 addition & 0 deletions ASEPRITE/ASEPRITE.BI
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
' @see https://github.com/aseprite/aseprite/blob/main/docs/ase-file-specs.md
' @author Rick Christy <grymmjack@gmail.com>
'
$INCLUDEONCE

TYPE ASEPRITE_IMAGE_HEADER
' A 128-byte header (same as FLC/FLI header, but with other magic number):
Expand Down
1 change: 1 addition & 0 deletions ASEPRITE/ASEPRITE.BM
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'
' @author Rick Christy <grymmjack@gmail.com>
'
$INCLUDEONCE

''
' Loads an ASEPRITE image into memory
Expand Down
1 change: 1 addition & 0 deletions CONSOLE/CONSOLE.BI
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
' @depends STRINGS/STRINGS.BI
' @author Rick Christy <grymmjack@gmail.com>
'
$INCLUDEONCE
$IF DEBUGGING = UNDEFINED THEN
$LET DEBUGGING = TRUE
$END IF
Expand Down
1 change: 1 addition & 0 deletions CONSOLE/CONSOLE.BM
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'
' @author Rick Christy <grymmjack@gmail.com>
'
$INCLUDEONCE

''
' Log a boxed message to console if DEBUGGING
Expand Down
1 change: 1 addition & 0 deletions DICT/DICT.BI
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses DICT.BM
'
$INCLUDEONCE

' DICTIONARY type consists of keys and values and is intended for array use
TYPE DICTIONARY
Expand Down
1 change: 1 addition & 0 deletions DICT/DICT.BM
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses DICT.BI
'
$INCLUDEONCE
'$INCLUDE:'DICT.BI'


Expand Down
1 change: 1 addition & 0 deletions DUMP/DUMP.BI
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
' @uses DUMP.BM
' @uses DICT.BI
'
$INCLUDEONCE
'$INCLUDE:'../DICT/DICT.BI'

$IF GJ_LIB_NL = UNDEFINED THEN
Expand Down
1 change: 1 addition & 0 deletions DUMP/DUMP.BM
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
' @see [0] https://www.merriam-webster.com/dictionary/dump
' @see [1] https://www.php.net/manual/en/function.print-r.php
'
$INCLUDEONCE

''
' Returns string with a dump of a string
Expand Down
1 change: 0 additions & 1 deletion INPUT/LIGHTBAR.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
' @uses LIGHTBAR.BI
' @uses LIGHTBAR.BM
'

$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI <> 1 THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
Expand Down
2 changes: 1 addition & 1 deletion INPUT/LIGHTBAR.BI
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses LIGHTBAR.BM
'
$LET GJ_LIB_INPUT_LIGHTBAR_INC_BI = 1
$INCLUDEONCE

' LIGHTBAR configuration UDT
TYPE LIGHTBAR
Expand Down
2 changes: 1 addition & 1 deletion INPUT/LIGHTBAR.BM
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses LIGHTBAR.BI
'
$LET GJ_LIB_INPUT_LIGHTBAR_INC_BM = 1
$INCLUDEONCE

''
' Render a LIGHTBAR menu
Expand Down
6 changes: 1 addition & 5 deletions INPUT/LIGHTBAR32.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
' @uses LIGHTBAR32.BI
' @uses LIGHTBAR32.BM
'

$INCLUDEONCE
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI <> 1 THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_INPUT_LIGHTBAR32_INC_BI = UNDEFINED THEN
'$INCLUDE:'LIGHTBAR32.BI'
$END IF

_TITLE "QB64_GJ_LIB - INPUT LIB - LIGHTBAR32 DEMO"

Expand Down Expand Up @@ -131,6 +129,4 @@ COLOR LB_EGA(12), LB_EGA(0) : PRINT "Thank you! Come again!"
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BM <> 1 THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_INPUT_LIGHTBAR32_INC_BM = UNDEFINED THEN
'$INCLUDE:'LIGHTBAR32.BM'
$END IF
2 changes: 1 addition & 1 deletion INPUT/LIGHTBAR32.BI
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses LIGHTBAR32.BM
'
$LET GJ_LIB_INPUT_LIGHTBAR32_INC_BI = 1
$INCLUDEONCE

' LIGHTBAR configuration UDT
TYPE LIGHTBAR32
Expand Down
2 changes: 1 addition & 1 deletion INPUT/LIGHTBAR32.BM
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses LIGHTBAR32.BI
'
$LET GJ_LIB_INPUT_LIGHTBAR32_INC_BM = 1
$INCLUDEONCE

''
' Render a LIGHTBA32R menu
Expand Down
2 changes: 1 addition & 1 deletion MISC/MISC.BI
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
'
' @author Rick Christy <grymmjack@gmail.com>
'
$LET GJ_LIB_MISC_INC_BI = 1
$INCLUDEONCE
2 changes: 1 addition & 1 deletion MISC/MISC.BM
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'
' @author Rick Christy <grymmjack@gmail.com>
'
$LET GJ_LIB_MISC_INC_BM = 1
$INCLUDEONCE


''
Expand Down
4 changes: 0 additions & 4 deletions PIPEPRINT/PIPEPRINT.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ $LET GJ_LIB_UNIFIED_TESTING = 1
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_PIPEPRINT_INC_BI = UNDEFINED THEN
'$INCLUDE:'PIPEPRINT.BI'
$END IF

OPTION _EXPLICIT
OPTION _EXPLICITARRAY
Expand Down Expand Up @@ -125,6 +123,4 @@ END SUB
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BM = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_PIPEPRINT_INC_BM = UNDEFINED THEN
'$INCLUDE:'PIPEPRINT.BM'
$END IF
2 changes: 1 addition & 1 deletion PIPEPRINT/PIPEPRINT.BI
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
' @uses ANSI/ANSI.BI
' @uses STRINGS/STRINGS.BI
'
$LET GJ_LIB_PIPEPRINT_INC_BI = 1
$INCLUDEONCE
CONST MAX_PIPES = 50
CONST MAX_PIPES_STRIP = 50

Expand Down
4 changes: 1 addition & 3 deletions PIPEPRINT/PIPEPRINT.BM
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
' @uses ANSI/ANSI.BM
' @uses STRINGS/STRINGS.BM
'
$LET GJ_LIB_PIPEPRINT_INC_BM = 1


$INCLUDEONCE

''
' Parses pipe codes and returns ANSI (can emulate ANSI via QB)
Expand Down
8 changes: 0 additions & 8 deletions STRINGS/STRINGS.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI <> 1 THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_STRINGS_INC_BI = UNDEFINED THEN
'$INCLUDE:'STRINGS.BI'
$END IF
$IF GJ_LIB_DUMP_INC_BI = UNDEFINED THEN
'$INCLUDE:'../DUMP/DUMP.BI'
$END IF
'$DYNAMIC
OPTION _EXPLICIT
OPTION _EXPLICITARRAY
Expand Down Expand Up @@ -204,9 +200,5 @@ PRINT STR.implode$(words_extracted$(), " ")
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BM <> 1 THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_STRINGS_INC_BM = UNDEFINED THEN
'$INCLUDE:'STRINGS.BM'
$END IF
$IF GJ_LIB_DUMP_INC_BM = UNDEFINED THEN
'$INCLUDE:'../DUMP/DUMP.BM'
$END IF
3 changes: 2 additions & 1 deletion STRINGS/STRINGS.BI
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses STRINGS.BM
'
$LET GJ_LIB_STRINGS_INC_BI = 1
$INCLUDEONCE

CONST GJ_LIB_MAX_STR_POSITIONS = 50

DECLARE LIBRARY
Expand Down
5 changes: 1 addition & 4 deletions STRINGS/STRINGS.BM
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses STRINGS.BI
'
$LET GJ_LIB_STRINGS_INC_BM = 1
$LET DEBUGGING = 1


$INCLUDEONCE

''
' Returns a string if n is true or false
Expand Down
4 changes: 0 additions & 4 deletions SYS/SYS.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_SYS_INC_BI = UNDEFINED THEN
'$INCLUDE:'SYS.BI'
$END IF
OPTION _EXPLICIT
OPTION _EXPLICITARRAY

Expand Down Expand Up @@ -44,6 +42,4 @@ SYSTEM 1
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BM = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_SYS_INC_BM = UNDEFINED THEN
'$INCLUDE:'SYS.BM'
$END IF
2 changes: 1 addition & 1 deletion SYS/SYS.BI
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
'
' @author Rick Christy <grymmjack@gmail.com>
'
$LET GJ_LIB_SYS_INC_BI = 1
$INCLUDEONCE
4 changes: 1 addition & 3 deletions SYS/SYS.BM
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
'
' @author Rick Christy <grymmjack@gmail.com>
'
$LET GJ_LIB_SYS_INC_BM = 1


$INCLUDEONCE

''
' Opens a URL in the default web browser
Expand Down
4 changes: 0 additions & 4 deletions VECT2D/VECT2D.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_COMMON_BI = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB_COMMON.BI'
$END IF
$IF GJ_LIB_VECT2D_INC_BI = UNDEFINED THEN
'$INCLUDE:'./VECT2D.BI'
$END IF


DIM v1 AS VECT2D
Expand Down Expand Up @@ -128,6 +126,4 @@ IF b% = TRUE THEN PRINT "TRUE" ELSE PRINT "FALSE"
b% = VECT2D.eq(v1, v1)
IF b% = TRUE THEN PRINT "TRUE" ELSE PRINT "FALSE"

$IF GJ_LIB_VECT2D_INC_BM = UNDEFINED THEN
'$INCLUDE:'./VECT2D.BM'
$END IF
2 changes: 1 addition & 1 deletion VECT2D/VECT2D.BI
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
' @author Evan Shortiss <https://github.com/evanshortiss/vector2d>
' @support William Barnes
'
$LET GJ_LIB_VECT2D_INC_BI = 1
$INCLUDEONCE

TYPE VECT2D
x AS SINGLE
Expand Down
3 changes: 1 addition & 2 deletions VECT2D/VECT2D.BM
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
' @author Evan Shortiss <https://github.com/evanshortiss/vector2d>
' @support William Barnes
'
$LET GJ_LIB_VECT2D_INC_BM = 1

$INCLUDEONCE

''
' Sets both x and y axes of the vector
Expand Down
Loading

0 comments on commit 2a73102

Please sign in to comment.