From e66b158aa9fdda92517f56e32b59ab9b241c43d0 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 8 Apr 2016 03:52:42 -0500 Subject: [PATCH] Copyright year bumps; minor tweaks. --- LICENSE | 2 +- makefile | 19 +++++++++++-------- src/assembler/instructions.c | 2 -- src/config.c | 2 +- src/logging.h | 5 +++-- src/rom.c | 2 +- src/z80_ops.inc.c | 2 +- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/LICENSE b/LICENSE index 0764864..1811091 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2014-2015 Ben Kurtovic +Copyright (C) 2014-2016 Ben Kurtovic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/makefile b/makefile index 61ba471..fdd9618 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2014-2015 Ben Kurtovic +# Copyright (C) 2014-2016 Ben Kurtovic # Released under the terms of the MIT License. See LICENSE for details. PROGRAM = crater @@ -36,7 +36,7 @@ export CC export FLAGS export RM -.PHONY: all clean test-prereqs test tests $(TCPS) +.PHONY: all clean test tests test-prereqs test-make-prereqs $(TCPS) all: $(BNRY) @@ -61,13 +61,16 @@ ASM_INST = $(SOURCES)/assembler/instructions $(ASM_INST).inc.c: $(ASM_INST).yml $(ASM_UP) python $(ASM_UP) -test-prereqs: - $(MAKE) $(PROGRAM) DEBUG= +test-prereqs: $(PROGRAM) + @: # No-op; prevents make from cluttering output with "X is up to date" -test: test-prereqs - $(MAKE) -C tests all +test-make-prereqs: + @$(MAKE) test-prereqs DEBUG= + +test: test-make-prereqs + @$(MAKE) -C tests -s all tests: test -$(TCPS): test-prereqs - $(MAKE) -C tests $(subst test-,,$@) +$(TCPS): test-make-prereqs + @$(MAKE) -C tests -s $(subst test-,,$@) diff --git a/src/assembler/instructions.c b/src/assembler/instructions.c index 04e0cea..e268ebf 100644 --- a/src/assembler/instructions.c +++ b/src/assembler/instructions.c @@ -98,8 +98,6 @@ static ASMErrorDesc parse_inst_##mnemonic( \ #define INST_INDEX_PREFIX(n) INST_PREFIX_(INST_INDEX(n).reg) -/* ----------------------------- END WORK BLOCK ---------------------------- */ - /* Fill an instruction's byte array with the given data. diff --git a/src/config.c b/src/config.c index 1777772..d13fb14 100644 --- a/src/config.c +++ b/src/config.c @@ -90,7 +90,7 @@ static int get_rom_paths(char ***path_ptr) } closedir(dirp); } else { - WARN_ERRNO("couldn't open 'roms/'") + WARN_ERRNO("couldn't open '" ROMS_DIR "/'") } *path_ptr = paths; return npaths; diff --git a/src/logging.h b/src/logging.h index a40e3cd..16e2a90 100644 --- a/src/logging.h +++ b/src/logging.h @@ -10,12 +10,13 @@ /* Internal usage only */ -#define LOG_MSG_(dest, level, extra, after, ...) { \ +#define LOG_MSG_(dest, level, extra, after, ...) \ + do { \ fprintf(dest, level ": " __VA_ARGS__); \ extra; \ fprintf(dest, "\n"); \ after; \ - } + } while (0); #define LOG_ERR_(...) LOG_MSG_(stderr, __VA_ARGS__) #define LOG_OUT_(...) LOG_MSG_(stdout, __VA_ARGS__) diff --git a/src/rom.c b/src/rom.c index 2083dd6..1185f7b 100644 --- a/src/rom.c +++ b/src/rom.c @@ -32,7 +32,7 @@ static void print_header(const uint8_t *header) snprintf(&header_chr[3 * i], 3, "%2c", header[i]); else { header_chr[3 * i] = ' '; - header_chr[3 * i + 1] = '?'; + header_chr[3 * i + 1] = '.'; } header_hex[3 * i + 2] = header_chr[3 * i + 2] = ' '; } diff --git a/src/z80_ops.inc.c b/src/z80_ops.inc.c index 787f590..835f5ff 100644 --- a/src/z80_ops.inc.c +++ b/src/z80_ops.inc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2014-2015 Ben Kurtovic +/* Copyright (C) 2014-2016 Ben Kurtovic Released under the terms of the MIT License. See LICENSE for details. */ /*