File: FTYPEINFO.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 (28 lines) | stat: -rw-r--r-- 661 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
/*======================================================================
                 FTYPEINFO(F)

Formula type information.

Inputs
 F : A formula.
Output
 T : The type of the formula:  NIL if F is an atom, ANDOP if it's a
     conjunction, and OROP if it's a disjunction.
======================================================================*/
#include "qepcad.h"

Word FTYPEINFO(Word A)
{
  if (ISLIST(FIRST(A)))
    return NIL;
  if (FIRST(A) == ANDOP)
    return ANDOP;
  if (FIRST(A) == OROP)
    return OROP;
  if (FIRST(A) == TRUE)
    return TRUE;
  if (FIRST(A) == FALSE)
    return FALSE;
  FAIL("FTYPEINFO","Unknown formula type!"); 
}