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
#!/bin/sh | |
set -e | |
cc -g -Wall -Wextra moetr.c $(pkg-config --cflags gtk4 libsoup-3.0 json-glib-1.0)\ | |
$(pkg-config --libs gtk4 libsoup-3.0 json-glib-1.0) -o moetr |
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
#ifndef __FSCONF_H__ | |
#define __FSCONF_H__ | |
/* A f*cking simple, error prone, and slow key-value-based file configuration | |
* | |
* File name: file.fsconf | |
* ------------------------ | |
* key0(value)\n | |
* key1(value)\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
#include <stdarg.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <time.h> | |
struct log { | |
pthread_mutex_t mutex; |
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
const std = @import("std"); | |
const mem = std.mem; | |
const debug = std.debug; | |
const assert = debug.assert; | |
const dprint = debug.print; | |
pub fn MemPool(comptime T: type) type { | |
return struct { | |
allocator: mem.Allocator, |
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
/* | |
* fixed-size string hashmap (FNV-1) | |
*/ | |
#ifndef __CSTRMAP_H__ | |
#define __CSTRMAP_H__ | |
#include <assert.h> | |
#include <errno.h> | |
#include <stdint.h> |
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 <errno.h> | |
#include <stdarg.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "str.h" | |
static int |
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 <stdio.h> | |
#include <stdlib.h> | |
typedef void (*Func) (void *udata); | |
typedef struct node { | |
Func func; | |
void *udata; | |
struct node *next; |
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 <stdlib.h> | |
#include "thrd_pool.h" | |
typedef struct thrd_pool_job { | |
ThrdPoolFn func; | |
void *udata; | |
struct thrd_pool_job *next; | |
} ThrdPoolJob; |
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 <stdio.h> | |
#include <libavformat/avformat.h> | |
#include <libavcodec/avcodec.h> | |
#include <libavutil/opt.h> | |
#include <libavutil/mathematics.h> | |
#include <libavutil/samplefmt.h> | |
#include <libswresample/swresample.h> | |
#include <SDL2/SDL.h> | |
#define SDL_AUDIO_BUFFER_SIZE 1024 |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <pipewire/pipewire.h> | |
#include <spa/utils/defs.h> | |
#include <spa/utils/string.h> | |
#include <spa/utils/result.h> | |
#include <spa/param/audio/format-utils.h> | |
#include <spa/pod/builder.h> |