File:  [CSRG BSD Unix] / 43BSDTahoe / sys / tahoestand / vdformat / cmd.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

/*	cmd.h	1.1	86/07/05	*/

#define	QUIT	-1

typedef struct {
	int	cmd_token;
	char	*cmd_text;
	char	*cmd_help;
} cmd_text_element;

typedef struct {
	int	cmd_min;
	int	cmd_max;
} cmd_digit_element;

#define ismustmatch(c)	((((c)>' ')&&((c)<'a')) || (((c)>'z')&&((c)<='~')))
#define isupper(c)	(((c) >= 'A') && ((c) <= 'Z'))
#define islower(c)	(((c) >= 'a') && ((c) <= 'z'))
#define toupper(c)	(islower(c) ? ((c) & ~040) : c)
#define tolower(c)	(isupper(c) ? ((c) | 040) : c)


#define skipdigits(ptr)	while(is_digit(*ptr)) ptr++
#define skip_junk(ptr)	while(*ptr && !is_digit(*ptr) &&\
			    (*ptr != '-') && (*ptr != '~')) ptr++
#define is_digit(c)	(((c) >= '0') && ((c) <= '9'))
#define	finddigit(ptr)	while(*ptr && !is_digit(*ptr)) ptr++

#define trim_white(ptr) while((*ptr == ' ') || (*ptr == '\t')) ptr++


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.