shithub: pdffs

ref: 51cd3bfceeb001872d4ff298180875c4229a3d68
dir: /misc.c/

View raw version
#include <u.h>
#include <libc.h>
#include <bio.h>
#include "pdf.h"

/* 7.2.2 whitespace */
int
isws(int c)
{
	return /* \0 is missing on purpose */
		c == '\t' || c == '\n' || c == '\f' || c == '\r' ||
		c == ' ';
}

/* 7.2.2 delimeters */
int
isdelim(int c)
{
	return
		c == '(' || c == ')' || c == '<' || c == '>' ||
		c == '[' || c == ']' || c == '{' || c == '}' ||
		c == '/' || c == '%';
}