Skip to content

Instantly share code, notes, and snippets.

#include <stdlib.h>
#include <ctype.h>
#include <limits.h>
#include <errno.h>
/* https://github.com/gcc-mirror/gcc/blob/master/libiberty/strtoul.c */
unsigned long
strntoul(const char *nptr, size_t n, char **endptr, register int base)
{
register const char *s = nptr;
@gusteivos
gusteivos / s_tm.c
Created November 9, 2023 14:41
my Turing machine set to repeat 0 1
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BLANK ' '
#define ONE '1'
#define ZERO '0'