diff options
-rw-r--r-- | listamsb.1 | 13 | ||||
-rw-r--r-- | listamsb.c | 12 | ||||
-rw-r--r-- | listamsb.rst | 10 |
3 files changed, 34 insertions, 1 deletions
@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "LISTAMSB" 1 "2025-03-07" "0.2.1" "Urchlay's Atari 8-bit Tools" +.TH "LISTAMSB" 1 "2025-03-08" "0.2.1" "Urchlay's Atari 8-bit Tools" .SH NAME listamsb \- List the source of a tokenized Atari Microsoft BASIC program .SH SYNOPSIS @@ -239,6 +239,17 @@ of Microsoft BASIC (e.g. Commodore, AppleSoft, GW\-BASIC, TRS\-80). If you see this warning, you\(aqll also see \fIN\fP <unknown token \fIXX\fP> messages in the actual listing. .UNINDENT +.SH ENVIRONMENT +.sp +\fBA8CAT\fP +.INDENT 0.0 +.INDENT 3.5 +The path to the \fBa8cat\fP(1) binary. Can be a full path or just +the executable name, in which case it will be searched for with the +normal \fBPATH\fP mechanism. If not set, \fIa8cat\fP is used. If there are +spaces or other metacharacters, they must be escaped. +.UNINDENT +.UNINDENT .SH LIMITATIONS .sp Unlike \fBlistbas\fP, there\(aqs no color syntax highlighting. Probably there @@ -751,9 +751,15 @@ void get_line_range(const char *arg) { } void parse_args(int argc, char **argv) { + const char *a8cat; char tmp[10]; int opt; + a8cat = getenv("A8CAT"); + if(!a8cat) a8cat = "a8cat"; + + strncpy(pipe_command, a8cat, BUFSIZ); + if(argc >= 2) { if(strcmp(argv[1], "--help") == 0) { print_help(); @@ -832,6 +838,12 @@ void open_output() { outfile = stdout; verbose(1, "using stdout for output"); } else { + const char *a8cat; + if((a8cat = getenv("A8CAT"))) { + verbose(1, "read A8CAT=%s from environment", a8cat); + } else { + verbose(1, "A8CAT not set in environment, using 'a8cat'"); + } verbose(1, "using pipe for output: %s", pipe_command); outfile = popen(pipe_command, "w"); /* "wb" not allowed! */ /* we probably never see this error. popen() fails only if diff --git a/listamsb.rst b/listamsb.rst index a76c22b..902319b 100644 --- a/listamsb.rst +++ b/listamsb.rst @@ -223,6 +223,16 @@ continues processing. you see this warning, you'll also see *N* <unknown token *XX*> messages in the actual listing. +ENVIRONMENT +=========== + +**A8CAT** + + The path to the **a8cat**\(1) binary. Can be a full path or just + the executable name, in which case it will be searched for with the + normal **PATH** mechanism. If not set, *a8cat* is used. If there are + spaces or other metacharacters, they must be escaped. + LIMITATIONS =========== |