don't need this after all. yay.
This commit is contained in:
parent
989e6dc3ac
commit
b2f08f618b
3 changed files with 6 additions and 19 deletions
|
|
@ -172,7 +172,6 @@ void casefl(void);
|
||||||
void caseev(void);
|
void caseev(void);
|
||||||
void envcopy(Env *e1, Env *e2);
|
void envcopy(Env *e1, Env *e2);
|
||||||
void caseel(void);
|
void caseel(void);
|
||||||
void caseei(void);
|
|
||||||
void caseie(void);
|
void caseie(void);
|
||||||
void casexif(void);
|
void casexif(void);
|
||||||
void caseif(void);
|
void caseif(void);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
#include "ext.h"
|
#include "ext.h"
|
||||||
|
|
||||||
int iflist[NIF]; /* whether 'else' is true */
|
int iflist[NIF];
|
||||||
int ifx;
|
int ifx;
|
||||||
int ifnum = 0; /* trying numeric expression for .if or .ie condition */
|
int ifnum = 0; /* trying numeric expression for .if or .ie condition */
|
||||||
|
|
||||||
|
|
@ -612,16 +612,6 @@ void envcopy(Env *e1, Env *e2) /* copy env e2 to e1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void caseei(void)
|
|
||||||
{
|
|
||||||
if (--ifx < 0) {
|
|
||||||
ifx = 0;
|
|
||||||
iflist[0] = 0;
|
|
||||||
}
|
|
||||||
caseif1(1);
|
|
||||||
ifx++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void caseel(void)
|
void caseel(void)
|
||||||
{
|
{
|
||||||
if (--ifx < 0) {
|
if (--ifx < 0) {
|
||||||
|
|
@ -631,6 +621,7 @@ void caseel(void)
|
||||||
caseif1(2);
|
caseif1(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void caseie(void)
|
void caseie(void)
|
||||||
{
|
{
|
||||||
if (ifx >= NIF) {
|
if (ifx >= NIF) {
|
||||||
|
|
@ -638,11 +629,11 @@ void caseie(void)
|
||||||
ifx = 0;
|
ifx = 0;
|
||||||
edone(040);
|
edone(040);
|
||||||
}
|
}
|
||||||
iflist[ifx] = 1;
|
|
||||||
caseif1(1);
|
caseif1(1);
|
||||||
ifx++;
|
ifx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void caseif(void)
|
void caseif(void)
|
||||||
{
|
{
|
||||||
caseif1(0);
|
caseif1(0);
|
||||||
|
|
@ -654,7 +645,7 @@ void caseif1(int x)
|
||||||
int notflag, true;
|
int notflag, true;
|
||||||
Tchar i;
|
Tchar i;
|
||||||
|
|
||||||
if (x == 2) { /* .el */
|
if (x == 2) {
|
||||||
notflag = 0;
|
notflag = 0;
|
||||||
true = iflist[ifx];
|
true = iflist[ifx];
|
||||||
goto i1;
|
goto i1;
|
||||||
|
|
@ -700,10 +691,8 @@ void caseif1(int x)
|
||||||
}
|
}
|
||||||
i1:
|
i1:
|
||||||
true ^= notflag;
|
true ^= notflag;
|
||||||
if (x == 1) { /* .ie or .ei */
|
if (x == 1)
|
||||||
true = true && iflist[ifx];
|
iflist[ifx] = !true;
|
||||||
iflist[ifx] = iflist[ifx] && !true;
|
|
||||||
}
|
|
||||||
if (true) {
|
if (true) {
|
||||||
i2:
|
i2:
|
||||||
while ((cbits(i = getch())) == ' ')
|
while ((cbits(i = getch())) == ' ')
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,6 @@ Contab contab[NM] = {
|
||||||
C(PAIR('n', 'r'), casenr),
|
C(PAIR('n', 'r'), casenr),
|
||||||
C(PAIR('i', 'f'), caseif),
|
C(PAIR('i', 'f'), caseif),
|
||||||
C(PAIR('i', 'e'), caseie),
|
C(PAIR('i', 'e'), caseie),
|
||||||
C(PAIR('e', 'i'), caseei),
|
|
||||||
C(PAIR('e', 'l'), caseel),
|
C(PAIR('e', 'l'), caseel),
|
||||||
C(PAIR('p', 'o'), casepo),
|
C(PAIR('p', 'o'), casepo),
|
||||||
C(PAIR('t', 'l'), casetl),
|
C(PAIR('t', 'l'), casetl),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue