shithub: pdffs

ref: 1d93500ddcda77cd265d492c6c9094c0f5c7488f
dir: pdffs/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 == '%';
}