File: PRMCC.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 (32 lines) | stat: -rw-r--r-- 872 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
/*======================================================================
                      PRMCC(; t)

Process "manually choose a cell" command.

\Output
  \parm{t} is 1 if the command is legal, 0 otherwise.
======================================================================*/
#include "qepcad.h"

void QepcadCls::PRMCC(Word *t_)
{
       Word c,t;
       /* hide t; */

Step1: /* Read in an argument. */
       CELLRDR(GVPC,&c,&t); if (t == 0) { PCMC = 'n'; goto Return; }

Step2: /* Is it a candidate cell? */
       if ((LELTI(c,TRUTH) == UNDET) && (LELTI(c,CHILD) == NIL)) goto Step3;
       SWRITE("Error PRMCC: ");
       LWRITE(LELTI(c,INDX));
       SWRITE(" is not a candidate cell.\n");
       PCMC = 'n'; t = 0; goto Return;

Step3: /* Process. */
       PCMCC = c; PCMC = 'y'; t = 1;

Return: /* Prepare for return. */
       *t_ = t;
       return;
}