git @ Cat's Eye Technologies Maentwrog / 686be1e
Missed 'em by _that_ much. Chris Pressey 8 years ago
3 changed file(s) with 9 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
11
22 PROGS=bin/maentw bin/caparse bin/rpn bin/rdp
33 CC?=gcc
4 RM_F?=rm -f
45
56 WARNS= -W -Wall -Wstrict-prototypes -Wmissing-prototypes \
67 -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
2122
2223 all: $(PROGS)
2324
24 bin/.exists:
25 mkdir -p bin
26 touch bin/.exists
27
28 bin/maentw: bin/.exists src/maentw.c
25 bin/maentw: src/maentw.c
2926 $(CC) $(CFLAGS) src/maentw.c -o bin/maentw
3027
31 bin/caparse: bin/.exists src/caparse.c
28 bin/caparse: src/caparse.c
3229 $(CC) $(CFLAGS) src/caparse.c -o bin/caparse
3330
34 bin/rpn: bin/.exists src/rpn.c
31 bin/rpn: src/rpn.c
3532 $(CC) $(CFLAGS) src/rpn.c -lm -o bin/rpn
3633
37 bin/rdp: bin/.exists src/rdp.c
34 bin/rdp: src/rdp.c
3835 $(CC) $(CFLAGS) src/rdp.c -o bin/rdp
3936
4037 clean:
41 rm -f *.o
38 $(RM_F) src/*.o
4239
4340 distclean:
44 rm -f $(PROGS)
41 $(RM_F) $(PROGS)
106106 token[strlen (token)] = prog[t++];
107107 }
108108 }
109 else if ((int)isdigit (prog[t]))
109 else if (isdigit ((int)prog[t]))
110110 {
111111 toktype = T_CONSTANT;
112112 while (!(isdelimeter (prog[t])))
124124 push(atof(s));
125125 else if (s[0] == '=')
126126 setvari(s + 1, pop());
127 else if ((s[0] == '*') && ((int)isalpha(s[1])))
127 else if ((s[0] == '*') && (isalpha((int)s[1])))
128128 addvari(s + 1);
129129 else if ((w = lookup(s)))
130130 dofunc(w);