scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <ctype.h>
 2#include <limits.h>
 3#include <string.h>
 4
 5#include "../libc.h"
 6
 7int
 8_dtoi(char c)
 9{
10	static const char digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
11	char *p;
12
13	if (p = strchr(digits, toupper(c)))
14		return p - digits;
15
16	return INT_MAX;
17}