Word Unperfect
public
Read
Owner: themaster
Branch: main
Commits: 0
Git CLI clone URL
git clone https://www.xt-emporium.com/git/word-unperfect.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
word-unperfect
/
unix-word-unperfect
/
Makefile
File editor
# libc-only Unix build for word unperfect. # # This folder intentionally does not compile or modify the DOS/OpenWatcom build # harness or runtime adapter. Normal file/print/export paths use ISO C stdio. # The default Linux TUI links the shared frontend's Unix terminal adapter so the # host build starts in the same full-screen editor mode as the DOS clone. CC ?= cc CFLAGS ?= -std=c11 -O2 -g -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-uninitialized CPPFLAGS ?= -I../rev -DWORD_UNPERFECT_POSIX_PATHS=1 LDFLAGS ?= BUILD_DIR ?= build BIN := $(BUILD_DIR)/unix-word-unperfect VPATH := .:../rev LOCAL_SRCS := \ main.c \ unix_host_stubs.c REV_SRCS := \ wp_application.c \ wp_compact_text.c \ wp_control_codes.c \ wp_display_buffer.c \ wp_document_analyzer.c \ wp_document_model.c \ wp_file_format.c \ wp_fixed_codes.c \ wp_format_executor.c \ wp_format_gate.c \ wp_format_table.c \ wp_key_dispatcher.c \ wp_layout_deferred_stubs.c \ wp_layout_engine.c \ wp_layout_flow.c \ wp_layout_globals.c \ wp_layout_metrics.c \ wp_layout_reconcile.c \ wp_layout_state.c \ wp_layout_status.c \ wp_layout_variant.c \ wp_memory_manager.c \ wp_msdos_frontend.c \ wp_nested_stream.c \ wp_parser_classify.c \ wp_parser_command.c \ wp_parser_gate.c \ wp_parser_process.c \ wp_record_dump.c \ wp_record_merge.c \ wp_record_parser.c \ wp_record_ring.c \ wp_record_stream.c \ wp_record_stream_buffers.c \ wp_resource_manager.c \ wp_scanner_logic.c \ wp_span_metrics.c \ wp_text_export.c \ wp_variable_codes.c SRCS := $(LOCAL_SRCS) $(REV_SRCS) CHECK_SRCS := $(LOCAL_SRCS) $(addprefix ../rev/,$(REV_SRCS)) AUDIT_SRCS := $(filter-out ../rev/wp_msdos_frontend.c,$(CHECK_SRCS)) OBJS := $(patsubst %.c,$(BUILD_DIR)/%.o,$(SRCS)) DEPS := $(OBJS:.o=.d) .PHONY: all clean run smoke syntax-check audit-io all: $(BIN) $(BUILD_DIR): mkdir -p $@ $(BUILD_DIR)/%.o: %.c | $(BUILD_DIR) mkdir -p $(@D) $(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -c -o $@ $< $(BIN): $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) run: $(BIN) ./$(BIN) smoke: $(BIN) ./$(BIN) --analyze ../wp_c/WP51/LEARN/MEMO.WKB ./$(BIN) --export ../wp_c/WP51/LEARN/MEMO.WKB $(BUILD_DIR)/memo.txt ./$(BIN) --print ../wp_c/WP51/LEARN/MEMO.WKB $(BUILD_DIR)/fake-lpt0 ./$(BIN) --new $(BUILD_DIR)/blank.wp ./$(BIN) --append $(BUILD_DIR)/blank.wp $(BUILD_DIR)/hello.wp "Hello from libc" ./$(BIN) --roundtrip ../wp_c/WP51/LEARN/MEMO.WKB $(BUILD_DIR)/memo-roundtrip.wkb printf '\021' | COLUMNS=100 LINES=30 ./$(BIN) ../wp_c/WP51/LEARN/MEMO.WKB > $(BUILD_DIR)/tui-smoke-wide.ansi printf '\021' | COLUMNS=60 LINES=12 ./$(BIN) ../wp_c/WP51/LEARN/MEMO.WKB > $(BUILD_DIR)/tui-smoke-small.ansi syntax-check: $(CC) $(CPPFLAGS) $(CFLAGS) -fsyntax-only $(CHECK_SRCS) audit-io: @if grep -n -E '#include <(unistd|termios|sys/|dos|conio)|\b(open|read|write|stat|opendir|readdir|getch|int86)\s*\(' $(AUDIT_SRCS) 2>/dev/null; then \ echo "non-libc or DOS I/O reference found"; \ exit 1; \ fi clean: rm -rf $(BUILD_DIR) rev -include $(DEPS)
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
main
Visibility
public
Your access
Read
Remote
None
File activity
View file history