Reorganize code and remove hack for empty block outputs

This commit is contained in:
Utkarsh Verma 2023-03-25 21:38:05 +05:30
commit 8dd9bc6a7d
No known key found for this signature in database
GPG key ID: 817656CF818EFCCC
17 changed files with 531 additions and 362 deletions

9
inc/util.h Normal file
View file

@ -0,0 +1,9 @@
#pragma once
#include <unistd.h>
#define LEN(arr) (sizeof(arr) / sizeof(arr[0]))
#define MAX(a, b) (a > b ? a : b)
int gcd(int, int);
void closePipe(int[2]);
void trimUTF8(char*, unsigned int);