Skip to content

Commit

Permalink
Refactor h3client: Remove unused files and streamline code
Browse files Browse the repository at this point in the history
- Deleted obsolete files: amsg.c, amsg.h, answer.c, answer.h, argless.c, argless.h, array_size.h, buff.c, buff.h, cco.h, compiler.h, copy_string.h, echo.c, echo.h, fs.c, fs.h, h3c_deadline.c, h3c_deadline.h, h3c_dialer.c, h3c_dialer.h, h3c_fini.c, h3c_fini.h, h3c_result.c, h3c_result.h, h3c_stream.c, h3c_stream.h, h3c_strerror.h, helper.c, helper.h, hmmd_alidisplay.c, hmmd_alidisplay.h, hmmd_domain.c, hmmd_domain.h, hmmd_hit.c, hmmd_hit.h, hmmd_hmmd.h, hmmd_stats.c, hmmd_stats.h, hmmd_status.c, hmmd_status.h, hmmd_tophits.c, hmmd_tophits.h, hmmd_zsetby.c, hmmd_zsetby.h, hmsg.c, hmsg.h, itoa.c, itoa.h, msg.c, msg.h, nnge.c, nnge.h, read.h, strerror.c, test_corrupt.c, test_multi.c, test_single.c, timeout.c, timeout.h, utils.c, utils.h, write.h, zc.c, zc.h, zsetby.h
- Added new files: body.c, body.h, discard.h, full_recv.h, full_send.h, h3c_clock.c, h3c_clock.h, h3c_socket.c, h3c_socket.h, head.h, little_endian.h, parse.h, posix.h, sequences.h, test_h3client.c
- Updated Makefile to remove test targets and clean up references to deleted files.
  • Loading branch information
horta committed Aug 29, 2024
1 parent b1402b6 commit a19c6f1
Show file tree
Hide file tree
Showing 83 changed files with 1,398 additions and 5,263 deletions.
11 changes: 4 additions & 7 deletions h3client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ OBJ = $(SRC:.c=.o)
HDR = $(wildcard h3c_*.h)
LIB = libh3client.a
PREFIX ?= /usr/local
TEST_SRC = $(wildcard test_*.c)
TEST_OBJ = $(TEST_SRC:.c=.o)
TEST_TARGET = $(basename $(TEST_OBJ))

all: $(LIB)

Expand All @@ -19,12 +16,12 @@ $(LIB): $(OBJ)
%.o: %.c $(HDR)
$(CC) $(CFLAGS) -c $< -o $@

$(TEST_TARGET): %: %.o $(LIB) $(HDR)
test_h3client: %: %.o $(LIB) $(HDR)
$(CC) $(CFLAGS) $< -L. -lh3client -lh3result -lnng -llio -llite_pack -lm -o $@

check: $(TEST_TARGET)
check: test_h3client
./start_daemon.sh data/ross.5.hmm
for test in $(TEST_TARGET); do ./$$test || exit 1; done
./test_h3client
./stop_daemon.sh data/ross.5.hmm

install: $(LIB) $(HDR)
Expand All @@ -37,7 +34,7 @@ uninstall:

.PHONY: all clean check uninstall
clean:
rm -f $(OBJ) $(LIB) $(TEST_OBJ) $(TEST_TARGET) *.d
rm -f $(OBJ) $(LIB) test_h3client.o test_h3client *.d
rm -f data/ross.5.hmm.h3f
rm -f data/ross.5.hmm.h3i
rm -f data/ross.5.hmm.h3m
Expand Down
141 changes: 0 additions & 141 deletions h3client/amsg.c

This file was deleted.

20 changes: 0 additions & 20 deletions h3client/amsg.h

This file was deleted.

Loading

0 comments on commit a19c6f1

Please sign in to comment.