Завершил подключение встроенного qsort
This commit is contained in:
parent
a45af76154
commit
6e9934a2d8
5 changed files with 12 additions and 14 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -141,12 +141,12 @@ bool more(double a, double b) {
|
|||
}
|
||||
|
||||
int compare(const void * ufirst, const void * usecond) {
|
||||
double first = (double)ufirst;
|
||||
double second = (double)usecond;
|
||||
double first = *(double *)ufirst;
|
||||
double second = *(double *)usecond;
|
||||
|
||||
if ((first - second) > eps) {
|
||||
if ((first - second) > exp) {
|
||||
return 1;
|
||||
} else ((second - first) > eps) {
|
||||
} else if ((second - first) > exp) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
|
|
|
@ -12,7 +12,6 @@ CFLAGS = -mfpmath=sse \
|
|||
-Wpointer-arith \
|
||||
-Wformat-security \
|
||||
-Wmissing-format-attribute \
|
||||
-Wformat=1 \
|
||||
-Wwrite-strings \
|
||||
-Wcast-align \
|
||||
-Wno-long-long \
|
||||
|
@ -28,16 +27,15 @@ CFLAGS = -mfpmath=sse \
|
|||
-D_DEBUG -g \
|
||||
-c
|
||||
|
||||
|
||||
all: main.o grouping.o tools.o
|
||||
gcc main.o grouping.o tools.o -lssp && del *.o
|
||||
a.exe
|
||||
gcc main.o grouping.o tools.o -o a.out && rm -f *.o
|
||||
./a.out
|
||||
|
||||
main.o: main.c
|
||||
gcc $(CFLAGS) main.c
|
||||
gcc $(CFLAGS) main.c -o main.o
|
||||
|
||||
grouping.o: grouping.c
|
||||
gcc $(CFLAGS) grouping.c
|
||||
gcc $(CFLAGS) grouping.c -o grouping.o
|
||||
|
||||
tools.o: tools.c
|
||||
gcc $(CFLAGS) tools.c
|
||||
gcc $(CFLAGS) tools.c -o tools.o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue