Skip to content

Instantly share code, notes, and snippets.

@m039
m039 / utf8.c
Created June 12, 2011 16:46
Print a katakana table to the stdout in the utf8 format.
/* Author: m039 <flam44 (at) gmail (dot) com> */
#include <stdio.h>
/* Code point ranges */
#define MINUSCULE 0x000d8 /* 0 to 7F */
#define ALPHA 0x00251 /* 80 to 7FF */
#define KATAKANA_NI 0x030A0 /* 800 to FFFF */
#define CLEF 0x1D11E /* 10000 to 10FFFF */
@m039
m039 / tounix.c
Created June 10, 2011 16:30
Convert file from mac(\r)/unix(\n)/dos(\r\n) formats to the unix format
/* Author: m039 <flam44 (at) gmail (dot) com> */
#include <stdio.h>
#include <stdlib.h>
static FILE *src;
static FILE *dst;
int main(int argc, char **argv) {
int c;