From c466faf484781b33e7b5ab211d0b95266a3f3ba6 Mon Sep 17 00:00:00 2001 From: Kugel Fuhr <98353208+kugelfuhr@users.noreply.github.com> Date: Mon, 7 Jul 2025 21:49:45 +0200 Subject: [PATCH] Use UTF-8 for diagnostic output if it is available. Added a command line switch --no-utf8 to disable the use of UTF-8 characters. --- doc/ca65.sgml | 11 +++- src/ca65/condasm.c | 1 + src/ca65/dbginfo.c | 3 +- src/ca65/ea65.c | 17 ++++--- src/ca65/easw16.c | 1 + src/ca65/enum.c | 3 +- src/ca65/error.c | 92 +++++++++++++++++++++++++++++++++- src/ca65/error.h | 3 ++ src/ca65/expect.c | 116 +++++++++++++++++++++++++++++++++++++++++++ src/ca65/expect.h | 83 +++++++++++++++++++++++++++++++ src/ca65/expr.c | 15 +++--- src/ca65/filetab.c | 4 +- src/ca65/instr.c | 2 +- src/ca65/listing.c | 2 +- src/ca65/macro.c | 31 ++++++------ src/ca65/main.c | 20 ++++++-- src/ca65/nexttok.c | 88 +++----------------------------- src/ca65/nexttok.h | 30 ----------- src/ca65/objfile.c | 4 +- src/ca65/pseudo.c | 15 +++--- src/ca65/repeat.c | 5 +- src/ca65/scanner.c | 13 ++--- src/ca65/segment.c | 2 +- src/ca65/struct.c | 5 +- src/ca65/studyexpr.c | 2 +- src/ca65/symbol.c | 5 +- src/ca65/symentry.c | 52 +++++++++---------- src/ca65/symtab.c | 24 ++++----- 28 files changed, 435 insertions(+), 214 deletions(-) create mode 100644 src/ca65/expect.c create mode 100644 src/ca65/expect.h diff --git a/doc/ca65.sgml b/doc/ca65.sgml index f1154d4b2..31da0306c 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -120,6 +120,7 @@ Long options: --listing name Create a listing file if assembly was ok --list-bytes n Maximum number of bytes per listing line --memory-model model Set the memory model + --no-utf8 Disable use of UTF-8 in diagnostics --pagelength n Set the page length for the listing --relax-checks Relax some checks (see docs) --smart Enable smart mode @@ -147,7 +148,7 @@ Here is a description of all the command line options: name="search paths">. -