Initial import of project archive (1BIT-3BIT)

This commit is contained in:
Roman Necas 2026-04-14 19:28:46 +02:00
commit 85ec0e7501
485 changed files with 73909 additions and 0 deletions

9
.gitignore vendored Normal file
View file

@ -0,0 +1,9 @@
# Large binary — kept only locally / in OneDrive
2BIT/winter-semester/ITU/03_xnecasr00_video.mp4
# OS / editor noise
Thumbs.db
desktop.ini
.DS_Store
*.tmp
*~

View file

@ -0,0 +1,52 @@
# Makefile
# Řešení IJC-DU1, 22.3.2024
# Autor: Roman Nečas, FIT
# Compiler and Flags
CC=gcc
CFLAGS += -g -std=c11 -pedantic -Wall -Wextra -fsanitize=address -O2
LDFLAGS += -fsanitize=address
# Executables
EXECUTABLES = primes primes-i no-comment
# Default Target
.PHONY: all
all: $(EXECUTABLES)
# Rules for Targets
primes: primes.o error.o eratosthenes.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
primes-i: primes-i.o error.o eratosthenes-i.o bitset.o
$(CC) $(CFLAGS) $(LDFLAGS) -DUSE_INLINE $^ -o $@
no-comment: no-comment.o error.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
# Rules for Object Files
primes.o: primes.c primes.h bitset.h
primes-i.o: primes.c
$(CC) $(CFLAGS) -DUSE_INLINE -c $^ -o $@
eratosthenes.o: eratosthenes.c primes.h bitset.h
eratosthenes-i.o: eratosthenes.c primes.h
$(CC) $(CFLAGS) -DUSE_INLINE -c $< -o $@
bitset.o: bitset.c bitset.h
$(CC) $(CFLAGS) -DUSE_INLINE -c $< -o $@
error.o: error.c error.h
no-comment.o: no-comment.c error.h
# Clean
.PHONY: clean
clean:
rm $(EXECUTABLES) *.o
# Run
.PHONY: run
run: primes primes-i
ulimit -s 81920 && ./primes
ulimit -s 81920 && ./primes-i

View file

@ -0,0 +1,17 @@
// bitset.c
// Řešení IJC-DU1, příklad a), 22.3.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 13.2.1
//
#include "bitset.h"
/* Sets the specified bit in the array to the value given by the expression */
extern void bitset_setbit(bitset_t name, bitset_index_t index, bool expr);
extern void bitset_fill(bitset_t name, bool bool_expr);
/* Gets the value of the specified bit, returns 0 or 1 */
extern char bitset_getbit(bitset_t name, bitset_index_t index);
/* Returns the declared size of the array stored at index 0 */
extern unsigned long bitset_size(bitset_t name);

View file

@ -0,0 +1,106 @@
// bitset.h
// Řešení IJC-DU1, příklad a), 22.3.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 13.2.1
#ifndef BITSET_H
#define BITSET_H
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include "error.h"
#include <stdbool.h>
#define WORD_BITS (sizeof(unsigned long) * CHAR_BIT) // Number of bits in an unsigned long
#define WORD_BYTES sizeof(unsigned long) // Number of bytes in an unsigned long
#define HEADER_WORD 1 // First element is reserved for size
/* Index type for the bit set. */
typedef unsigned long bitset_index_t;
/* Bit set type (for passing as a parameter by reference). */
typedef unsigned long *bitset_t;
/* MACROS that are used always */
/* defines and initializes the variable name */
#define bitset_create(name, size) \
static_assert(size > 0 && size < ULONG_MAX, "ERROR: bitset_create: Invalid array size."); \
bitset_index_t name[(size)/WORD_BITS + HEADER_WORD + (((size) % WORD_BITS) ? 1 : 0)] = {size}
#define bitset_alloc(name, size) \
static_assert(size > 0 && size < ULONG_MAX, "ERROR: bitset_create: Invalid array size."); \
bitset_t name = calloc((size)/WORD_BITS + HEADER_WORD + (((size) % WORD_BITS) ? 1 : 0), sizeof(bitset_index_t)); \
if (name == NULL) error_exit("bitset_alloc: Memory allocation error"); \
name[0] = size
/* Frees the memory of a dynamically allocated array. */
#define bitset_free(name) free(name)
#ifdef USE_INLINE
/* INLINE FUNCTIONS */
/* Returns the declared size of the array stored at index 0 */
inline bitset_index_t bitset_size(bitset_t name)
{
return name[0];
}
/* Sets all bits in the array to 0 (false) or 1 (true) */
inline void bitset_fill(bitset_t name, bool bool_expr)
{
unsigned long i;
for (i = HEADER_WORD; i < ((bitset_size(name) / WORD_BITS) + HEADER_WORD + (((bitset_size(name)) % WORD_BITS) ? 1 : 0)); i++)
{
name[i] = (bool_expr) ? ~0UL : 0UL;
}
}
/* Sets the specified bit in the array to the value given by the expression */
inline void bitset_setbit(bitset_t name, bitset_index_t index, bool bool_expr)
{
if (index >= bitset_size(name))
error_exit("bitset_setbit: Index %lu out of range 0..%lu", (unsigned long)index, (unsigned long)bitset_size(name));
name[(index/WORD_BITS) + HEADER_WORD] = (bool_expr) ? (name[(index/WORD_BITS) + HEADER_WORD] | (1UL << (index & (WORD_BITS - 1))))
: (name[(index/WORD_BITS) + HEADER_WORD] & ~(1UL << (index & (WORD_BITS - 1))));
}
/* Gets the value of the specified bit, returns 0 or 1 */
inline char bitset_getbit(bitset_t name, bitset_index_t index)
{
if (index >= bitset_size(name))
error_exit("bitset_getbit: Index %lu out of range 0..%lu", (unsigned long)index, (unsigned long)bitset_size(name));
return name[(index/WORD_BITS + HEADER_WORD)] >> (index & (WORD_BITS - 1)) & 1UL;
}
#else
/* MACROS */
/* Sets all bits in the array to 0 (false) or 1 (true) */
#define bitset_fill(name, bool_expr) do \
{ \
unsigned long i; \
for (i = HEADER_WORD; i < ((bitset_size(name) / WORD_BITS) + HEADER_WORD + (((bitset_size(name)) % WORD_BITS) ? 1 : 0)); i++) \
{ \
name[i] = (bool_expr) ? ~0UL : 0UL; \
} \
} while (0)
/* Sets the specified bit in the array to the value given by the expression */
#define bitset_setbit(name, index, bool_expr) do \
{ \
if ((index) >= bitset_size(name)) error_exit("bitset_setbit: Index %lu out of range 0..%lu", \
(unsigned long)index, (unsigned long)bitset_size(name)); \
name[((index)/WORD_BITS) + HEADER_WORD] = (bool_expr) ? (name[((index)/WORD_BITS) + HEADER_WORD] | (1UL << ((index) & (WORD_BITS - 1)))) \
: (name[((index)/WORD_BITS) + HEADER_WORD] & ~(1UL << ((index) & (WORD_BITS - 1)))); \
} while (0)
/* Gets the value of the specified bit, returns 0 or 1 */
#define bitset_getbit(name, index) \
(((index) >= bitset_size(name)) ? (error_exit("bitset_getbit: Index %lu out of range 0..%lu", (unsigned long)index, (unsigned long)bitset_size(name)), 0) \
: ((name[((index)/WORD_BITS + HEADER_WORD)] >> ((index) & (WORD_BITS - 1))) & 1UL))
/* Returns the declared size of the array stored at index 0 */
#define bitset_size(name) name[0]
#endif
#endif

View file

@ -0,0 +1,21 @@
// bitset.h
// Řešení IJC-DU1, příklad a), 22.3.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 13.2.1
#include "primes.h"
void Eratosthenes(bitset_t pole) {
bitset_index_t size = bitset_size(pole);
bitset_fill(pole, true); // Assume all numbers are prime initially
bitset_setbit(pole, 0, false); // 0 is not prime
bitset_setbit(pole, 1, false); // 1 is not prime
for (bitset_index_t i = 2; i * i < size; i++) {
if (bitset_getbit(pole, i)) {
for (bitset_index_t j = i * i; j < size; j += i) {
bitset_setbit(pole, j, false); // Mark multiples of i as not prime
}
}
}
}

View file

@ -0,0 +1,28 @@
// error.c
// Řešení IJC-DU1, příklad a), 22.3.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 13.2.1
#include "error.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
void warning(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
fprintf(stderr, "Warning: ");
vfprintf(stderr, fmt, args);
va_end(args);
}
void error_exit(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
fprintf(stderr, "Error: ");
vfprintf(stderr, fmt, args);
va_end(args);
exit(1);
}

View file

@ -0,0 +1,12 @@
// error.h
// Řešení IJC-DU1, příklad a), 22.3.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 13.2.1
#ifndef ERROR_H
#define ERROR_H
void warning(const char *fmt, ...);
void error_exit(const char *fmt, ...);
#endif

View file

@ -0,0 +1,163 @@
// no-comment.c
// Řešení IJC-DU1, příklad b), 22.3.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 13.2.1
#include <stdio.h>
#include "error.h"
int main(int argc, char *argv[])
{
FILE *fp;
int state = 0;
int c;
int lastChar = 0; // To keep track of the last character to handle line continuation in comments
if (argc > 2)
{
error_exit("Too many arguments");
}
if(argc == 2)
{
fp = fopen(argv[1], "r");
if (!fp) {
error_exit("Cannot open file: %s", argv[1]);
}
}
else
{
fp = stdin;
}
while ((c = fgetc(fp)) != EOF)
{
switch (state)
{
case 0: // Normal code
if (c == '/')
{
state = 1; // Possible comment start
}
else if (c == '"')
{
putchar(c);
state = 4; // String literal start
}
else if (c == '\'') // Handle single quotes
{
putchar(c);
state = 7; // Character literal start
}
else
{
putchar(c);
}
break;
case 1: // After first '/'
if (c == '*')
{
state = 2; // Multi-line comment start
}
else if (c == '/')
{
// Transition to single-line comment state but do not output '/'
state = 6; // Single-line comment start
}
else
{
putchar('/'); // Not a comment, print '/' and current char
putchar(c);
state = 0;
}
break;
case 2: // Inside multi-line comment
if (c == '*')
{
state = 3; // Possible end of comment
}
break;
case 3: // Possible end of multi-line comment
if (c == '/')
{
state = 0; // End of comment
}
else if (c != '*')
{
state = 2; // Still inside comment
}
break;
case 4: // Inside string literal
if (c == '\\')
{
putchar(c);
c = fgetc(fp); // Read next character
putchar(c); // Print escaped character
// Do not change state, stay in string literal
}
else if (c == '"')
{
putchar(c); // End of string literal
state = 0;
}
else
{
putchar(c); // Part of string literal
}
break;
case 5: // After escape character in string literal
putchar(c); // Print escaped character
state = 4;
break;
case 6: // Inside single-line comment
if (c == '\n')
{
if (lastChar != '\\') // If not a continuation
{
putchar(c); // Ensure newline is outputted to maintain original structure
state = 0; // End of single-line comment
}
// If it was a continuation, simply ignore and continue in state 6
}
break;
case 7: // Inside character literal
putchar(c);
if (c == '\\')
{
state = 8; // Escape sequence within character literal
}
else if (c == '\'')
{
state = 0; // End of character literal
}
break;
case 8: // After escape character in character literal
putchar(c); // Print escaped character
state = 7; // Return to character literal state
break;
}
lastChar = c; // Update lastChar at the end of the loop
}
if (ferror(fp))
{
error_exit("Read error\n");
}
if (state != 0)
{
error_exit("Unterminated comment or string\n");
}
fclose(fp);
return 0;
}

View file

@ -0,0 +1,36 @@
// primes.c
// Řešení IJC-DU1, příklad a), 22.3.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 13.2.1
#include "primes.h"
#include <stdio.h>
#include <time.h>
#define N 666000000
int main() {
clock_t start = clock();
bitset_create(name, N);
Eratosthenes(name);
// Saves last 10 primes
bitset_index_t primes[10] = {0, };
int count = 0;
for (bitset_index_t i = bitset_size(name)-1; count < 10 && i > 0; i--)
{
if (bitset_getbit(name, i))
{
primes[9 - count++] = i;
}
}
//Writes last 10 primes
for (unsigned int i = 0; i < 10; i++)
{
printf("%lu\n", primes[i]);
}
fprintf(stderr, "Time=%.3g\n", (double)(clock() - start) / CLOCKS_PER_SEC);
return 0;
}

View file

@ -0,0 +1,13 @@
// primes.h
// Řešení IJC-DU1, příklad a), 22.3.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 13.2.1
#ifndef PRIMES_H
#define PRIMES_H
#include "bitset.h"
void Eratosthenes(bitset_t name);
#endif

Binary file not shown.

View file

@ -0,0 +1,56 @@
#Makefile
#Řešení IJC-DU2, 22.4.2024
#Autor: Roman Nečas, FIT
# Nastavenie kompilátora a príznakov
CC=gcc
CFLAGS=-std=c11 -pedantic -Wall -Wextra -g
PIC_CFLAGS=$(CFLAGS) -fPIC
# Zdrojove subory kniznice
HTAB_SRCS=htab_init.c htab_size.c htab_bucket_count.c htab_find.c htab_lookup_add.c htab_erase.c htab_for_each.c htab_clear.c htab_free.c htab_statistics.c htab_hash_function.c
#Ciele
all: tail wordcount wordcount-dynamic libhtab.a libhtab.so
# Pravidla pre programy
tail: tail.o
$(CC) $(CFLAGS) $< -o $@
wordcount: wordcount.o io.o libhtab.a
$(CC) $(CFLAGS) $^ -o $@
wordcount-dynamic: wordcount.o io.o libhtab.so
$(CC) $(CFLAGS) $^ -o $@
# Zavislosti pre objektove subory
%.o: %.c htab.h htab_struct.h
$(CC) $(PIC_CFLAGS) -c $<
io.o: io.c
$(CC) $(CFLAGS) -c $<
# Pravidla pre staticku a dynamicku kniznicu
libhtab.a: $(HTAB_SRCS:.c=.o)
ar rcs $@ $^
libhtab.so: $(HTAB_SRCS:.c=.o)
$(CC) $(CFLAGS) -shared -o $@ $^
# Pravidla pre spustenie programov
run: run-tail run-wordcount run-wordcount-dynamic
run-wordcount: wordcount
./wordcount < wordcount.c
run-wordcount-dynamic: wordcount-dynamic
LD_LIBRARY_PATH="." ./wordcount-dynamic < wordcount.c
run-tail: tail
./tail < wordcount.c
# Cistenie
clean:
rm -f *.o *.a *.so tail wordcount wordcount-dynamic
.PHONY: all clean run run-wordcount run-wordcount-dynamic run-tail

View file

@ -0,0 +1,49 @@
// htab.h -- rozhraní knihovny htab (řešení IJC-DU2)
// Licence: žádná (Public domain)
// následující řádky zabrání násobnému vložení:
#ifndef HTAB_H__
#define HTAB_H__
#include <string.h> // size_t
#include <stdbool.h> // bool
// Tabulka:
struct htab; // neúplná deklarace struktury - uživatel nevidí obsah
typedef struct htab htab_t; // typedef podle zadání
// Typy:
typedef const char * htab_key_t; // typ klíče
typedef int htab_value_t; // typ hodnoty
// Dvojice dat v tabulce:
typedef struct htab_pair {
htab_key_t key; // klíč
htab_value_t value; // asociovaná hodnota
} htab_pair_t; // typedef podle zadání
// Rozptylovací (hash) funkce (stejná pro všechny tabulky v programu)
// Pokud si v programu definujete stejnou funkci, použije se ta vaše.
size_t htab_hash_function(htab_key_t str);
// Funkce pro práci s tabulkou:
htab_t *htab_init(const size_t n); // konstruktor tabulky
size_t htab_size(const htab_t * t); // počet záznamů v tabulce
size_t htab_bucket_count(const htab_t * t); // velikost pole
htab_pair_t * htab_find(const htab_t * t, htab_key_t key); // hledání
htab_pair_t * htab_lookup_add(htab_t * t, htab_key_t key);
bool htab_erase(htab_t * t, htab_key_t key); // ruší zadaný záznam
// for_each: projde všechny záznamy a zavolá na ně funkci f
// Pozor: f nesmí měnit klíč .key ani přidávat/rušit položky
void htab_for_each(const htab_t * t, void (*f)(htab_pair_t *data));
void htab_clear(htab_t * t); // ruší všechny záznamy
void htab_free(htab_t * t); // destruktor tabulky
// výpočet a tisk statistik délky seznamů (min,max,avg) do stderr:
void htab_statistics(const htab_t * t);
#endif // HTAB_H__

View file

@ -0,0 +1,11 @@
// htab_bucket_count.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include "htab.h"
#include "htab_struct.h"
size_t htab_bucket_count(const htab_t *t) {
return t->arr_size;
}

View file

@ -0,0 +1,22 @@
// htab_clear.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <stdlib.h>
#include "htab.h"
#include "htab_struct.h"
void htab_clear(htab_t *t) {
for (size_t i = 0; i < t->arr_size; i++) {
struct htab_item *item = t->arr_ptr[i];
while (item != NULL) {
struct htab_item *next = item->next;
free((void *)item->pair.key);
free(item);
item = next;
}
t->arr_ptr[i] = NULL;
}
t->size = 0;
}

View file

@ -0,0 +1,30 @@
// htab_erase.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <stdlib.h>
#include <string.h>
#include "htab.h"
#include "htab_struct.h"
bool htab_erase(htab_t *t, htab_key_t key) {
size_t idx = htab_hash_function(key) % t->arr_size;
struct htab_item *item = t->arr_ptr[idx];
struct htab_item *prev = NULL;
while (item != NULL) {
if (strcmp(item->pair.key, key) == 0) {
if (prev == NULL)
t->arr_ptr[idx] = item->next;
else
prev->next = item->next;
free((void *)item->pair.key);
free(item);
t->size--;
return true;
}
prev = item;
item = item->next;
}
return false;
}

View file

@ -0,0 +1,19 @@
// htab_find.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <string.h>
#include "htab.h"
#include "htab_struct.h"
htab_pair_t *htab_find(const htab_t *t, htab_key_t key) {
size_t idx = htab_hash_function(key) % t->arr_size;
struct htab_item *item = t->arr_ptr[idx];
while (item != NULL) {
if (strcmp(item->pair.key, key) == 0)
return &item->pair;
item = item->next;
}
return NULL;
}

View file

@ -0,0 +1,17 @@
// htab_for_each.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include "htab.h"
#include "htab_struct.h"
void htab_for_each(const htab_t *t, void (*f)(htab_pair_t *data)) {
for (size_t i = 0; i < t->arr_size; i++) {
struct htab_item *item = t->arr_ptr[i];
while (item != NULL) {
f(&item->pair);
item = item->next;
}
}
}

View file

@ -0,0 +1,13 @@
// htab_free.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include "htab.h"
#include "htab_struct.h"
#include <stdlib.h>
void htab_free(htab_t *t) {
htab_clear(t);
free(t);
}

View file

@ -0,0 +1,14 @@
// htab_hash_function.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include "htab.h"
size_t htab_hash_function(htab_key_t str) {
int h = 0;
const unsigned char *p;
for (p = (const unsigned char *)str; *p != '\0'; p++)
h = 65599 * h + *p;
return h;
}

View file

@ -0,0 +1,20 @@
// htab_init
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <stdlib.h>
#include "htab.h"
#include "htab_struct.h"
htab_t *htab_init(const size_t n) {
htab_t *t = malloc(sizeof(htab_t) + n * sizeof(struct htab_item *));
if (t == NULL)
return NULL;
t->size = 0;
t->arr_size = n;
t->arr_ptr = (struct htab_item **)((char *)t + sizeof(htab_t));
for (size_t i = 0; i < n; i++)
t->arr_ptr[i] = NULL;
return t;
}

View file

@ -0,0 +1,44 @@
// htab_lookup_add
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <stdlib.h>
#include <string.h>
#include "htab.h"
#include "htab_struct.h"
htab_pair_t *htab_lookup_add(htab_t *t, htab_key_t key) {
size_t idx = htab_hash_function(key) % t->arr_size;
struct htab_item *item = t->arr_ptr[idx];
struct htab_item *prev = NULL;
while (item != NULL) {
if (strcmp(item->pair.key, key) == 0)
return &item->pair;
prev = item;
item = item->next;
}
// kluc nebol najdeny, musime pridat novy zaznam
char *new_key = malloc(strlen(key) + 1);
if (new_key == NULL)
return NULL;
strcpy(new_key, key);
struct htab_item *new_item = malloc(sizeof(struct htab_item));
if (new_item == NULL) {
free(new_key);
return NULL;
}
new_item->pair.key = new_key;
new_item->pair.value = 0;
new_item->next = NULL;
if (prev == NULL)
t->arr_ptr[idx] = new_item;
else
prev->next = new_item;
t->size++;
return &new_item->pair;
}

View file

@ -0,0 +1,11 @@
// htab_size
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include "htab.h"
#include "htab_struct.h"
size_t htab_size(const htab_t *t) {
return t->size;
}

View file

@ -0,0 +1,25 @@
// htab_statistics
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <stdio.h>
#include "htab.h"
#include "htab_struct.h"
void htab_statistics(const htab_t *t) {
size_t max_len = 0, sum_len = 0;
for (size_t i = 0; i < t->arr_size; i++) {
size_t len = 0;
struct htab_item *item = t->arr_ptr[i];
while (item != NULL) {
len++;
item = item->next;
}
if (len > max_len)
max_len = len;
sum_len += len;
}
double avg_len = (double)sum_len / t->arr_size;
fprintf(stderr, "Statistiky delky seznamu: min=0, max=%zu, avg=%.2f\n", max_len, avg_len);
}

View file

@ -0,0 +1,23 @@
// htab_struct.h
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#ifndef HTAB_STRUCT_H
#define HTAB_STRUCT_H
#include "htab.h"
// Definicia privatnej struktury
struct htab_item{
htab_pair_t pair;
struct htab_item *next;
};
struct htab{
size_t size;
size_t arr_size;
struct htab_item **arr_ptr;
};
#endif // HTAB_STRUCT_H

View file

@ -0,0 +1,23 @@
// io.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <ctype.h>
#include <stdio.h>
#include "io.h"
int read_word(char *s, int max, FILE *f) {
int c, len = 0;
while ((c = fgetc(f)) != EOF && isspace(c))
; // ignoruj uvodne biele znaky
if (c == EOF)
return EOF;
s[len++] = c;
while ((c = fgetc(f)) != EOF && !isspace(c)) {
if (len < max)
s[len++] = c;
}
s[len] = '\0';
return len;
}

View file

@ -0,0 +1,13 @@
// io.h
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#ifndef IO_H
#define IO_H
#include <stdio.h>
int read_word(char *s, int max, FILE *f);
#endif

View file

@ -0,0 +1,196 @@
// tail.c
// Řešení IJC-DU2, příklad a), 15.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>
#define MAX_LINE_LENGTH 2048 // Maximalna dlzka riadku je 2047 + '\n'
typedef struct {
char **buffer; // pole ukazatelov na riadky
int size; // velkost bufferu
int start; // Index prveho riadku
int count; // pocet riadkov v bufferi
} CircularBuffer;
// vytvori kruhovy buffer s kapacitou n
CircularBuffer *cbuf_create(int n) {
CircularBuffer *cb = (CircularBuffer *)malloc(sizeof(CircularBuffer));
if (cb == NULL) {
fprintf(stderr, "Error: Failed to allocate memory for circular buffer.\n");
exit(EXIT_FAILURE);
}
cb->buffer = (char **)malloc(n * sizeof(char *));
if (cb->buffer == NULL) {
fprintf(stderr, "Error: Failed to allocate memory for line buffer.\n");
exit(EXIT_FAILURE);
}
for (int i = 0; i < n; i++) {
cb->buffer[i] = (char *)malloc((MAX_LINE_LENGTH+1) * sizeof(char));
if (cb->buffer[i] == NULL) {
fprintf(stderr, "Error: Failed to allocate memory for line.\n");
exit(EXIT_FAILURE);
}
}
cb->size = n;
cb->start = 0;
cb->count = 0;
return cb;
}
// vloz riadok do bufferu
void cbuf_put(CircularBuffer *cb, char *line) {
line[MAX_LINE_LENGTH] = '\0';
line[MAX_LINE_LENGTH-1] = '\n';
strncpy(cb->buffer[(cb->start + cb->count) % cb->size], line, MAX_LINE_LENGTH);
cb->buffer[(cb->start + cb->count) % cb->size][MAX_LINE_LENGTH] = '\0';
if (cb->count < cb->size) {
cb->count++;
} else {
cb->start = (cb->start + 1) % cb->size;
}
}
// nacitaj riadok z bufferu
char *cbuf_get(CircularBuffer *cb, int index) {
if (index < 0 || index >= cb->count) {
fprintf(stderr, "Error: Line index out of buffer range.\n");
exit(EXIT_FAILURE);
}
return cb->buffer[(cb->start + index) % cb->size];
}
// vyscisti pamat
void cbuf_free(CircularBuffer *cb) {
for (int i = 0; i < cb->size; i++) {
free(cb->buffer[i]);
}
free(cb->buffer);
free(cb);
}
bool isNumber(char *str) {
for(int i = 0; str[i] != '\0'; i++) {
if(!isdigit(str[i])) {
return false;
}
}
return true;
}
int main(int argc, char *argv[]) {
int n = 10; // defaultny pocet riadkov
FILE *file = stdin;
// Parsing argumentov
if (argc == 3 && strcmp(argv[1], "-n") == 0) { // 3 argumenty nacitja z stdin
if(isNumber(argv[2]) == false)
{
fprintf(stderr, "Error: Invalid number of lines.\n");
return 1;
}
n = atoi(argv[2]);
if (n < 0) {
fprintf(stderr, "Error: Invalid number of lines.\n");
return EXIT_FAILURE;
}
else if (n == 0)
{
return 0;
}
}
else if(argc == 4 && strcmp(argv[1], "-n") == 0) { // 4 argumenty, subor je posledny
if(isNumber(argv[2]) == false)
{
fprintf(stderr, "Error: Invalid number of lines.\n");
return 1;
}
n = atoi(argv[2]);
if (n < 0) {
fprintf(stderr, "Error: Invalid number of lines.\n");
return EXIT_FAILURE;
}
else if (n == 0)
{
return 0;
}
file = fopen(argv[3], "r");
if (file == NULL) {
fprintf(stderr, "Error: Unable to open file '%s'.\n", argv[3]);
return EXIT_FAILURE;
}
}
else if(argc == 4 && strcmp(argv[2], "-n") == 0) { // 4 argumenty, subor je 2
if(isNumber(argv[3]) == false)
{
fprintf(stderr, "Error: Invalid number of lines.\n");
return 1;
}
n = atoi(argv[3]);
if (n < 0) {
fprintf(stderr, "Error: Invalid number of lines.\n");
return EXIT_FAILURE;
}
else if (n == 0)
{
return 0;
}
file = fopen(argv[1], "r");
if (file == NULL) {
fprintf(stderr, "Error: Unable to open file '%s'.\n", argv[1]);
return EXIT_FAILURE;
}
}
else if (argc == 2) { // 2 argument, subor je druhy
file = fopen(argv[1], "r");
if (file == NULL) {
fprintf(stderr, "Error: Unable to open file '%s'.\n", argv[1]);
return EXIT_FAILURE;
}
} else if(argc != 1) {
fprintf(stderr, "Usage: %s [-n number] [file]\n", argv[0]);
return EXIT_FAILURE;
}
// Inicializacia kruhoveho bufferu
CircularBuffer *cb = cbuf_create(n);
// nacitame riadky
char line[MAX_LINE_LENGTH];
int islonger = 0;
while (fgets(line, sizeof(line), file) != NULL) {
int len = strlen(line);
if (len == (MAX_LINE_LENGTH-1) && line[MAX_LINE_LENGTH -1] != '\n') {
islonger = 1;
// zahodime zvysok riadku
int c;
while ((c = fgetc(file)) != '\n'&& c!= EOF);
}
cbuf_put(cb, line);
}
if (islonger == 1)
{
fprintf(stderr, "Too long line, above limit will be truncated\n");
}
// vypiseme poslledne riadky
int start_index = cb->count >= n ? cb->count - n : 0;
for (int i = start_index; i < cb->count; i++) {
printf("%s", cbuf_get(cb, i));
}
// vycisti pamet
cbuf_free(cb);
if (file != stdin) {
fclose(file);
}
return EXIT_SUCCESS;
}

View file

@ -0,0 +1,49 @@
// wordcount.c
// Řešení IJC-DU2, příklad b), 22.4.2024
// Autor: Roman Nečas, FIT
// Přeloženo: gcc 11.4.0
#include <stdio.h>
#include "htab.h"
#include "io.h"
#include "htab_struct.h"
#define MAX_WORD_LEN 255
#define HTAB_SIZE 130003 //program som testoval napriklad na prikaze seq 100000 200000|shuf, teda 100 0000 slov, velkost by mala byt 1.3
//nasobok a zaroven prvocislo, teda najblizsie cislo je 130003
static void print_pair(htab_pair_t *pair) {
printf("%s\t%d\n", pair->key, pair->value);
}
int main() {
htab_t *t = htab_init(HTAB_SIZE);
if (t == NULL) {
fprintf(stderr, "Chyba: Nedostatok pamati pre tabulku\n");
return 1;
}
char word[MAX_WORD_LEN];
int ret;
while ((ret = read_word(word, sizeof(word), stdin)) != EOF) {
if (ret == MAX_WORD_LEN) {
fprintf(stderr, "Varovanie: Niektore slova boli skratene na 255 znakov.\n");
}
htab_pair_t *pair = htab_lookup_add(t, word);
if (pair == NULL) {
fprintf(stderr, "Chyba: Nedostatok pamati pre novy zaznam\n");
htab_free(t);
return 1;
}
pair->value++;
}
htab_for_each(t, print_pair);
#ifdef STATISTICS
htab_statistics(t);
#endif
htab_free(t);
return 0;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,154 @@
#!/bin/sh
#xnecasr00 Roman Nečas
#9.3.2024
export POSIXLY_CORRECT=yes
# Function to display help message
print_help() {
echo "Usage: xtf [-h|--help] [FILTER] [COMMAND] USER LOG [LOG2 ...]"
echo ""
echo "Options:"
echo ""
echo " COMMAND can be one of these:"
echo " list - displays records for the given user."
echo " list-currency - displays sorted list of currencies."
echo " status - displays account status for the given user."
echo " profit - calculates profit for the given user."
echo ""
echo " FILTER can be a combination of:"
echo " -a DATETIME - after: considers records after this date and time (exclusive)."
echo " -b DATETIME - before: considers records before this date and time (exclusive)."
echo " -c CURRENCY - considers records matching the given currency."
echo ""
echo " -h or --help displays this help message."
}
# Function to display error message and exit with code 1
print_error() {
echo "Error: $1" >&2
exit 1
}
# Function to validate date
validate_date() {
date -d "$1" >/dev/null 2>&1 || print_error "Invalid date: $1"
}
USER=""
LOGS=""
COMMAND=""
AFTER_DATE=""
BEFORE_DATE=""
CURRENCY_FILTER=""
# Process arguments
while [ "$#" -gt 0 ]; do
case $1 in
-h|--help)
print_help
exit 0
;;
list|list-currency|status|profit)
if [ -z "$COMMAND" ]; then
COMMAND=$1
else
print_error "Multiple commands provided"
fi
;;
-a)
validate_date "$2"
AFTER_DATE=$2
shift
;;
-b)
validate_date "$2"
if [ -z "$BEFORE_DATE" ]; then
BEFORE_DATE=$2
else
print_error "Multiple 'before' dates provided. Please provide only one 'before' date."
fi
shift
;;
-c)
CURRENCY_FILTER=$2
shift
;;
*)
if [ -z "$USER" ]; then
USER=$1
else
# Use a special character to separate log files
LOGS="$LOGS|$1"
fi
;;
esac
shift
done
# Set default command (list) if none specified
if [ -z "$COMMAND" ]; then
COMMAND="list"
fi
# Check if user is specified
if [ -z "$USER" ]; then
print_error "No user specified."
fi
# Change IFS to handle log files with spaces
OLD_IFS="$IFS"
IFS="|"
# Process logs
for LOG in $LOGS
do
case "$LOG" in
*.gz)
zcat "$LOG" || print_error "Failed to read log: $LOG"
;;
*)
cat "$LOG" || print_error "Failed to read log: $LOG"
;;
esac
done
# Restore IFS
IFS="$OLD_IFS"
# Filter records
awk -v user="$USER" -v after="$AFTER_DATE" -v before="$BEFORE_DATE" -v currency_filter="$CURRENCY_FILTER" '
BEGIN {
FS=";"
}
{
if ($1 == "" || $2 !~ /^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/ || $3 !~ /^[A-Z]{3}$/ ||
$4 !~ /^-?[0-9]+\.[0-9]{4}$/) {
print "Error: Invalid record format: " $0 > "/dev/stderr"
exit 1
}
}
$1 == user && ($2 > after || after == "") && ($2 < before || before == "") && ($3 ~ currency_filter || currency_filter == "") {
print
}
' |
# Process command
case "$COMMAND" in
list)
cat
;;
list-currency)
awk -F ";" '{print $3}' | sort -u
;;
status)
awk -F ";" '{ currency[$3] += $4 } END { for (cur in currency) { printf "%s : %.4f\n", cur, currency[cur] } }' | sort
;;
profit)
if [ -z "$XTF_PROFIT" ]; then
XTF_PROFIT=20
fi
awk -v profit="$XTF_PROFIT" -F ";" '{ currency[$3] += $4 } END { for (cur in currency) { if (currency[cur] > 0) currency[cur] =
currency[cur] * (1 + profit / 100); printf "%s : %.4f\n", cur, currency[cur] } }' | sort
;;
esac

View file

@ -0,0 +1,17 @@
# Makefile pro proj2
CC = gcc
CFLAGS = -std=gnu99 -Wall -Wextra -Werror -pedantic -pthread
LDLIBS = -lrt -pthread
SOURCES = proj2.c
EXECUTABLE = proj2
all: $(EXECUTABLE)
$(EXECUTABLE): $(SOURCES)
$(CC) $(CFLAGS) $(SOURCES) -o $@ $(LDLIBS)
clean:
rm -f $(EXECUTABLE)
.PHONY: all clean

View file

@ -0,0 +1,309 @@
//Autor: Roman Necas
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <stdbool.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/mman.h>
#include <semaphore.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
// Macros for memory mapping
#define MMAP(ptr) {(ptr) = mmap(NULL, sizeof(*(ptr)), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);}
#define UNMAP(ptr) {munmap((ptr), sizeof(*(ptr)));}
// Shared memory variables
int *order = NULL; // Order of execution for print statements
int *bus_stop; // Array to store bus stop IDs for each skier
// Semaphores
sem_t *sem_mutex = NULL; // Mutex semaphore for critical sections
sem_t *sem_boarded = NULL; // Semaphore for skiers boarding the bus
sem_t *sem_order = NULL; // Semaphore for print order
sem_t *sem_ubus = NULL; // Semaphore for skiers unboarding the bus
sem_t *sem_unboard = NULL; // Semaphore for skiers unboarding the bus
sem_t **sem_busstops = NULL; // Array of semaphores for each bus stop
FILE *output; // File pointer for output
// Function prototypes
void bus_loop(int Z, int K, int TB, int L);
void skier_loop(int idL, int idZ, int TL);
int main(int argc, char* argv[]) {
// Check for correct number of arguments
if (argc != 6) {
fprintf(stderr, "Usage: %s L Z K TL TB\n", argv[0]);
return 1;
}
// Parse command-line arguments
int L = atoi(argv[1]); // Number of skiers
int Z = atoi(argv[2]); // Number of bus stops
int K = atoi(argv[3]); // Maximum skiers on the bus
int TL = atoi(argv[4]); // Maximum time for a skier to reach the bus stop
int TB = atoi(argv[5]); // Maximum time for the bus to travel between stops
// Validate argument values
if (L < 0 || L >= 20000 || Z <= 0 || Z > 10 || K < 10 || K > 100 || TL < 0 || TL > 10000 || TB < 0 || TB > 1000) {
fprintf(stderr, "Invalid arguments\n");
return 1;
}
output = fopen("proj2.out", "w");
// Memory mapping for shared variables
MMAP(order);
bus_stop = mmap(NULL, sizeof(*bus_stop) * L, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
for (int i = 0; i < L; i++) {
bus_stop[i] = 0; // Initialize bus stop array
}
*order = 1; // Initialize order
// Create semaphores
if (( sem_mutex = sem_open("/xnecasr00_sem_mutex", O_CREAT | O_EXCL, 0666, 1)) == SEM_FAILED) {
fprintf(stderr, "Error: Opening sem_mutex failed.\n");
return 1;
}
if ((sem_boarded = sem_open("/xnecasr00_sem_boarded", O_CREAT | O_EXCL, 0666, 0)) == SEM_FAILED) {
fprintf(stderr, "Error: Opening sem_boarded failed.\n");
return 1;
}
if ((sem_order = sem_open("/xnecasr00_sem_order", O_CREAT | O_EXCL, 0666, 1)) == SEM_FAILED) {
fprintf(stderr, "Error: Opening sem_order failed.\n");
return 1;
}
if ((sem_ubus = sem_open("/xnecasr00_sem_ubus", O_CREAT | O_EXCL, 0666, 0)) == SEM_FAILED) {
fprintf(stderr, "Error: Opening sem_ubus failed.\n");
return 1;
}
if ((sem_unboard = sem_open("/xnecasr00_sem_unboard", O_CREAT | O_EXCL, 0666, 0)) == SEM_FAILED) {
fprintf(stderr, "Error: Opening sem_unboard failed.\n");
return 1;
}
// Create semaphores for each bus stop
MMAP(sem_busstops);
for (int i = 0; i < Z; i++) {
char sem_name[35];
snprintf(sem_name, sizeof(sem_name), "/xnecasr00_sem_busstop_%d", i + 1);
if ((sem_busstops[i] = sem_open(sem_name, O_CREAT | O_EXCL, 0666, 0)) == SEM_FAILED) {
fprintf(stderr, "Error: Opening semaphore %s failed.\n", sem_name);
return 1;
}
}
// Fork for bus process
pid_t bus_pid = fork();
if (bus_pid == -1) {
perror("fork");
return 1;
} else if (bus_pid == 0) {
bus_loop(Z, K, TB, L);
exit(0);
}
// Fork for skier processes
for (int i = 1; i <= L; i++) {
pid_t skier_pid = fork();
if (skier_pid == -1) {
perror("fork");
return 1;
} else if (skier_pid == 0) {
srand(time(0) * getpid());
int idZ = rand() % Z + 1; // Randomly assign bus stop ID
skier_loop(i, idZ, TL);
exit(0);
}
}
// Wait for all child processes to finish
for (int i = 0; i <= L; i++) {
wait(NULL);
}
// Clean up shared memory and semaphores
UNMAP(order);
munmap(bus_stop, sizeof(*bus_stop)*L);
sem_close(sem_mutex);
sem_unlink("/xnecasr00_sem_mutex");
sem_close(sem_boarded);
sem_unlink("/xnecasr00_sem_boarded");
sem_close(sem_order);
sem_unlink("/xnecasr00_sem_order");
sem_close(sem_ubus);
sem_unlink("/xnecasr00_sem_ubus");
sem_close(sem_unboard);
sem_unlink("/xnecasr00_sem_unboard");
// Close and unlink semaphores for each bus stop
for (int i = 0; i < Z; i++) {
char sem_name[35];
snprintf(sem_name, sizeof(sem_name), "/xnecasr00_sem_busstop_%d", i + 1);
sem_close(sem_busstops[i]);
sem_unlink(sem_name);
}
fclose(output);
return 0;
}
void bus_loop(int Z, int K, int TB, int L) {
srand(time(0) * getpid());
// Print bus started
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: BUS: started\n", *order);
*order += 1;
sem_post(sem_order);
int boarded = 0; // Number of skiers on the bus
int idZ = 1; // Current bus stop ID
int skiing = 0;
while (1) {
// Sleep for a random time before arriving at the next stop
usleep(rand() % (TB + 1));
// Print bus arrival at the current stop
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: BUS: arrived to %d\n",*order, idZ);
*order += 1;
sem_post(sem_order);
// Board skiers waiting at the current stop
sem_wait(sem_mutex);
int waiting_at_stop = 0;
for (int i = 0; i < L; i++) {
if ((bus_stop[i] == idZ) && waiting_at_stop < K) {
bus_stop[i] = 0; // Reset bus stop ID for skiers who boarded
waiting_at_stop++;
sem_post(sem_busstops[idZ - 1]); // Signal skiers at the current stop to board
sem_wait(sem_boarded); // Wait for skiers to board
}
}
boarded += waiting_at_stop; // Increment the number of skiers on the bus
sem_post(sem_mutex);
// Print bus leaving the current stop
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: BUS: leaving %d\n",*order, idZ);
*order += 1;
sem_post(sem_order);
// If the bus has reached the final stop
if (idZ == Z) {
usleep(rand() % (TB + 1)); // Sleep for a random time before arriving at the final stop
// Print bus arrival at the final stop
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: BUS: arrived to final\n", *order);
*order += 1;
sem_post(sem_order);
// Unboard skiers at the final stop
for (int i = 0; i < boarded; i++) {
sem_post(sem_ubus); // Signal skiers to unboard
sem_wait(sem_unboard); // Wait for skiers to unboard
skiing++;
}
// Print bus leaving the final stop
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: BUS: leaving final\n", *order);
*order += 1;
sem_post(sem_order);
idZ = 1; // Reset bus stop ID to the first stop
boarded = 0; // Reset the number of skiers on the bus
sem_wait(sem_mutex);
// Check if there are any remaining skiers at the bus stops
int remaining = 0;
for (int i = 0; i < L; i++) {
if (bus_stop[i] != 0) {
remaining++;
}
}
sem_post(sem_mutex);
// If there are no remaining skiers, print finish and exit the loop
if (remaining == 0 && skiing == L) {
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: BUS: finish\n", *order);
*order += 1;
sem_post(sem_order);
break;
}
} else {
idZ++; // Move to the next bus stop
}
}
}
void skier_loop(int idL, int idZ, int TL) {
srand(time(0) * getpid());
// Print skier started
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: L %d: started\n",*order, idL);
*order += 1;
sem_post(sem_order);
// Sleep for a random time before arriving at the bus stop
usleep(rand() % (TL + 1));
// Print skier arrival at the bus stop
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: L %d: arrived to %d\n",*order, idL, idZ);
*order += 1;
sem_post(sem_order);
// Store the skier's bus stop ID and increment the waiting count
sem_wait(sem_mutex);
bus_stop[idL - 1] = idZ;
sem_post(sem_mutex);
// Wait for the bus to arrive at the skier's bus stop
sem_wait(sem_busstops[idZ - 1]);
// Print skier boarding the bus
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: L %d: boarding\n",*order, idL);
*order += 1;
sem_post(sem_order);
sem_post(sem_boarded); // Signal that the skier has boarded
// Wait for the bus to reach the final stop
sem_wait(sem_ubus);
// Print skier going to ski
sem_wait(sem_order);
setbuf(output, NULL);
fprintf(output, "%d: L %d: going to ski\n",*order, idL);
*order += 1;
sem_post(sem_order);
sem_post(sem_unboard); // Signal that the skier has unboarded
}

Binary file not shown.

View file

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View file

@ -0,0 +1 @@
izlo_projekt1

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/izlo-projekt1.iml" filepath="$PROJECT_DIR$/.idea/izlo-projekt1.iml" />
</modules>
</component>
</project>

View file

@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.26)
project(izlo_projekt1 C)
set(CMAKE_C_STANDARD 11)
include_directories(izlo-projekt1/code)
add_executable(izlo_projekt1
izlo-projekt1/code/add_conditions.c
izlo-projekt1/code/cnf.h
izlo-projekt1/code/main.c)

View file

@ -0,0 +1,445 @@
{
"inputs" :
[
{
"path" : "CMakeLists.txt"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystem.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.26.4/CMakeSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystemSpecificInitialize.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCompilerIdDetection.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/ADSP-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Borland-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Cray-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GHS-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/HP-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/IAR-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/IBMClang-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Intel-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/LCC-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/MSVC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/NVHPC-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/PGI-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/PathScale-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/SCO-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/TI-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Tasking-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/Watcom-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/XL-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/XLClang-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeFindBinUtils.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-FindBinUtils.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompiler.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.26.4/CMakeCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystemSpecificInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeGenericSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeInitializeConfigs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/WindowsPaths.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineRCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeRCCompiler.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.26.4/CMakeRCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeRCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-windres.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestRCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeParseImplicitIncludeInfo.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeParseImplicitLinkInfo.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeParseLibraryArchitecture.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCompilerCommon.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompileFeatures.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Internal/FeatureTesting.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompiler.cmake.in"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.26.4/CMakeCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-C-ABI.cmake"
}
],
"kind" : "cmakeFiles",
"paths" :
{
"build" : "C:/Users/roman/OneDrive/Po\u010d\u00edta\u010d/izlo-projekt1/cmake-build-debug",
"source" : "C:/Users/roman/OneDrive/Po\u010d\u00edta\u010d/izlo-projekt1"
},
"version" :
{
"major" : 1,
"minor" : 0
}
}

View file

@ -0,0 +1,60 @@
{
"configurations" :
[
{
"directories" :
[
{
"build" : ".",
"jsonFile" : "directory-.-Debug-d0094a50bb2071803777.json",
"minimumCMakeVersion" :
{
"string" : "3.26"
},
"projectIndex" : 0,
"source" : ".",
"targetIndexes" :
[
0
]
}
],
"name" : "Debug",
"projects" :
[
{
"directoryIndexes" :
[
0
],
"name" : "izlo_projekt1",
"targetIndexes" :
[
0
]
}
],
"targets" :
[
{
"directoryIndex" : 0,
"id" : "izlo_projekt1::@6890427a1f51a3e7e1df",
"jsonFile" : "target-izlo_projekt1-Debug-0fdb4e90381189864e5a.json",
"name" : "izlo_projekt1",
"projectIndex" : 0
}
]
}
],
"kind" : "codemodel",
"paths" :
{
"build" : "C:/Users/roman/OneDrive/Po\u010d\u00edta\u010d/izlo-projekt1/cmake-build-debug",
"source" : "C:/Users/roman/OneDrive/Po\u010d\u00edta\u010d/izlo-projekt1"
},
"version" :
{
"major" : 2,
"minor" : 5
}
}

View file

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

View file

@ -0,0 +1,108 @@
{
"cmake" :
{
"generator" :
{
"multiConfig" : false,
"name" : "Ninja"
},
"paths" :
{
"cmake" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/bin/cmake.exe",
"cpack" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/bin/cpack.exe",
"ctest" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/bin/ctest.exe",
"root" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 26,
"patch" : 4,
"string" : "3.26.4",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-c0d749d99c2845fa16ae.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 5
}
},
{
"jsonFile" : "cache-v2-0b29e88ec07b1fea850f.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-02cde7b53cf03d54564c.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
{
"jsonFile" : "toolchains-v1-1a91e91f1c114e4c2010.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"cache-v2" :
{
"jsonFile" : "cache-v2-0b29e88ec07b1fea850f.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
"cmakeFiles-v1" :
{
"jsonFile" : "cmakeFiles-v1-02cde7b53cf03d54564c.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-c0d749d99c2845fa16ae.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 5
}
},
"toolchains-v1" :
{
"jsonFile" : "toolchains-v1-1a91e91f1c114e4c2010.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
}
}

View file

@ -0,0 +1,140 @@
{
"artifacts" :
[
{
"path" : "izlo_projekt1.exe"
},
{
"path" : "izlo_projekt1.pdb"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"include_directories"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 8,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 6,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : "-g -std=gnu11 -fdiagnostics-color=always"
}
],
"includes" :
[
{
"backtrace" : 2,
"path" : "C:/Users/roman/OneDrive/Po\u010d\u00edta\u010d/izlo-projekt1/izlo-projekt1/code"
}
],
"language" : "C",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "11"
},
"sourceIndexes" :
[
0,
2
]
}
],
"id" : "izlo_projekt1::@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" : "izlo_projekt1",
"nameOnDisk" : "izlo_projekt1.exe",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0,
2
]
},
{
"name" : "Header Files",
"sourceIndexes" :
[
1
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "izlo-projekt1/code/add_conditions.c",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"path" : "izlo-projekt1/code/cnf.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "izlo-projekt1/code/main.c",
"sourceGroupIndex" : 0
}
],
"type" : "EXECUTABLE"
}

View file

@ -0,0 +1,51 @@
{
"kind" : "toolchains",
"toolchains" :
[
{
"compiler" :
{
"id" : "GNU",
"implicit" :
{
"includeDirectories" :
[
"C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include",
"C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/include",
"C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed",
"C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/x86_64-w64-mingw32/include"
],
"linkDirectories" : [],
"linkFrameworkDirectories" : [],
"linkLibraries" : []
},
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/gcc.exe",
"version" : "13.1.0"
},
"language" : "C",
"sourceFileExtensions" :
[
"c",
"m"
]
},
{
"compiler" :
{
"implicit" : {},
"path" : "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/windres.exe"
},
"language" : "RC",
"sourceFileExtensions" :
[
"rc",
"RC"
]
}
],
"version" :
{
"major" : 1,
"minor" : 0
}
}

View file

@ -0,0 +1,363 @@
# This is the CMakeCache file.
# For build in directory: c:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug
# It was generated by CMake: C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/bin/cmake.exe
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Path to a program.
CMAKE_ADDR2LINE:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/addr2line.exe
//Path to a program.
CMAKE_AR:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/ar.exe
//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=Debug
//Enable colored diagnostics throughout.
CMAKE_COLOR_DIAGNOSTICS:BOOL=ON
//C compiler
CMAKE_C_COMPILER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/gcc.exe
//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_AR:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/gcc-ar.exe
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/gcc-ranlib.exe
//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Libraries linked by default with all C applications.
CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
//Path to a program.
CMAKE_DLLTOOL:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/dlltool.exe
//Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
//Value Computed by CMake.
CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=C:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug/CMakeFiles/pkgRedirects
//Convert GNU import libraries to MS format (requires Visual Studio)
CMAKE_GNUtoMS:BOOL=OFF
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/izlo_projekt1
//Path to a program.
CMAKE_LINKER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/ld.exe
//make program
CMAKE_MAKE_PROGRAM:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/ninja/win/x64/ninja.exe
//Flags used by the linker during the creation of modules during
// all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_NM:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/nm.exe
//Path to a program.
CMAKE_OBJCOPY:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/objcopy.exe
//Path to a program.
CMAKE_OBJDUMP:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/objdump.exe
//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=izlo_projekt1
//Path to a program.
CMAKE_RANLIB:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/ranlib.exe
//RC compiler
CMAKE_RC_COMPILER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/windres.exe
//Flags for Windows Resource Compiler during all build types.
CMAKE_RC_FLAGS:STRING=
//Flags for Windows Resource Compiler during DEBUG builds.
CMAKE_RC_FLAGS_DEBUG:STRING=
//Flags for Windows Resource Compiler during MINSIZEREL builds.
CMAKE_RC_FLAGS_MINSIZEREL:STRING=
//Flags for Windows Resource Compiler during RELEASE builds.
CMAKE_RC_FLAGS_RELEASE:STRING=
//Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_READELF:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/readelf.exe
//Flags used by the linker during the creation of shared libraries
// during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO
//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_STRIP:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/strip.exe
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Value Computed by CMake
izlo_projekt1_BINARY_DIR:STATIC=C:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug
//Value Computed by CMake
izlo_projekt1_IS_TOP_LEVEL:STATIC=ON
//Value Computed by CMake
izlo_projekt1_SOURCE_DIR:STATIC=C:/Users/roman/OneDrive/Počítač/izlo-projekt1
########################
# INTERNAL cache entries
########################
//ADVANCED property for variable: CMAKE_ADDR2LINE
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=26
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=4
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/bin/cmake.exe
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/bin/cpack.exe
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/bin/ctest.exe
//ADVANCED property for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES
CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_DLLTOOL
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Ninja
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/roman/OneDrive/Počítač/izlo-projekt1
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_COMPILER
CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1
CMAKE_RC_COMPILER_WORKS:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS
CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG
CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL
CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE
CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO
CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_READELF
CMAKE_READELF-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//linker supports push/pop state
_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE

View file

@ -0,0 +1,72 @@
set(CMAKE_C_COMPILER "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/gcc.exe")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "GNU")
set(CMAKE_C_COMPILER_VERSION "13.1.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 "GNU")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_AR "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/ar.exe")
set(CMAKE_C_COMPILER_AR "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/gcc-ar.exe")
set(CMAKE_RANLIB "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/ranlib.exe")
set(CMAKE_C_COMPILER_RANLIB "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/gcc-ranlib.exe")
set(CMAKE_LINKER "C:/Program Files/JetBrains/CLion 2023.2.2/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/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/include;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/x86_64-w64-mingw32/include")
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

View file

@ -0,0 +1,6 @@
set(CMAKE_RC_COMPILER "C:/Program Files/JetBrains/CLion 2023.2.2/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

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

View file

@ -0,0 +1,866 @@
#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(__LCC__ / 100)
# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100)
# 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

@ -0,0 +1,203 @@
---
events:
-
kind: "message-v1"
backtrace:
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineSystem.cmake:204 (message)"
- "CMakeLists.txt:2 (project)"
message: |
The system is: Windows - 10.0.22631 - AMD64
-
kind: "message-v1"
backtrace:
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:17 (message)"
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)"
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCCompiler.cmake:123 (CMAKE_DETERMINE_COMPILER_ID)"
- "CMakeLists.txt:2 (project)"
message: |
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/Program Files/JetBrains/CLion 2023.2.2/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/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdC/a.exe
-
kind: "try_compile-v1"
backtrace:
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)"
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
- "CMakeLists.txt:2 (project)"
checks:
- "Detecting C compiler ABI info"
directories:
source: "C:/Users/roman/OneDrive/Po\u010d\u00edta\u010d/izlo-projekt1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-hbhbxo"
binary: "C:/Users/roman/OneDrive/Po\u010d\u00edta\u010d/izlo-projekt1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-hbhbxo"
cmakeVariables:
CMAKE_C_FLAGS: ""
CMAKE_C_FLAGS_DEBUG: "-g"
CMAKE_EXE_LINKER_FLAGS: ""
buildResult:
variable: "CMAKE_C_ABI_COMPILED"
cached: true
stdout: |
Change Dir: C:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-hbhbxo
Run Build Command(s):C:/Program Files/JetBrains/CLion 2023.2.2/bin/ninja/win/x64/ninja.exe -v cmTC_4aeaa && [1/2] C:\\PROGRA~1\\JETBRA~1\\CLION2~1.2\\bin\\mingw\\bin\\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj -c "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c"
Using built-in specs.
COLLECT_GCC=C:\\PROGRA~1\\JETBRA~1\\CLION2~1.2\\bin\\mingw\\bin\\gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-13.1.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++ --with-arch=nocona --with-tune=generic --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --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 13.1.0 (GCC)
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=nocona' '-dumpdir' 'CMakeFiles/cmTC_4aeaa.dir/'
C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/cc1.exe -quiet -v -iprefix C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/ -D_REENTRANT C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_4aeaa.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=nocona -version -fdiagnostics-color=always -o C:\\Users\\roman\\AppData\\Local\\Temp\\ccesssLa.s
GNU C17 (GCC) version 13.1.0 (x86_64-w64-mingw32)
compiled by GNU C version 13.1.0, GMP version 6.2.1, MPFR version 4.2.0-p4, MPC version 1.3.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/include"
ignoring nonexistent directory "/win/include"
ignoring duplicate directory "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/../../include"
ignoring duplicate directory "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed"
ignoring duplicate directory "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include
C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../include
C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed
C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include
End of search list.
Compiler executable checksum: 2aa4fcf5c9208168c5e2d38a58fc2a97
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=nocona' '-dumpdir' 'CMakeFiles/cmTC_4aeaa.dir/'
as -v -o CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj C:\\Users\\roman\\AppData\\Local\\Temp\\ccesssLa.s
GNU assembler version 2.40 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.40
COMPILER_PATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/
LIBRARY_PATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=nocona' '-dumpdir' 'CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.'
[2/2] cmd.exe /C "cd . && C:\\PROGRA~1\\JETBRA~1\\CLION2~1.2\\bin\\mingw\\bin\\gcc.exe -v CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj -o cmTC_4aeaa.exe -Wl,--out-implib,libcmTC_4aeaa.dll.a -Wl,--major-image-version,0,--minor-image-version,0 && cd ."
Using built-in specs.
COLLECT_GCC=C:\\PROGRA~1\\JETBRA~1\\CLION2~1.2\\bin\\mingw\\bin\\gcc.exe
COLLECT_LTO_WRAPPER=C:/Program\\ Files/JetBrains/CLion\\ 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-13.1.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++ --with-arch=nocona --with-tune=generic --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --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 13.1.0 (GCC)
COMPILER_PATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/
LIBRARY_PATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_4aeaa.exe' '-mtune=generic' '-march=nocona' '-dumpdir' 'cmTC_4aeaa.'
C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/collect2.exe -m i386pep -Bdynamic -o cmTC_4aeaa.exe C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0 -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../.. CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj --out-implib libcmTC_4aeaa.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:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_4aeaa.exe' '-mtune=generic' '-march=nocona' '-dumpdir' 'cmTC_4aeaa.'
exitCode: 0
-
kind: "message-v1"
backtrace:
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:127 (message)"
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
- "CMakeLists.txt:2 (project)"
message: |
Parsed C implicit include dir info: rv=done
found start of include info
found start of implicit include info
add: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include]
add: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../include]
add: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed]
add: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include]
end of search list found
collapse include dir [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include] ==> [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include]
collapse include dir [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../include] ==> [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/include]
collapse include dir [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed] ==> [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed]
collapse include dir [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include] ==> [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/x86_64-w64-mingw32/include]
implicit include dirs: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/include;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed;C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/x86_64-w64-mingw32/include]
-
kind: "message-v1"
backtrace:
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:152 (message)"
- "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
- "CMakeLists.txt:2 (project)"
message: |
Parsed C implicit link information:
link line regex: [^( *|.*[/\\])(ld\\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)]
ignore line: [Change Dir: C:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-hbhbxo]
ignore line: []
ignore line: [Run Build Command(s):C:/Program Files/JetBrains/CLion 2023.2.2/bin/ninja/win/x64/ninja.exe -v cmTC_4aeaa && [1/2] C:\\PROGRA~1\\JETBRA~1\\CLION2~1.2\\bin\\mingw\\bin\\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj -c "C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c"]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\\PROGRA~1\\JETBRA~1\\CLION2~1.2\\bin\\mingw\\bin\\gcc.exe]
ignore line: [Target: x86_64-w64-mingw32]
ignore line: [Configured with: ../gcc-13.1.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++ --with-arch=nocona --with-tune=generic --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --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 13.1.0 (GCC) ]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=nocona' '-dumpdir' 'CMakeFiles/cmTC_4aeaa.dir/']
ignore line: [ C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/cc1.exe -quiet -v -iprefix C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/ -D_REENTRANT C:/Program Files/JetBrains/CLion 2023.2.2/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_4aeaa.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=nocona -version -fdiagnostics-color=always -o C:\\Users\\roman\\AppData\\Local\\Temp\\ccesssLa.s]
ignore line: [GNU C17 (GCC) version 13.1.0 (x86_64-w64-mingw32)]
ignore line: [ compiled by GNU C version 13.1.0 GMP version 6.2.1 MPFR version 4.2.0-p4 MPC version 1.3.1 isl version none]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [ignoring duplicate directory "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/include"]
ignore line: [ignoring nonexistent directory "/win/include"]
ignore line: [ignoring duplicate directory "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/../../include"]
ignore line: [ignoring duplicate directory "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed"]
ignore line: [ignoring duplicate directory "C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.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:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include]
ignore line: [ C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../include]
ignore line: [ C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed]
ignore line: [ C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include]
ignore line: [End of search list.]
ignore line: [Compiler executable checksum: 2aa4fcf5c9208168c5e2d38a58fc2a97]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=nocona' '-dumpdir' 'CMakeFiles/cmTC_4aeaa.dir/']
ignore line: [ as -v -o CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj C:\\Users\\roman\\AppData\\Local\\Temp\\ccesssLa.s]
ignore line: [GNU assembler version 2.40 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.40]
ignore line: [COMPILER_PATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/]
ignore line: [LIBRARY_PATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=nocona' '-dumpdir' 'CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.']
ignore line: [[2/2] cmd.exe /C "cd . && C:\\PROGRA~1\\JETBRA~1\\CLION2~1.2\\bin\\mingw\\bin\\gcc.exe -v CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj -o cmTC_4aeaa.exe -Wl --out-implib libcmTC_4aeaa.dll.a -Wl --major-image-version 0 --minor-image-version 0 && cd ."]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\\PROGRA~1\\JETBRA~1\\CLION2~1.2\\bin\\mingw\\bin\\gcc.exe]
ignore line: [COLLECT_LTO_WRAPPER=C:/Program\\ Files/JetBrains/CLion\\ 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/lto-wrapper.exe]
ignore line: [Target: x86_64-w64-mingw32]
ignore line: [Configured with: ../gcc-13.1.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++ --with-arch=nocona --with-tune=generic --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --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 13.1.0 (GCC) ]
ignore line: [COMPILER_PATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/]
ignore line: [LIBRARY_PATH=C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/]
ignore line: [C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_4aeaa.exe' '-mtune=generic' '-march=nocona' '-dumpdir' 'cmTC_4aeaa.']
ignore line: [ C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/collect2.exe -m i386pep -Bdynamic -o cmTC_4aeaa.exe C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0 -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib -LC:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../.. CMakeFiles/cmTC_4aeaa.dir/CMakeCCompilerABI.c.obj --out-implib libcmTC_4aeaa.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:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_4aeaa.exe' '-mtune=generic' '-march=nocona' '-dumpdir' 'cmTC_4aeaa.']
ignore line: []
ignore line: []
implicit libs: []
implicit objs: []
implicit dirs: []
implicit fwks: []
...

View file

@ -0,0 +1,3 @@
C:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug/CMakeFiles/izlo_projekt1.dir
C:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug/CMakeFiles/edit_cache.dir
C:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug/CMakeFiles/rebuild_cache.dir

View file

@ -0,0 +1,10 @@
"C:\Program Files\JetBrains\CLion 2023.2.2\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2023.2.2/bin/ninja/win/x64/ninja.exe" -G Ninja -S C:\Users\roman\OneDrive\Počítač\izlo-projekt1 -B C:\Users\roman\OneDrive\Počítač\izlo-projekt1\cmake-build-debug
-- The C compiler identification is GNU 13.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/JetBrains/CLion 2023.2.2/bin/mingw/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done (1.4s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug

View file

@ -0,0 +1,4 @@
ToolSet: w64 11.0 (local)@C:\Program Files\JetBrains\CLion 2023.2.2\bin\mingw
Options:
Options:-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2023.2.2/bin/ninja/win/x64/ninja.exe

View file

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

View file

@ -0,0 +1,64 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Ninja" Generator, CMake Version 3.26
# This file contains all the rules used to get the outputs files
# built from the input files.
# It is included in the main 'build.ninja'.
# =============================================================================
# Project: izlo_projekt1
# Configurations: Debug
# =============================================================================
# =============================================================================
#############################################
# Rule for compiling C files.
rule C_COMPILER__izlo_projekt1_unscanned_Debug
depfile = $DEP_FILE
deps = gcc
command = C:\PROGRA~1\JETBRA~1\CLION2~1.2\bin\mingw\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in
description = Building C object $out
#############################################
# Rule for linking C executable.
rule C_EXECUTABLE_LINKER__izlo_projekt1_Debug
command = cmd.exe /C "$PRE_LINK && C:\PROGRA~1\JETBRA~1\CLION2~1.2\bin\mingw\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD"
description = Linking C executable $TARGET_FILE
restat = $RESTAT
#############################################
# Rule for running custom commands.
rule CUSTOM_COMMAND
command = $COMMAND
description = $DESC
#############################################
# Rule for re-running cmake.
rule RERUN_CMAKE
command = "C:\Program Files\JetBrains\CLion 2023.2.2\bin\cmake\win\x64\bin\cmake.exe" --regenerate-during-build -SC:\Users\roman\OneDrive\Poèítaè\izlo-projekt1 -BC:\Users\roman\OneDrive\Poèítaè\izlo-projekt1\cmake-build-debug
description = Re-running CMake...
generator = 1
#############################################
# Rule for cleaning all built files.
rule CLEAN
command = "C:\Program Files\JetBrains\CLion 2023.2.2\bin\ninja\win\x64\ninja.exe" $FILE_ARG -t clean $TARGETS
description = Cleaning all built files...
#############################################
# Rule for printing all primary targets available.
rule HELP
command = "C:\Program Files\JetBrains\CLion 2023.2.2\bin\ninja\win\x64\ninja.exe" -t targets
description = All primary targets available:

View file

@ -0,0 +1,3 @@
Start testing: Mar 02 19:37 Stredoeurópsky èas (normálny)
----------------------------------------------------------
End testing: Mar 02 19:37 Stredoeurópsky èas (normálny)

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,49 @@
# Install script for directory: C:/Users/roman/OneDrive/Počítač/izlo-projekt1
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/izlo_projekt1")
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/JetBrains/CLion 2023.2.2/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/roman/OneDrive/Počítač/izlo-projekt1/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
"${CMAKE_INSTALL_MANIFEST_CONTENT}")

View file

@ -0,0 +1,23 @@
CC=gcc
CFLAGS=--std=c99 -Wall
TARGET=main
HEADERS := cnf.h
OBJECTS := main.o add_conditions.o
default: $(TARGET)
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) -Wall -o $@
clean:
-rm -f $(OBJECTS)
-rm -f $(TARGET)
test: default
@python3 ../tests/run_tests.py

View file

@ -0,0 +1,105 @@
#include <stddef.h>
#include "cnf.h"
//
// LOGIN: <xnecasr00>
//
// Tato funkce by mela do formule pridat klauzule predstavujici podminku 1)
// Křižovatky jsou reprezentovany cisly 0, 1, ..., num_of_crossroads-1
// Cislo num_of_streets predstavuje pocet ulic a proto i pocet kroku cesty
// Pole streets ma velikost num_of_streets a obsahuje vsechny existujuci ulice
// - pro 0 <= i < num_of_streets predstavuje streets[i] jednu existujici
// ulici od krizovatky streets[i].crossroad_from ke krizovatce streets[i].crossroad_to
void at_least_one_valid_street_for_each_step(CNF* formula, unsigned num_of_crossroads, unsigned num_of_streets, const Street* streets) {
assert(formula != NULL);
assert(num_of_crossroads > 0);
assert(num_of_streets > 0);
assert(streets != NULL);
for (unsigned i = 0; i < num_of_streets; ++i) {
Clause* cl = create_new_clause(formula);
for (unsigned j = 0; j < num_of_streets; ++j) {
add_literal_to_clause(cl, true, i, streets[j].crossroad_from, streets[j].crossroad_to);
}
}
}
// Tato funkce by mela do formule pridat klauzule predstavujici podminku 2)
// Křižovatky jsou reprezentovany cisly 0, 1, ..., num_of_crossroads-1
// Cislo num_of_streets predstavuje pocet ulic a proto i pocet kroku cesty
void at_most_one_street_for_each_step(CNF* formula, unsigned num_of_crossroads, unsigned num_of_streets) {
assert(formula != NULL);
assert(num_of_crossroads > 0);
assert(num_of_streets > 0);
for (unsigned i = 0; i < num_of_streets; ++i) {
for (unsigned z = 0; z < num_of_crossroads; ++z) {
for (unsigned k = 0; k < num_of_crossroads; ++k) {
for (unsigned z2 = 0; z2 < num_of_crossroads; ++z2) {
for (unsigned k2 = 0; k2 < num_of_crossroads; ++k2) {
if ((z2 != z) || (k != k2)) {
Clause* cl = create_new_clause(formula);
add_literal_to_clause(cl, false, i, z, k);
add_literal_to_clause(cl, false, i, z2, k2);
}
}
}
}
}
}
}
// Tato funkce by mela do formule pridat klauzule predstavujici podminku 3)
// Křižovatky jsou reprezentovany cisly 0, 1, ..., num_of_crossroads-1
// Cislo num_of_streets predstavuje pocet ulic a proto i pocet kroku cesty
void streets_connected(CNF *formula, unsigned num_of_crossroads, unsigned num_of_streets) {
assert(formula != NULL);
assert(num_of_crossroads > 0);
assert(num_of_streets > 0);
for (unsigned i = 0; i < num_of_streets-1; ++i) {
for (unsigned z = 0; z < num_of_crossroads; ++z) {
for (unsigned k = 0; k < num_of_crossroads; ++k) {
for (unsigned z2 =0; z2 < num_of_crossroads; ++z2) {
for (unsigned k2 = 0; k2 < num_of_crossroads; ++k2) {
if (z2 != k) {
Clause* cl = create_new_clause(formula);
add_literal_to_clause(cl, false, i, z, k);
add_literal_to_clause(cl, false, i+1, z2, k2);
}
}
}
}
}
}
}
// Tato funkce by mela do formule pridat klauzule predstavujici podminku 4)
// Křižovatky jsou reprezentovany cisly 0, 1, ..., num_of_crossroads-1
// Cislo num_of_streets predstavuje pocet ulic a proto i pocet kroku cesty
void streets_do_not_repeat(CNF *formula, unsigned num_of_crossroads, unsigned num_of_streets) {
assert(formula != NULL);
assert(num_of_crossroads > 0);
assert(num_of_streets > 0);
for (unsigned i = 0; i < num_of_streets; ++i) {
// pro kazdy krok i
for (unsigned j = 0; j < num_of_streets; ++j) {
if (i != j) {
// pro kazdy jiny krok j
for (unsigned z = 0; z < num_of_crossroads; ++z) {
for (unsigned k = 0; k < num_of_crossroads; ++k) {
// pro kazdu dvojici krizovatek (z, k)
Clause *cl = create_new_clause(formula);
add_literal_to_clause(cl, false, i, z, k);
add_literal_to_clause(cl, false, j, z, k);
}
}
}
}
}
}

View file

@ -0,0 +1,29 @@
#ifndef __CNF_H
#define __CNF_H
#include <stdbool.h>
#include <assert.h>
typedef struct Literal Literal;
typedef struct Clause Clause;
typedef struct CNF CNF;
// Struktura reprezentujici ulici z křižovatky crossroad_from do křižovatky crossroad_to
typedef struct {
unsigned crossroad_from;
unsigned crossroad_to;
} Street;
// Vytvoreni nove klauzule v danej formuli
Clause* create_new_clause(CNF *formula);
// Prida (pripadne negovanou) promennou do klauzule reprezentujici, že v kroku step je zvolena ulice z křižovatky crossroad_from do křižovatky crossroad_to
void add_literal_to_clause(Clause *clause, bool is_positive, unsigned step, unsigned crossroad_from, unsigned crossroad_to);
void at_least_one_valid_street_for_each_step(CNF* formula, unsigned num_of_crossroads, unsigned num_of_streets, const Street* streets);
void at_most_one_street_for_each_step(CNF* formula, unsigned num_of_crossroads, unsigned num_of_streets);
void streets_connected(CNF* formula, unsigned num_of_crossroads, unsigned num_of_streets);
void streets_do_not_repeat(CNF* formula, unsigned num_of_crossroads, unsigned num_of_streets);
#endif

Binary file not shown.

View file

@ -0,0 +1,195 @@
#include <stdlib.h>
#include <stdio.h>
#include "cnf.h"
struct Literal {
int var;
struct Literal *next_literal;
};
struct Clause {
Literal* first_literal;
Literal* last_literal;
struct Clause* next_clause;
unsigned num_of_crossroads;
};
struct CNF {
Clause* first_clause;
Clause* last_clause;
unsigned num_of_clauses;
unsigned num_of_crossroads;
unsigned num_of_streets;
};
void add_clause_to_formula(Clause *clause, CNF *formula) {
assert(clause != NULL);
assert(formula != NULL);
if (formula->last_clause == NULL) {
assert(formula->first_clause == NULL);
formula->first_clause = clause;
} else {
formula->last_clause->next_clause = clause;
}
formula->last_clause = clause;
clause->num_of_crossroads = formula->num_of_crossroads;
++formula->num_of_clauses;
}
Clause* create_new_clause(CNF* formula) {
Clause *new_clause = malloc(sizeof(Clause));
new_clause->first_literal = NULL;
new_clause->last_literal = NULL;
new_clause->next_clause = NULL;
add_clause_to_formula(new_clause, formula);
return new_clause;
}
void add_literal_to_clause(Clause *clause, bool is_positive, unsigned step, unsigned crossroad_from, unsigned crossroad_to) {
assert(clause != NULL);
Literal *new_literal = malloc(sizeof(Literal));
unsigned num_of_crossroads = clause->num_of_crossroads;
int lit_num = step*num_of_crossroads*num_of_crossroads + crossroad_from*num_of_crossroads + crossroad_to + 1;
if (!is_positive) {
lit_num = -lit_num;
}
new_literal->var = lit_num;
new_literal->next_literal = NULL;
if (clause->last_literal == NULL) {
assert(clause->first_literal == NULL);
clause->first_literal = new_literal;
} else {
clause->last_literal->next_literal = new_literal;
}
clause->last_literal = new_literal;
}
unsigned get_num_of_variables(CNF* formula) {
assert(formula != NULL);
return formula->num_of_crossroads * formula->num_of_crossroads * formula->num_of_streets;
}
unsigned get_num_of_clauses(CNF* formula) {
assert(formula != NULL);
return formula->num_of_clauses;
}
void clear_clause(Clause* cl) {
assert(cl != NULL);
while(cl->first_literal != NULL) {
Literal *cur_lit = cl->first_literal;
cl->first_literal = cl->first_literal->next_literal;
free(cur_lit);
}
cl->last_literal = NULL;
}
void clear_cnf(CNF* formula) {
assert(formula != NULL);
while(formula->first_clause != NULL) {
Clause *this_cl = formula->first_clause;
formula->first_clause = formula->first_clause->next_clause;
clear_clause(this_cl);
free(this_cl);
}
formula->last_clause = NULL;
formula->num_of_clauses = 0;
}
void error(char* error_msg) {
fprintf(stderr, "%s\n", error_msg);
exit(-1);
}
void print_formula(CNF* formula) {
assert(formula != NULL);
printf("p cnf %u %u\n", get_num_of_variables(formula), get_num_of_clauses(formula));
Clause *next_cl = formula->first_clause;
while (next_cl != 0) {
Literal *next_lit = next_cl->first_literal;
while (next_lit != 0) {
printf("%d ", next_lit->var);
next_lit = next_lit->next_literal;
}
next_cl = next_cl->next_clause;
printf("0\n");
}
}
int main (int argc, char** argv) {
if (argc != 2) {
error("Program ocekava presne jeden argument: soubor obsahujici seznam ulic");
}
FILE *input_file = fopen(argv[1], "r");
if (input_file == NULL) {
error("Vstupni soubor nelze otevrit");
}
printf("c Vstupni soubor:\n");
unsigned num_of_crossroads, num_of_streets;
if (fscanf(input_file, "%u %u", &num_of_crossroads, &num_of_streets) != 2) {
fclose(input_file);
error("Hlavicka souboru by mela obsahovat dve cisla: pocet krizovatek a pocet ulic v souboru");
}
printf("c %u %u\n", num_of_crossroads, num_of_streets);
if (num_of_crossroads == 0 || num_of_streets == 0) {
fclose(input_file);
error("Je treba stanovit kladny pocet krizovatek a pocet ulic");
}
Street* streets = malloc(num_of_streets * sizeof(Street));
for (unsigned i = 0; i < num_of_streets; ++i) {
Street e;
if (fscanf(input_file, "%u %u", &e.crossroad_from, &e.crossroad_to) != 2) {
free(streets);
fclose(input_file);
error("Ulice je dana dvema cisly - krizovatkou, ze ktere vychazi a do ktere vede");
}
printf("c %u %u\n", e.crossroad_from, e.crossroad_to);
if (e.crossroad_from >= num_of_crossroads || e.crossroad_to >= num_of_crossroads) {
free(streets);
fclose(input_file);
error("Krizovatka pro nejakou ulici ma vyssi hodnotu nez maximalni povolena hodnota");
}
streets[i] = e;
}
fclose(input_file);
printf("c\nc Mapovani promennych na krok a ulici:\n");
for (unsigned var = 1; var <= num_of_crossroads * num_of_crossroads * num_of_streets; ++var) {
unsigned step = (var-1) / (num_of_crossroads * num_of_crossroads);
unsigned rest = (var-1) % (num_of_crossroads * num_of_crossroads);
printf("c %u - v kroku %u se pouzije ulice od krizovatky %u ke krizovatce %u\n", var, step, rest / num_of_crossroads, rest % num_of_crossroads);
}
printf("c\nc\n");
CNF f = { .first_clause = NULL, .last_clause = NULL, .num_of_clauses = 0, .num_of_crossroads = num_of_crossroads, .num_of_streets = num_of_streets };
at_least_one_valid_street_for_each_step(&f, num_of_crossroads, num_of_streets, streets);
free(streets);
at_most_one_street_for_each_step(&f, num_of_crossroads, num_of_streets);
streets_connected(&f, num_of_crossroads, num_of_streets);
streets_do_not_repeat(&f, num_of_crossroads, num_of_streets);
printf("c Formula:\n");
print_formula(&f);
clear_cnf(&f);
return 0;
}

Binary file not shown.

View file

@ -0,0 +1,3 @@
#!/bin/sh
python3 ../tests/run.py $1

View file

@ -0,0 +1,160 @@
from collections import Counter
STATUS_SAT = "SAT"
STATUS_UNSAT = "UNSAT"
class ModelError(Exception):
pass
class Edge:
def __init__(self, src, dst):
self.src = src
self.dst = dst
def __eq__(self, other):
return self.src == other.src and self.dst == other.dst
def __hash__(self):
return hash((self.src, self.dst))
def __repr__(self):
return f"{self.src} -> {self.dst}"
class Input:
def __init__(self, num_of_nodes, edges):
self.num_of_nodes = num_of_nodes
self.edges = edges
@staticmethod
def load(path):
with open(path) as f:
lines = f.read().split("\n")
header = lines[0].split(" ")
num_of_nodes = int(header[0])
edges = []
for line in lines[1:]:
if line not in ["", "\n"]:
edge = line.split(" ")
src = int(edge[0])
dst = int(edge[1])
edges.append(Edge(src, dst))
return Input(num_of_nodes, edges)
@property
def num_of_edges(self):
return len(self.edges)
def compute_var_index(self, step, src, dst):
return step * (self.num_of_nodes ** 2) + src * self.num_of_nodes + dst + 1
class Model:
def __init__(self, status, literals, input):
self.status = status
self.literals = literals
self.input = input
def is_sat(self):
return self.status == STATUS_SAT
@staticmethod
def load(path, input):
"""
The output of the minisat always has the form:
STATUS
[MODEL 0]
"""
with open(path, "r") as f:
lines = f.read().split("\n")
status = lines[0]
if status == STATUS_UNSAT:
return Model(status, None, input)
else:
model = lines[1].split(" ")[0:-1] # Discard '0'
if model == [""]:
return Model(status, [], input)
model = list(map(lambda x: int(x), model))
return Model(status, model, input)
def __getitem__(self, key):
var = self.input.compute_var_index(*key)
if var in self.literals:
return True
elif -var in self.literals:
return False
else:
return True # variable is undefined
def edges_in_step(self, step):
# Return all edges taken in the given step
acc = []
for src in range(self.input.num_of_nodes):
for dst in range(self.input.num_of_nodes):
if self[step, src, dst]:
acc.append(Edge(src, dst))
return acc
def all_edges(self):
# Return all edges taken
acc = []
for step in range(self.input.num_of_edges):
acc += self.edges_in_step(step)
return acc
def print(self):
print("Status:", self.status)
if self.status == STATUS_UNSAT:
return
print("Model:")
for step in range(self.input.num_of_edges):
edges = ", ".join([str(e) for e in self.edges_in_step(step)])
print(f" krok {step}: {edges}")
def check_one_valid_edge_in_step(self):
for step in range(self.input.num_of_edges):
edges = self.edges_in_step(step)
if len(edges) == 0:
raise ModelError(f"Nesprávný model: žádná ulice v kroku {step}")
if len(edges) > 1:
raise ModelError(f"Nesprávný model: více ulic v kroku {step}")
for edge in edges:
if edge not in self.input.edges:
raise ModelError(f"Nesprávný model: neexistující ulice {edge} v kroku {step}")
def check_path(self):
edges = self.all_edges()
duplicates = [str(edge) for (edge, count) in Counter(edges).items() if count > 1]
if len(duplicates) > 0:
duplicates = ", ".join(duplicates)
raise ModelError(f"Nesprávný model: některé ulice byly navštíveny vícekrát: {duplicates}.")
# This should not happen
if len(edges) != len(self.input.edges):
raise ModelError(f"Nesprávný model: některá z ulic nebyla navštívena.")
def check_connectivity(self):
for step in range(self.input.num_of_edges - 1):
edges = self.edges_in_step(step)
edges_next = self.edges_in_step(step+1)
assert(len(edges) == 1)
assert(len(edges_next) == 1)
current_e = edges[0]
next_e = edges_next[0]
if current_e.dst != next_e.src:
raise ModelError(f"Nesprávný model: ulice {next_e} v kroku {step+1} nenavazuje na ulici {current_e} z kroku {step}.")
def check(self):
self.check_one_valid_edge_in_step()
self.check_path()
self.check_connectivity()

View file

@ -0,0 +1,33 @@
import sys
from model import ModelError
from run_tests import execute, smoke_test, print_ok, print_err, SolverError, GeneratorError
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: ./run.sh input")
exit(1)
smoke_test()
try:
result = execute(sys.argv[1])
except GeneratorError as e:
print_err("Chyba generátoru:")
print(e)
exit(1)
except SolverError as e:
print_err("Chyba SAT solveru:")
print(e)
exit(1)
result.print()
if result.is_sat():
try:
result.check()
print_ok("Nalezený model je korektní")
except ModelError as e:
print_err(f"\n{e}")
exit(1)

View file

@ -0,0 +1,103 @@
import os
from tempfile import NamedTemporaryFile as TmpFile
from subprocess import run, PIPE, TimeoutExpired
from model import Model, Input, STATUS_SAT, STATUS_UNSAT, ModelError
TRANSLATOR = "../code/main"
SOLVER = "minisat"
RC_SAT = 10
RC_UNSAT = 20
class colors:
red = "\033[91m"
green = "\033[92m"
white = "\033[m"
def print_ok(text):
print(f"{colors.green}{text}{colors.white}")
def print_err(text):
print(f"{colors.red}{text}{colors.white}")
class GeneratorError(Exception):
pass
class SolverError(Exception):
pass
def smoke_test():
# Verify that MiniSat solver is available
try:
run([SOLVER, "--help"], stdout=PIPE, stderr=PIPE)
except Exception:
print("Minisat není nainstalovaný nebo není k dispozici v cestě")
exit(1)
def execute(path):
with TmpFile(mode="w+") as dimacs_out, TmpFile(mode="w+") as model_out:
try:
translator = run([TRANSLATOR, path], stdout=dimacs_out, stderr=PIPE)
except Exception:
raise GeneratorError("Chyba při spuštění generátoru formule")
if translator.returncode != 0:
raise GeneratorError(translator.stderr.decode().strip())
try:
solver = run(
[SOLVER, dimacs_out.name, model_out.name], stdout=PIPE, stderr=PIPE
)
except Exception:
raise SolverError("Chyba při spuštění SAT solveru")
if not solver.returncode in [RC_SAT, RC_UNSAT]:
raise SolverError(solver.stderr.decode().strip())
input = Input.load(path)
model = Model.load(model_out.name, input)
return model
def run_test_case(path, expected_status):
try:
result = execute(path)
except GeneratorError:
print_err(f"{path}: Chyba generátoru")
return
except SolverError:
print_err(f"{path}: Chyba SAT solveru")
return
if expected_status != result.status:
print_err(
f"{path}: Chybný výsledek ({result.status}, očekávaný {expected_status})"
)
else:
try:
if result.is_sat():
result.check()
print_ok(f"{path}: OK")
except ModelError as e:
print_err(f"{path}: {e}")
def run_test_suite(path, expected_status):
for test_case in sorted(os.listdir(path)):
if test_case.endswith(".in"):
run_test_case(os.path.join(path, test_case), expected_status)
if __name__ == "__main__":
smoke_test()
run_test_suite("../tests/sat", STATUS_SAT)
run_test_suite("../tests/unsat", STATUS_UNSAT)

View file

@ -0,0 +1,11 @@
6 9
0 1
0 3
1 2
1 4
1 5
2 0
3 1
4 4
4 1

View file

@ -0,0 +1,10 @@
5 8
0 1
1 2
2 3
3 4
4 3
3 2
2 1
1 0

View file

@ -0,0 +1,12 @@
5 10
0 1
1 2
2 1
3 4
4 3
1 0
3 1
1 3
0 2
2 0

View file

@ -0,0 +1,3 @@
2 1
0 1

View file

@ -0,0 +1,11 @@
5 9
0 1
1 2
2 3
3 4
0 0
1 1
2 2
3 3
4 4

View file

@ -0,0 +1,3 @@
1 1
0 0

View file

@ -0,0 +1,6 @@
5 4
0 1
1 2
2 3
3 4

View file

@ -0,0 +1,6 @@
4 4
0 1
0 2
1 3
2 3

View file

@ -0,0 +1,6 @@
4 4
0 1
1 2
2 1
2 3

View file

@ -0,0 +1,10 @@
5 8
0 1
1 4
3 4
2 3
1 2
3 1
0 4
3 2

View file

@ -0,0 +1,4 @@
3 2
0 1
2 1

View file

@ -0,0 +1,5 @@
5 3
0 1
1 2
3 4

View file

@ -0,0 +1,13 @@
9 11
0 1
1 2
2 3
3 4
4 3
3 2
5 6
6 7
7 8
8 7
7 6

View file

@ -0,0 +1,109 @@
(set-logic NIA)
(set-option :produce-models true)
(set-option :incremental true)
; Deklarace promennych pro vstupy
; ===============================
; Parametry
(declare-fun A () Int)
(declare-fun B () Int)
(declare-fun C () Int)
(declare-fun D () Int)
(declare-fun E () Int)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;; START OF SOLUTION ;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Declare the variables
(declare-fun x () Int)
(declare-fun y () Int)
(declare-fun z () Int)
; Constraints for D and E
(assert (and (> D 0) (> E 0)))
; Compute the variables
(assert (= x (* A B 2)))
(assert (ite (< x E) (= y (+ x (* 5 B))) (= y (- x C))))
(assert (ite (< (+ y 2) D) (= z (- (* x A) (* y B))) (= z (+ (* x B) (* y A)))))
; Function f returns true
(assert (< z (+ E D)))
; D + E is the smallest possible
(assert (forall ((d Int) (e Int) (X Int) (Y Int) (Z Int))
(=> (and (> d 0) (> e 0)
(= X (* A B 2))
(ite (< X e) (= Y (+ X (* 5 B))) (= Y (- X C)))
(ite (< (+ Y 2) d) (= Z (- (* X A) (* Y B))) (= Z (+ (* X B) (* Y A))))
(< Z (+ e d)))
(<= (+ D E) (+ d e))
)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;; END OF SOLUTION ;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Testovaci vstupy
; ================
(echo "Test 1 - vstup A=1, B=1, C=3")
(echo "a) Ocekavany vystup je sat a D+E se rovna 2")
(check-sat-assuming (
(= A 1) (= B 1) (= C 3)
))
(get-value (D E (+ D E)))
(echo "b) Neexistuje jine reseni nez 2, ocekavany vystup je unsat")
(check-sat-assuming (
(= A 1) (= B 1) (= C 3) (distinct (+ D E) 2)
))
(echo "Test 2 - vstup A=5, B=2, C=5")
(echo "a) Ocekavany vystup je sat a D+E se rovna 54")
(check-sat-assuming (
(= A 5) (= B 2) (= C 5)
))
(get-value (D E (+ D E)))
(echo "b) Neexistuje jine reseni nez 54, ocekavany vystup je unsat")
(check-sat-assuming (
(= A 5) (= B 2) (= C 5) (distinct (+ D E) 54)
))
(echo "Test 3 - vstup A=100, B=15, C=1")
(echo "a) Ocekavany vystup je sat a D+E se rovna 253876")
(check-sat-assuming (
(= A 100) (= B 15) (= C 1)
))
(get-value (D E (+ D E)))
(echo "b) Neexistuje jine reseni nez 253876, ocekavany vystup je unsat")
(check-sat-assuming (
(= A 100) (= B 15) (= C 1) (distinct (+ D E) 253876)
))
(echo "Test 4 - vstup A=5, B=5, C=3")
(echo "a) Ocekavany vystup je sat a D+E se rovna 51")
(check-sat-assuming (
(= A 5) (= B 5) (= C 3)
))
(get-value (D E (+ D E)))
(echo "b) Neexistuje jine reseni nez 51, ocekavany vystup je unsat")
(check-sat-assuming (
(= A 5) (= B 5) (= C 3) (distinct (+ D E) 51)
))
(echo "Test 5 - vstup A=2, B=1, C=2")
(echo "a) Ocekavany vystup je sat a D+E se rovna 7")
(check-sat-assuming (
(= A 2) (= B 1) (= C 2)
))
(get-value (D E (+ D E)))
(echo "b) Neexistuje jine reseni nez 7, ocekavany vystup je unsat")
(check-sat-assuming (
(= A 2) (= B 1) (= C 2) (distinct (+ D E) 7)
))

View file

@ -0,0 +1,6 @@
Brno
Bratislava
Praha
Bruntal
Brno hl.

Binary file not shown.

View file

@ -0,0 +1,124 @@
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<stdbool.h>
#include<stdlib.h>
#define MAX_ADRESS_LENGTH 103 // 0->99 + \n + \0 + check for wrong input
#define ASCII_LENGTH 129 // 0->127 + \0
int findPrefix(char *prefix, char *found, char *enabled) //funkcia, ktora prudovo prejde po riadku zoznam miest a robi s nimi 3
//hlavne operacie, zapisuje pocet zhod prefixu s adresou, zapisuje
//poslednu zhodnu adresu s prefixom do premennej found a zapisuje
//povolene klavesy
{
char adress [MAX_ADRESS_LENGTH];
bool preocc = false; // prefix occurence, vyskyt prefixu v jednej adrese
int prenum = 0; //prefix number(pocet vsetkych zhod prefixu s adresami)
while(fgets(adress, sizeof(adress), stdin) != NULL) //cyklus, ktory prechadza riadok po riadku adresy, konci na konci suboru
{
if(strlen(adress) == MAX_ADRESS_LENGTH - 1)
{
fprintf(stderr, "Wrong input(too long adress)\n");
exit(1);
}
for(size_t i = 0; i < strlen(prefix); i++)
{
if(toupper(prefix[i]) == toupper(adress[i]))
preocc = true; // ak sa kazdy znak v prefixe zhoduje so znakmi adresy, do vyskytu prefixu dame hodnotu true
else
{
preocc = false; //ak sa aspon jedno pismeno nezhoduje
break;
}
}
if(preocc == true) // ak sa vsetky pismena v prefixe zhodovali
{
prenum++;
strcpy(found, adress);
int enable = toupper(adress[strlen(prefix)]); // do enable zapiseme poradie v ascii nasledujuceho znaku v adrese po
// zhodnom prefixe
enabled[enable] = 1; // do pola povolenych znakov zaznacime povoleny znak na pozicii enable
preocc = false;
}
else if(strlen(prefix) == 0) // specialny pripad, ak je program spusteny bez 2. argumentu(prazdny retazec)
{
int enable = toupper(adress[0]);// povolime vsetky zaciatocne pismena adries
enabled[enable] = 1;
prenum = 42; // nemozeme dat hodntou 1, pretoze najst zhodu nemozeme
// nemozeme dat ani 0, pretoze ak bol zadany spravny vstup,musime vypisat aspon jednu povolenu klavesu
}
}
return prenum;
}
void printFound(char *found)
{
printf ("FOUND: ");
for(size_t i = 0; i < strlen(found); i++)
{
printf ("%c", toupper(found[i]));
}
}
void printNotFound()
{
printf ("NOT FOUND\n");
}
void printEnabled(char *enabled)
{
printf("ENABLE: ");
for (int i = 0; i < ASCII_LENGTH - 1; i++)
{
if (enabled[i]) printf("%c", i); // prechadzame ascii tabulku a vypisujeme znaky, ktore sme si do nej zaznacili ako povolene
}
printf ("\n");
}
int main(int argc, char** argv){
char prefix [MAX_ADRESS_LENGTH];//max prefix == max adress
if (argc == 1)
{
strcpy(prefix, "\0"); //zaciatocny stav(prefix) berieme ako prazdny retazec
}
else if (argc == 2)
{
strcpy(prefix, argv[1]);
if(strlen(prefix) > MAX_ADRESS_LENGTH - 3)
{
fprintf(stderr, "Wrong argument\n");
return 1;
}
}
else
{
fprintf(stderr,"Wrong argument\n");
return 1;
}
char found[MAX_ADRESS_LENGTH]; // najdene mesto
char enabled[ASCII_LENGTH] = {0}; // pole povolenych znakov, znaci, ci za znak z ascii tabulky nachadza v povolenych znakoch
int prenum = findPrefix(prefix, found, enabled);
if(prenum == 1)
{
printFound(found); // ak je pocet zhodnych prefixov len jeden, vypiseme najdenu adresu
}
else if (prenum == 0) // ziadna zhoda
{
printNotFound();
}
else
{
printEnabled(enabled);
}
return 0;
}

View file

@ -0,0 +1,4 @@
CFLAGS=-std=c11 -Wall -Wextra -Werror
keyfilter: keyfilter.c
gcc $(CFLAGS) keyfilter.c -o keyfilter

View file

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

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