Compare commits

..

131 Commits

Author SHA1 Message Date
32346f8a28 +++ 2024-01-28 23:21:55 +01:00
240e93a90f +++ 2024-01-28 23:20:45 +01:00
bc41dcda4a --- 2024-01-28 23:15:34 +01:00
f62030772a ,,, 2024-01-28 23:10:28 +01:00
43663714ca ... 2024-01-28 23:06:11 +01:00
38bfd5c7d9 add heap size 2024-01-28 23:02:03 +01:00
nilspolek
f348174229 gc 2024-01-28 22:29:20 +01:00
nilspolek
bc8a037a30 gc 2024-01-28 22:26:50 +01:00
nilspolek
958c383f85 changed objref to prevent bugs 2024-01-28 10:30:39 +01:00
nilspolek
f3829559d4 null problems are now not more 2024-01-28 00:14:19 +01:00
nilspolek
9155216fd2 now breakpoints are possible 2024-01-27 23:29:33 +01:00
nilspolek
b6320ecba7 updated the test 2024-01-27 23:21:18 +01:00
nilspolek
3bd8b9ac20 updated the test 2024-01-27 23:20:25 +01:00
root
147415beef s 2024-01-27 22:14:18 +00:00
nilspolek
5fb42ff984 updated the test 2024-01-27 23:09:29 +01:00
nilspolek
d7bb53687d updated the test 2024-01-27 23:08:21 +01:00
root
ee27de7481 factor.asm 2024-01-27 22:01:18 +00:00
root
eaab6ab023 s 2024-01-27 21:55:35 +00:00
nilspolek
38f06b1575 updated the test 2024-01-27 22:52:29 +01:00
nilspolek
6ebc065a7a added a method for testing arrays 2024-01-27 22:43:34 +01:00
nilspolek
8c45b02769 added njvm2 2024-01-27 21:19:57 +01:00
nilspolek
4cc117fdd4 added tests 2024-01-27 21:18:34 +01:00
nilspolek
49e4911238 added tests 2024-01-27 21:17:06 +01:00
nilspolek
21c1f8fee6 made some updates 2024-01-27 20:53:05 +01:00
root
30311a393d s 2024-01-27 19:36:30 +00:00
root
daacbc705d added njc8l 2024-01-27 19:33:56 +00:00
nilspolek
b77ea3d3d8 made some updates 2024-01-27 20:11:56 +01:00
nilspolek
29dc364f94 made some updates 2024-01-27 20:01:28 +01:00
nilspolek
fd15e54cdd made some updates 2024-01-27 19:59:01 +01:00
nilspolek
460def3fc6 made some updates 2024-01-27 18:53:42 +01:00
nilspolek
4cf1a82974 made some updates 2024-01-27 18:52:39 +01:00
nilspolek
bc56a6a1c2 made some updates 2024-01-27 18:51:14 +01:00
nilspolek
84320f00c7 made some updates 2024-01-27 18:49:59 +01:00
nilspolek
8d667ec836 removed sda from stack.c 2024-01-27 18:45:27 +01:00
nilspolek
520cfa57d5 removed sda from stack.c 2024-01-27 18:32:29 +01:00
nilspolek
2df1debe1a removed sda from stack.c 2024-01-27 18:31:36 +01:00
nilspolek
9475dd6666 changed version 2024-01-27 18:27:57 +01:00
nilspolek
03b88a8a76 added some things to GC 2024-01-27 10:25:27 +01:00
nilspolek
91b36a53d5 changed stack size 2024-01-26 19:13:42 +01:00
nilspolek
169217fd2c changed stack size 2024-01-26 17:01:07 +01:00
084b715729 testing sth 2024-01-25 20:22:33 +00:00
7d2e5ad1cd made some improvements 2024-01-25 19:51:24 +00:00
nilspolek
08109a4f16 changed stack size 2024-01-23 22:49:23 +01:00
nilspolek
ade4f8e18d changed version 2024-01-23 22:46:55 +01:00
nilspolek
9f7cd4aefc forgot what ive done 2024-01-23 22:45:49 +01:00
nilspolek
82704187f9 Arrays work now 2024-01-23 22:15:49 +01:00
nilspolek
4f0fc8a364 Arrays work now 2024-01-23 22:05:23 +01:00
nilspolek
797bfa45eb corrected CMakeLists.txt 2024-01-23 21:44:03 +01:00
nilspolek
1c0d85b5c9 added sth 2024-01-23 21:10:06 +01:00
nilspolek
dc5a98c401 added sth 2024-01-23 20:04:06 +01:00
nilspolek
c174108e09 fixed some mistakes 2024-01-23 17:18:54 +01:00
nilspolek
e8b4062331 added some sht 2024-01-23 16:58:57 +01:00
nilspolek
f0d74a7e17 forgotten to add new in instructions.c 2024-01-23 16:03:04 +01:00
nilspolek
1ea539ddea removed the fib program 2024-01-23 15:49:05 +01:00
nilspolek
69b4a1afb4 Added some instructions for cmp 2024-01-23 15:47:43 +01:00
nilspolek
3a046d6f89 Added some instructions for cmp 2024-01-23 15:41:31 +01:00
eba9656631 sjkbdsfjk 2024-01-18 21:07:59 +01:00
nils polek
f60e82b46b Chanded versin 2024-01-18 19:56:11 +00:00
1f02f49cdf fix comparisons 2024-01-18 20:18:21 +01:00
nils polek
6319ddcad9 some shit 2024-01-18 19:15:56 +00:00
9b4a9faa8d update version to 6 2024-01-18 18:54:53 +01:00
4d24ab038c remove unused tmp variable 2024-01-18 18:54:20 +01:00
82d3201374 add bigint to execute 2024-01-18 18:53:46 +01:00
e5f2858a5c update 2024-01-18 18:25:16 +01:00
906ea30be2 update 2024-01-18 18:25:00 +01:00
nils polek
70dbd0253b Big int works 2024-01-18 17:17:07 +00:00
5039f95153 Revert "update"
This reverts commit dbafdbeea5ec44865047cbcce23d20d0855093ea.
2024-01-18 17:24:01 +01:00
dbafdbeea5 update 2024-01-18 16:21:34 +01:00
nils polek
ac57431ac4 added big int lib 2024-01-15 16:28:41 +00:00
nils polek
3935d2778b alle rechenobjekte im stack sind jetzt pointer 2024-01-15 15:32:02 +00:00
nils polek
37843d9356 Added a debug menue 2024-01-15 12:43:49 +00:00
nils polek
6cc2ff87ca Stack uses only references and equation objects 2024-01-15 11:48:21 +00:00
nils polek
f29f500d0c added some shit 2024-01-14 20:09:51 +00:00
nils polek
23e787eb5e added pushr popr 2024-01-14 17:39:11 +00:00
nils polek
94fb404c71 Added nja njc and Makefile 2024-01-14 17:11:09 +00:00
847f68bb29 fix error 2023-12-28 22:29:30 +01:00
da06afd43b update version to 8 2023-12-28 22:28:35 +01:00
9421d34756 add heap and stack args (not yet implemented) 2023-12-28 22:25:40 +01:00
Nils Polek
60bdfd7843 Added DUB 2023-12-10 00:24:17 +01:00
bdb0ce63b8 fix dfbnjkhghjdfsbg 2023-12-10 00:18:20 +01:00
dcb665f5a6 update debug 2023-12-10 00:00:59 +01:00
Nils Polek
82dc5f28cc abc 2023-12-09 23:43:33 +01:00
8be99c5244 update debug 2023-12-09 23:15:11 +01:00
742f050b24 update debug 2023-12-09 23:14:19 +01:00
14025d3b08 update debug 2023-12-09 23:12:33 +01:00
3f12378110 update debug 2023-12-09 23:11:42 +01:00
2cb94eaf76 update debug 2023-12-09 23:10:31 +01:00
9d64b87a09 update debug 2023-12-09 23:10:23 +01:00
b87ebbe841 update debug 2023-12-09 23:03:32 +01:00
829735eb8c update debug 2023-12-09 22:57:26 +01:00
44f70a1777 update debug 2023-12-09 22:51:27 +01:00
5a7338f91c update debug 2023-12-09 22:49:44 +01:00
a8999f4ec2 update debug 2023-12-09 22:43:53 +01:00
c0a5e694c0 update debug
fix call not jumping
2023-12-09 22:42:46 +01:00
Nils Polek
61a138fdee versin v 2023-12-09 22:40:18 +01:00
55af679c39 fix jump not working right 2023-12-09 22:10:02 +01:00
27400289f5 update debug 2023-12-09 22:00:13 +01:00
c0d25212af fix printProgram 2023-12-09 21:56:17 +01:00
10a6883750 update debug mode 2023-12-09 21:55:12 +01:00
Nils Polek
33a2994c29 Commit with mistake 2023-12-09 21:40:42 +01:00
Nils Polek
7390df9ee0 Aufgabe 2 Fertig 2023-12-09 20:35:15 +01:00
Nils Polek
83dae77e31 aufgabe 2 stack overflow 2023-12-09 19:45:15 +01:00
nils polek
fb8497fbee changed path 2023-12-03 19:39:50 +01:00
dc16504cd7 Aufgabe 2 fertig 2023-12-03 19:30:38 +01:00
2a427a2563 Aufgabe 2 fertig 2023-12-03 18:19:39 +01:00
0e52973475 Aufgabe 2 fertig 2023-12-03 18:14:27 +01:00
nils polek
8b3770df80 added codeReader and consts.c 2023-12-03 16:10:33 +01:00
dc33e46e24 update help 2023-12-03 14:59:02 +01:00
c900a0444f fix printing negative numbers 2023-12-03 14:29:07 +01:00
c16fe6349b add error message if no program selected
fix error with negative numbers
2023-12-03 14:24:22 +01:00
1363db7c11 Finished cleaning up the code 2023-10-30 12:51:42 +01:00
dfedf2e717 test 2023-10-30 11:59:56 +01:00
4d547cca6a #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "instruktion.c"
#include "code.c"
#include "stack.c"

//Comment to disable debug

// #define DEBUG

// Stack
struct stack stack;
#define SIZE 1000

unsigned int* programmSpeicher;

void copyToProgramm(unsigned int codeToCopy[]){
  programmSpeicher = codeToCopy;
}

void version(void) {
    printf("Ninja Virtual Machine version %i (compiled %s, %s)\n", 0, __DATE__, __TIME__);
}

void help(void) {
    printf("usage: ./njvm [option] [option] ...\n\t--version\tshow version and exit\n\t--help\t\tshow this help and exit\n");
}
void printProgramm(){
  int i = 0;
  char c[10];
  while (programmSpeicher[i] != 0)
  {
    switch (programmSpeicher[i] >> 24) {
      case PUSHC:
        strcpy(c,"pushc");
      break;
      case ADD:
        strcpy(c,"add");
      break;
      case SUB:
        strcpy(c,"sub");
      break;
      case MUL:
        strcpy(c,"mul");
      break;
      case DIV:
        strcpy(c,"div");
      break;
      case MOD:
        strcpy(c,"mod");
      break;
      case RDINT:
        strcpy(c,"rdint");
      break;
      case WRINT:
        strcpy(c,"wrint");
      break;
      case RDCHR:
        strcpy(c,"rdchr");
      break;
      case WRCHR:
        strcpy(c,"wrchr");
      break;
      default:
        strcpy(c,"halt");
      break;
    }
    IMMEDIATE(programmSpeicher[i])? printf("%03i:\t%s\t%i\n",i,c,IMMEDIATE(programmSpeicher[i])) : printf("%03i:\t%s\n",i,c);
       i++;
  }
  printf("%03i:\thalt\n",i);
}
void execute(void) {
    int i = 0;
    int intInput;
    int temp;
    char charInput;
    while (1) {

        switch (programmSpeicher[i] >> 24) {
            case HALT:
                  goto end;
                break;
            case PUSHC:
                  push(stack,IMMEDIATE(programmSpeicher[i]));
                break;
            case ADD:
                  push(stack,pop(stack)+pop(stack));
                break;
            case SUB:
                  temp = pop(stack);
                  push(stack,pop(stack) - temp);
                break;
            case MUL:
                  push(stack,pop(stack)*pop(stack));
                break;
            case DIV:
                  temp = pop(stack);
                  push(stack,pop(stack)/temp);
                break;
            case MOD:
                  temp = pop(stack);
                  push(stack,pop(stack)%temp);
                break;
            case RDINT:
                  scanf("%i",&intInput);
                  push(stack,intInput);
                break;
            case WRINT:
                  printf("%i",pop(stack));
                break;
            case RDCHR:
                  scanf("%c",&charInput);
                  push(stack,charInput);
                break;
            case WRCHR:
                  printf("%c",pop(stack));
                break;
        }
        i++;
    }
end:
  return;
}
#ifdef DEBUG

void tests(void){
  printf("Runnig debug mode\n");
  copyToProgramm(code1);
  printProgramm();
  execute();
}

#endif /* ifdef DEBUG */

int main(int argc, char *argv[]) {
  int size = SIZE;
  int current = 0;
  unsigned int s[SIZE];
  stack.size = &size;
  stack.current = &current;
  stack.stack = s;
    #ifdef DEBUG
      tests();
    #endif /* ifdef DEBUG */
     if (argc > 1) {
        if (strcmp(argv[1], "--version") == 0) {
            version();
        } else if (strcmp(argv[1], "--help") == 0) {
            help();
        } else if (strcmp(argv[1], "--prog1") == 0) {
            copyToProgramm(code1);
            goto run;
        } else if (strcmp(argv[1],"--prog2") == 0) {
            copyToProgramm(code2);
            goto run;
        }else if (strcmp(argv[1],"--prog3") == 0) {
            copyToProgramm(code3);
            goto run;
        }else {
            printf("unknown command line argument '%s', try './njvm --help'", argv[1]);
        }
    } else {
  run:
//    Started
        printf("Ninja Virtual Machine started\n");
        printProgramm();
        execute();
//    Stopped
        printf("Ninja Virtual Machine stopped\n");
        return 0;
    }
}
2023-10-30 00:24:55 +01:00
6740f41edc stack organized 2023-10-30 00:17:17 +01:00
9890324ea5 Structurized the code 2023-10-26 22:36:54 +02:00
efe7663637 Print program 2023-10-26 17:26:59 +02:00
4e629a6ca7 orginized projekt 2023-10-26 14:49:57 +02:00
d947afdf03 Test 2023-10-26 14:03:31 +02:00
d05c415295 Now HALT works correctly 2023-10-22 13:51:32 +02:00
d23727f6da Added the 3 progamms 2023-10-21 21:31:04 +02:00
62ede37645 Operations now work 2023-10-21 21:09:01 +02:00
9f7b69e5f7 Added the option to test and basic math to execute() 2023-10-21 19:14:48 +02:00
nplk84
7d7b67f7f2 Stack overflow errors get detected correctly 2023-10-16 11:56:38 +02:00
nplk84
655da552de Added Keys 2023-10-15 19:08:12 +02:00
4f23944408 fix some warnings 2023-10-15 19:05:43 +02:00
19de6c2dbc remove config.h.in 2023-10-15 19:01:28 +02:00
49b064d74d remove config file
update CMakeLists.txt
update gitignore file
2023-10-15 19:00:46 +02:00
nplk84
119b5be760 deleated some shit 2023-10-15 18:50:37 +02:00
nplk84
23690576ea Added Keys 2023-10-15 18:23:32 +02:00
nplk84
8a7d900d9a Added the Stack 2023-10-12 14:42:31 +02:00
nplk84
1b742e0007 Added the Stack 2023-10-12 12:57:51 +02:00
183 changed files with 37728 additions and 4143 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
.idea .idea
cmake-build-debug cmake-build-debug
njvm
njvm.dSYM
njvm.exe

View File

@ -2,11 +2,25 @@ cmake_minimum_required(VERSION 3.0)
project(ninja LANGUAGES C) project(ninja LANGUAGES C)
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
set(PROJECT_VERSION 0)
configure_file( add_compile_options(-g -Wall -pedantic)
${CMAKE_SOURCE_DIR}/config.h.in
${CMAKE_BINARY_DIR}/config.h add_executable(njvm njvm.c
) njvm.h)
include_directories(${CMAKE_BINARY_DIR})
add_executable(ninja # Include directories for njvm executable
njvm.c config.h.in) target_include_directories(njvm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bigint/build/include)
# Add the library
add_library(bigint STATIC ${CMAKE_SOURCE_DIR}/bigint/src/bigint.c
support.c
GC.c
heap.c
heap.h)
# Include directories for the bigint library
target_include_directories(bigint PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/bigint/build/include)
# Link the executable with the library
target_link_libraries(njvm PRIVATE bigint)

99
GC.c Normal file
View File

@ -0,0 +1,99 @@
#ifndef GC
#define GC
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "stackslot.c"
#include "stack.c"
#include "bigint.h"
#include "instruktion.c"
#include "record.c"
#include "SDA.c"
typedef struct {
unsigned int freiZeiger;
unsigned int size;
unsigned char *data;
} *heapPartRef;
// SDA
struct sda sda;
// Stack
struct stack stack;
#define SIZE 1000;
//Register
struct stack reg;
//heapPartRef primary;
//heapPartRef secondary;
//unsigned int heapSize;
//void initHeap(int size){
// heapSize = 2 * sizeof (unsigned int) + size;
// if ((primary = malloc(heapSize)) == NULL) perror("malloc");
// if ((secondary = malloc(heapSize)) == NULL) perror("malloc");
//}
//
//
//// nimmt obj und copier es in den secondary Speicher
//void copy(ObjRef obj){
// if(obj->brokenHeart == true) return;
// obj->brokenHeart = true;
// if (IS_PRIMITIVE(obj)){
// if(obj->size > secondary->size-secondary->freiZeiger) perror("Heap is to Small");
// obj->forward_pointer = memcpy((void *) secondary->data[secondary->freiZeiger], obj, obj->size);
// secondary->freiZeiger += obj->size;
// } else {
// if(sizeof(*obj) + (GET_ELEMENT_COUNT(obj) * sizeof(void *)) > secondary->size-secondary->freiZeiger) perror("Heap is to Small");
// GET_ELEMENT_COUNT(obj);
// obj->forward_pointer = memcpy((void *) secondary->data[secondary->freiZeiger], obj, sizeof(*obj) + (GET_ELEMENT_COUNT(obj) * sizeof(void *)));
// secondary->freiZeiger += sizeof(*obj) + (GET_ELEMENT_COUNT(obj) * sizeof(void *));
// for (int i = 0; i < GET_ELEMENT_COUNT(obj); ++i) {
// copy(getField(obj,i));
// }
// }
//}
//
//void runGC(){
// int rootSize = *sda.size + *reg.size + *stack.size + 4;
// ObjRef* rootObjs = malloc(sizeof(ObjRef) * rootSize);
// if(rootObjs == NULL) perror("malloc");
// int counter = 0;
// //Bip
// rootObjs[0] = bip.op1;
// rootObjs[counter++] = bip.op2;
// rootObjs[counter++] = bip.res;
// rootObjs[counter++] = bip.rem;
// //SDA
// for (int i = 0; i < *sda.size; ++i) {
// rootObjs[counter++] = sda.sda[i];
// }
// //REG
// for (int i = 0; i < *reg.size; ++i) {
// rootObjs[counter++] = reg.stack[i].u.objRef;
// }
// //STACK
// for (int i = 0; i < *stack.size; ++i) {
// rootObjs[counter++] = stack.stack[i].u.objRef;
// }
//
// for (int i = 0; i < rootSize; ++i) {
// if(rootObjs[i] == NULL) continue;
// copy(rootObjs[i]);
// }
// heapPartRef temp = primary;
// primary = secondary;
// secondary = temp;
//
//}
//
//void *alloc(size_t size){
// if(primary->size-primary->freiZeiger < size){
// runGC();
// }
// primary->freiZeiger += size;
// return (void *) primary->data[primary->freiZeiger - size];
//}
#endif

12
Makefile Normal file
View File

@ -0,0 +1,12 @@
# Makefile for a simple C program
build:
cd ./bigint; make; cd ..
gcc -g -Wall -Ibigint/build/include -o support.o -c support.c
gcc -g -Wall -Ibigint/build/include -o njvm.o -c njvm.c
gcc -g -Wall -Lbigint/build/lib -o njvm njvm.o support.o -lbigint
run: build
./njvm prog.bin
debug: build
./njvm --debug prog.bin

43
Makefile3 Normal file
View File

@ -0,0 +1,43 @@
# Makefile for a simple C program
# Compiler
CC = gcc
# program to Run
F = prog.bin
# Compiler flags
CFLAGS = -g -Wall -Ibigint/build/include
LDFLAGS = -g -Wall -Lbigint/build/lib
# Source file
SRC = njvm.c
# Executable name
TARGET = njvm
njvm.o:
$(CC) $(CFLAGS) -o njvm.o -c njvm.c
support.o:
$(CC) $(CFLAGS) -o support.o -c support.c
# Default target
all: njvm.o support.o
$(CC) $(LDFLAGS) -o $(TARGET) njvm.o support.o -lbigint
# Clean up
clean:
rm -f $(OBJ) $(TARGET)
debug: all
./$(TARGET) --debug $(F)
run: all
./$(TARGET) $(F)
nja: ./nja/nja$(V)
./nja/nja$(V) $(IN) $(OUT)
njc: ./njc/njc$(V)
./njc/njc$(V) $(IN) $(OUT)

28
SDA.c Normal file
View File

@ -0,0 +1,28 @@
//
// Created by Nils on 03.12.2023
//
#ifndef SDA
#define SDA
#include <stdio.h>
#include "stackslot.c"
struct sda {
int *size;
ObjRef *sda;
};
ObjRef getSDA(int i, struct sda s) {
return s.sda[i];
}
void setSDA(int point, ObjRef val, struct sda s) {
if (val == NULL) perror("Value is null");
s.sda[point] = val;
}
void printSDA(struct sda s) {
for (int i = 0; i < *s.size; i++) {
printf("%i\n", *(int *)getSDA(i, s)->data);
}
}
#endif

BIN
a.out Executable file

Binary file not shown.

22
bigint/Makefile Normal file
View File

@ -0,0 +1,22 @@
#
# Makefile for big integer library and test
#
DIRS = src tst
all: clean
for i in $(DIRS) ; do \
$(MAKE) -C $$i install ; \
done
clean:
for i in $(DIRS) ; do \
$(MAKE) -C $$i clean ; \
done
rm -rf ./build
rm -f *~
dist: clean
(cd .. ; \
tar -cvf bigint.tar bigint ; \
gzip -f bigint.tar)

92
bigint/README Normal file
View File

@ -0,0 +1,92 @@
The "bigint" Package
====================
1. What is it?
--------------
This package implements a multiple-precision integer arithmetic package,
i.e., a collection of functions which can calculate with integers having
arbitrarily many digits. The algorithms are taken from [D. Knuth: The
Art of Computer Programming, Vol. 2, Seminumerical Algorithms], the
implementation language is C.
2. "Multiple Precision" - how does it work?
-------------------------------------------
Each integer number is represented as an array of digits. The array
is large enough to hold the number of digits necessary to represent
the number. Each digit occupies a single byte, so the number base of
this representation is 256. Addition, subtraction, and multiplication
work as we all have learned it: perform the desired operation digit
by digit, starting from the least significant digit, and observing
any "carries" from one place to the next higher one. Division is a
little bit more complicated because there is a certain amount of
guesswork involved. Knuth gives a formal treatment of this guesswork.
3. How do I use it?
-------------------
Because every big integer may have a differently sized array to hold
its digits, these structures are dynamically allocated on the heap of
the C runtime system, and accessed by pointers. If you want to perform
an arithmetic operation on one or two big integers, you have to load
the corresponding pointers into a structure called BIP ("Big Integer
Processor"), and call the arithmetic function. When the function has
returned, the pointer to the result of the operation can be found in
another component of the BIP. The following functions are available:
int bigSgn(void); /* sign */
int bigCmp(void); /* comparison */
void bigNeg(void); /* negation */
void bigAdd(void); /* addition */
void bigSub(void); /* subtraction */
void bigMul(void); /* multiplication */
void bigDiv(void); /* division */
void bigFromInt(int n); /* conversion int --> big */
int bigToInt(void); /* conversion big --> int */
void bigRead(FILE *in); /* read a big integer */
void bigPrint(FILE *out); /* print a big integer */
void bigDump(FILE *out, BigObjRef bigObjRef); /* dump a big integer */
Some of these functions accept or return ordinary integers. For the
exact definition of each function's interface, please see the comments
in the function's source.
4. What else is needed?
-----------------------
The library tries to detect fatal errors in using its functions (e.g.,
null pointers to operands) as well as internal errors (which "cannot
happen"). In either case a user-supplied error routine is called, which
is supposed to print an error message and then to terminate the program.
The library does not attempt to manage memory. For this purpose, it
relies on a user-supplied function "void* newPrimObject(int dataSize)",
which should allocate sufficiently many bytes and return a pointer to
a created object. In addition, the library needs to access a data field
- that implements the size-as-needed cocept - within the created object,
to actualy manage the data structures that represent the values of the
integer number. For this, the following function can be used:
void * getPrimObjectDataPointer(void * obj){
ObjRef oo = ((ObjRef) (obj));
return oo->data;
}
This function must also be a user-supplied function that must be
implemented by the program that wants to use this library.
For details about these three user-supplied functions take a look in
the file "support.c" in the directory "tst".
5. What is in the directory "tst"?
----------------------------------
Well, you may have guessed it already: these are test cases for the
library. You can learn how to link against the library by inspecting
the "Makefile" for the tests, and you can find a simple implementation
of the support library.

BIN
bigint/build/bin/testbip Executable file

Binary file not shown.

View File

@ -0,0 +1,60 @@
/*
* bigint.h -- big integer library
*/
#ifndef _BIGINT_H_
#define _BIGINT_H_
/* object representation */
typedef void* BigObjRef;
#include <stdio.h>
typedef struct {
int nd; /* number of digits; array may be bigger */
/* nd = 0 exactly when number = 0 */
unsigned char sign; /* one of BIG_NEGATIVE or BIG_POSITIVE */
/* zero always has BIG_POSITIVE here */
unsigned char digits[1]; /* the digits proper; number base is 256 */
/* LS digit first; MS digit is not zero */
} Big;
#include "support.h"
/* big integer processor registers */
typedef struct {
BigObjRef op1; /* first (or single) operand */
BigObjRef op2; /* second operand (if present) */
BigObjRef res; /* result of operation */
BigObjRef rem; /* remainder in case of division */
} BIP;
extern BIP bip; /* registers of the processor */
/* big integer processor functions */
int bigSgn(void); /* sign */
int bigCmp(void); /* comparison */
void bigNeg(void); /* negation */
void bigAdd(void); /* addition */
void bigSub(void); /* subtraction */
void bigMul(void); /* multiplication */
void bigDiv(void); /* division */
void bigFromInt(int n); /* conversion int --> big */
int bigToInt(void); /* conversion big --> int */
void bigRead(FILE *in); /* read a big integer */
void bigPrint(FILE *out); /* print a big integer */
void bigDump(FILE *out, BigObjRef bigObjRef); /* dump a big integer object */
#endif /* _BIGINT_H_ */

View File

@ -0,0 +1,15 @@
/*
* support.h -- object representation and support functions
*/
#ifndef _SUPPORT_H_
#define _SUPPORT_H_
/* support functions */
void fatalError(char *msg); /* print a message and exit */
void * newPrimObject(int dataSize); /* create a new primitive object */
void * getPrimObjectDataPointer(void * primObject);
#endif /* _SUPPORT_H_ */

Binary file not shown.

26
bigint/src/Makefile Normal file
View File

@ -0,0 +1,26 @@
#
# Makefile for big integer library
#
BUILD = ../build
CC = gcc
CFLAGS = -g -Wall
all: support.h bigint.h libbigint.a
install: all
mkdir -p $(BUILD)/include
cp support.h $(BUILD)/include
cp bigint.h $(BUILD)/include
mkdir -p $(BUILD)/lib
cp libbigint.a $(BUILD)/lib
libbigint.a: bigint.o
ar -crs libbigint.a bigint.o
bigint.o: bigint.c bigint.h support.h
$(CC) $(CFLAGS) -o bigint.o -c bigint.c
clean:
rm -f *~ bigint.o libbigint.a

987
bigint/src/bigint.c Normal file
View File

@ -0,0 +1,987 @@
/*
* bigint.c -- big integer library
*/
#include <stdio.h>
#include <ctype.h>
#include "bigint.h"
/**************************************************************/
/* debugging */
#define DIV_CHK_01 0
#define DIV_CHK_02 0
#define DIV_CHK_03 0
#define DIV_CHK_04 0
#define DIV_CHK_05 0
#define DIV_CHK_06 0
#define DIV_CHK_07 0
#define DIV_CHK_08 0
#define DIV_CHK_09 0
#define DIV_CHK_10 0
#define DIV_CHK_11 0
/**************************************************************/
/* big integer representation */
#define BIG_NEGATIVE ((unsigned char) 0)
#define BIG_POSITIVE ((unsigned char) 1)
#define BIG_PTR(bigObjRef) ((Big *) (getPrimObjectDataPointer(bigObjRef)))
#define GET_ND(bigObjRef) (BIG_PTR(bigObjRef)->nd)
#define SET_ND(bigObjRef, val) (BIG_PTR(bigObjRef)->nd = (val))
#define GET_SIGN(bigObjRef) (BIG_PTR(bigObjRef)->sign)
#define SET_SIGN(bigObjRef, val) (BIG_PTR(bigObjRef)->sign = (val))
#define GET_DIGIT(bigObjRef, i) (BIG_PTR(bigObjRef)->digits[i])
#define SET_DIGIT(bigObjRef, i, val) (BIG_PTR(bigObjRef)->digits[i] = (val))
/**************************************************************/
/* global data */
/*
* registers of the big integer processor
*/
BIP bip = {
NULL, /* op1 */
NULL, /* op2 */
NULL, /* res */
NULL, /* rem */
};
/**************************************************************/
/*
* construct a new big integer object
*
* number of digits is given by parameter
* a reference to a proper object is returned
* but no component of the big integer is set
*
* ATTENTION: All object references stored in
* places other than the bip registers may become
* invalid as soon as this function is called!
*/
static BigObjRef newBig(int nd) {
int dataSize;
BigObjRef bigObjRef;
dataSize = sizeof(int) + 1 + nd;
bigObjRef = newPrimObject(dataSize);
return bigObjRef;
}
/**************************************************************/
/* big integer unsigned arithmetic */
/*
* exchange bip.op1 and bip.op2
*/
static void bigXchg(void) {
BigObjRef tmp;
tmp = bip.op1;
bip.op1 = bip.op2;
bip.op2 = tmp;
}
/*
* big integer unsigned comparison
*
* operands in bip.op1 and bip.op2
* result is < 0, = 0, or > 0 if and only if the
* same relation holds for bip.op1 and bip.op2
*/
static int bigUcmp(void) {
int nd1;
int nd2;
int diff;
/* compare sizes */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
if (nd1 != nd2) {
/* sizes are different: we know the bigger number */
return nd1 - nd2;
}
/* sizes are equal: we must look at the digits */
while (nd1--) {
diff = (int) GET_DIGIT(bip.op1, nd1) -
(int) GET_DIGIT(bip.op2, nd1);
if (diff != 0) {
return diff;
}
}
/* the numbers are equal */
return 0;
}
/*
* big integer unsigned addition
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
static void bigUadd(void) {
int nd1;
int nd2;
int i;
unsigned short carry;
unsigned short aux;
int xchgFlag;
/* make sure op1 has at least as many digits as op2 */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
if (nd1 < nd2) {
/* exchange operands */
bigXchg();
i = nd1;
nd1 = nd2;
nd2 = i;
xchgFlag = 1;
} else {
/* don't exchange operands */
xchgFlag = 0;
}
/* allocate result */
bip.res = newBig(nd1 + 1);
/* copy op2 to result */
for (i = 0; i < nd2; i++) {
SET_DIGIT(bip.res, i, GET_DIGIT(bip.op2, i));
}
/* fill result with 0 up to size of op1 */
for (; i < nd1; i++) {
SET_DIGIT(bip.res, i, 0);
}
/* res = op1 + res */
carry = 0x00;
for (i = 0; i < nd1; i++) {
aux = (unsigned short) GET_DIGIT(bip.op1, i) +
(unsigned short) GET_DIGIT(bip.res, i) +
carry;
SET_DIGIT(bip.res, i, aux & 0xFF);
carry = aux >> 8;
}
SET_DIGIT(bip.res, i, carry);
/* determine actual size of result */
i = nd1 + 1;
while (--i >= 0 && GET_DIGIT(bip.res, i) == 0) ;
SET_ND(bip.res, i + 1);
/* restore operands */
if (xchgFlag) {
bigXchg();
}
}
/*
* big integer unsigned subtraction
*
* operands in bip.op1 and bip.op2
* result in bip.res, must not be negative
*/
static void bigUsub(void) {
int nd1;
int nd2;
int i;
unsigned short carry;
unsigned short aux;
/* op1 must have at least as many digits as op2 */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
if (nd1 < nd2) {
/* unsigned subtraction would yield negative result */
fatalError("internal library error #1 - THIS SHOULD NEVER HAPPEN!");
}
/* allocate result */
bip.res = newBig(nd1);
/* copy op2 to result */
for (i = 0; i < nd2; i++) {
SET_DIGIT(bip.res, i, GET_DIGIT(bip.op2, i));
}
/* fill result with 0 up to size of op1 */
for (; i < nd1; i++) {
SET_DIGIT(bip.res, i, 0);
}
/* res = op1 - res */
carry = 0x01;
for (i = 0; i < nd1; i++) {
aux = (unsigned short) GET_DIGIT(bip.op1, i) -
(unsigned short) GET_DIGIT(bip.res, i) +
carry + 0xFF;
SET_DIGIT(bip.res, i, aux & 0xFF);
carry = aux >> 8;
}
if (carry != 0x01) {
/* unsigned subtraction would yield negative result */
fatalError("internal library error #2 - THIS SHOULD NEVER HAPPEN!");
}
/* determine actual size of result */
i = nd1;
while (--i >= 0 && GET_DIGIT(bip.res, i) == 0) ;
SET_ND(bip.res, i + 1);
}
/*
* big integer unsigned multiplication
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
static void bigUmul(void) {
int nd1;
int nd2;
int i, j, k;
unsigned short carry;
unsigned short aux;
/* get sizes of operands */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
/* allocate result */
bip.res = newBig(nd1 + nd2);
/* reset lower nd1 digits of result */
for (i = 0; i < nd1; i++) {
SET_DIGIT(bip.res, i, 0);
}
/* res = op1 * op2 */
for (j = 0; j < nd2; j++) {
carry = 0x00;
for (k = j, i = 0; i < nd1; k++, i++) {
aux = (unsigned short) GET_DIGIT(bip.op1, i) *
(unsigned short) GET_DIGIT(bip.op2, j) +
(unsigned short) GET_DIGIT(bip.res, k) +
carry;
SET_DIGIT(bip.res, k, aux & 0xFF);
carry = aux >> 8;
}
SET_DIGIT(bip.res, k, carry);
}
/* determine actual size of result */
i = nd1 + nd2;
while (--i >= 0 && GET_DIGIT(bip.res, i) == 0) ;
SET_ND(bip.res, i + 1);
}
/*
* big integer unsigned division by single digit divisor
*
* dividend in bip.rem, divisor in parameter
* quotient in bip.rem, remainder is returned
*/
static unsigned char bigUdiv1(unsigned char divisor) {
BigObjRef tmp;
int nd;
int i;
unsigned short d, r;
unsigned short aux;
/* get size of dividend */
nd = GET_ND(bip.rem);
/* check for division by zero */
d = (unsigned short) divisor;
if (d == 0) {
fatalError("internal library error #3 - THIS SHOULD NEVER HAPPEN!");
}
/* allocate result */
tmp = newBig(nd);
/* tmp = dividend / divisor, r = dividend % divisor */
r = 0;
for (i = nd - 1; i >= 0; i--) {
aux = (r << 8) | (unsigned short) GET_DIGIT(bip.rem, i);
SET_DIGIT(tmp, i, aux / d);
r = aux % d;
}
/* determine actual size of quotient */
i = nd;
while (--i >= 0 && GET_DIGIT(tmp, i) == 0) ;
SET_ND(tmp, i + 1);
/* store quotient */
bip.rem = tmp;
/* return remainder */
return (unsigned char) r;
}
/*
* big integer unsigned division
*
* dividend in bip.op1, divisor in bip.op2
* quotient in bip.res, remainder in bip.rem
*/
static void bigUdiv(void) {
BigObjRef tmp;
int nd1;
int nd2;
int nd3;
int i, j, k, l;
unsigned char r;
unsigned short scale;
unsigned short carry;
unsigned short aux;
unsigned short qhat;
unsigned short v1, v2;
unsigned short uj0, uj1, uj2, two;
/* get sizes of operands */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
/* check for division by zero */
if (nd2 == 0) {
fatalError("division by zero");
}
/* check for small dividend */
if (bigUcmp() < 0) {
/* res = 0 */
bip.res = newBig(0);
SET_ND(bip.res, 0);
/* rem = op1; BUT THIS HAS TO BE A COPY! */
bip.rem = newBig(nd1);
for (i = 0; i < nd1; i++) {
SET_DIGIT(bip.rem, i, GET_DIGIT(bip.op1, i));
}
SET_ND(bip.rem, nd1);
return;
}
/* check for single digit divisor */
if (nd2 == 1) {
/* yes - use simple division by single digit divisor */
bip.rem = bip.op1;
r = bigUdiv1(GET_DIGIT(bip.op2, 0));
bip.res = bip.rem;
if (r == 0) {
bip.rem = newBig(0);
SET_ND(bip.rem, 0);
} else {
bip.rem = newBig(1);
SET_ND(bip.rem, 1);
SET_DIGIT(bip.rem, 0, r);
}
return;
}
/*
* now for the general case
*/
#if DIV_CHK_01
printf("div_chk #01: division, general case\n");
printf(" dividend = ");
bigDump(stdout, bip.op1);
printf("\n");
printf(" divisor = ");
bigDump(stdout, bip.op2);
printf("\n");
#endif
/* determine scale factor for normalization */
scale = (unsigned short) 256 /
((unsigned short) GET_DIGIT(bip.op2, nd2 - 1) + 1);
#if DIV_CHK_02
printf("div_chk #02: scale factor = %02X\n", scale);
#endif
/* normalize dividend, result is in bip.rem */
bip.rem = newBig(nd1 + 1);
carry = 0x00;
for (i = 0; i < nd1; i++) {
aux = (unsigned short) GET_DIGIT(bip.op1, i) * scale +
carry;
SET_DIGIT(bip.rem, i, aux & 0xFF);
carry = aux >> 8;
}
SET_DIGIT(bip.rem, i, carry);
SET_ND(bip.rem, nd1 + 1);
#if DIV_CHK_03
printf("div_chk #03: normalized dividend = ");
bigDump(stdout, bip.rem);
printf("\n");
#endif
/* normalize divisor, result is in bip.res */
bip.res = newBig(nd2);
carry = 0x00;
for (i = 0; i < nd2; i++) {
aux = (unsigned short) GET_DIGIT(bip.op2, i) * scale +
carry;
SET_DIGIT(bip.res, i, aux & 0xFF);
carry = aux >> 8;
}
if (carry != 0x00) {
/* overflow in divisor normalization */
fatalError("internal library error #4 - THIS SHOULD NEVER HAPPEN!");
}
SET_ND(bip.res, nd2);
#if DIV_CHK_04
printf("div_chk #04: normalized divisor = ");
bigDump(stdout, bip.res);
printf("\n");
#endif
/* allocate quotient */
nd3 = nd1 - nd2 + 1;
tmp = newBig(nd3);
/* extract the two most significand digits of divisor */
v1 = (unsigned short) GET_DIGIT(bip.res, nd2 - 1);
v2 = (unsigned short) GET_DIGIT(bip.res, nd2 - 2);
/* loop on digits of dividend and compute digits of quotient */
/* j is index into dividend, k is index into quotient */
for (j = nd1, k = nd3 - 1; k >= 0; j--, k--) {
#if DIV_CHK_05
printf("div_chk #05: j = %d, k = %d\n", j, k);
#endif
/* calculate qhat */
uj0 = (unsigned short) GET_DIGIT(bip.rem, j);
uj1 = (unsigned short) GET_DIGIT(bip.rem, j - 1);
uj2 = (unsigned short) GET_DIGIT(bip.rem, j - 2);
two = (uj0 << 8) | uj1;
if (uj0 == v1) {
qhat = (unsigned short) 255;
#if DIV_CHK_06
printf("div_chk #06a: qhat = %02X\n", qhat);
#endif
} else {
qhat = two / v1;
#if DIV_CHK_06
printf("div_chk #06b: qhat = %02X\n", qhat);
#endif
}
while (qhat * v2 > (((two - qhat * v1) << 8) | uj2)) {
qhat--;
#if DIV_CHK_07
printf("div_chk #07: qhat decremented, is now %02X\n", qhat);
#endif
}
/* multiply and subtract */
/* l is index into dividend, i is index into divisor */
carry = 0xFF;
for (l = j - nd2, i = 0; i < nd2; l++, i++) {
aux = (unsigned short) GET_DIGIT(bip.rem, l) -
(unsigned short) GET_DIGIT(bip.res, i) * qhat +
carry + 0xFE01;
SET_DIGIT(bip.rem, l, aux & 0xFF);
carry = aux >> 8;
}
aux = (unsigned short) GET_DIGIT(bip.rem, l) +
carry + 0xFE01;
SET_DIGIT(bip.rem, l, aux & 0xFF);
carry = aux >> 8;
#if DIV_CHK_08
printf("div_chk #08: remainder = ");
bigDump(stdout, bip.rem);
printf("\n");
#endif
/* test remainder and possibly add back */
if (carry != 0xFF) {
/* qhat is one too large */
qhat--;
#if DIV_CHK_09
printf("div_chk #09: qhat final correction, is now %02X\n", qhat);
#endif
/* add back */
/* l is index into dividend, i is index into divisor */
carry = 0x00;
for (l = j - nd2, i = 0; i < nd2; l++, i++) {
aux = (unsigned short) GET_DIGIT(bip.rem, l) +
(unsigned short) GET_DIGIT(bip.res, i) +
carry;
SET_DIGIT(bip.rem, l, aux & 0xFF);
carry = aux >> 8;
}
aux = (unsigned short) GET_DIGIT(bip.rem, l) +
carry;
SET_DIGIT(bip.rem, l, aux & 0xFF);
carry = aux >> 8;
if (carry != 0x01) {
/* missing carry in add-back sum */
fatalError("internal library error #5 - THIS SHOULD NEVER HAPPEN!");
}
#if DIV_CHK_10
printf("div_chk #10: remainder = ");
bigDump(stdout, bip.rem);
printf("\n");
#endif
}
/* store quotient digit */
SET_DIGIT(tmp, k, qhat);
#if DIV_CHK_11
printf("div_chk #11: quotient digit = %02X\n", qhat);
#endif
}
/* finish quotient */
i = nd3;
while (--i >= 0 && GET_DIGIT(tmp, i) == 0) ;
SET_ND(tmp, i + 1);
bip.res = tmp;
/* finish and unnormalize remainder */
i = nd1 + 1;
while (--i >= 0 && GET_DIGIT(bip.rem, i) == 0) ;
SET_ND(bip.rem, i + 1);
r = bigUdiv1(scale);
if (r != 0) {
/* non-zero remainder in unnormalization */
fatalError("internal library error #6 - THIS SHOULD NEVER HAPPEN!");
}
}
/**************************************************************/
/* nil reference exception */
static void nilRefException(void) {
fatalError("big integer library detected illegal nil reference");
}
/**************************************************************/
/* big integer arithmetic */
/*
* big integer sign
*
* operand in bip.op1
* result is < 0, = 0, or > 0 if and only if
* the same relation holds for bip.op1
*/
int bigSgn(void) {
if (bip.op1 == NULL) {
nilRefException();
}
if (GET_ND(bip.op1) == 0) {
return 0;
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE) {
return 1;
} else {
return -1;
}
}
/*
* big integer comparison
*
* operands in bip.op1 and bip.op2
* result is < 0, = 0, or > 0 if and only if the
* same relation holds for bip.op1 and bip.op2
*/
int bigCmp(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE) {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 >= 0 and op2 >= 0 */
return bigUcmp();
} else {
/* op1 >= 0 and op2 < 0 */
return 1;
}
} else {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 < 0 and op2 >= 0 */
return -1;
} else {
/* op1 < 0 and op2 < 0 */
return -bigUcmp();
}
}
}
/*
* big integer negation
*
* operand in bip.op1
* result in bip.res
*/
void bigNeg(void) {
int nd;
int i;
if (bip.op1 == NULL) {
nilRefException();
}
/* make copy of operand */
nd = GET_ND(bip.op1);
bip.res = newBig(nd);
for (i = 0; i < nd; i++) {
SET_DIGIT(bip.res, i, GET_DIGIT(bip.op1, i));
}
SET_ND(bip.res, nd);
/* store inverted sign */
if (GET_SIGN(bip.op1) == BIG_NEGATIVE || nd == 0) {
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
/*
* big integer addition
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
void bigAdd(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE) {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 >= 0 and op2 >= 0 */
bigUadd();
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
/* op1 >= 0 and op2 < 0 */
if (bigUcmp() >= 0) {
/* |op1| >= |op2| */
bigUsub();
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
/* |op1| < |op2| */
bigXchg();
bigUsub();
SET_SIGN(bip.res, BIG_NEGATIVE);
bigXchg();
}
}
} else {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 < 0 and op2 >= 0 */
if (bigUcmp() <= 0) {
/* |op1| <= |op2| */
bigXchg();
bigUsub();
SET_SIGN(bip.res, BIG_POSITIVE);
bigXchg();
} else {
/* |op1| > |op2| */
bigUsub();
SET_SIGN(bip.res, BIG_NEGATIVE);
}
} else {
/* op1 < 0 and op2 < 0 */
bigUadd();
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
}
/*
* big integer subtraction
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
void bigSub(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE) {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 >= 0 and op2 >= 0 */
if (bigUcmp() >= 0) {
/* |op1| >= |op2| */
bigUsub();
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
/* |op1| < |op2| */
bigXchg();
bigUsub();
SET_SIGN(bip.res, BIG_NEGATIVE);
bigXchg();
}
} else {
/* op1 >= 0 and op2 < 0 */
bigUadd();
SET_SIGN(bip.res, BIG_POSITIVE);
}
} else {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 < 0 and op2 >= 0 */
bigUadd();
SET_SIGN(bip.res, BIG_NEGATIVE);
} else {
/* op1 < 0 and op2 < 0 */
if (bigUcmp() <= 0) {
/* |op1| <= |op2| */
bigXchg();
bigUsub();
SET_SIGN(bip.res, BIG_POSITIVE);
bigXchg();
} else {
/* |op1| > |op2| */
bigUsub();
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
}
}
/*
* big integer multiplication
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
void bigMul(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
bigUmul();
if (GET_SIGN(bip.op1) == GET_SIGN(bip.op2) || GET_ND(bip.res) == 0) {
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
/*
* big integer division, truncating towards zero
*
* dividend in bip.op1, divisor in bip.op2
* quotient in bip.res, remainder in bip.rem
*/
void bigDiv(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
bigUdiv();
if (GET_SIGN(bip.op1) == GET_SIGN(bip.op2) || GET_ND(bip.res) == 0) {
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
SET_SIGN(bip.res, BIG_NEGATIVE);
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE || GET_ND(bip.rem) == 0) {
SET_SIGN(bip.rem, BIG_POSITIVE);
} else {
SET_SIGN(bip.rem, BIG_NEGATIVE);
}
}
/**************************************************************/
/* big integer conversions */
/*
* conversion int --> big
*
* operand in parameter
* result in bip.res
*/
void bigFromInt(int n) {
int i;
bip.res = newBig(sizeof(int));
if (n < 0) {
n = -n;
SET_SIGN(bip.res, BIG_NEGATIVE);
} else {
SET_SIGN(bip.res, BIG_POSITIVE);
}
for (i = 0; i < sizeof(int); i++) {
SET_DIGIT(bip.res, i, n & 0xFF);
n >>= 8;
}
while (--i >= 0 && GET_DIGIT(bip.res, i) == 0) ;
SET_ND(bip.res, i + 1);
}
/*
* conversion big --> int
*
* operand in bip.op1
* result is returned
*/
int bigToInt(void) {
int nd;
int i;
int res;
if (bip.op1 == NULL) {
nilRefException();
}
nd = GET_ND(bip.op1);
if (nd > 4 ||
(nd == 4 && GET_DIGIT(bip.op1, 3) >= 0x80)) {
fatalError("big integer too big for conversion to int");
}
res = 0;
for (i = nd - 1; i >= 0; i--) {
res <<= 8;
res |= (unsigned int) GET_DIGIT(bip.op1, i);
}
if (GET_SIGN(bip.op1) == BIG_NEGATIVE) {
res = -res;
}
return res;
}
/**************************************************************/
/* big integer I/O */
/*
* read a big integer
*
* stream to read from in parameter
* result in bip.res
*/
void bigRead(FILE *in) {
int c;
int positive;
c = fgetc(in);
while (isspace(c)) {
c = fgetc(in);
}
if (c == '-') {
positive = 0;
c = fgetc(in);
} else {
positive = 1;
if (c == '+') {
c = fgetc(in);
}
}
if (!isdigit(c)) {
fatalError("no digits in input");
}
bigFromInt(10);
bip.rem = bip.res;
bigFromInt(0);
while (isdigit(c)) {
bip.op1 = bip.res;
bip.op2 = bip.rem;
bigUmul();
bip.op1 = bip.res;
bigFromInt(c - '0');
bip.op2 = bip.res;
bigUadd();
c = fgetc(in);
}
ungetc(c, in);
if (positive || GET_ND(bip.res) == 0) {
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
/*
* print a big integer
*
* stream to write to in parameter
* number to print in bip.op1
*/
void bigPrint(FILE *out) {
int nd;
unsigned char r;
int skipZero;
if (bip.op1 == NULL) {
nilRefException();
}
nd = GET_ND(bip.op1);
if (nd == 0) {
fprintf(out, "0");
return;
}
if (GET_SIGN(bip.op1) == BIG_NEGATIVE) {
fprintf(out, "-");
}
/* number of digits in base 10 = number of digits
in base 256 * log10(256), and log10(256) < 2.5 */
nd = 2 * nd + nd / 2;
bip.rem = bip.op1;
bigFromInt(10);
bip.op2 = bip.res;
bigFromInt(1);
while (nd != 0) {
bip.op1 = bip.res;
bigUmul();
nd--;
}
bip.op1 = bip.rem;
bip.op2 = bip.res;
skipZero = 1;
do {
bigUdiv();
if (GET_ND(bip.res) == 0) {
if (!skipZero) {
fprintf(out, "0");
}
} else {
if (GET_ND(bip.res) != 1) {
fatalError("internal library error #7 - THIS SHOULD NEVER HAPPEN!");
}
fprintf(out, "%c", GET_DIGIT(bip.res, 0) + '0');
skipZero = 0;
}
bip.op1 = bip.rem;
bip.rem = bip.op2;
r = bigUdiv1(10);
bip.op2 = bip.rem;
} while (r == 0);
}
/**************************************************************/
/* debugging */
/*
* dump a big integer object
*/
void bigDump(FILE *out, BigObjRef bigObjRef) {
int nd;
unsigned char sign;
int i;
if (bigObjRef == NULL) {
nilRefException();
}
nd = GET_ND(bigObjRef);
sign = GET_SIGN(bigObjRef);
fprintf(out, "[%d %c", nd, sign == BIG_POSITIVE ? '+' : '-');
for (i = 0; i < nd; i++) {
fprintf(out, " %02X", GET_DIGIT(bigObjRef, i));
}
fprintf(out, "]");
}

60
bigint/src/bigint.h Normal file
View File

@ -0,0 +1,60 @@
/*
* bigint.h -- big integer library
*/
#ifndef _BIGINT_H_
#define _BIGINT_H_
/* object representation */
typedef void* BigObjRef;
#include <stdio.h>
typedef struct {
int nd; /* number of digits; array may be bigger */
/* nd = 0 exactly when number = 0 */
unsigned char sign; /* one of BIG_NEGATIVE or BIG_POSITIVE */
/* zero always has BIG_POSITIVE here */
unsigned char digits[1]; /* the digits proper; number base is 256 */
/* LS digit first; MS digit is not zero */
} Big;
#include "support.h"
/* big integer processor registers */
typedef struct {
BigObjRef op1; /* first (or single) operand */
BigObjRef op2; /* second operand (if present) */
BigObjRef res; /* result of operation */
BigObjRef rem; /* remainder in case of division */
} BIP;
extern BIP bip; /* registers of the processor */
/* big integer processor functions */
int bigSgn(void); /* sign */
int bigCmp(void); /* comparison */
void bigNeg(void); /* negation */
void bigAdd(void); /* addition */
void bigSub(void); /* subtraction */
void bigMul(void); /* multiplication */
void bigDiv(void); /* division */
void bigFromInt(int n); /* conversion int --> big */
int bigToInt(void); /* conversion big --> int */
void bigRead(FILE *in); /* read a big integer */
void bigPrint(FILE *out); /* print a big integer */
void bigDump(FILE *out, BigObjRef bigObjRef); /* dump a big integer object */
#endif /* _BIGINT_H_ */

BIN
bigint/src/bigint.o Normal file

Binary file not shown.

BIN
bigint/src/libbigint.a Normal file

Binary file not shown.

15
bigint/src/support.h Normal file
View File

@ -0,0 +1,15 @@
/*
* support.h -- object representation and support functions
*/
#ifndef _SUPPORT_H_
#define _SUPPORT_H_
/* support functions */
void fatalError(char *msg); /* print a message and exit */
void * newPrimObject(int dataSize); /* create a new primitive object */
void * getPrimObjectDataPointer(void * primObject);
#endif /* _SUPPORT_H_ */

28
bigint/tst/Makefile Normal file
View File

@ -0,0 +1,28 @@
#
# Makefile for big integer test
#
BUILD = ../build
CC = gcc
CFLAGS = -g -Wall -I$(BUILD)/include
LDFLAGS = -g -Wall -L$(BUILD)/lib
LDLIBS = -lbigint
all: testbip
install: all
mkdir -p $(BUILD)/bin
cp testbip $(BUILD)/bin
testbip: testbip.o support.o
$(CC) $(LDFLAGS) -o testbip testbip.o support.o $(LDLIBS)
testbip.o: testbip.c
$(CC) $(CFLAGS) -o testbip.o -c testbip.c
support.o: support.c
$(CC) $(CFLAGS) -o support.o -c support.c
clean:
rm -f *~ testbip.o support.o testbip

55
bigint/tst/support.c Normal file
View File

@ -0,0 +1,55 @@
/*
* support.c -- support functions for big integer library
*/
#include <stdio.h>
#include <stdlib.h>
#include "support.h"
typedef struct {
unsigned int size; /* byte count of payload data */
unsigned char data[1]; /* payload data, size as needed */
} *ObjRef;
/*
* This routine is called in case a fatal error has occurred.
* It should print the error message and terminate the program.
*/
void fatalError(char *msg) {
printf("Fatal error: %s\n", msg);
exit(1);
}
/*
* This function is called whenever a new primitive object with
* a certain amount of internal memory is needed. It should return
* an object reference to a regular object, which contains a freely
* usable memory area of at least the requested size (measured in
* bytes). The memory area need not be initialized in any way.
*
* Note that this function may move all objects in memory at will
* (due to, e.g., garbage collection), as long as the pointers in
* the global "bip" structure point to the correct objects when
* the function returns.
*/
void * newPrimObject(int dataSize) {
ObjRef bigObjRef;
int size = sizeof(unsigned int) + dataSize * sizeof(unsigned char);
bigObjRef = malloc(size);
bigObjRef->size = size;
if (bigObjRef == NULL) {
fatalError("newPrimObject() got no memory");
}
bigObjRef->size = size;
return bigObjRef;
}
void * getPrimObjectDataPointer(void * obj){
ObjRef oo = ((ObjRef) (obj));
return oo->data;
}

BIN
bigint/tst/support.o Normal file

Binary file not shown.

BIN
bigint/tst/testbip Executable file

Binary file not shown.

1253
bigint/tst/testbip.c Normal file

File diff suppressed because it is too large Load Diff

BIN
bigint/tst/testbip.o Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1,134 +0,0 @@
{
"inputs" :
[
{
"path" : "CMakeLists.txt"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeGenericSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/WindowsPaths.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeFindCodeBlocks.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/ProcessorCount.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU.cmake"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeRCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeRCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-windres.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C-ABI.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake"
},
{
"path" : "config.h.in"
}
],
"kind" : "cmakeFiles",
"paths" :
{
"build" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug",
"source" : "C:/Users/Nilss/CLionProjects/ninja"
},
"version" :
{
"major" : 1,
"minor" : 0
}
}

View File

@ -1,60 +0,0 @@
{
"configurations" :
[
{
"directories" :
[
{
"build" : ".",
"jsonFile" : "directory-.-Debug-d0094a50bb2071803777.json",
"minimumCMakeVersion" :
{
"string" : "3.0"
},
"projectIndex" : 0,
"source" : ".",
"targetIndexes" :
[
0
]
}
],
"name" : "Debug",
"projects" :
[
{
"directoryIndexes" :
[
0
],
"name" : "ninja",
"targetIndexes" :
[
0
]
}
],
"targets" :
[
{
"directoryIndex" : 0,
"id" : "ninja::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ninja-Debug-f292f08edd698e5009d2.json",
"name" : "ninja",
"projectIndex" : 0
}
]
}
],
"kind" : "codemodel",
"paths" :
{
"build" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug",
"source" : "C:/Users/Nilss/CLionProjects/ninja"
},
"version" :
{
"major" : 2,
"minor" : 4
}
}

View File

@ -1,14 +0,0 @@
{
"backtraceGraph" :
{
"commands" : [],
"files" : [],
"nodes" : []
},
"installers" : [],
"paths" :
{
"build" : ".",
"source" : "."
}
}

View File

@ -1,108 +0,0 @@
{
"cmake" :
{
"generator" :
{
"multiConfig" : false,
"name" : "MinGW Makefiles"
},
"paths" :
{
"cmake" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/cmake.exe",
"cpack" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/cpack.exe",
"ctest" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/ctest.exe",
"root" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 25,
"patch" : 2,
"string" : "3.25.2",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-23072077a90ad9331d20.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 4
}
},
{
"jsonFile" : "cache-v2-04d7c2d5c2c139b5c81c.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-b12e026c23bbd32d623a.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
{
"jsonFile" : "toolchains-v1-0a3201452b7e265c1bfb.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"cache-v2" :
{
"jsonFile" : "cache-v2-04d7c2d5c2c139b5c81c.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
"cmakeFiles-v1" :
{
"jsonFile" : "cmakeFiles-v1-b12e026c23bbd32d623a.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-23072077a90ad9331d20.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 4
}
},
"toolchains-v1" :
{
"jsonFile" : "toolchains-v1-0a3201452b7e265c1bfb.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
}
}

View File

@ -1,135 +0,0 @@
{
"artifacts" :
[
{
"path" : "ninja.exe"
},
{
"path" : "ninja.pdb"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"include_directories"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 11,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 10,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : "-g -fdiagnostics-color=always"
},
{
"fragment" : "-std=gnu99"
}
],
"includes" :
[
{
"backtrace" : 2,
"path" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"
}
],
"language" : "C",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "99"
},
"sourceIndexes" :
[
0
]
}
],
"id" : "ninja::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
},
{
"fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32",
"role" : "libraries"
}
],
"language" : "C"
},
"name" : "ninja",
"nameOnDisk" : "ninja.exe",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0
]
},
{
"name" : "Header Files",
"sourceIndexes" :
[
1
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "njvm.c",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"path" : "config.h.in",
"sourceGroupIndex" : 1
}
],
"type" : "EXECUTABLE"
}

View File

@ -1,75 +0,0 @@
{
"kind" : "toolchains",
"toolchains" :
[
{
"compiler" :
{
"id" : "GNU",
"implicit" :
{
"includeDirectories" :
[
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include"
],
"linkDirectories" :
[
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib"
],
"linkFrameworkDirectories" : [],
"linkLibraries" :
[
"mingw32",
"gcc",
"moldname",
"mingwex",
"kernel32",
"pthread",
"advapi32",
"shell32",
"user32",
"kernel32",
"iconv",
"mingw32",
"gcc",
"moldname",
"mingwex",
"kernel32"
]
},
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe",
"version" : "11.2.0"
},
"language" : "C",
"sourceFileExtensions" :
[
"c",
"m"
]
},
{
"compiler" :
{
"implicit" : {},
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/windres.exe"
},
"language" : "RC",
"sourceFileExtensions" :
[
"rc",
"RC"
]
}
],
"version" :
{
"major" : 1,
"minor" : 0
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,72 +0,0 @@
set(CMAKE_C_COMPILER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "GNU")
set(CMAKE_C_COMPILER_VERSION "11.2.0")
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
set(CMAKE_C_COMPILER_WRAPPER "")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
set(CMAKE_C_PLATFORM_ID "MinGW")
set(CMAKE_C_SIMULATE_ID "")
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_AR "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ar.exe")
set(CMAKE_C_COMPILER_AR "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc-ar.exe")
set(CMAKE_RANLIB "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ranlib.exe")
set(CMAKE_C_COMPILER_RANLIB "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc-ranlib.exe")
set(CMAKE_LINKER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ld.exe")
set(CMAKE_MT "")
set(CMAKE_COMPILER_IS_GNUCC 1)
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_ABI_COMPILED TRUE)
set(CMAKE_C_COMPILER_ENV_VAR "CC")
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
set(CMAKE_C_SIZEOF_DATA_PTR "8")
set(CMAKE_C_COMPILER_ABI "")
set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
if(CMAKE_C_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_C_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif()
if(CMAKE_C_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include")
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "mingw32;gcc;moldname;mingwex;kernel32;pthread;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex;kernel32")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

View File

@ -1,6 +0,0 @@
set(CMAKE_RC_COMPILER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/windres.exe")
set(CMAKE_RC_COMPILER_ARG1 "")
set(CMAKE_RC_COMPILER_LOADED 1)
set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC)
set(CMAKE_RC_OUTPUT_EXTENSION .obj)
set(CMAKE_RC_COMPILER_ENV_VAR "RC")

View File

@ -1,15 +0,0 @@
set(CMAKE_HOST_SYSTEM "Windows-10.0.22621")
set(CMAKE_HOST_SYSTEM_NAME "Windows")
set(CMAKE_HOST_SYSTEM_VERSION "10.0.22621")
set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(CMAKE_SYSTEM "Windows-10.0.22621")
set(CMAKE_SYSTEM_NAME "Windows")
set(CMAKE_SYSTEM_VERSION "10.0.22621")
set(CMAKE_SYSTEM_PROCESSOR "AMD64")
set(CMAKE_CROSSCOMPILING "FALSE")
set(CMAKE_SYSTEM_LOADED 1)

View File

@ -1,868 +0,0 @@
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#if defined(__CLASSIC_C__)
/* cv-qualifiers did not exist in K&R C */
# define const
# define volatile
#endif
#if !defined(__has_include)
/* If the compiler does not have __has_include, pretend the answer is
always no. */
# define __has_include(x) 0
#endif
/* Version number components: V=Version, R=Revision, P=Patch
Version date components: YYYY=Year, MM=Month, DD=Day */
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# if defined(__GNUC__)
# define SIMULATE_ID "GNU"
# endif
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
except that a few beta releases use the old format with V=2021. */
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# if defined(__INTEL_COMPILER_UPDATE)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
# else
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# endif
# else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
/* The third version component from --version is an update index,
but no macro is provided for it. */
# define COMPILER_VERSION_PATCH DEC(0)
# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
# endif
# if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
# define COMPILER_ID "IntelLLVM"
#if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
#endif
#if defined(__GNUC__)
# define SIMULATE_ID "GNU"
#endif
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
* VVVV is no smaller than the current year when a version is released.
*/
#if __INTEL_LLVM_COMPILER < 1000000L
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
#else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
#endif
#if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
#endif
#if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
#elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
#endif
#if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
#endif
#if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
#endif
#elif defined(__PATHCC__)
# define COMPILER_ID "PathScale"
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
# if defined(__PATHCC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
# endif
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
# define COMPILER_ID "Embarcadero"
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
/* __BORLANDC__ = 0xVRR */
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
# define COMPILER_ID "Watcom"
/* __WATCOMC__ = VVRR */
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__WATCOMC__)
# define COMPILER_ID "OpenWatcom"
/* __WATCOMC__ = VVRP + 1100 */
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__SUNPRO_C)
# define COMPILER_ID "SunPro"
# if __SUNPRO_C >= 0x5100
/* __SUNPRO_C = 0xVRRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# else
/* __SUNPRO_CC = 0xVRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# endif
#elif defined(__HP_cc)
# define COMPILER_ID "HP"
/* __HP_cc = VVRRPP */
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
#elif defined(__DECC)
# define COMPILER_ID "Compaq"
/* __DECC_VER = VVRRTPPPP */
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__open_xl__) && defined(__clang__)
# define COMPILER_ID "IBMClang"
# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
#elif defined(__ibmxl__) && defined(__clang__)
# define COMPILER_ID "XLClang"
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
# define COMPILER_ID "XL"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
# define COMPILER_ID "VisualAge"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__NVCOMPILER)
# define COMPILER_ID "NVHPC"
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
# if defined(__NVCOMPILER_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
# endif
#elif defined(__PGI)
# define COMPILER_ID "PGI"
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
# if defined(__PGIC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
# endif
#elif defined(_CRAYC)
# define COMPILER_ID "Cray"
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI"
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
#elif defined(__CLANG_FUJITSU)
# define COMPILER_ID "FujitsuClang"
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
#elif defined(__FUJITSU)
# define COMPILER_ID "Fujitsu"
# if defined(__FCC_version__)
# define COMPILER_VERSION __FCC_version__
# elif defined(__FCC_major__)
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# endif
# if defined(__fcc_version)
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
# elif defined(__FCC_VERSION)
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
# endif
#elif defined(__ghs__)
# define COMPILER_ID "GHS"
/* __GHS_VERSION_NUMBER = VVVVRP */
# ifdef __GHS_VERSION_NUMBER
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
# endif
#elif defined(__TASKING__)
# define COMPILER_ID "Tasking"
# define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
# define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
#elif defined(__TINYC__)
# define COMPILER_ID "TinyCC"
#elif defined(__BCC__)
# define COMPILER_ID "Bruce"
#elif defined(__SCO_VERSION__)
# define COMPILER_ID "SCO"
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
# define COMPILER_ID "ARMCC"
#if __ARMCC_VERSION >= 1000000
/* __ARMCC_VERSION = VRRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#else
/* __ARMCC_VERSION = VRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#endif
#elif defined(__clang__) && defined(__apple_build_version__)
# define COMPILER_ID "AppleClang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
# define COMPILER_ID "ARMClang"
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
#elif defined(__clang__)
# define COMPILER_ID "Clang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
# define COMPILER_ID "LCC"
# define COMPILER_VERSION_MAJOR DEC(1)
# if defined(__LCC__)
# define COMPILER_VERSION_MINOR DEC(__LCC__- 100)
# endif
# if defined(__LCC_MINOR__)
# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
# endif
# if defined(__GNUC__) && defined(__GNUC_MINOR__)
# define SIMULATE_ID "GNU"
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
# endif
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
# if defined(__GNUC_MINOR__)
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
/* _MSC_VER = VVRR */
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
# if defined(_MSC_FULL_VER)
# if _MSC_VER >= 1400
/* _MSC_FULL_VER = VVRRPPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
# else
/* _MSC_FULL_VER = VVRRPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
# endif
# endif
# if defined(_MSC_BUILD)
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
# endif
#elif defined(_ADI_COMPILER)
# define COMPILER_ID "ADSP"
#if defined(__VERSIONNUM__)
/* __VERSIONNUM__ = 0xVVRRPPTT */
# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
#endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# define COMPILER_ID "IAR"
# if defined(__VER__) && defined(__ICCARM__)
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# endif
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
# define COMPILER_ID "SDCC"
# if defined(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
# else
/* SDCC = VRP */
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
# endif
/* These compilers are either not known or too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
#ifdef SIMULATE_ID
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
#ifdef __QNXNTO__
char const* qnxnto = "INFO" ":" "qnxnto[]";
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
#endif
#define STRINGIFY_HELPER(X) #X
#define STRINGIFY(X) STRINGIFY_HELPER(X)
/* Identify known platforms by name. */
#if defined(__linux) || defined(__linux__) || defined(linux)
# define PLATFORM_ID "Linux"
#elif defined(__MSYS__)
# define PLATFORM_ID "MSYS"
#elif defined(__CYGWIN__)
# define PLATFORM_ID "Cygwin"
#elif defined(__MINGW32__)
# define PLATFORM_ID "MinGW"
#elif defined(__APPLE__)
# define PLATFORM_ID "Darwin"
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
# define PLATFORM_ID "Windows"
#elif defined(__FreeBSD__) || defined(__FreeBSD)
# define PLATFORM_ID "FreeBSD"
#elif defined(__NetBSD__) || defined(__NetBSD)
# define PLATFORM_ID "NetBSD"
#elif defined(__OpenBSD__) || defined(__OPENBSD)
# define PLATFORM_ID "OpenBSD"
#elif defined(__sun) || defined(sun)
# define PLATFORM_ID "SunOS"
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
# define PLATFORM_ID "AIX"
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
#elif defined(__QNX__) || defined(__QNXNTO__)
# define PLATFORM_ID "QNX"
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
# define PLATFORM_ID "Tru64"
#elif defined(__riscos) || defined(__riscos__)
# define PLATFORM_ID "RISCos"
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
# define PLATFORM_ID "SINIX"
#elif defined(__UNIX_SV__)
# define PLATFORM_ID "UNIX_SV"
#elif defined(__bsdos__)
# define PLATFORM_ID "BSDOS"
#elif defined(_MPRAS) || defined(MPRAS)
# define PLATFORM_ID "MP-RAS"
#elif defined(__osf) || defined(__osf__)
# define PLATFORM_ID "OSF1"
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
# define PLATFORM_ID "SCO_SV"
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
# define PLATFORM_ID "ULTRIX"
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
# define PLATFORM_ID "Xenix"
#elif defined(__WATCOMC__)
# if defined(__LINUX__)
# define PLATFORM_ID "Linux"
# elif defined(__DOS__)
# define PLATFORM_ID "DOS"
# elif defined(__OS2__)
# define PLATFORM_ID "OS2"
# elif defined(__WINDOWS__)
# define PLATFORM_ID "Windows3x"
# elif defined(__VXWORKS__)
# define PLATFORM_ID "VxWorks"
# else /* unknown platform */
# define PLATFORM_ID
# endif
#elif defined(__INTEGRITY)
# if defined(INT_178B)
# define PLATFORM_ID "Integrity178"
# else /* regular Integrity */
# define PLATFORM_ID "Integrity"
# endif
# elif defined(_ADI_COMPILER)
# define PLATFORM_ID "ADSP"
#else /* unknown platform */
# define PLATFORM_ID
#endif
/* For windows compilers MSVC and Intel we can determine
the architecture of the compiler being used. This is because
the compilers do not have flags that can change the architecture,
but rather depend on which compiler is being used
*/
#if defined(_WIN32) && defined(_MSC_VER)
# if defined(_M_IA64)
# define ARCHITECTURE_ID "IA64"
# elif defined(_M_ARM64EC)
# define ARCHITECTURE_ID "ARM64EC"
# elif defined(_M_X64) || defined(_M_AMD64)
# define ARCHITECTURE_ID "x64"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# elif defined(_M_ARM64)
# define ARCHITECTURE_ID "ARM64"
# elif defined(_M_ARM)
# if _M_ARM == 4
# define ARCHITECTURE_ID "ARMV4I"
# elif _M_ARM == 5
# define ARCHITECTURE_ID "ARMV5I"
# else
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
# endif
# elif defined(_M_MIPS)
# define ARCHITECTURE_ID "MIPS"
# elif defined(_M_SH)
# define ARCHITECTURE_ID "SHx"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__WATCOMC__)
# if defined(_M_I86)
# define ARCHITECTURE_ID "I86"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# if defined(__ICCARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__ICCRX__)
# define ARCHITECTURE_ID "RX"
# elif defined(__ICCRH850__)
# define ARCHITECTURE_ID "RH850"
# elif defined(__ICCRL78__)
# define ARCHITECTURE_ID "RL78"
# elif defined(__ICCRISCV__)
# define ARCHITECTURE_ID "RISCV"
# elif defined(__ICCAVR__)
# define ARCHITECTURE_ID "AVR"
# elif defined(__ICC430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__ICCV850__)
# define ARCHITECTURE_ID "V850"
# elif defined(__ICC8051__)
# define ARCHITECTURE_ID "8051"
# elif defined(__ICCSTM8__)
# define ARCHITECTURE_ID "STM8"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__ghs__)
# if defined(__PPC64__)
# define ARCHITECTURE_ID "PPC64"
# elif defined(__ppc__)
# define ARCHITECTURE_ID "PPC"
# elif defined(__ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__x86_64__)
# define ARCHITECTURE_ID "x64"
# elif defined(__i386__)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__TI_COMPILER_VERSION__)
# if defined(__TI_ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__MSP430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__TMS320C28XX__)
# define ARCHITECTURE_ID "TMS320C28x"
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
# define ARCHITECTURE_ID "TMS320C6x"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
# elif defined(__ADSPSHARC__)
# define ARCHITECTURE_ID "SHARC"
# elif defined(__ADSPBLACKFIN__)
# define ARCHITECTURE_ID "Blackfin"
#elif defined(__TASKING__)
# if defined(__CTC__) || defined(__CPTC__)
# define ARCHITECTURE_ID "TriCore"
# elif defined(__CMCS__)
# define ARCHITECTURE_ID "MCS"
# elif defined(__CARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__CARC__)
# define ARCHITECTURE_ID "ARC"
# elif defined(__C51__)
# define ARCHITECTURE_ID "8051"
# elif defined(__CPCP__)
# define ARCHITECTURE_ID "PCP"
# else
# define ARCHITECTURE_ID ""
# endif
#else
# define ARCHITECTURE_ID
#endif
/* Convert integer to decimal digit literals. */
#define DEC(n) \
('0' + (((n) / 10000000)%10)), \
('0' + (((n) / 1000000)%10)), \
('0' + (((n) / 100000)%10)), \
('0' + (((n) / 10000)%10)), \
('0' + (((n) / 1000)%10)), \
('0' + (((n) / 100)%10)), \
('0' + (((n) / 10)%10)), \
('0' + ((n) % 10))
/* Convert integer to hex digit literals. */
#define HEX(n) \
('0' + ((n)>>28 & 0xF)), \
('0' + ((n)>>24 & 0xF)), \
('0' + ((n)>>20 & 0xF)), \
('0' + ((n)>>16 & 0xF)), \
('0' + ((n)>>12 & 0xF)), \
('0' + ((n)>>8 & 0xF)), \
('0' + ((n)>>4 & 0xF)), \
('0' + ((n) & 0xF))
/* Construct a string literal encoding the version number. */
#ifdef COMPILER_VERSION
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
/* Construct a string literal encoding the version number components. */
#elif defined(COMPILER_VERSION_MAJOR)
char const info_version[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
COMPILER_VERSION_MAJOR,
# ifdef COMPILER_VERSION_MINOR
'.', COMPILER_VERSION_MINOR,
# ifdef COMPILER_VERSION_PATCH
'.', COMPILER_VERSION_PATCH,
# ifdef COMPILER_VERSION_TWEAK
'.', COMPILER_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct a string literal encoding the internal version number. */
#ifdef COMPILER_VERSION_INTERNAL
char const info_version_internal[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
'i','n','t','e','r','n','a','l','[',
COMPILER_VERSION_INTERNAL,']','\0'};
#elif defined(COMPILER_VERSION_INTERNAL_STR)
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
#endif
/* Construct a string literal encoding the version number components. */
#ifdef SIMULATE_VERSION_MAJOR
char const info_simulate_version[] = {
'I', 'N', 'F', 'O', ':',
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
SIMULATE_VERSION_MAJOR,
# ifdef SIMULATE_VERSION_MINOR
'.', SIMULATE_VERSION_MINOR,
# ifdef SIMULATE_VERSION_PATCH
'.', SIMULATE_VERSION_PATCH,
# ifdef SIMULATE_VERSION_TWEAK
'.', SIMULATE_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
#if !defined(__STDC__) && !defined(__clang__)
# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
# define C_VERSION "90"
# else
# define C_VERSION
# endif
#elif __STDC_VERSION__ > 201710L
# define C_VERSION "23"
#elif __STDC_VERSION__ >= 201710L
# define C_VERSION "17"
#elif __STDC_VERSION__ >= 201000L
# define C_VERSION "11"
#elif __STDC_VERSION__ >= 199901L
# define C_VERSION "99"
#else
# define C_VERSION "90"
#endif
const char* info_language_standard_default =
"INFO" ":" "standard_default[" C_VERSION "]";
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
defined(__TI_COMPILER_VERSION__)) && \
!defined(__STRICT_ANSI__)
"ON"
#else
"OFF"
#endif
"]";
/*--------------------------------------------------------------------------*/
#ifdef ID_VOID_MAIN
void main() {}
#else
# if defined(__CLASSIC_C__)
int main(argc, argv) int argc; char *argv[];
# else
int main(int argc, char* argv[])
# endif
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
require += info_arch[argc];
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
#endif
#ifdef COMPILER_VERSION_INTERNAL
require += info_version_internal[argc];
#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
require += info_cray[argc];
#endif
require += info_language_standard_default[argc];
require += info_language_extensions_default[argc];
(void)argv;
return require;
}
#endif

View File

@ -1,16 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Relative path conversion top directories.
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "C:/Users/Nilss/CLionProjects/ninja")
set(CMAKE_RELATIVE_PATH_TOP_BINARY "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug")
# Force unix paths in dependencies.
set(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

View File

@ -1,230 +0,0 @@
The system is: Windows - 10.0.22621 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/3.25.2/CompilerIdC/a.exe"
Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz
Run Build Command(s):C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f Makefile cmTC_be6eb/fast && C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f CMakeFiles\cmTC_be6eb.dir\build.make CMakeFiles/cmTC_be6eb.dir/build
mingw32-make[1]: Entering directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz'
Building C object CMakeFiles/cmTC_be6eb.dir/CMakeCCompilerABI.c.obj
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj -c "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c"
Using built-in specs.
COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\'
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/cc1.exe -quiet -v -iprefix C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/ -D_REENTRANT C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles\cmTC_be6eb.dir\ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -fdiagnostics-color=always -o C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s
GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include"
ignoring nonexistent directory "/win/include"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../include"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 23424b72d090e8b977a96775bde79257
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\'
as -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s
GNU assembler version 2.37 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.37
COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/
LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.'
Linking C executable cmTC_be6eb.exe
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_be6eb.dir\link.txt --verbose=1
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\cmTC_be6eb.dir/objects.a
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\cmTC_be6eb.dir/objects.a @CMakeFiles\cmTC_be6eb.dir\objects1
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -v -Wl,--whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a -Wl,--no-whole-archive -o cmTC_be6eb.exe -Wl,--out-implib,libcmTC_be6eb.dll.a -Wl,--major-image-version,0,--minor-image-version,0
Using built-in specs.
COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)
COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/
LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.'
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe -m i386pep -Bdynamic -o cmTC_be6eb.exe C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0 -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../.. --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a --no-whole-archive --out-implib libcmTC_be6eb.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.'
mingw32-make[1]: Leaving directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz'
Parsed C implicit include dir info from above output: rv=done
found start of include info
found start of implicit include info
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include]
end of search list found
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include]
implicit include dirs: [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include]
Parsed C implicit link information from above output:
link line regex: [^( *|.*[/\])(ld\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz]
ignore line: []
ignore line: [Run Build Command(s):C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f Makefile cmTC_be6eb/fast && C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f CMakeFiles\cmTC_be6eb.dir\build.make CMakeFiles/cmTC_be6eb.dir/build]
ignore line: [mingw32-make[1]: Entering directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz']
ignore line: [Building C object CMakeFiles/cmTC_be6eb.dir/CMakeCCompilerABI.c.obj]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj -c "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c"]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe]
ignore line: [Target: x86_64-w64-mingw32]
ignore line: [Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends]
ignore line: [Thread model: posix]
ignore line: [Supported LTO compression algorithms: zlib]
ignore line: [gcc version 11.2.0 (GCC) ]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\']
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/cc1.exe -quiet -v -iprefix C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/ -D_REENTRANT C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles\cmTC_be6eb.dir\ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -fdiagnostics-color=always -o C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s]
ignore line: [GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)]
ignore line: [ compiled by GNU C version 11.2.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version none]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include"]
ignore line: [ignoring nonexistent directory "/win/include"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../include"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"]
ignore line: [ignoring nonexistent directory "/mingw/include"]
ignore line: [#include "..." search starts here:]
ignore line: [#include <...> search starts here:]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include]
ignore line: [End of search list.]
ignore line: [GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)]
ignore line: [ compiled by GNU C version 11.2.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version none]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [Compiler executable checksum: 23424b72d090e8b977a96775bde79257]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\']
ignore line: [ as -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s]
ignore line: [GNU assembler version 2.37 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.37]
ignore line: [COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/]
ignore line: [LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.']
ignore line: [Linking C executable cmTC_be6eb.exe]
ignore line: ["C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_be6eb.dir\link.txt --verbose=1]
ignore line: ["C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\cmTC_be6eb.dir/objects.a]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\cmTC_be6eb.dir/objects.a @CMakeFiles\cmTC_be6eb.dir\objects1]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -v -Wl --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a -Wl --no-whole-archive -o cmTC_be6eb.exe -Wl --out-implib libcmTC_be6eb.dll.a -Wl --major-image-version 0 --minor-image-version 0 ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe]
ignore line: [COLLECT_LTO_WRAPPER=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/lto-wrapper.exe]
ignore line: [Target: x86_64-w64-mingw32]
ignore line: [Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends]
ignore line: [Thread model: posix]
ignore line: [Supported LTO compression algorithms: zlib]
ignore line: [gcc version 11.2.0 (GCC) ]
ignore line: [COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/]
ignore line: [LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.']
link line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe -m i386pep -Bdynamic -o cmTC_be6eb.exe C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0 -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../.. --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a --no-whole-archive --out-implib libcmTC_be6eb.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o]
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe] ==> ignore
arg [-m] ==> ignore
arg [i386pep] ==> ignore
arg [-Bdynamic] ==> search dynamic
arg [-o] ==> ignore
arg [cmTC_be6eb.exe] ==> ignore
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o]
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o] ==> obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../..] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../..]
arg [--whole-archive] ==> ignore
arg [CMakeFiles\cmTC_be6eb.dir/objects.a] ==> ignore
arg [--no-whole-archive] ==> ignore
arg [--out-implib] ==> ignore
arg [libcmTC_be6eb.dll.a] ==> ignore
arg [--major-image-version] ==> ignore
arg [0] ==> ignore
arg [--minor-image-version] ==> ignore
arg [0] ==> ignore
arg [-lmingw32] ==> lib [mingw32]
arg [-lgcc] ==> lib [gcc]
arg [-lgcc_eh] ==> lib [gcc_eh]
arg [-lmoldname] ==> lib [moldname]
arg [-lmingwex] ==> lib [mingwex]
arg [-lmsvcrt] ==> lib [msvcrt]
arg [-lkernel32] ==> lib [kernel32]
arg [-lpthread] ==> lib [pthread]
arg [-ladvapi32] ==> lib [advapi32]
arg [-lshell32] ==> lib [shell32]
arg [-luser32] ==> lib [user32]
arg [-lkernel32] ==> lib [kernel32]
arg [-liconv] ==> lib [iconv]
arg [-lmingw32] ==> lib [mingw32]
arg [-lgcc] ==> lib [gcc]
arg [-lgcc_eh] ==> lib [gcc_eh]
arg [-lmoldname] ==> lib [moldname]
arg [-lmingwex] ==> lib [mingwex]
arg [-lmsvcrt] ==> lib [msvcrt]
arg [-lkernel32] ==> lib [kernel32]
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o] ==> obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o]
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o] ==> obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o]
remove lib [gcc_eh]
remove lib [msvcrt]
remove lib [gcc_eh]
remove lib [msvcrt]
collapse obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib/crt2.o]
collapse obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o]
collapse obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib/default-manifest.o]
collapse obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o]
collapse library dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0]
collapse library dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc]
collapse library dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib]
collapse library dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib]
collapse library dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib]
collapse library dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../..] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib]
implicit libs: [mingw32;gcc;moldname;mingwex;kernel32;pthread;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex;kernel32]
implicit objs: [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib/crt2.o;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib/default-manifest.o;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o]
implicit dirs: [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib]
implicit fwks: []

View File

@ -1,52 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# The generator used is:
set(CMAKE_DEPENDS_GENERATOR "MinGW Makefiles")
# The top level Makefile was generated from the following files:
set(CMAKE_MAKEFILE_DEPENDS
"CMakeCache.txt"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeFindCodeBlocks.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeGenericSystem.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeRCInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU-C.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C-ABI.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-windres.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/WindowsPaths.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/ProcessorCount.cmake"
"C:/Users/Nilss/CLionProjects/ninja/CMakeLists.txt"
"CMakeFiles/3.25.2/CMakeCCompiler.cmake"
"CMakeFiles/3.25.2/CMakeRCCompiler.cmake"
"CMakeFiles/3.25.2/CMakeSystem.cmake"
"C:/Users/Nilss/CLionProjects/ninja/config.h.in"
)
# The corresponding makefile is:
set(CMAKE_MAKEFILE_OUTPUTS
"Makefile"
"CMakeFiles/cmake.check_cache"
)
# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
"config.h"
"CMakeFiles/CMakeDirectoryInformation.cmake"
)
# Dependency information for all targets:
set(CMAKE_DEPEND_INFO_FILES
"CMakeFiles/ninja.dir/DependInfo.cmake"
)

View File

@ -1,111 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
#=============================================================================
# Directory level rules for the build root directory
# The main recursive "all" target.
all: CMakeFiles/ninja.dir/all
.PHONY : all
# The main recursive "preinstall" target.
preinstall:
.PHONY : preinstall
# The main recursive "clean" target.
clean: CMakeFiles/ninja.dir/clean
.PHONY : clean
#=============================================================================
# Target rules for target CMakeFiles/ninja.dir
# All Build rule for target.
CMakeFiles/ninja.dir/all:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/depend
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/build
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=1,2 "Built target ninja"
.PHONY : CMakeFiles/ninja.dir/all
# Build rule for subdir invocation for target.
CMakeFiles/ninja.dir/rule: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 2
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 CMakeFiles/ninja.dir/all
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 0
.PHONY : CMakeFiles/ninja.dir/rule
# Convenience name for target.
ninja: CMakeFiles/ninja.dir/rule
.PHONY : ninja
# clean rule for target.
CMakeFiles/ninja.dir/clean:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/clean
.PHONY : CMakeFiles/ninja.dir/clean
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@ -1,3 +0,0 @@
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/ninja.dir
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/edit_cache.dir
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/rebuild_cache.dir

View File

@ -1,4 +0,0 @@
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" -S C:\Users\Nilss\CLionProjects\ninja -B C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug

View File

@ -1,4 +0,0 @@
ToolSet: w64 9.0 (local)@C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\mingw
Options:
Options:

View File

@ -1 +0,0 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file

View File

@ -1,19 +0,0 @@
# Consider dependencies only in project.
set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
)
# The set of dependency files which are needed:
set(CMAKE_DEPENDS_DEPENDENCY_FILES
"C:/Users/Nilss/CLionProjects/ninja/njvm.c" "CMakeFiles/ninja.dir/njvm.c.obj" "gcc" "CMakeFiles/ninja.dir/njvm.c.obj.d"
)
# Targets to which this target links.
set(CMAKE_TARGET_LINKED_INFO_FILES
)
# Fortran module output directory.
set(CMAKE_Fortran_TARGET_MODULE_DIR "")

View File

@ -1,112 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Delete rule output on recipe failure.
.DELETE_ON_ERROR:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
# Include any dependencies generated for this target.
include CMakeFiles/ninja.dir/depend.make
# Include any dependencies generated by the compiler for this target.
include CMakeFiles/ninja.dir/compiler_depend.make
# Include the progress variables for this target.
include CMakeFiles/ninja.dir/progress.make
# Include the compile flags for this target's objects.
include CMakeFiles/ninja.dir/flags.make
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/flags.make
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/includes_C.rsp
CMakeFiles/ninja.dir/njvm.c.obj: C:/Users/Nilss/CLionProjects/ninja/njvm.c
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/compiler_depend.ts
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/ninja.dir/njvm.c.obj"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/ninja.dir/njvm.c.obj -MF CMakeFiles\ninja.dir\njvm.c.obj.d -o CMakeFiles\ninja.dir\njvm.c.obj -c C:\Users\Nilss\CLionProjects\ninja\njvm.c
CMakeFiles/ninja.dir/njvm.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ninja.dir/njvm.c.i"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E C:\Users\Nilss\CLionProjects\ninja\njvm.c > CMakeFiles\ninja.dir\njvm.c.i
CMakeFiles/ninja.dir/njvm.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ninja.dir/njvm.c.s"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S C:\Users\Nilss\CLionProjects\ninja\njvm.c -o CMakeFiles\ninja.dir\njvm.c.s
# Object files for target ninja
ninja_OBJECTS = \
"CMakeFiles/ninja.dir/njvm.c.obj"
# External object files for target ninja
ninja_EXTERNAL_OBJECTS =
ninja.exe: CMakeFiles/ninja.dir/njvm.c.obj
ninja.exe: CMakeFiles/ninja.dir/build.make
ninja.exe: CMakeFiles/ninja.dir/linkLibs.rsp
ninja.exe: CMakeFiles/ninja.dir/objects1
ninja.exe: CMakeFiles/ninja.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking C executable ninja.exe"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles\ninja.dir\link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
CMakeFiles/ninja.dir/build: ninja.exe
.PHONY : CMakeFiles/ninja.dir/build
CMakeFiles/ninja.dir/clean:
$(CMAKE_COMMAND) -P CMakeFiles\ninja.dir\cmake_clean.cmake
.PHONY : CMakeFiles/ninja.dir/clean
CMakeFiles/ninja.dir/depend:
$(CMAKE_COMMAND) -E cmake_depends "MinGW Makefiles" C:\Users\Nilss\CLionProjects\ninja C:\Users\Nilss\CLionProjects\ninja C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles\ninja.dir\DependInfo.cmake --color=$(COLOR)
.PHONY : CMakeFiles/ninja.dir/depend

View File

@ -1,13 +0,0 @@
file(REMOVE_RECURSE
"CMakeFiles/ninja.dir/njvm.c.obj"
"CMakeFiles/ninja.dir/njvm.c.obj.d"
"libninja.dll.a"
"ninja.exe"
"ninja.exe.manifest"
"ninja.pdb"
)
# Per-language clean rules from dependency scanning.
foreach(lang C)
include(CMakeFiles/ninja.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

View File

@ -1,2 +0,0 @@
# Empty compiler generated dependencies file for ninja.
# This may be replaced when dependencies are built.

View File

@ -1,2 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Timestamp file for compiler generated dependencies management for ninja.

View File

@ -1,2 +0,0 @@
# Empty dependencies file for ninja.
# This may be replaced when dependencies are built.

View File

@ -1,10 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# compile C with C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe
C_DEFINES =
C_INCLUDES = @CMakeFiles/ninja.dir/includes_C.rsp
C_FLAGS = -g -fdiagnostics-color=always -std=gnu99

View File

@ -1 +0,0 @@
-I"C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"

View File

@ -1,3 +0,0 @@
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\ninja.dir/objects.a
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\ninja.dir/objects.a @CMakeFiles\ninja.dir\objects1
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -g -Wl,--whole-archive CMakeFiles\ninja.dir/objects.a -Wl,--no-whole-archive -o ninja.exe -Wl,--out-implib,libninja.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\ninja.dir\linkLibs.rsp

View File

@ -1 +0,0 @@
-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32

View File

@ -1,17 +0,0 @@
CMakeFiles/ninja.dir/njvm.c.obj: \
C:\Users\Nilss\CLionProjects\ninja\njvm.c \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/stdio.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/corecrt_stdio_config.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/corecrt.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_mac.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_secapi.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/vadefs.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sdks/_mingw_ddk.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_off_t.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/swprintf.inl \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sec_api/stdio_s.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/string.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/crtdefs.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sec_api/string_s.h \
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/config.h

View File

@ -1 +0,0 @@
CMakeFiles/ninja.dir/njvm.c.obj

View File

@ -1,3 +0,0 @@
CMAKE_PROGRESS_1 = 1
CMAKE_PROGRESS_2 = 2

View File

@ -1 +0,0 @@
2

View File

@ -1,180 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E echo "No interactive CMake dialog available."
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\\CMakeFiles\progress.marks
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named ninja
# Build rule for target.
ninja: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 ninja
.PHONY : ninja
# fast build rule for target.
ninja/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/build
.PHONY : ninja/fast
njvm.obj: njvm.c.obj
.PHONY : njvm.obj
# target to build an object file
njvm.c.obj:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.obj
.PHONY : njvm.c.obj
njvm.i: njvm.c.i
.PHONY : njvm.i
# target to preprocess a source file
njvm.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.i
.PHONY : njvm.c.i
njvm.s: njvm.c.s
.PHONY : njvm.s
# target to generate assembly for a file
njvm.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.s
.PHONY : njvm.c.s
# Help Target
help:
@echo The following are some of the valid targets for this Makefile:
@echo ... all (the default if no target is provided)
@echo ... clean
@echo ... depend
@echo ... edit_cache
@echo ... rebuild_cache
@echo ... ninja
@echo ... njvm.obj
@echo ... njvm.i
@echo ... njvm.s
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@ -1,3 +0,0 @@
Start testing: Oct 12 12:13 Mitteleuropäische Sommerzeit
----------------------------------------------------------
End testing: Oct 12 12:13 Mitteleuropäische Sommerzeit

View File

@ -1,49 +0,0 @@
# Install script for directory: C:/Users/Nilss/CLionProjects/ninja
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/ninja")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
# Is this installation the result of a crosscompile?
if(NOT DEFINED CMAKE_CROSSCOMPILING)
set(CMAKE_CROSSCOMPILING "FALSE")
endif()
# Set default install directory permissions.
if(NOT DEFINED CMAKE_OBJDUMP)
set(CMAKE_OBJDUMP "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/objdump.exe")
endif()
if(CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
"${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
"${CMAKE_INSTALL_MANIFEST_CONTENT}")

View File

@ -1 +0,0 @@
#define PROJECT_VERSION 0

View File

@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6"/>
<Project>
<Option title="ninja"/>
<Option makefile_is_custom="1"/>
<Option compiler="gcc"/>
<Option virtualFolders="CMake Files\;"/>
<Build>
<Target title="all">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 all"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="ninja">
<Option output="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/ninja.exe" prefix_auto="0" extension_auto="0"/>
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option object_output="./"/>
<Option type="1"/>
<Option compiler="gcc"/>
<Compiler>
<Add directory="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"/>
</Compiler>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 ninja"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="ninja/fast">
<Option output="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/ninja.exe" prefix_auto="0" extension_auto="0"/>
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option object_output="./"/>
<Option type="1"/>
<Option compiler="gcc"/>
<Compiler>
<Add directory="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"/>
</Compiler>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 ninja/fast"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="edit_cache">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 edit_cache"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="rebuild_cache">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 rebuild_cache"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
</Build>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/config.h.in">
<Option target="ninja"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/njvm.c">
<Option target="ninja"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/CMakeLists.txt">
<Option virtualFolder="CMake Files\"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/config.h.in">
<Option virtualFolder="CMake Files\"/>
</Unit>
</Project>
</CodeBlocks_project_file>

Binary file not shown.

38
code.c Normal file
View File

@ -0,0 +1,38 @@
#ifndef CODE
#define CODE
#include "instruktion.c"
unsigned int code1[] = {
(PUSHC << 24) | IMMEDIATE(3),
(PUSHC << 24) | IMMEDIATE(4),
(ADD << 24),
(PUSHC << 24) | IMMEDIATE(10),
(PUSHC << 24) | IMMEDIATE(6),
(SUB << 24),
(MUL << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE(10),
(WRCHR << 24),
(HALT)
};
unsigned int code2[] = {
(PUSHC << 24) | IMMEDIATE(SIGN_EXTEND(-2)),
(RDINT << 24),
(MUL << 24),
(PUSHC << 24) | IMMEDIATE(3),
(ADD << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE('\n'),
(WRCHR << 24),
(HALT << 24)
};
unsigned int code3[] = {
(RDCHR << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE('\n'),
(WRCHR << 24),
(HALT << 24)
};
#endif

37
codeReader.c Normal file
View File

@ -0,0 +1,37 @@
#ifndef CODEREADER
#define CODEREADER
#include "consts.c"
#include <stdio.h>
#include <stdlib.h>
#include "program.c"
unsigned int fromFile(char *path, struct program program) {
unsigned int countInstructions;
unsigned int staticVars;
FILE *fptr;
fptr = fopen(path, "r");
if (fptr == NULL) {
printf("Error: cannot open code file %s", path);
exit(EXIT_FAILURE);
}
unsigned int buffer[4];
fread(buffer, 4, 4, fptr);
// Check file type
if (buffer[0] != 0x46424A4E) {
printf("Error: wrong file type");
exit(EXIT_FAILURE);
}
if (buffer[1] != VERSION) {
printf("Error: wrong version");
exit(EXIT_FAILURE);
}
countInstructions = buffer[2];
staticVars = buffer[3];
unsigned int instBuffer[countInstructions];
fread(instBuffer, 4, countInstructions, fptr);
copyToProgram(instBuffer, countInstructions, program);
return staticVars;
}
#endif /* ifdef CODEREADER */

3
compile_flags.txt Normal file
View File

@ -0,0 +1,3 @@
-Ibigint/build/include
-Lbigint/build/lib
-lbigint

View File

@ -1 +0,0 @@
#define PROJECT_VERSION @PROJECT_VERSION@

7
consts.c Normal file
View File

@ -0,0 +1,7 @@
#ifndef CONSTS
#define CONSTS
#define VERSION 8
#endif /* ifndef CONSTS
#define CONSTS
#define VERSION 2; */

55
debugMenu.c Normal file
View File

@ -0,0 +1,55 @@
#ifndef DEBUGMENU
#define DEBUGMENU
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stack.c"
#include "stack.c"
void inspect(struct stack s, int fp){
//todo Does not work dont know why
char input[20];
char ref[20];
char refStr[20];
printf("DEBUG [inspect]: stack, datam object?");
fgets(input,20,stdin);
if (input[0] == 's') printStack(s, fp);
if (input[0] == 'd'){/* todo */ }
if (input[0] == 'o'){
scanf("%19s",ref);
ObjRefContainer container;
for (int i = 0; i<= container.size; i++) {
sprintf(refStr, "%p", (void *)&container.refs[i]);
if(strcmp(ref, refStr) == 0) printf("Adress exists\n");
else printf("Adress doeas not exist\n");
printf("%s",refStr);
}
}
}
void list(void){
//todo
}
void breakpoint(int *bp){
printf("BREAKPOINT: ");
char input[20];
fgets(input,20,stdin);
*bp = atoi(input);
}
void debugMenu(int fp, struct stack stack, int* debug, int point, int* bp){
char input[20];
while (true) {
printf("DEBUG(%i): inspect, list, breakpoint, run, step, quit?",point);
fgets(input, 20, stdin);
printf("%s",input);
if(input[0] == 'i') {inspect(stack,fp);}
if(input[0] == 'l') list();
if(input[0] == 'b') breakpoint(bp);
if(input[0] == 's') break;
if(input[0] == 'r') {*debug = 0; break;};
if(input[0] == 'q') exit(0);
strcpy(input, "");
}
}
#endif /* ifndef DEBUGMENU */

8301
factor.asm Normal file

File diff suppressed because it is too large Load Diff

BIN
factor.bin Normal file

Binary file not shown.

794
factor.nj Normal file
View File

@ -0,0 +1,794 @@
//
// factor.nj -- factorize the numbers 10^n+1, n = 1..30
//
//--------------------------------------------------------------
// handle list of factors
type List = record {
Integer value;
List next;
};
List addToList(Integer value, List next) {
local List newList;
newList = new(List);
newList.value = value;
newList.next = next;
return newList;
}
List sortList(List list) {
local List result;
local List element;
local List p;
result = nil;
while (list != nil) {
element = list;
list = list.next;
if (result == nil || element.value < result.value) {
element.next = result;
result = element;
} else {
p = result;
while (p.next != nil && element.value >= p.next.value) {
p = p.next;
}
element.next = p.next;
p.next = element;
}
}
return result;
}
void showList(List list) {
if (list == nil) {
writeString("1");
} else {
while (true) {
writeInteger(list.value);
list = list.next;
if (list == nil) {
break;
}
writeString(" * ");
}
}
writeString("\n");
}
Integer evalList(List list) {
local Integer result;
result = 1;
while (list != nil) {
result = result * list.value;
list = list.next;
}
return result;
}
List fuseLists(List list1, List list2) {
local List element;
while (list1 != nil) {
element = list1;
list1 = list1.next;
element.next = list2;
list2 = element;
}
return list2;
}
//--------------------------------------------------------------
// compute 10^n+1
Integer computeTarget(Integer n) {
local Integer x;
local Integer i;
x = 1;
i = 0;
while (i < n) {
x = x * 10;
i = i + 1;
}
x = x + 1;
return x;
}
void testComputeTarget() {
writeString("computeTarget()\n");
writeString("---------------\n");
writeString("target(1) = ");
writeInteger(computeTarget(1));
writeString("\n");
writeString("target(2) = ");
writeInteger(computeTarget(2));
writeString("\n");
writeString("target(3) = ");
writeInteger(computeTarget(3));
writeString("\n");
writeString("target(4) = ");
writeInteger(computeTarget(4));
writeString("\n");
writeString("\n");
}
//--------------------------------------------------------------
// build a table of small primes
global Integer smallPrimesLimit;
global Integer[] primes;
global Integer numPrimes;
void showSmallPrimes() {
local Integer i;
local Integer k;
i = 0;
k = 0;
while (i < numPrimes) {
writeInteger(primes[i]);
writeString(" ");
k = k + 1;
if (k == 8) {
k = 0;
writeString("\n");
}
i = i + 1;
}
if (k != 0) {
writeString("\n");
}
}
void enterSmallPrime(Integer p) {
local Integer n;
local Integer[] a;
local Integer i;
if (sizeof(primes) == numPrimes) {
n = 2 * numPrimes;
a = new(Integer[n]);
i = 0;
while (i < numPrimes) {
a[i] = primes[i];
i = i + 1;
}
primes = a;
}
primes[numPrimes] = p;
numPrimes = numPrimes + 1;
}
Boolean isPrime(Integer n) {
local Integer t;
t = 3;
while (t * t <= n) {
if (n % t == 0) {
return false;
}
t = t + 2;
}
return true;
}
void calcSmallPrimes(Integer limit) {
local Integer i;
smallPrimesLimit = limit;
primes = new(Integer[256]);
numPrimes = 0;
enterSmallPrime(2);
enterSmallPrime(3);
i = 5;
while (true) {
if (i > smallPrimesLimit) {
break;
}
if (isPrime(i)) {
enterSmallPrime(i);
}
i = i + 2;
if (i > smallPrimesLimit) {
break;
}
if (isPrime(i)) {
enterSmallPrime(i);
}
i = i + 4;
}
}
void testCalcSmallPrimes() {
writeString("calcSmallPrimes()\n");
writeString("-----------------\n");
writeString("primes less than or equal to 100:\n");
calcSmallPrimes(100);
showSmallPrimes();
writeString("number of primes less than or equal to 100: ");
writeInteger(numPrimes);
writeString("\n");
calcSmallPrimes(1000);
writeString("number of primes less than or equal to 1000: ");
writeInteger(numPrimes);
writeString("\n");
calcSmallPrimes(10000);
writeString("number of primes less than or equal to 10000: ");
writeInteger(numPrimes);
writeString("\n");
calcSmallPrimes(100000);
writeString("number of primes less than or equal to 100000: ");
writeInteger(numPrimes);
writeString("\n");
writeString("\n");
}
//--------------------------------------------------------------
// try to find a small prime factor of a given number
Integer smallPrimeFactor(Integer n) {
local Integer i;
i = 0;
while (i < numPrimes) {
if (n % primes[i] == 0) {
// prime factor found
return primes[i];
}
i = i + 1;
}
// no prime factor less than or equal to smallPrimesLimit found
return 0;
}
void testSmallPrimeFactor() {
calcSmallPrimes(10000);
writeString("smallPrimeFactor()\n");
writeString("------------------\n");
writeString("small prime factor of 2: ");
writeInteger(smallPrimeFactor(2));
writeString("\n");
writeString("small prime factor of 222: ");
writeInteger(smallPrimeFactor(222));
writeString("\n");
writeString("small prime factor of 17*19*23: ");
writeInteger(smallPrimeFactor(17*19*23));
writeString("\n");
writeString("small prime factor of 7919: ");
writeInteger(smallPrimeFactor(7919));
writeString("\n");
writeString("small prime factor of 987654323: ");
writeInteger(smallPrimeFactor(987654323));
writeString("\n");
writeString("\n");
}
//--------------------------------------------------------------
// compute b^n mod m
Integer powerMod(Integer b, Integer n, Integer m) {
local Integer a;
a = 1;
while (n != 0) {
if (n % 2 == 0) {
b = (b * b) % m;
n = n / 2;
} else {
a = (a * b) % m;
n = n - 1;
}
}
return a;
}
void testPowerMod() {
writeString("powerMod()\n");
writeString("----------\n");
writeString("2^16 mod 7: ");
writeInteger(powerMod(2, 16, 7));
writeString("\n");
writeString("3^10 mod 19: ");
writeInteger(powerMod(3, 10, 19));
writeString("\n");
writeString("123^987654323 mod 987654323: ");
writeInteger(powerMod(123, 987654323, 987654323));
writeString("\n");
writeString("\n");
}
//--------------------------------------------------------------
// compute greatest common divisor
Integer GCD(Integer a, Integer b) {
local Integer r;
if (a < 0) {
a = -a;
}
if (b < 0) {
b = -b;
}
while (b != 0) {
r = a % b;
a = b;
b = r;
}
return a;
}
void testGCD() {
writeString("GCD()\n");
writeString("-----\n");
writeString("GCD(3*5*5*11*37, 2*2*5*37*53) = ");
writeInteger(GCD(3*5*5*11*37, 2*2*5*37*53));
writeString("\n");
writeString("\n");
}
//--------------------------------------------------------------
// Rabin-Miller test
Boolean isComposite(Integer n) {
local Integer q;
local Integer t;
local Integer i;
local Integer a;
local Integer e;
local Integer b;
q = n - 1;
t = 0;
while (q % 2 == 0) {
q = q / 2;
t = t + 1;
}
i = 0;
while (i < 20) {
a = primes[i];
if (a >= n) {
break;
}
e = 0;
b = powerMod(a, q, n);
if (b != 1) {
while (b != 1 && b != n - 1 && e <= t - 2) {
b = (b * b) % n;
e = e + 1;
}
if (b != n - 1) {
return true;
}
}
i = i + 1;
}
return false;
}
void testIsComposite() {
local Integer n;
local Integer k;
writeString("isComposite()\n");
writeString("-------------\n");
writeString("odd numbers in [3..99] which are probably prime:\n");
n = 3;
k = 0;
while (n < 100) {
if (!isComposite(n)) {
writeInteger(n);
writeString(" ");
k = k + 1;
if (k == 8) {
k = 0;
writeString("\n");
}
}
n = n + 2;
}
if (k != 0) {
writeString("\n");
}
n = 1234567;
while (n < 1234607) {
writeInteger(n);
writeString(" is ");
if (isComposite(n)) {
writeString("definitely composite\n");
} else {
writeString("probably prime\n");
}
n = n + 2;
}
writeString("\n");
}
//--------------------------------------------------------------
Boolean provePrime(Integer n) {
// not implemented yet
return false;
}
void testProvePrime() {
writeString("provePrime()\n");
writeString("------------\n");
writeString("<not implemented yet>\n");
writeString("\n");
}
//--------------------------------------------------------------
// Pollard's rho method
Integer findFactor1(Integer n) {
local Integer y;
local Integer x;
local Integer x1;
local Integer k;
local Integer l;
local Integer p;
local Integer c;
local Integer g;
local Integer r;
y = 2;
x = 2;
x1 = 2;
k = 1;
l = 1;
p = 1;
c = 0;
while (true) {
x = (x * x + 1) % n;
p = (p * (x1 - x)) % n;
c = c + 1;
if (c == 20) {
g = GCD(p, n);
if (g > 1) {
break;
}
y = x;
c = 0;
}
k = k - 1;
if (k == 0) {
g = GCD(p, n);
if (g > 1) {
break;
}
x1 = x;
k = l;
l = 2 * l;
r = 0;
while (r < k) {
x = (x * x + 1) % n;
r = r + 1;
}
y = x;
c = 0;
}
}
do {
y = (y * y + 1) % n;
g = GCD(x1 - y, n);
} while (g == 1);
if (g < n) {
return g;
} else {
return 0;
}
}
Integer findFactor2(Integer n) {
local Integer y;
local Integer x;
local Integer x1;
local Integer k;
local Integer l;
local Integer p;
local Integer c;
local Integer g;
local Integer r;
y = 2;
x = 2;
x1 = 2;
k = 1;
l = 1;
p = 1;
c = 0;
while (true) {
x = (x * x - 1) % n;
p = (p * (x1 - x)) % n;
c = c + 1;
if (c == 20) {
g = GCD(p, n);
if (g > 1) {
break;
}
y = x;
c = 0;
}
k = k - 1;
if (k == 0) {
g = GCD(p, n);
if (g > 1) {
break;
}
x1 = x;
k = l;
l = 2 * l;
r = 0;
while (r < k) {
x = (x * x - 1) % n;
r = r + 1;
}
y = x;
c = 0;
}
}
do {
y = (y * y - 1) % n;
g = GCD(x1 - y, n);
} while (g == 1);
if (g < n) {
return g;
} else {
return 0;
}
}
Integer findFactor3(Integer n) {
local Integer y;
local Integer x;
local Integer x1;
local Integer k;
local Integer l;
local Integer p;
local Integer c;
local Integer g;
local Integer r;
y = 2;
x = 2;
x1 = 2;
k = 1;
l = 1;
p = 1;
c = 0;
while (true) {
x = (x * x + 3) % n;
p = (p * (x1 - x)) % n;
c = c + 1;
if (c == 20) {
g = GCD(p, n);
if (g > 1) {
break;
}
y = x;
c = 0;
}
k = k - 1;
if (k == 0) {
g = GCD(p, n);
if (g > 1) {
break;
}
x1 = x;
k = l;
l = 2 * l;
r = 0;
while (r < k) {
x = (x * x + 3) % n;
r = r + 1;
}
y = x;
c = 0;
}
}
do {
y = (y * y + 3) % n;
g = GCD(x1 - y, n);
} while (g == 1);
if (g < n) {
return g;
} else {
return 0;
}
}
Integer findFactor(Integer n) {
local Integer r;
r = findFactor1(n);
if (r != 0) {
return r;
}
r = findFactor2(n);
if (r != 0) {
return r;
}
r = findFactor3(n);
return r;
}
void testFindFactor() {
writeString("findFactor()\n");
writeString("------------\n");
writeString("5*5*5 = ");
writeInteger(5*5*5);
writeString(" is a multiple of ");
writeInteger(findFactor(5*5*5));
writeString("\n");
writeString("4421*5743*7699 = ");
writeInteger(4421*5743*7699);
writeString(" is a multiple of ");
writeInteger(findFactor(4421*5743*7699));
writeString("\n");
writeInteger(9999000099990001);
writeString(" is a multiple of ");
writeInteger(findFactor(9999000099990001));
writeString("\n");
writeString("\n");
}
//--------------------------------------------------------------
List factorize(Integer x, Boolean verbose) {
local List factors;
local Integer f;
local Integer f1;
local Integer f2;
local List moreFactors;
if (verbose) {
writeString("factorize(");
writeInteger(x);
writeString(")\n");
}
factors = nil;
while (x > 1) {
f = smallPrimeFactor(x);
if (f == 0) {
// no small prime factor found
if (x < smallPrimesLimit * smallPrimesLimit) {
// we know that x is prime
f = x;
} else {
// we don't know anything
break;
}
}
if (verbose) {
writeString("detected small prime factor ");
writeInteger(f);
writeString("\n");
}
factors = addToList(f, factors);
x = x / f;
}
if (x == 1) {
// x has been completely factorized
if (verbose) {
writeString("the number has been completely factorized\n");
}
return factors;
}
if (verbose) {
writeString("interim result:\n the remaining factor ");
writeInteger(x);
writeString("\n doesn't have any prime factors < ");
writeInteger(smallPrimesLimit);
writeString("\n ");
}
if (isComposite(x)) {
// x is definitely composite
if (verbose) {
writeString("but is definitely composite\n");
}
f1 = findFactor(x);
if (f1 == 0) {
// cannot factorize x, give up
writeString("cannot factorize ");
writeInteger(x);
writeString(", giving up\n");
factors = addToList(x, factors);
} else {
// x = f1 * f2
f2 = x / f1;
if (verbose) {
writeString("this number can be split into ");
writeInteger(f1);
writeString(" and ");
writeInteger(f2);
writeString("\n");
}
moreFactors = factorize(f1, verbose);
factors = fuseLists(moreFactors, factors);
moreFactors = factorize(f2, verbose);
factors = fuseLists(moreFactors, factors);
}
} else {
// x is very probably prime
if (verbose) {
writeString("and is very probably prime\n");
}
if (provePrime(x)) {
if (verbose) {
writeString("the primality of ");
writeInteger(x);
writeString(" has been proven\n");
}
} else {
writeString("cannot prove the primality of ");
writeInteger(x);
writeString(", giving up\n");
}
factors = addToList(x, factors);
}
return factors;
}
void testFactorize(Boolean verbose) {
local List factors;
writeString("factorize()\n");
writeString("-----------\n");
calcSmallPrimes(7);
showSmallPrimes();
writeString("3*5*7*7*141*49 = \n");
factors = factorize(3*5*7*7*141*49, verbose);
showList(sortList(factors));
writeString("\n");
}
//--------------------------------------------------------------
void showBar() {
writeString("---------------------------------");
writeString("-------------------------------\n");
}
void run(Boolean verbose) {
local Integer i;
local Integer x;
local List factors;
local Integer y;
calcSmallPrimes(10000);
showBar();
i = 1;
while (i <= 30) {
writeString("10^");
writeInteger(i);
writeString("+1 = ");
x = computeTarget(i);
writeInteger(x);
writeString(" = \n");
factors = factorize(x, verbose);
factors = sortList(factors);
showList(factors);
writeString("check: product = ");
y = evalList(factors);
writeInteger(y);
writeString("\n");
showBar();
i = i+ 1;
}
}
//--------------------------------------------------------------
void tests(Boolean verbose) {
writeString("\nTests\n");
writeString("=====\n\n");
testComputeTarget();
testCalcSmallPrimes();
testSmallPrimeFactor();
testPowerMod();
testGCD();
testIsComposite();
testProvePrime();
testFindFactor();
testFactorize(verbose);
}
//--------------------------------------------------------------
void main() {
//tests(true);
run(true);
}

33
heap.c Normal file
View File

@ -0,0 +1,33 @@
//
// Created by Elias Bennour on 28.01.24.
//
#ifndef HEAP
#define HEAP
#include <stdlib.h>
#include <stdio.h>
int maxHeapSize = 8192 * 1024;
void* my_malloc(size_t size) {
static size_t total_allocated = 0;
if (total_allocated + size > maxHeapSize) {
perror("Memory limit exceeded\n");
exit(1);
}
void* ptr = malloc(size);
if (ptr != NULL) {
total_allocated += size;
}
return ptr;
}
void initHeap(int size) {
maxHeapSize = size;
}
#endif //NINJA_NJVM_H

12
heap.h Normal file
View File

@ -0,0 +1,12 @@
//
// Created by Elias Bennour on 28.01.24.
//
#ifndef NINJA_HEAP_H
#define NINJA_HEAP_H
#include <stdlib.h>
void* my_malloc(size_t size);
#endif //NINJA_HEAP_H

54
instruktion.c Normal file
View File

@ -0,0 +1,54 @@
#ifndef INSREUKTION
#define INSREUKTION
#define IMMEDIATE(x) ((x) & 0x00FFFFFF)
#define MSB (1 << (8 * sizeof(unsigned int) - 1))
#define IS_PRIMITIVE(objRef) (((objRef)->size & MSB) == 0)
#define SIGN_EXTEND(i) ((i) & 0x00800000 ? (i) | 0xFF000000 : (i))
#define GET_ELEMENT_COUNT(objRef) ((objRef)->size & ~MSB)
#define GET_REFS_PTR(objRef) ((ObjRef *) (objRef)-> data)
#define HALT 0
#define PUSHC 1
#define ADD 2
#define SUB 3
#define MUL 4
#define DIV 5
#define MOD 6
#define RDINT 7
#define WRINT 8
#define RDCHR 9
#define WRCHR 10
#define PUSHG 11
#define POPG 12
#define ASF 13
#define RSF 14
#define PUSHL 15
#define POPL 16
#define EQ 17
#define NE 18
#define LT 19
#define LE 20
#define GT 21
#define GE 22
#define JMP 23
#define BRF 24
#define BRT 25
#define CALL 26
#define RET 27
#define DROP 28
#define PUSHR 29
#define POPR 30
#define DUP 31
#define NEW 32
#define GETF 33
#define PUTF 34
#define NEWA 35
#define GETFA 36
#define PUTFA 37
#define GETSZ 38
#define PUSHN 39
#define REFEQ 40
#define REFNE 41
#endif /* ifndef INSREUKTION */

778
matinv.asm Normal file
View File

@ -0,0 +1,778 @@
//
// version
//
.vers 8
//
// execution framework
//
__start:
call _main
call _exit
__stop:
jmp __stop
//
// Integer readInteger()
//
_readInteger:
asf 0
rdint
popr
rsf
ret
//
// void writeInteger(Integer)
//
_writeInteger:
asf 0
pushl -3
wrint
rsf
ret
//
// Character readCharacter()
//
_readCharacter:
asf 0
rdchr
popr
rsf
ret
//
// void writeCharacter(Character)
//
_writeCharacter:
asf 0
pushl -3
wrchr
rsf
ret
//
// Integer char2int(Character)
//
_char2int:
asf 0
pushl -3
popr
rsf
ret
//
// Character int2char(Integer)
//
_int2char:
asf 0
pushl -3
popr
rsf
ret
//
// void exit()
//
_exit:
asf 0
halt
rsf
ret
//
// void writeString(String)
//
_writeString:
asf 1
pushc 0
popl 0
jmp _writeString_L2
_writeString_L1:
pushl -3
pushl 0
getfa
call _writeCharacter
drop 1
pushl 0
pushc 1
add
popl 0
_writeString_L2:
pushl 0
pushl -3
getsz
lt
brt _writeString_L1
rsf
ret
//
// Integer gcd(Integer, Integer)
//
_gcd:
asf 1
jmp __2
__1:
pushl -4
pushl -3
mod
popl 0
pushl -3
popl -4
pushl 0
popl -3
__2:
pushl -3
pushc 0
ne
brt __1
__3:
pushl -4
popr
jmp __0
__0:
rsf
ret
//
// record { Integer num; Integer den; } newFraction(Integer, Integer)
//
_newFraction:
asf 4
pushl -4
pushc 0
lt
brf __5
pushc 0
pushl -4
sub
popl 0
jmp __6
__5:
pushl -4
popl 0
__6:
pushl -3
pushc 0
lt
brf __7
pushc 0
pushl -3
sub
popl 1
jmp __8
__7:
pushl -3
popl 1
__8:
pushl 0
pushl 1
call _gcd
drop 2
pushr
popl 2
new 2
popl 3
pushl -4
pushc 0
lt
pushl -3
pushc 0
lt
ne
brf __9
pushl 3
pushc 0
pushl 0
sub
pushl 2
div
putf 0
jmp __10
__9:
pushl 3
pushl 0
pushl 2
div
putf 0
__10:
pushl 3
pushl 1
pushl 2
div
putf 1
pushl 3
popr
jmp __4
__4:
rsf
ret
//
// void writeFraction(record { Integer num; Integer den; })
//
_writeFraction:
asf 0
pushl -3
getf 0
call _writeInteger
drop 1
pushc 1
newa
dup
pushc 0
pushc 47
putfa
call _writeString
drop 1
pushl -3
getf 1
call _writeInteger
drop 1
__11:
rsf
ret
//
// record { Integer num; Integer den; } negFraction(record { Integer num; Integer den; })
//
_negFraction:
asf 0
pushc 0
pushl -3
getf 0
sub
pushl -3
getf 1
call _newFraction
drop 2
pushr
popr
jmp __12
__12:
rsf
ret
//
// record { Integer num; Integer den; } addFraction(record { Integer num; Integer den; }, record { Integer num; Integer den; })
//
_addFraction:
asf 0
pushl -4
getf 0
pushl -3
getf 1
mul
pushl -3
getf 0
pushl -4
getf 1
mul
add
pushl -4
getf 1
pushl -3
getf 1
mul
call _newFraction
drop 2
pushr
popr
jmp __13
__13:
rsf
ret
//
// record { Integer num; Integer den; } subFraction(record { Integer num; Integer den; }, record { Integer num; Integer den; })
//
_subFraction:
asf 0
pushl -4
getf 0
pushl -3
getf 1
mul
pushl -3
getf 0
pushl -4
getf 1
mul
sub
pushl -4
getf 1
pushl -3
getf 1
mul
call _newFraction
drop 2
pushr
popr
jmp __14
__14:
rsf
ret
//
// record { Integer num; Integer den; } mulFraction(record { Integer num; Integer den; }, record { Integer num; Integer den; })
//
_mulFraction:
asf 0
pushl -4
getf 0
pushl -3
getf 0
mul
pushl -4
getf 1
pushl -3
getf 1
mul
call _newFraction
drop 2
pushr
popr
jmp __15
__15:
rsf
ret
//
// record { Integer num; Integer den; } divFraction(record { Integer num; Integer den; }, record { Integer num; Integer den; })
//
_divFraction:
asf 0
pushl -4
getf 0
pushl -3
getf 1
mul
pushl -4
getf 1
pushl -3
getf 0
mul
call _newFraction
drop 2
pushr
popr
jmp __16
__16:
rsf
ret
//
// Fraction[][] newMatrix(record { Integer num; Integer den; }, record { Integer num; Integer den; }, record { Integer num; Integer den; }, record { Integer num; Integer den; })
//
_newMatrix:
asf 1
pushc 2
newa
popl 0
pushl 0
pushc 0
pushc 2
newa
putfa
pushl 0
pushc 1
pushc 2
newa
putfa
pushl 0
pushc 0
getfa
pushc 0
pushl -6
putfa
pushl 0
pushc 0
getfa
pushc 1
pushl -5
putfa
pushl 0
pushc 1
getfa
pushc 0
pushl -4
putfa
pushl 0
pushc 1
getfa
pushc 1
pushl -3
putfa
pushl 0
popr
jmp __17
__17:
rsf
ret
//
// void writeMatrix(Fraction[][])
//
_writeMatrix:
asf 2
pushc 0
popl 0
jmp __20
__19:
pushc 0
popl 1
jmp __23
__22:
pushl -3
pushl 0
getfa
pushl 1
getfa
call _writeFraction
drop 1
pushc 2
newa
dup
pushc 0
pushc 32
putfa
dup
pushc 1
pushc 32
putfa
call _writeString
drop 1
pushl 1
pushc 1
add
popl 1
__23:
pushl 1
pushl -3
pushl 0
getfa
getsz
lt
brt __22
__24:
pushc 1
newa
dup
pushc 0
pushc 10
putfa
call _writeString
drop 1
pushl 0
pushc 1
add
popl 0
__20:
pushl 0
pushl -3
getsz
lt
brt __19
__21:
pushc 1
newa
dup
pushc 0
pushc 10
putfa
call _writeString
drop 1
__18:
rsf
ret
//
// Fraction[][] invertMatrix(Fraction[][])
//
_invertMatrix:
asf 1
pushl -3
pushc 0
getfa
pushc 0
getfa
pushl -3
pushc 1
getfa
pushc 1
getfa
call _mulFraction
drop 2
pushr
pushl -3
pushc 0
getfa
pushc 1
getfa
pushl -3
pushc 1
getfa
pushc 0
getfa
call _mulFraction
drop 2
pushr
call _subFraction
drop 2
pushr
popl 0
pushl 0
getf 0
pushc 0
eq
brf __26
pushc 33
newa
dup
pushc 0
pushc 101
putfa
dup
pushc 1
pushc 114
putfa
dup
pushc 2
pushc 114
putfa
dup
pushc 3
pushc 111
putfa
dup
pushc 4
pushc 114
putfa
dup
pushc 5
pushc 58
putfa
dup
pushc 6
pushc 32
putfa
dup
pushc 7
pushc 109
putfa
dup
pushc 8
pushc 97
putfa
dup
pushc 9
pushc 116
putfa
dup
pushc 10
pushc 114
putfa
dup
pushc 11
pushc 105
putfa
dup
pushc 12
pushc 120
putfa
dup
pushc 13
pushc 32
putfa
dup
pushc 14
pushc 99
putfa
dup
pushc 15
pushc 97
putfa
dup
pushc 16
pushc 110
putfa
dup
pushc 17
pushc 110
putfa
dup
pushc 18
pushc 111
putfa
dup
pushc 19
pushc 116
putfa
dup
pushc 20
pushc 32
putfa
dup
pushc 21
pushc 98
putfa
dup
pushc 22
pushc 101
putfa
dup
pushc 23
pushc 32
putfa
dup
pushc 24
pushc 105
putfa
dup
pushc 25
pushc 110
putfa
dup
pushc 26
pushc 118
putfa
dup
pushc 27
pushc 101
putfa
dup
pushc 28
pushc 114
putfa
dup
pushc 29
pushc 116
putfa
dup
pushc 30
pushc 101
putfa
dup
pushc 31
pushc 100
putfa
dup
pushc 32
pushc 10
putfa
call _writeString
drop 1
call _exit
__26:
pushl -3
pushc 1
getfa
pushc 1
getfa
pushl 0
call _divFraction
drop 2
pushr
pushl -3
pushc 0
getfa
pushc 1
getfa
call _negFraction
drop 1
pushr
pushl 0
call _divFraction
drop 2
pushr
pushl -3
pushc 1
getfa
pushc 0
getfa
call _negFraction
drop 1
pushr
pushl 0
call _divFraction
drop 2
pushr
pushl -3
pushc 0
getfa
pushc 0
getfa
pushl 0
call _divFraction
drop 2
pushr
call _newMatrix
drop 4
pushr
popr
jmp __25
__25:
rsf
ret
//
// void main()
//
_main:
asf 3
pushc 1
newa
dup
pushc 0
pushc 10
putfa
call _writeString
drop 1
pushc 7
pushc 1
call _newFraction
drop 2
pushr
pushc 4
pushc 1
call _newFraction
drop 2
pushr
pushc 6
pushc 1
call _newFraction
drop 2
pushr
pushc 5
pushc 1
call _newFraction
drop 2
pushr
call _newMatrix
drop 4
pushr
popl 0
pushl 0
call _writeMatrix
drop 1
pushl 0
call _invertMatrix
drop 1
pushr
popl 1
pushl 1
call _writeMatrix
drop 1
pushl 1
call _invertMatrix
drop 1
pushr
popl 2
pushl 2
call _writeMatrix
drop 1
__27:
rsf
ret

BIN
matinv.bin Normal file

Binary file not shown.

146
matinv.nj Normal file
View File

@ -0,0 +1,146 @@
//
// matinv.nj -- invert 2x2 matrices of fractions
//
//--------------------------------------------------------------
// greatest common divisor
Integer gcd(Integer a, Integer b) {
local Integer h;
while (b != 0) {
h = a % b;
a = b;
b = h;
}
return a;
}
//--------------------------------------------------------------
// fractions
type Fraction = record {
Integer num;
Integer den;
};
Fraction newFraction(Integer num, Integer den) {
local Integer n;
local Integer d;
local Integer g;
local Fraction r;
if (num < 0) {
n = -num;
} else {
n = num;
}
if (den < 0) {
d = -den;
} else {
d = den;
}
g = gcd(n, d);
r = new(Fraction);
if ((num < 0) != (den < 0)) {
r.num = -n / g;
} else {
r.num = n / g;
}
r.den = d / g;
return r;
}
void writeFraction(Fraction f) {
writeInteger(f.num);
writeString("/");
writeInteger(f.den);
}
Fraction negFraction(Fraction f) {
return newFraction(-f.num, f.den);
}
Fraction addFraction(Fraction f1, Fraction f2) {
return newFraction(f1.num * f2.den + f2.num * f1.den, f1.den * f2.den);
}
Fraction subFraction(Fraction f1, Fraction f2) {
return newFraction(f1.num * f2.den - f2.num * f1.den, f1.den * f2.den);
}
Fraction mulFraction(Fraction f1, Fraction f2) {
return newFraction(f1.num * f2.num, f1.den * f2.den);
}
Fraction divFraction(Fraction f1, Fraction f2) {
return newFraction(f1.num * f2.den, f1.den * f2.num);
}
//--------------------------------------------------------------
// 2x2 matrices of fractions
type Matrix = Fraction[][];
Matrix newMatrix(Fraction a00, Fraction a01,
Fraction a10, Fraction a11) {
local Matrix m;
m = new(Fraction[2][]);
m[0] = new(Fraction[2]);
m[1] = new(Fraction[2]);
m[0][0] = a00;
m[0][1] = a01;
m[1][0] = a10;
m[1][1] = a11;
return m;
}
void writeMatrix(Matrix m) {
local Integer i;
local Integer j;
i = 0;
while (i < sizeof(m)) {
j = 0;
while (j < sizeof(m[i])) {
writeFraction(m[i][j]);
writeString(" ");
j = j + 1;
}
writeString("\n");
i = i + 1;
}
writeString("\n");
}
Matrix invertMatrix(Matrix m) {
local Fraction det;
det = subFraction(mulFraction(m[0][0], m[1][1]),
mulFraction(m[0][1], m[1][0]));
if (det.num == 0) {
writeString("error: matrix cannot be inverted\n");
exit();
}
return newMatrix(
divFraction(m[1][1], det), divFraction(negFraction(m[0][1]), det),
divFraction(negFraction(m[1][0]), det), divFraction(m[0][0], det)
);
}
//--------------------------------------------------------------
void main() {
local Matrix matrix;
local Matrix result1;
local Matrix result2;
writeString("\n");
matrix = newMatrix(
newFraction(7, 1), newFraction(4, 1),
newFraction(6, 1), newFraction(5, 1)
);
writeMatrix(matrix);
result1 = invertMatrix(matrix);
writeMatrix(result1);
result2 = invertMatrix(result1);
writeMatrix(result2);
}

BIN
nja/nja2 Executable file

Binary file not shown.

BIN
nja/nja3 Executable file

Binary file not shown.

BIN
nja/nja4 Executable file

Binary file not shown.

BIN
nja/nja5 Executable file

Binary file not shown.

BIN
nja/nja6 Executable file

Binary file not shown.

BIN
nja/nja7 Executable file

Binary file not shown.

BIN
nja/nja8 Executable file

Binary file not shown.

BIN
nja/nja8l Executable file

Binary file not shown.

BIN
nja/nja?inline=false Normal file

Binary file not shown.

14
njc/njc4 Executable file
View File

@ -0,0 +1,14 @@
--2024-01-14 15:07:13-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a4/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137095 (134K) [application/octet-stream]
Saving to: njc?inline=false
0K .......... .......... .......... .......... .......... 37% 1.23M 0s
50K .......... .......... .......... .......... .......... 74% 2.63M 0s
100K .......... .......... .......... ... 100% 9.98M=0.06s
2024-01-14 15:07:14 (2.13 MB/s) - njc?inline=false saved [137095/137095]

14
njc/njc5 Executable file
View File

@ -0,0 +1,14 @@
--2024-01-14 15:07:20-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a5/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137095 (134K) [application/octet-stream]
Saving to: njc?inline=false.1
0K .......... .......... .......... .......... .......... 37% 1.21M 0s
50K .......... .......... .......... .......... .......... 74% 2.51M 0s
100K .......... .......... .......... ... 100% 11.2M=0.06s
2024-01-14 15:07:21 (2.08 MB/s) - njc?inline=false.1 saved [137095/137095]

Some files were not shown because too many files have changed in this diff Show More