This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* -*- compile-command: "gcc -O3 sliding_window.c && ./a.out"; -*- */ | |
| #include <assert.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| int slide_window(const size_t window_size, const void *const buf, const size_t elm_sz, const size_t n, void **start, void **end) { | |
| assert(buf && start); | |
| assert(buf <= *start && *start <= *end); | |
| assert(window_size > 0 && window_size <= n); | |
| char *buf_end = (char *)buf + (elm_sz * n); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "runtime.version": "Lua 5.4", | |
| "Lua.color.mode": "SemanticEnhanced", | |
| "Lua.hint.setType": true, | |
| "Lua.IntelliSense.traceBeSetted": true, | |
| "Lua.IntelliSense.traceFieldInject": true, | |
| "Lua.IntelliSense.traceLocalSet": true, | |
| "Lua.IntelliSense.traceReturn": true | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TARGET_EXEC := crypt | |
| CC := clang | |
| BUILD_DIR := build | |
| SRC_DIRS := src dep | |
| INC_DIRS := src dep | |
| INC_FLAGS := $(addprefix -I,$(INC_DIRS)) | |
| SRCS := $(shell find $(SRC_DIRS) -name '*.c') | |
| OBJS := $(SRCS:%=$(BUILD_DIR)/%.o) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "rogueutil.h" | |
| /* Constant strings for ANSI colors ans seqiences */ | |
| static const char *RU_ANSI_CLS = "\033[2J\033[3J"; | |
| static const char *RU_ANSI_CONSOLE_TITLE_PRE = "\033]0;"; | |
| static const char *RU_ANSI_CONSOLE_TITLE_POST = "\007"; | |
| static const char *RU_ANSI_ATTRIBUTE_RESET = "\033[0m"; | |
| static const char *RU_ANSI_CURSOR_HIDE = "\033[?25l"; | |
| static const char *RU_ANSI_CURSOR_SHOW = "\033[?25h"; | |
| static const char *RU_ANSI_CURSOR_HOME = "\033[H"; |