repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
karpathy/llama2.c | https://github.com/karpathy/llama2.c | null | null | null | null | 19,462 | null | null | mit | null | null | null | null | null | null | null | test.c | null | null | null | null | null | null | C | 2026-05-04T18:45:57.212544 | #define TESTING
#include "run.c"
void assert_eq(int a, int b) {
if (a != b) {
printf("Assertion failed: %d != %d\n", a, b);
exit(EXIT_FAILURE);
}
}
void test_prompt_encoding(Tokenizer* tokenizer, char* prompt, int* expected_tokens, int num_expected_tokens) {
// encode
int* prompt_token... |
karpathy/llama2.c | https://github.com/karpathy/llama2.c | null | null | null | null | 19,462 | null | null | mit | null | null | null | null | null | null | null | win.h | null | null | null | null | null | null | C | 2026-05-04T18:45:57.225137 | #ifndef _WIN_H_
#define _WIN_H_
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <time.h>
#include <stdint.h>
#define ssize_t int64_t
#define ftell _ftelli64
// Below code is originally from mman-win32
//
/*
* sys/mman.h
* mman-win32
*/
#ifndef _WIN... |
karpathy/llama2.c | https://github.com/karpathy/llama2.c | null | null | null | null | 19,462 | null | null | mit | null | null | null | null | null | null | null | win.c | null | null | null | null | null | null | C | 2026-05-04T18:45:57.247655 | #include "win.h"
#include <errno.h>
#include <io.h>
#ifndef FILE_MAP_EXECUTE
#define FILE_MAP_EXECUTE 0x0020
#endif /* FILE_MAP_EXECUTE */
static int __map_mman_error(const uint32_t err, const int deferr)
{
if (err == 0)
return 0;
//TODO: implement
return err;
}
static uint32_t... |
karpathy/llama2.c | https://github.com/karpathy/llama2.c | null | null | null | null | 19,462 | null | null | mit | null | null | null | null | null | null | null | runq.c | null | null | null | null | null | null | C | 2026-05-04T18:45:57.251032 | /* Inference for Llama-2 Transformer model in pure C, int8 quantized forward pass. */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdint.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include <fcntl.h>
#if defined _WIN32
#include "win.h"
#else
#include <unistd.h>
#inclu... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/ffmpeg.h | null | null | null | null | null | null | C | 2026-05-04T18:45:59.895512 | /*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/cmdutils.h | null | null | null | null | null | null | C | 2026-05-04T18:45:59.900156 | /*
* Various utilities for command line tools
* copyright (c) 2003 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/opt_common.h | null | null | null | null | null | null | C | 2026-05-04T18:45:59.902559 | /*
* Option handlers shared between the tools.
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/ffmpeg_filter.c | null | null | null | null | null | null | C | 2026-05-04T18:45:59.904991 | /*
* ffmpeg filter configuration
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later ve... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/ffmpeg_mux.c | null | null | null | null | null | null | C | 2026-05-04T18:45:59.907057 | /*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/fopen_utf8.h | null | null | null | null | null | null | C | 2026-05-04T18:45:59.908987 | /*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/ffmpeg_hw.c | null | null | null | null | null | null | C | 2026-05-04T18:45:59.909625 | /*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/opt_common.c | null | null | null | null | null | null | C | 2026-05-04T18:45:59.913277 | /*
* Option handlers shared between the tools.
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option... |
ffmpegwasm/ffmpeg.wasm | https://github.com/ffmpegwasm/ffmpeg.wasm | null | null | null | null | 17,454 | null | null | mit | null | null | null | null | null | null | null | src/fftools/cmdutils.c | null | null | null | null | null | null | C | 2026-05-04T18:45:59.918096 | /*
* Various utilities for command line tools
* Copyright (c) 2000-2003 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* vers... |
woltapp/blurhash | https://github.com/woltapp/blurhash | null | null | null | null | 16,974 | null | null | mit | null | null | null | null | null | null | null | C/decode_stb.c | null | null | null | null | null | null | C | 2026-05-04T18:46:03.780741 | #include "decode.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_writer.h"
int main(int argc, char **argv) {
if(argc < 5) {
fprintf(stderr, "Usage: %s hash width height output_file [punch]\n", argv[0]);
return 1;
}
int width, height, punch = 1;
char * hash = argv[1];
width = atoi(argv[2]);
height =... |
woltapp/blurhash | https://github.com/woltapp/blurhash | null | null | null | null | 16,974 | null | null | mit | null | null | null | null | null | null | null | C/encode.h | null | null | null | null | null | null | C | 2026-05-04T18:46:03.791369 | #ifndef __BLURHASH_ENCODE_H__
#define __BLURHASH_ENCODE_H__
#include <stdint.h>
#include <stdlib.h>
const char *blurHashForPixels(int xComponents, int yComponents, int width, int height, uint8_t *rgb, size_t bytesPerRow);
#endif
|
woltapp/blurhash | https://github.com/woltapp/blurhash | null | null | null | null | 16,974 | null | null | mit | null | null | null | null | null | null | null | C/encode.c | null | null | null | null | null | null | C | 2026-05-04T18:46:03.792078 | #include "encode.h"
#include "common.h"
#include <string.h>
static float *multiplyBasisFunction(int xComponent, int yComponent, int width, int height, uint8_t *rgb, size_t bytesPerRow);
static char *encode_int(int value, int length, char *destination);
static int encodeDC(float r, float g, float b);
static int encod... |
woltapp/blurhash | https://github.com/woltapp/blurhash | null | null | null | null | 16,974 | null | null | mit | null | null | null | null | null | null | null | C/decode.c | null | null | null | null | null | null | C | 2026-05-04T18:46:03.794283 | #include "decode.h"
#include "common.h"
static char chars[83] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~";
static inline uint8_t clampToUByte(int * src) {
if( *src >= 0 && *src <= 255 )
return *src;
return (*src < 0) ? 0 : 255;
}
static inline uint8_t * createByteArra... |
woltapp/blurhash | https://github.com/woltapp/blurhash | null | null | null | null | 16,974 | null | null | mit | null | null | null | null | null | null | null | C/common.h | null | null | null | null | null | null | C | 2026-05-04T18:46:03.808500 | #ifndef __BLURHASH_COMMON_H__
#define __BLURHASH_COMMON_H__
#include<math.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
static inline int linearTosRGB(float value) {
float v = fmaxf(0, fminf(1, value));
if(v <= 0.0031308) return v * 12.92 * 255 + 0.5;
else return (1.055 * powf(v, 1 / 2.4) - 0.055) * ... |
woltapp/blurhash | https://github.com/woltapp/blurhash | null | null | null | null | 16,974 | null | null | mit | null | null | null | null | null | null | null | C/encode_stb.c | null | null | null | null | null | null | C | 2026-05-04T18:46:03.808963 | #include "encode.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include <stdio.h>
const char *blurHashForFile(int xComponents, int yComponents,const char *filename);
int main(int argc, const char **argv) {
if(argc != 4) {
fprintf(stderr, "Usage: %s x_components y_components imagefile\n", argv[0]);
... |
woltapp/blurhash | https://github.com/woltapp/blurhash | null | null | null | null | 16,974 | null | null | mit | null | null | null | null | null | null | null | C/decode.h | null | null | null | null | null | null | C | 2026-05-04T18:46:03.833311 | #ifndef __BLURHASH_DECODE_H__
#define __BLURHASH_DECODE_H__
#include <math.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
/*
decode : Returns the pixel array of the result image given the blurhash string,
Parameters :
blurhash : A string representing the blurhash to be decod... |
woltapp/blurhash | https://github.com/woltapp/blurhash | null | null | null | null | 16,974 | null | null | mit | null | null | null | null | null | null | null | C/stb_writer.h | null | null | null | null | null | null | C | 2026-05-04T18:46:03.863133 | /* stb_image_write - v1.15 - public domain - http://nothings.org/stb
writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015
no warranty implied; use at your own risk
Before #including,
#define STB_IMAGE_WRITE_IMPLEMENTATION
in the file that you... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/stringop.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.369972 | #include <ctype.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <wordexp.h>
#include "list.h"
#include "log.h"
#include "stringop.h"
static const char whitespace[] = " \f\n\r\t\v";
void strip_whitespace(char *str) {
size_t len = str... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/log.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.389455 | #include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "log.h"
static terminate_callback_t log_terminate = exit;
void _sway_abort(const char *format, ...) {
va_list args;
va_start(args, format);
_sway_vlog(SWAY_ERROR, format, args);
va_end(arg... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/cairo.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.390022 | #include <stdint.h>
#include <cairo.h>
#include "cairo_util.h"
void cairo_set_source_u32(cairo_t *cairo, uint32_t color) {
cairo_set_source_rgba(cairo,
(color >> (3*8) & 0xFF) / 255.0,
(color >> (2*8) & 0xFF) / 255.0,
(color >> (1*8) & 0xFF) / 255.0,
(color >> (0*8) & 0xFF) / 255.0);
}
cairo_subpixel_ord... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/gesture.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.392286 | #include "gesture.h"
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "list.h"
#include "log.h"
#include "stringop.h"
const uint8_t GESTURE_FINGERS_ANY = 0;
char *gesture_parse(const char *input, struct gesture *output) {
// Clear output in case of failure
o... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/ipc-client.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.400192 | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include "ipc-client.h"
#include "log.h"
static const char ipc_magic[] = {'i', '3', '-', 'i', 'p', 'c'};
#define IPC_HEADER_SIZE (sizeof(ipc_magic) + 8)
char *get_socketpath(... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | client/pool-buffer.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.401614 | #include <assert.h>
#include <cairo.h>
#include <errno.h>
#include <fcntl.h>
#include <pango/pangocairo.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <time.h>
#include <unistd.h>
#include <wayland-client.h>
#include "config.h"
#include "pool-buffer.h"
#include "util.h"
st... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/pango.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.402852 | #include <cairo.h>
#include <pango/pangocairo.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cairo_util.h"
#include "log.h"
#include "stringop.h"
size_t escape_markup_text(const char *src, char *dest) {
size_t length = 0;
if (dest)... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/list.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.431043 | #include "list.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "log.h"
list_t *create_list(void) {
list_t *list = malloc(sizeof(list_t));
if (!list) {
return NULL;
}
list->capacity = 10;
list->length = 0;
list->items = malloc(sizeof(void*) * list->capacity);
return list;
}
static void ... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/loop.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.431545 | #include <limits.h>
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <poll.h>
#include <time.h>
#include <unistd.h>
#include "list.h"
#include "log.h"
#include "loop.h"
struct loop_fd_event {
void (*callback)(int fd, short mask, void *data);
void *data;
};
struct loop_timer {... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | common/util.c | null | null | null | null | null | null | C | 2026-05-04T18:46:06.463185 | #include <ctype.h>
#include <fcntl.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <wayland-server-protocol.h>
#include "log.h"
#include "util.h"
int wrap(int i, int max) {
return ((i % max) + max) % max;
}
bool parse_color(const char *color, uint32_t *res... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/cairo_util.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.002979 | #ifndef _SWAY_CAIRO_UTIL_H
#define _SWAY_CAIRO_UTIL_H
#include "config.h"
#include <stdint.h>
#include <cairo.h>
#include <wayland-client-protocol.h>
void cairo_set_source_u32(cairo_t *cairo, uint32_t color);
cairo_subpixel_order_t to_cairo_subpixel_order(enum wl_output_subpixel subpixel);
cairo_surface_t *cairo_imag... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/ipc.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.022098 | #ifndef _SWAY_IPC_H
#define _SWAY_IPC_H
#define event_mask(ev) (1 << (ev & 0x7F))
enum ipc_command_type {
// i3 command types - see i3's I3_REPLY_TYPE constants
IPC_COMMAND = 0,
IPC_GET_WORKSPACES = 1,
IPC_SUBSCRIBE = 2,
IPC_GET_OUTPUTS = 3,
IPC_GET_TREE = 4,
IPC_GET_MARKS = 5,
IPC_GET_BAR_CONFIG = 6,
IPC_GE... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/log.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.070416 | #ifndef _SWAY_LOG_H
#define _SWAY_LOG_H
#include <stdbool.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
typedef enum {
SWAY_SILENT = 0,
SWAY_ERROR = 1,
SWAY_INFO = 2,
SWAY_DEBUG = 3,
SWAY_LOG_IMPORTANCE_LAST,
} sway_log_importance_t;
#ifdef __GNUC__
#define ATTRIB_PRINTF(start, end) __attribute_... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/gesture.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.071395 | #ifndef _SWAY_GESTURE_H
#define _SWAY_GESTURE_H
#include <stdbool.h>
#include <stdint.h>
/**
* A gesture type used in binding.
*/
enum gesture_type {
GESTURE_TYPE_NONE = 0,
GESTURE_TYPE_HOLD,
GESTURE_TYPE_PINCH,
GESTURE_TYPE_SWIPE,
};
// Turns single type enum value to constant string representation.
const cha... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/list.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.100303 | #ifndef _SWAY_LIST_H
#define _SWAY_LIST_H
typedef struct {
int capacity;
int length;
void **items;
} list_t;
list_t *create_list(void);
void list_free(list_t *list);
void list_add(list_t *list, void *item);
void list_insert(list_t *list, int index, void *item);
void list_del(list_t *list, int index);
void list_cat... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/loop.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.101315 | #ifndef _SWAY_LOOP_H
#define _SWAY_LOOP_H
#include <stdbool.h>
/**
* This is an event loop system designed for sway clients, not sway itself.
*
* The loop consists of file descriptors and timers. Typically the Wayland
* display's file descriptor will be one of the fds in the loop.
*/
struct loop;
struct loop_tim... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/pango.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.102236 | #ifndef _SWAY_PANGO_H
#define _SWAY_PANGO_H
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <cairo.h>
#include <pango/pangocairo.h>
#include "stringop.h"
/**
* Utility function which escape characters a & < > ' ".
*
* The function returns the length of the escaped string, optionally writing th... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/ipc-client.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.116885 | #ifndef _SWAY_IPC_CLIENT_H
#define _SWAY_IPC_CLIENT_H
// arbitrary number, it's probably sufficient, higher number = more memory usage
#define JSON_MAX_DEPTH 512
#include <stdbool.h>
#include <stdint.h>
#include <sys/time.h>
#include "ipc.h"
/**
* IPC response including type of IPC response, size of payload and th... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/pool-buffer.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.117818 | #ifndef _SWAY_BUFFERS_H
#define _SWAY_BUFFERS_H
#include <cairo.h>
#include <pango/pangocairo.h>
#include <stdbool.h>
#include <stdint.h>
#include <wayland-client.h>
struct pool_buffer {
struct wl_buffer *buffer;
cairo_surface_t *surface;
cairo_t *cairo;
PangoContext *pango;
uint32_t width, height;
void *data;
... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/stringop.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.174887 | #ifndef _SWAY_STRINGOP_H
#define _SWAY_STRINGOP_H
#include <stdbool.h>
#include <stddef.h>
#include "list.h"
#ifdef __GNUC__
#define _SWAY_ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end)))
#else
#define _SWAY_ATTRIB_PRINTF(start, end)
#endif
void strip_whitespace(char *str);
void strip_quotes(cha... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/commands.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.987226 | #ifndef _SWAY_COMMANDS_H
#define _SWAY_COMMANDS_H
#include <wlr/util/edges.h>
#include "config.h"
#include "stringop.h"
struct sway_container;
typedef struct cmd_results *sway_cmd(int argc, char **argv);
struct cmd_handler {
const char *command;
sway_cmd *handle;
};
/**
* Indicates the result of a command's exe... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/decoration.h | null | null | null | null | null | null | C | 2026-05-04T18:46:07.999676 | #ifndef _SWAY_DECORATION_H
#define _SWAY_DECORATION_H
#include <wlr/types/wlr_server_decoration.h>
struct sway_server_decoration {
struct wlr_server_decoration *wlr_server_decoration;
struct wl_list link;
struct wl_listener destroy;
struct wl_listener mode;
};
struct sway_server_decoration *decoration_from_surf... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/desktop/launcher.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.000877 | #ifndef _SWAY_LAUNCHER_H
#define _SWAY_LAUNCHER_H
#include <stdlib.h>
#include <wayland-server-core.h>
#include "sway/input/seat.h"
struct launcher_ctx {
pid_t pid;
char *fallback_name;
struct wlr_xdg_activation_token_v1 *token;
struct wl_listener token_destroy;
struct sway_seat *seat;
struct wl_listener seat_d... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/desktop/transaction.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.002439 | #ifndef _SWAY_TRANSACTION_H
#define _SWAY_TRANSACTION_H
#include <stdint.h>
#include <stdbool.h>
#include <wlr/types/wlr_scene.h>
/**
* Transactions enable us to perform atomic layout updates.
*
* A transaction contains a list of containers and their new state.
* A state might contain a new size, or new border set... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/desktop/idle_inhibit_v1.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.009707 | #ifndef _SWAY_DESKTOP_IDLE_INHIBIT_V1_H
#define _SWAY_DESKTOP_IDLE_INHIBIT_V1_H
#include <wlr/types/wlr_idle_inhibit_v1.h>
enum sway_idle_inhibit_mode {
INHIBIT_IDLE_APPLICATION, // Application set inhibitor (when visible)
INHIBIT_IDLE_FOCUS, // User set inhibitor when focused
INHIBIT_IDLE_FULLSCREEN, // User se... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/config.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.011016 | #ifndef _SWAY_CONFIG_H
#define _SWAY_CONFIG_H
#include <libinput.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include <wlr/interfaces/wlr_switch.h>
#include <wlr/types/wlr_tablet_tool.h>
#include <wlr/util/box.h>
#include <wlr/render/color.h>
#include <xkbcommon/xkbcommon.h>
#include <xf86drmMode.h>
#i... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/cursor.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.040068 | #ifndef _SWAY_INPUT_CURSOR_H
#define _SWAY_INPUT_CURSOR_H
#include <stdbool.h>
#include <stdint.h>
#include <wlr/types/wlr_pointer_constraints_v1.h>
#include <wlr/types/wlr_pointer_gestures_v1.h>
#include <wlr/types/wlr_compositor.h>
#include "sway/input/seat.h"
#include "config.h"
#define SWAY_CURSOR_PRESSED_BUTTONS_... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/criteria.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.041232 | #ifndef _SWAY_CRITERIA_H
#define _SWAY_CRITERIA_H
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
#include "config.h"
#include "list.h"
#include "tree/view.h"
#if WLR_HAS_XWAYLAND
#include "sway/xwayland.h"
#endif
enum criteria_type {
CT_COMMAND = 1 << 0,
CT_ASSIGN_OUTPUT = 1 << 1,
CT... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/keyboard.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.171749 | #ifndef _SWAY_INPUT_KEYBOARD_H
#define _SWAY_INPUT_KEYBOARD_H
#include "sway/input/seat.h"
#define SWAY_KEYBOARD_PRESSED_KEYS_CAP 32
/**
* Get modifier mask from modifier name.
*
* Returns the modifier mask or 0 if the name isn't found.
*/
uint32_t get_modifier_mask_by_name(const char *name);
/**
* Get modifie... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/seat.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.838510 | #ifndef _SWAY_INPUT_SEAT_H
#define _SWAY_INPUT_SEAT_H
#include <wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_touch.h>
#include <wlr/util/edges.h>
#include "sway/config.h"
#include "sway/... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/ipc-server.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.840982 | #ifndef _SWAY_IPC_SERVER_H
#define _SWAY_IPC_SERVER_H
#include <sys/socket.h>
#include "sway/config.h"
#include "sway/input/input-manager.h"
#include "sway/tree/container.h"
#include "ipc.h"
struct sway_server;
void ipc_init(struct sway_server *server);
struct sockaddr_un *ipc_user_sockaddr(void);
void ipc_event_wo... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/libinput.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.842022 | #ifndef _SWAY_INPUT_LIBINPUT_H
#define _SWAY_INPUT_LIBINPUT_H
#include "sway/input/input-manager.h"
bool sway_input_configure_libinput_device(struct sway_input_device *device);
void sway_input_configure_libinput_device_send_events(
struct sway_input_device *device);
void sway_input_reset_libinput_device(struct sway... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/ipc-json.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.843268 | #ifndef _SWAY_IPC_JSON_H
#define _SWAY_IPC_JSON_H
#include <json.h>
#include "sway/output.h"
#include "sway/tree/container.h"
#include "sway/input/input-manager.h"
json_object *ipc_json_get_version(void);
json_object *ipc_json_get_binding_mode(void);
json_object *ipc_json_describe_disabled_output(struct sway_output ... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/text_input_popup.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.844333 | #ifndef _SWAY_INPUT_TEXT_INPUT_POPUP_H
#define _SWAY_INPUT_TEXT_INPUT_POPUP_H
#include "sway/tree/view.h"
struct sway_input_popup {
struct sway_input_method_relay *relay;
struct wlr_scene_tree *scene_tree;
struct sway_popup_desc desc;
struct wlr_input_popup_surface_v2 *popup_surface;
struct wlr_output *fixed_ou... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/tablet.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.845380 | #ifndef _SWAY_INPUT_TABLET_H
#define _SWAY_INPUT_TABLET_H
#include <wlr/types/wlr_layer_shell_v1.h>
struct sway_seat;
struct wlr_tablet_tool;
struct sway_tablet {
struct wl_list link;
struct sway_seat_device *seat_device;
struct wlr_tablet_v2_tablet *tablet_v2;
};
enum sway_tablet_tool_mode {
SWAY_TABLET_TOOL_MO... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/text_input.h | null | null | null | null | null | null | C | 2026-05-04T18:46:08.846571 | #ifndef _SWAY_INPUT_TEXT_INPUT_H
#define _SWAY_INPUT_TEXT_INPUT_H
#include <wlr/types/wlr_text_input_v3.h>
#include <wlr/types/wlr_input_method_v2.h>
#include <wlr/types/wlr_compositor.h>
/**
* The relay structure manages the relationship between text-input and
* input_method interfaces on a given seat. Multiple te... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/layers.h | null | null | null | null | null | null | C | 2026-05-04T18:46:09.040747 | #ifndef _SWAY_LAYERS_H
#define _SWAY_LAYERS_H
#include <stdbool.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include "sway/tree/view.h"
struct sway_layer_surface {
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener surface_commit;
struct wl_listener node_des... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/input-manager.h | null | null | null | null | null | null | C | 2026-05-04T18:46:09.041310 | #ifndef _SWAY_INPUT_INPUT_MANAGER_H
#define _SWAY_INPUT_INPUT_MANAGER_H
#include <libinput.h>
#include <wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h>
#include <wlr/types/wlr_virtual_keyboard_v1.h>
#include <wlr/types/wlr_virtual_pointer_v1.h>
#include <wlr/types/wlr_transient_seat_v1.h>
#include "sway/config.h"
#inclu... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/swaynag.h | null | null | null | null | null | null | C | 2026-05-04T18:46:09.821329 | #ifndef _SWAY_SWAYNAG_H
#define _SWAY_SWAYNAG_H
#include <wayland-server-core.h>
#include "stringop.h"
struct swaynag_instance {
struct wl_client *client;
struct wl_listener client_destroy;
const char *args;
int fd[2];
bool detailed;
};
// Spawn swaynag. If swaynag->detailed, then swaynag->fd[1] will left open
... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/scene_descriptor.h | null | null | null | null | null | null | C | 2026-05-04T18:46:09.838842 | /**
* Across a wayland compositor, there are multiple shells: It can be
* a toplevel, or a layer_shell, or even something more meta like a drag
* icon or highlight indicators when dragging windows around.
*
* This object lets us store values that represent these modes of operation
* and keep track of what object ... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/server.h | null | null | null | null | null | null | C | 2026-05-04T18:46:09.840455 | #ifndef _SWAY_SERVER_H
#define _SWAY_SERVER_H
#include <stdbool.h>
#include <wayland-server-core.h>
#include "config.h"
#include "list.h"
#include "sway/desktop/idle_inhibit_v1.h"
#if WLR_HAS_XWAYLAND
#include "sway/xwayland.h"
#endif
struct sway_transaction;
struct sway_session_lock {
struct wlr_session_lock_v1 *lo... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/tree/arrange.h | null | null | null | null | null | null | C | 2026-05-04T18:46:09.841235 | #ifndef _SWAY_ARRANGE_H
#define _SWAY_ARRANGE_H
struct sway_output;
struct sway_workspace;
struct sway_container;
struct sway_node;
void arrange_container(struct sway_container *container);
void arrange_workspace(struct sway_workspace *workspace);
void arrange_output(struct sway_output *output);
void arrange_root(... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/output.h | null | null | null | null | null | null | C | 2026-05-04T18:46:09.856982 | #ifndef _SWAY_OUTPUT_H
#define _SWAY_OUTPUT_H
#include <time.h>
#include <unistd.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_damage_ring.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_scene.h>
#include "config.h"
#include "sway/tree/node.h"
#include "sway/tree/view.h"
struct sway_server;
... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/sway_text_node.h | null | null | null | null | null | null | C | 2026-05-04T18:46:09.886632 | #ifndef _SWAY_BUFFER_H
#define _SWAY_BUFFER_H
#include <wlr/types/wlr_scene.h>
struct sway_text_node {
int width;
int max_width;
int height;
int baseline;
bool pango_markup;
float color[4];
float background[4];
struct wlr_scene_node *node;
};
struct sway_text_node *sway_text_node_create(struct wlr_scene_tree... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/input/switch.h | null | null | null | null | null | null | C | 2026-05-04T18:46:14.032029 | #ifndef _SWAY_INPUT_SWITCH_H
#define _SWAY_INPUT_SWITCH_H
#include "sway/input/seat.h"
struct sway_switch {
struct sway_seat_device *seat_device;
struct wlr_switch *wlr;
enum wlr_switch_state state;
enum wlr_switch_type type;
struct wl_listener switch_toggle;
};
struct sway_switch *sway_switch_create(struct sw... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/tree/node.h | null | null | null | null | null | null | C | 2026-05-04T18:46:14.618229 | #ifndef _SWAY_NODE_H
#define _SWAY_NODE_H
#include <wayland-server-core.h>
#include <stdbool.h>
#include <wlr/types/wlr_scene.h>
#include "list.h"
#define MIN_SANE_W 100
#define MIN_SANE_H 60
struct sway_root;
struct sway_output;
struct sway_workspace;
struct sway_container;
struct sway_transaction_instruction;
struc... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/tree/container.h | null | null | null | null | null | null | C | 2026-05-04T18:46:14.789441 | #ifndef _SWAY_CONTAINER_H
#define _SWAY_CONTAINER_H
#include <stdint.h>
#include <sys/types.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_scene.h>
#include "list.h"
#include "sway/tree/node.h"
struct sway_view;
struct sway_seat;
enum sway_container_layout {
L_NONE,
L_HORIZ,
L_VERT,
L_STACKED,
... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/tree/root.h | null | null | null | null | null | null | C | 2026-05-04T18:46:15.568539 | #ifndef _SWAY_ROOT_H
#define _SWAY_ROOT_H
#include <wayland-server-core.h>
#include <wayland-util.h>
#include <wlr/config.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/render/wlr_texture.h>
#include "sway/tree/container.h"
#include "sway/tree/node.h"
#include "list.h"
exter... |
swaywm/sway | https://github.com/swaywm/sway | null | null | null | null | 16,868 | null | null | mit | null | null | null | null | null | null | null | include/sway/tree/view.h | null | null | null | null | null | null | C | 2026-05-04T18:46:15.569182 | #ifndef _SWAY_VIEW_H
#define _SWAY_VIEW_H
#include <wayland-server-core.h>
#include <wlr/config.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_tearing_control_v1.h>
#include "sway/config.h"
#if WLR_HAS_XWAYLAND
#include <wlr/xwayland.h>
#endif
#include "sway/input/inpu... |
skywind3000/kcp | https://github.com/skywind3000/kcp | null | null | null | null | 16,732 | null | null | mit | null | null | null | null | null | null | null | test.h | null | null | null | null | null | null | C | 2026-05-04T18:46:17.923791 | #ifndef __TEST_H__
#define __TEST_H__
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include <string.h>
#include "ikcp.h"
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
#include <windows.h>
#elif !defined(__unix)
#define __unix
#endif
#ifdef... |
skywind3000/kcp | https://github.com/skywind3000/kcp | null | null | null | null | 16,732 | null | null | mit | null | null | null | null | null | null | null | ikcp.h | null | null | null | null | null | null | C | 2026-05-04T18:46:17.925094 | //=====================================================================
//
// KCP - A Better ARQ Protocol Implementation
// skywind3000 (at) gmail.com, 2010-2011
//
// Features:
// + Average RTT reduce 30% - 40% vs traditional ARQ like tcp.
// + Maximum RTT reduce three times vs tcp.
// + Lightweight, distrib... |
skywind3000/kcp | https://github.com/skywind3000/kcp | null | null | null | null | 16,732 | null | null | mit | null | null | null | null | null | null | null | ikcp.c | null | null | null | null | null | null | C | 2026-05-04T18:46:17.926024 | //=====================================================================
//
// KCP - A Better ARQ Protocol Implementation
// skywind3000 (at) gmail.com, 2010-2011
//
// Features:
// + Average RTT reduce 30% - 40% vs traditional ARQ like tcp.
// + Maximum RTT reduce three times vs tcp.
// + Lightweight, distrib... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/bendian.h | null | null | null | null | null | null | C | 2026-05-04T18:46:21.156935 | #ifndef ENDIAN_H_
#define ENDIAN_H_
#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
/* macros for big endian machines */
#ifdef PRAGMA_ENDIAN
#pragma message("Using macros for big endian machines")
#endif
#define ASCON_U64BIG(x) (x)
#define ASCON_U32BIG(x) (x)
#define ASCON_U16BIG(x) (x)
#elif ... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/config.h | null | null | null | null | null | null | C | 2026-05-04T18:46:21.157456 | #ifndef CONFIG_H_
#define CONFIG_H_
/* inline the ascon mode */
#ifndef ASCON_INLINE_MODE
#define ASCON_INLINE_MODE 1
#endif
/* inline all permutations */
#ifndef ASCON_INLINE_PERM
#define ASCON_INLINE_PERM 1
#endif
/* unroll permutation loops */
#ifndef ASCON_UNROLL_LOOPS
#define ASCON_UNROLL_LOOPS 1
#endif
#endif... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | bindings/c/include/libsql.h | null | null | null | null | null | null | C | 2026-05-04T18:46:21.159494 | #ifndef LIBSQL_EXPERIMENTAL_H
#define LIBSQL_EXPERIMENTAL_H
#include <stdint.h>
#define LIBSQL_INT 1
#define LIBSQL_FLOAT 2
#define LIBSQL_TEXT 3
#define LIBSQL_BLOB 4
#define LIBSQL_NULL 5
typedef struct libsql_connection libsql_connection;
typedef struct libsql_database libsql_database;
typedef struct libsql... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | bottomless/bottomless.c | null | null | null | null | null | null | C | 2026-05-04T18:46:21.160604 | #ifdef LIBSQL_ENABLE_BOTTOMLESS_WAL
#include "sqlite3ext.h"
SQLITE_EXTENSION_INIT1
LIBSQL_EXTENSION_INIT1
#include <stdio.h>
extern void bottomless_tracing_init();
extern void bottomless_init();
extern struct libsql_wal_methods* bottomless_methods(struct libsql_wal_methods*);
int sqlite3_bottomless_init(
sqlite3 ... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/conan/all/test_package/main.c | null | null | null | null | null | null | C | 2026-05-04T18:46:21.169790 | #include <sqlite3mc/sqlite3mc.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
sqlite3 *db;
const char *key = "password";
const char *wrongKey = "wrongPassword";
// Create database
int rc = sqlite3_open("test.db", &db);
if (rc != SQLITE_OK)
{
fprintf(stderr, "Failed to open... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/aes_hardware.c | null | null | null | null | null | null | C | 2026-05-04T18:46:21.181847 | /*
** Name: aes_hardware.c
** Purpose: AES algorithms based on AES NI
** Author: Ulrich Telle
** Created: 2020-12-01
** Copyright: (c) 2020 Ulrich Telle
** License: MIT
*/
/*
** Check whether the platform offers hardware support for AES
*/
#define AES_HARDWARE_NONE 0
#define AES_HARDWARE_NI... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/ascon.h | null | null | null | null | null | null | C | 2026-05-04T18:46:21.182420 | #ifndef ASCON_H_
#define ASCON_H_
#include <stdint.h>
#include "api.h"
#include "config.h"
typedef union {
uint64_t x[5];
uint32_t w[5][2];
uint8_t b[5][8];
} ascon_state_t;
#ifdef ASCON_AEAD_RATE
#define ASCON_KEYWORDS (CRYPTO_KEYBYTES + 7) / 8
typedef union {
uint64_t x[ASCON_KEYWORDS];
uint32_t w[ASC... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | bindings/c/example.c | null | null | null | null | null | null | C | 2026-05-04T18:46:21.217809 | #include "libsql.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
libsql_connection_t conn;
libsql_rows_t rows;
libsql_row_t row;
libsql_database_t db;
libsql_config config;
const char *err = NULL;
int retval = 0;
char db_path[1024];
char sync = 0;
if (argc > ... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/crypto_aead.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.200851 | /*
** Name: hash.c
** Purpose: API definition for Hash algorithm with Ascon
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** Remarks: API functions adapted for use in SQLite3 Mu... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/crypto_pbkdf2.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.201365 | /*
** Name: pbkdf2.h
** Purpose: API definition of PBKDF2 algoritm with Ascon
** Password-based key derivation function based on ASCON.
** (see https://tools.ietf.org/html/rfc8018)
** Based on: Public domain Ascon reference implementation
** and optimized variants fo... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/constants.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.203958 | #ifndef CONSTANTS_H_
#define CONSTANTS_H_
#include <stdint.h>
#define ASCON_128_KEYBYTES 16
#define ASCON_128A_KEYBYTES 16
#define ASCON_80PQ_KEYBYTES 20
#define ASCON_128_RATE 8
#define ASCON_128A_RATE 16
#define ASCON_HASH_RATE 8
#define ASCON_PRF_IN_RATE 32
#define ASCON_PRFA_IN_RATE 40
#define ASCON_PRF_OUT_RATE... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/crypto_hash.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.205154 | /*
** Name: hash.c
** Purpose: API definition for Hash algorithm with Ascon
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** Remarks: API functions adapted for use in SQLite3 Mu... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/pbkdf2.c | null | null | null | null | null | null | C | 2026-05-04T18:46:22.206421 | /*
** Name: pbkdf2.c
** Purpose: Implementation of PBKDF2 algoritm with Ascon
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** and the paper "Additional Modes for ASCON... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/forceinline.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.207304 | #ifndef FORCEINLINE_H_
#define FORCEINLINE_H_
/* define forceinline macro */
#ifdef _MSC_VER
#define forceinline __forceinline
#elif defined(__GNUC__)
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define forceinline inline __attribute__((__always_inline__))
#else
#define forceinline static inline
#endi... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/hash.c | null | null | null | null | null | null | C | 2026-05-04T18:46:22.231724 | /*
** Name: hash.c
** Purpose: Hash algorithm with Ascon
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** Remarks: API functions adapted for use in SQLite3 Multiple Ciphers
** M... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/aead.c | null | null | null | null | null | null | C | 2026-05-04T18:46:22.334482 | /*
** Name: aead.c
** Purpose: Stream encryption/decryption with Ascon
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** Remarks: API functions adapted for use in SQLite3 Multipl... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/round.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.848904 | /*
** Name: round.h
** Purpose: Selector for Ascon implementation variant for 32- resp 64-bit
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** Remarks: API functions adapted for... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/round32.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.850134 | #ifndef ROUND32_H_
#define ROUND32_H_
#include "ascon.h"
#include "constants.h"
#include "forceinline.h"
#include "printstate.h"
#include "word.h"
forceinline void ASCON_ROUND(ascon_state_t* s, uint8_t C) {
uint64_t xtemp;
/* round constant */
s->x[2] ^= C;
/* s-box layer */
s->x[0] ^= s->x[4];
s->x[4] ^=... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/printstate.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.851761 | #ifndef PRINTSTATE_H_
#define PRINTSTATE_H_
#ifdef ASCON_PRINT_STATE
#include "ascon.h"
#include "word.h"
void ascon_printword(const char* text, const uint64_t x);
void ascon_printstate(const char* text, const ascon_state_t* s);
#else
#define ascon_printword(text, w) \
do { \
} while (0)
#... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/prolog.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.853886 | /*
** Name: prolog.h
** Purpose: Include important header files, before
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** Remarks: API functions adapted for use in SQLite3 Multi... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/permutations.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.854596 | #ifndef PERMUTATIONS_H_
#define PERMUTATIONS_H_
#include <stdint.h>
#include "api.h"
#include "ascon.h"
#include "config.h"
#include "constants.h"
#include "printstate.h"
#include "round.h"
forceinline void ASCON_P12ROUNDS(ascon_state_t* s) {
ASCON_ROUND(s, ASCON_RC0);
ASCON_ROUND(s, ASCON_RC1);
ASCON_ROUND(s,... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/round64.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.870647 | #ifndef ROUND64_H_
#define ROUND64_H_
#include "ascon.h"
#include "constants.h"
#include "forceinline.h"
#include "printstate.h"
#include "word.h"
forceinline void ASCON_ROUND(ascon_state_t* s, uint8_t C) {
ascon_state_t t;
/* round constant */
s->x[2] ^= C;
/* s-box layer */
s->x[0] ^= s->x[4];
s->x[4] ^... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/printstate.c | null | null | null | null | null | null | C | 2026-05-04T18:46:22.880947 | #ifdef ASCON_PRINT_STATE
#include "printstate.h"
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#ifndef WORDTOU64
#define WORDTOU64
#endif
#ifndef U64BIG
#define U64BIG
#endif
void printword(const char* text, const uint64_t x) {
printf("%s=%016" PRIx64, text, U64BIG(WORDTOU64(x)));
}
void printsta... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/permutations.c | null | null | null | null | null | null | C | 2026-05-04T18:46:22.921933 | #include "permutations.h"
#if !ASCON_INLINE_PERM && ASCON_UNROLL_LOOPS
void P12(ascon_state_t* s) { P12ROUNDS(s); }
#endif
#if ((defined(ASCON_AEAD_RATE) && ASCON_AEAD_RATE == 16) || \
(defined(ASCON_HASH_ROUNDS) && ASCON_HASH_ROUNDS == 8) || \
(defined(ASCON_PRF_ROUNDS) && ASCON_PRF_ROUNDS == 8)) && ... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/word.h | null | null | null | null | null | null | C | 2026-05-04T18:46:22.962376 | #ifndef WORD_H_
#define WORD_H_
#include <stdint.h>
#include <string.h>
#include "bendian.h"
#include "forceinline.h"
typedef union {
uint64_t x;
uint32_t w[2];
uint8_t b[8];
} word_t;
#define ASCON_U64TOWORD(x) ASCON_U64BIG(x)
#define ASCON_WORDTOU64(x) ASCON_U64BIG(x)
forceinline uint64_t ASCON_ROR(uint64_... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/ascon/api.h | null | null | null | null | null | null | C | 2026-05-04T18:46:23.002224 | /*
** Name: api.h
** Purpose: Definition of preprocessor symbols
** Based on: Public domain Ascon reference implementation
** and optimized variants for 32- and 64-bit
** (see https://github.com/ascon/ascon-c)
** Remarks: API functions adapted for use in SQLite3 Multiple Ciph... |
tursodatabase/libsql | https://github.com/tursodatabase/libsql | null | null | null | null | 16,701 | null | null | mit | null | null | null | null | null | null | null | libsql-ffi/bundled/SQLite3MultipleCiphers/src/carray.h | null | null | null | null | null | null | C | 2026-05-04T18:46:23.473558 | /*
** 2020-11-17
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
**************************... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.