break out special local mail processing (e.g., mapping to the
[unix-history] / usr / src / usr.bin / m4 / stdd.h
CommitLineData
f645fe31 1/*-
491c97d5
KB
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
f645fe31
KB
4 *
5 * This code is derived from software contributed to Berkeley by
a93b814a 6 * Ozan Yigit at York University.
f645fe31
KB
7 *
8 * %sccs.include.redist.c%
9 *
491c97d5 10 * @(#)stdd.h 8.1 (Berkeley) %G%
f645fe31
KB
11 */
12
13/*
14 * standard defines
15 */
16
17#define max(a,b) ((a) > (b)? (a): (b))
18#define min(a,b) ((a) < (b)? (a): (b))
19
20#define iswhite(c) ((c) == ' ' || (c) == '\t')
21
22/*
23 * STREQ is an optimised strcmp(a,b)==0
24 * STREQN is an optimised strncmp(a,b,n)==0; assumes n > 0
25 */
26#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0)
27#define STREQN(a, b, n) ((a)[0] == (b)[0] && strncmp(a, b, n) == 0)
28
29#define YES 1
30#define NO 0