Skip to content

Commit

Permalink
Merge pull request #9 from ryangray/number-op-number-fix
Browse files Browse the repository at this point in the history
Number op number fix
  • Loading branch information
chris-y authored Apr 17, 2023
2 parents f3e00e7 + 0fa1a82 commit bc2d5a9
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2023-04-15 ryangray
* Fix "-num" or "+num" following a number leaving out the FP bytes after "num"
* Version 1.8.3

2023-01-28 ryangray
* Fix translation of backtick to the quote image token
* Remove VAL$ from ZX81 tokens list
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ zmakebas.guide: zmakebas.1

# The stuff below makes the distribution tgz.

VERS=1.8.2
VERS=1.8.3

dist: tgz
tgz: ../zmakebas-$(VERS).tar.gz
Expand Down
2 changes: 1 addition & 1 deletion Makefile.68k
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ zmakebas.guide: zmakebas.1

# The stuff below makes the distribution tgz.

VERS=1.8.2
VERS=1.8.3

dist: tgz
tgz: ../zmakebas-$(VERS).tar.gz
Expand Down
2 changes: 1 addition & 1 deletion zmakebas.1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.\"
.\" zmakebas.1 - man page
.\"
.TH zmakebas 1 "28th January, 2023" "Version 1.8.2" "Retrocomputing Tools"
.TH zmakebas 1 "15th April, 2023" "Version 1.8.3" "Retrocomputing Tools"
.\"
.\"------------------------------------------------------------------
.\"
Expand Down
6 changes: 3 additions & 3 deletions zmakebas.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define MSDOS
#endif

#define VERSION "1.8.2"
#define VERSION "1.8.3"
#define DEFAULT_OUTPUT "out.tap"
#define REM_TOKEN_NUM 234
#define PEEK_TOKEN_NUM 190 // :dbolli:20200420 19:00:13 Added ZX Spectrum PEEK token code (v1.5.2)
Expand Down Expand Up @@ -1199,7 +1199,7 @@ int main(int argc, char *argv[]) {
* so that we only have to find the start - i.e. a non-alpha char,
* an optional `-' or `+', an optional `.', then a digit.
*/
if (!in_rem && !in_quotes && !isalpha(ptr[-1]) &&
if (!in_rem && !in_quotes && !isalpha(ptr[-1]) && !isdigit(ptr[-1]) &&
(isdigit(*ptr) ||
((*ptr == '-' || *ptr == '+' || *ptr == '.') && isdigit(ptr[1])) ||
((*ptr == '-' || *ptr == '+') && ptr[1] == '.' && isdigit(ptr[2])))) {
Expand All @@ -1222,7 +1222,7 @@ int main(int argc, char *argv[]) {
memcpy(outptr, ptr, ptr2 - ptr);
outptr += ptr2 - ptr;

if ( zx81mode || ( ptr[-1] != '$' && ptr[-1] != '@' && !isalnum(ptr[-1]) ) ) { // :dbolli:20200417 19:36:10 Don't insert 5 byte inline FP for ZX Spectrum Next $nnnn hex num and @nnn binary num
if ( zx81mode || ( ptr[-1] != '$' && ptr[-1] != '@' ) ) { // :dbolli:20200417 19:36:10 Don't insert 5 byte inline FP for ZX Spectrum Next $nnnn hex num and @nnn binary num

*outptr++ = zx81mode ? 0x7e : 0x0e;

Expand Down
8 changes: 4 additions & 4 deletions zmakebas.rc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,8,2,0
PRODUCTVERSION 1,8,2,0
FILEVERSION 1,8,3,0
PRODUCTVERSION 1,8,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -68,12 +68,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "zmakebas"
VALUE "FileVersion", "1.8.2.0"
VALUE "FileVersion", "1.8.3.0"
VALUE "InternalName", "zmakebas.exe"
VALUE "LegalCopyright", "Copyright (C) 2023"
VALUE "OriginalFilename", "zmakebas.exe"
VALUE "ProductName", "zmakebas"
VALUE "ProductVersion", "1.8.2.0"
VALUE "ProductVersion", "1.8.3.0"
END
END
BLOCK "VarFileInfo"
Expand Down
6 changes: 5 additions & 1 deletion zmakebas.readme
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Short: BASIC Text to ZX Spectrum/ZX81 .TAP/.P
Uploader: chris@unsatisfactorysoftware.co.uk (Chris Young)
Author: Russell Marks and others
Type: util/conv
Version: 1.8.2
Version: 1.8.3
Architecture: m68k-amigaos >= 2.0.4; ppc-amigaos >= 4.0.0

Quick port/recompile of zmakebas.
Expand All @@ -13,6 +13,10 @@ format.

Changelog:

2023-04-15 ryangray
* Fix "-num" or "+num" following a number leaving out the FP bytes after "num"
* Version 1.8.3

2023-01-28 ryangray
* Fix translation of backtick to the quote image token
* Remove VAL$ from ZX81 tokens list
Expand Down

0 comments on commit bc2d5a9

Please sign in to comment.