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
pub fn less_than_vers(s1: []const u8, s2: []const u8) bool { | |
var ii1: usize = 0; | |
var ii2: usize = 0; | |
const n1 = s1.len; | |
const n2 = s2.len; | |
while (ii1 < n1 and ii2 < n2) { | |
const c1 = s1[ii1]; | |
const c2 = s2[ii2]; |
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 <stdbool.h> | |
#include <pthread.h> | |
#include <ncurses.h> | |
#include <pipewire/pipewire.h> | |
#include <spa/utils/result.h> | |
#include <spa/param/audio/format-utils.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 <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> |
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 <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 <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 <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
/* | |
* 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
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
#include <stdarg.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <time.h> | |
struct log { | |
pthread_mutex_t mutex; |
NewerOlder