Skip to content

Commit b9b215a

Browse files
committedJul 30, 2024
fixed a bug; renamed qdist -> dist
1 parent 3fd82c4 commit b9b215a

File tree

6 files changed

+85
-12
lines changed

6 files changed

+85
-12
lines changed
 

‎.gitignore

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# temp directory and tmp files to be ignored
2+
tmp/*
3+
tmp
4+
tmp*
5+
6+
# tags file
7+
tags
8+
TAGS
9+
10+
# Object files
11+
*.o
12+
*.ko
13+
*.obj
14+
*.elf
15+
16+
# Linker output
17+
*.ilk
18+
*.map
19+
*.exp
20+
21+
# Precompiled Headers
22+
*.gch
23+
*.pch
24+
25+
# Libraries
26+
*.lib
27+
*.a
28+
*.la
29+
*.lo
30+
31+
# Shared objects (inc. Windows DLLs)
32+
*.dll
33+
*.so
34+
*.so.*
35+
*.dylib
36+
37+
# Executables
38+
src/dist_m4ri
39+
dist_m4ri
40+
*.exe
41+
*.out
42+
*.app
43+
*.i*86
44+
*.x86_64
45+
*.hex
46+
47+
# Debug files
48+
*.dSYM/
49+
*.su
50+
*.idb
51+
*.pdb
52+
*.log
53+
# Long input files
54+
55+
# emacs backup files
56+
*~
57+
\#todo.md#
58+
.\#todo.md
59+
../\#todo.md#
60+
../.\#todo.md
61+
62+
# documentation files
63+
# src/docs/
64+
*.pdf
65+
66+
# python cache directory
67+
__pycache__/
68+
69+
# emacs created directory
70+
auto/
71+
72+
# IDE files
73+
.idea/

‎src/qdist_m4ri.c ‎src/dist_m4ri.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "mmio.h"
2222
#include "util_m4ri.h"
2323
#include "util_io.h"
24-
#include "qdist_m4ri.h"
24+
#include "dist_m4ri.h"
2525
// #include "util.h"
2626

2727
/**

‎src/qdist_m4ri.h ‎src/dist_m4ri.h

File renamed without changes.

‎src/makefile

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ CFLAGS = ${OPT} ${VER} ${WARN}
1414
CPP = g++
1515

1616
default: give_help
17-
all: qdist_m4ri
17+
all: dist_m4ri
1818

19-
qdist_m4ri: qdist_m4ri.c qdist_m4ri.h util_io.o util_m4ri.o mmio.o makefile
20-
${CC} ${CFLAGS} -DSTANDALONE -o qdist_m4ri $< mmio.o util_m4ri.o util_io.o -lm4ri -lm
19+
dist_m4ri: dist_m4ri.c dist_m4ri.h util_io.o util_m4ri.o mmio.o makefile
20+
${CC} ${CFLAGS} -DSTANDALONE -o dist_m4ri $< mmio.o util_m4ri.o util_io.o -lm4ri -lm
2121

2222
util_m4ri.o: util_m4ri.c util_m4ri.h mmio.h makefile
2323
${CC} ${CFLAGS} -c -o util_m4ri.o $<
@@ -40,21 +40,21 @@ tags:
4040

4141

4242
veryclean: clean
43-
rm -f qdist_m4ri *.exe
43+
rm -f dist_m4ri *.exe
4444

4545
zip: ${src}
46-
zip -9 -o qdist_m4ri.zip ${src} ../Doxyfile ../README.md
46+
zip -9 -o dist_m4ri.zip ${src} ../Doxyfile ../README.md
4747

4848
give_help:
49-
@echo "\e[36m make qdist_m4ri \e[0m" " to compile \`qdist_m4ri\` \e[32m\e[0m"
49+
@echo "\e[36m make dist_m4ri \e[0m" " to compile \`dist_m4ri\` \e[32m\e[0m"
5050
@echo "\e[36m make clean \e[0m " "to\e[31m remove\e[0m object files and such"
5151
@echo "\e[36m make veryclean \e[0m" "also\e[31m remove\e[0m executables and zip file"
52-
@echo "\e[36m make zip \e[0m " "to make \e[35m \`qdist_m4ri.zip\`\e[0m file with all sources"
52+
@echo "\e[36m make zip \e[0m " "to make \e[35m \`dist_m4ri.zip\`\e[0m file with all sources"
5353
@echo "\e[36m make tags \e[0m " "to create \e[35m TAGS\e[0m file"
5454
@echo
5555
@echo "\e[31m The program does not compile?\e[0m"
5656
@echo " - Make sure you have '\e[32mlibm4ri_dev\e[0m' on your system."
5757
@echo " Please see '../README.md' for installation instructions."
5858
@echo " - On a Mac, you may want to disable '\e[32m-march=native\e[0m' compiler switch by running"
59-
@echo "\e[36m make qdist_m4ri OPT='-g -mtune=native -O3'\e[0m"
59+
@echo "\e[36m make dist_m4ri OPT='-g -mtune=native -O3'\e[0m"
6060

‎src/util_io.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void var_init(int argc, char **argv, params_t * const p){
6060
p->finH = argv[++i]; /**< allow space before file name */
6161
if (p->debug&4)
6262
printf("# read %s, finH=%s; setting fin=\"\"\n",argv[i],p->finH);
63-
p->fin[0]='\0';
63+
p->fin="";
6464
}
6565
else if (0==strncmp(argv[i],"finG=",5)){/** `finG` degeneracy generator matrix */
6666
if(strlen(argv[i])>5)
@@ -69,7 +69,7 @@ void var_init(int argc, char **argv, params_t * const p){
6969
p->finG = argv[++i]; /**< allow space before file name */
7070
if (p->debug&4)
7171
printf("# read %s, finG=%s; setting fin=\"\"\n",argv[i],p->finG);
72-
p->fin[0]='\0';
72+
p->fin="";
7373
}
7474
else if (0==strncmp(argv[i],"fin=",4)){
7575
if(p->finH)

‎src/util_io.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ typedef struct{
3333
int dist_max; /* distance actually checked */
3434
int dist_min; /* distance actually checked */
3535
int max_row_wgt_G; /* needed for C */
36-
//! int maxrow; /* WARNING: this is defined in `qdist_m4ri.h` as `static const int` */
36+
//! int maxrow; /* WARNING: this is defined in `dist_m4ri.h` as `static const int` */
3737
int start;
3838
// int linear; /* not supported */
3939
int n0; /* code length, =nvar for css, (nvar/2) for non-css */

0 commit comments

Comments
 (0)
Please sign in to comment.