xref: /original-bsd/usr.bin/window/alias.h (revision bac0d407)
1 /*
2  * Copyright (c) 1983 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that this notice is preserved and that due credit is given
7  * to the University of California at Berkeley. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  *
12  *	@(#)alias.h	3.5 (Berkeley) 02/21/88
13  */
14 
15 #define alias var
16 #define a_name r_name
17 #define a_buf r_val.v_str
18 #define a_flags r_val.v_type
19 
20 	/* a_flags bits, must not interfere with v_type values */
21 #define A_INUSE		0x010	/* already inuse */
22 
23 #define alias_set(n, s)		var_setstr1(&alias_head, n, s)
24 #define alias_walk(f, a)	var_walk1(alias_head, f, a)
25 #define alias_unset(n)		var_unset1(&alias_head, n)
26 #define alias_lookup(n)		(*var_lookup1(&alias_head, n))
27 
28 struct var *alias_head;
29