File: INITPCAD.c

package info (click to toggle)
qepcad 1.74%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,828 kB
  • sloc: ansic: 27,242; cpp: 2,995; makefile: 1,285; perl: 91
file content (35 lines) | stat: -rw-r--r-- 883 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*======================================================================
                      D <- INITPCAD()

Initialize Partial CAD.

\Output
  \parm{D) is the partial CAD with the root cell
           whose truth value is set to be \c{UNDET}.
======================================================================*/
#include "qepcad.h"

Word QepcadCls::INITPCAD()
{
       Word D, tv;

Step0: /* Determine truth value! */
       if (GVNA == FALSE || (GVNA != NIL && LELTI(GVNA,1) == NEOP && LELTI(GVNA,2) == 0)) tv = NA;
       else if (LELTI(GVNQFF,1) == NEOP && LELTI(GVNQFF,2) == 0) tv = FALSE;
       else if (LELTI(GVNQFF,1) == EQOP && LELTI(GVNQFF,2) == 0) tv = TRUE;
       else tv = UNDET;

Step1: /* Make one and initialize it. */
       D = MCELL(0,NIL,FALSE,tv,LIST3(0,LIST2(0,0),NIL),NIL,NIL,0,NIL,NIL);

Return: /* Prepare for return. */
       return(D);
}