Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / cpp.ansi / ch3mon.c
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* $Id: ch3mon.c,v 1.4 1994/06/24 11:36:46 ceriel Exp $ */
6 /* EVALUATION OF MONADIC OPERATORS */
7
8 #include        "Lpars.h"
9 #include        "arith.h"
10
11 /*ARGSUSED2*/
12 ch3mon(oper, pval, puns)
13         register arith *pval;
14         int *puns;
15 {
16         switch (oper)   {
17         case '~':
18                 *pval = ~(*pval);
19                 break;
20         case '-':
21                 *pval = -(*pval);
22                 break;
23         case '!':
24                 *pval = !(*pval);
25                 break;
26         }
27 }