cosmopolitan/third_party/tr/extern.h
Justine Tunney fa20edc44d
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
2023-11-28 14:39:42 -08:00

22 lines
705 B
C

#ifndef COSMOPOLITAN_THIRD_PARTY_TR_EXTERN_H_
#define COSMOPOLITAN_THIRD_PARTY_TR_EXTERN_H_
#include "libc/limits.h"
COSMOPOLITAN_C_START_
typedef struct {
enum { STRING1, STRING2 } which;
enum { EOS, INFINITE, NORMAL, RANGE, SEQUENCE, SET } state;
int cnt; /* character count */
int lastch; /* last character */
int equiv[2]; /* equivalence set */
int *set; /* set of characters */
unsigned char *str; /* user's string */
} STR;
#define NCHARS (UCHAR_MAX + 1) /* Number of possible characters. */
#define OOBCH (UCHAR_MAX + 1) /* Out of band character value. */
int next(STR *);
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_THIRD_PARTY_TR_EXTERN_H_ */