Skip to content

Commit

Permalink
Trying to clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
greggirwin committed Feb 14, 2024
1 parent d3409ba commit fc45cf4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build/git-version.r
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ context [
if all [system/version/4 = 3 not find get-env "PATH" "git"][return none]

attempt [
temp: parse git "describe --long --tags" "-"
temp: parse git "describe --long" "-"
compose/deep [
context [
branch: (git "rev-parse --abbrev-ref HEAD")
Expand Down
2 changes: 1 addition & 1 deletion encapper/version.r
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.5
0.6.4
7 changes: 2 additions & 5 deletions modules/view/backends/windows/direct2d.reds
Original file line number Diff line number Diff line change
Expand Up @@ -2130,11 +2130,8 @@ create-text-format: func [
if TYPE_OF(value) = TYPE_NONE [make-font face font] ;-- make a GDI font

int: as red-integer! values + FONT_OBJ_SIZE
len: either TYPE_OF(int) <> TYPE_INTEGER [0][int/value]
if len <= 0 [
int: as red-integer! #get system/view/fonts/size
len: int/value
]
len: either TYPE_OF(int) <> TYPE_INTEGER [10][int/value]
if len <= 0 [len: 10]
ft-sz: as float! len
size: ConvertPointSizeToDIP(ft-sz)

Expand Down
2 changes: 2 additions & 0 deletions modules/view/backends/windows/gui.reds
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,8 @@ set-defaults: func [
len
#get system/view/fonts/system
UTF-16LE

font/lfHeight: font/lfHeight * log-pixels-y / inital-dpi ;-- font/lfHeight isn't affected by DPI change, we update it manually
integer/make-at
#get system/view/fonts/size
0 - (font/lfHeight * 72 / log-pixels-y)
Expand Down
5 changes: 1 addition & 4 deletions runtime/lexer.reds
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ lexer: context [
0000000000000000000100000000000000000000000000000000000000000000
0100000100000000000000010001010001010101010101010101000000000000
0001000000010100000100000000010000000000000000000000000000000000
0001000000010100000100000000010000000000000000000000000000000000
0000000000010000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
Expand Down Expand Up @@ -351,7 +351,6 @@ lexer: context [
mstr-s [byte-ptr!] ;-- multiline string saved start position
mstr-nest [integer!] ;-- multiline string nested {} counting
mstr-flags [integer!] ;-- multiline string accumulated flags
p-nline [integer!] ;-- points literals saved line(s) span
fun-ptr [red-function!] ;-- callback function pointer or NULL
fun-locs [integer!] ;-- number of local words in callback function
fun-evts [integer!] ;-- bitmap of allowed events
Expand Down Expand Up @@ -1140,7 +1139,6 @@ lexer: context [
][
type: either s/1 = #"(" [
if prescan-point s + 1 lex/in-end [
lex/p-nline: lex/nline
lex/scanned: 0
lex/in-pos: e + 1 ;-- skip delimiter
lex/entry: S_POINT
Expand Down Expand Up @@ -2145,7 +2143,6 @@ lexer: context [
if p/1 <> #"," [throw-error lex s e TYPE_POINT2D]
p: p + 1
y: as-float32 grab
lex/nline: lex/p-nline ;-- bring back saved lines span (frontal LF flag handling)
either p/1 = #"," [
p: p + 1
z: as-float32 grab
Expand Down
10 changes: 0 additions & 10 deletions tests/source/units/lexer-test.red
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,6 @@ Red [
--test-- "tr-53" --assert [(1, 2) (5, 6)] == transcode " (1, 2) (5, 6) "
--test-- "tr-54" --assert [(16-Jun-2014/14:34:59+2:00)] == transcode "(16-Jun-2014/14:34:59+2:00)"
--test-- "tr-55" --assert [(1.1.1)] == transcode "(1.1.1)"

--test-- "tr-56"
--assert [(2, 3) + 2 (2, 3) + 2] == out: transcode {^/(2,3) + 2^/(2,3) + 2^/}
--assert new-line? at out 1
--assert new-line? at out 4

===end-group===
===start-group=== "transcode/one"
Expand Down Expand Up @@ -694,11 +689,6 @@ Red [
--test-- "tro-199" --assert error? try [transcode/one "(1,2,)"]
--test-- "tro-200" --assert error? try [transcode/one "(1,2 3,)"]
--test-- "tro-201" --assert error? try [transcode/one "(1, 2 3)"]

--test-- "tro-202" --assert (1.#INF, 1.#INF) == transcode/one "(1.#inf, 1.#inf)"
--test-- "tro-203" --assert "(1.#NaN, 1.#NaN)" == mold transcode/one "(1.#nan, 1.#nan)" ; NaN values can't be compared with themselves
--test-- "tro-204" --assert error? try [transcode/one "(0, 0, 0]"]


===end-group===
===start-group=== "transcode/next"
Expand Down
2 changes: 1 addition & 1 deletion utils/generate-misc-tables.red
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ gen-float-classes-table: function [][

gen-point-scan-table: function [][
out: make binary! 256
list: charset "0123456789 ^-.+-#eEINFAinfa"
list: charset "0123456789 ^-.+-#eEINFA"

repeat i 256 [
c: to-char i - 1
Expand Down

0 comments on commit fc45cf4

Please sign in to comment.