Skip to content

Commit 990de99

Browse files
authored
Merge pull request #6 from fishca/очистка-кода-от-__fastcall-9e8a4
Update from task 1efe4d0c-f834-49e0-a988-6394cfe9e8a4
2 parents e8f53fb + dd9d767 commit 990de99

160 files changed

Lines changed: 13652 additions & 21 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
```
22
# Build artifacts
3-
build/
4-
CMakeCache.txt
5-
CMakeFiles/
6-
Makefile
7-
cmake_install.cmake
8-
CPackConfig.cmake
9-
CPackSourceConfig.cmake
10-
11-
# Executables and binaries
12-
bin/
13-
*.exe
14-
*.dll
15-
*.so
16-
*.a
17-
*.lib
18-
*.obj
193
*.o
4+
*.obj
5+
*.a
6+
*.so
7+
*.dll
8+
*.exe
9+
*.out
10+
11+
# Dependencies
12+
3rdparty/
13+
14+
# Logs and temp files
15+
*.log
16+
*.tmp
17+
18+
# Environment
19+
.env
20+
.env.local
21+
*.env.*
22+
23+
# Editors
24+
.vscode/
25+
.idea/
2026

21-
# CMake build system
22-
CMakeFiles/
23-
CMakeCache.txt
24-
cmake_install.cmake
25-
Makefile
27+
# OS specific
28+
.DS_Store
29+
Thumbs.db
2630
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
all: test
2+
3+
libblast.so: blast.c blast.h
4+
cc -o libblast.so -shared blast.c
5+
6+
blast-test: libblast.so
7+
cc -o blast-test.o -c blast-test.c
8+
cc -o blast-test blast-test.o libblast.so
9+
10+
test: blast-test
11+
LD_LIBRARY_PATH=./ ./blast-test < test.pk | cmp - test.txt
12+
13+
clean:
14+
rm -f libblast.so blast-test blast-test.o
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
CPPFLAGS = -I../..
2+
3+
UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
4+
ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
5+
6+
all: miniunz minizip
7+
8+
miniunz.o: miniunz.c unzip.h iowin32.h
9+
minizip.o: minizip.c zip.h iowin32.h ints.h
10+
unzip.o: unzip.c unzip.h crypt.h
11+
zip.o: zip.c zip.h crypt.h skipset.h ints.h
12+
ioapi.o: ioapi.c ioapi.h ints.h
13+
iowin32.o: iowin32.c iowin32.h ioapi.h
14+
mztools.o: mztools.c unzip.h
15+
16+
miniunz: $(UNZ_OBJS)
17+
${CC} ${LDFLAGS} -o $@ $(UNZ_OBJS)
18+
19+
minizip: $(ZIP_OBJS)
20+
${CC} ${LDFLAGS} -o $@ $(ZIP_OBJS)
21+
22+
test: miniunz minizip
23+
@rm -f test.*
24+
@echo hello hello hello > test.txt
25+
./minizip test test.txt
26+
./miniunz -l test.zip
27+
@mv test.txt test.old
28+
./miniunz test.zip
29+
@cmp test.txt test.old
30+
@rm -f test.*
31+
32+
clean:
33+
/bin/rm -f *.o *~ minizip miniunz test.*
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
CFLAGS=-O
2+
3+
puff: puff.o pufftest.o
4+
5+
puff.o: puff.h
6+
7+
pufftest.o: puff.h
8+
9+
test: puff
10+
puff zeros.raw
11+
12+
puft: puff.c puff.h pufftest.o
13+
cc -fprofile-arcs -ftest-coverage -o puft puff.c pufftest.o
14+
15+
# puff full coverage test (should say 100%)
16+
cov: puft
17+
@rm -f *.gcov *.gcda
18+
@puft -w zeros.raw 2>&1 | cat > /dev/null
19+
@echo '04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
20+
@echo '00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
21+
@echo '00 00 00 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 254
22+
@echo '00 01 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
23+
@echo '01 01 00 fe ff 0a' | xxd -r -p | puft -f 2>&1 | cat > /dev/null
24+
@echo '02 7e ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
25+
@echo '02' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
26+
@echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
27+
@echo '04 80 49 92 24 49 92 24 71 ff ff 93 11 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 249
28+
@echo '04 c0 81 08 00 00 00 00 20 7f eb 0b 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
29+
@echo '0b 00 00' | xxd -r -p | puft -f 2>&1 | cat > /dev/null
30+
@echo '1a 07' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
31+
@echo '0c c0 81 00 00 00 00 00 90 ff 6b 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 245
32+
@puft -f zeros.raw 2>&1 | cat > /dev/null
33+
@echo 'fc 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 253
34+
@echo '04 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 252
35+
@echo '04 00 24 49' | xxd -r -p | puft 2> /dev/null || test $$? -eq 251
36+
@echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 84' | xxd -r -p | puft 2> /dev/null || test $$? -eq 248
37+
@echo '04 00 24 e9 ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 250
38+
@echo '04 00 24 e9 ff 6d' | xxd -r -p | puft 2> /dev/null || test $$? -eq 247
39+
@gcov -n puff.c
40+
41+
clean:
42+
rm -f puff puft *.o *.gc*

0 commit comments

Comments
 (0)