Lines Matching +defs:i +defs:n

82 	int i;
86 for (i=0; i<FILENUM; i++)
87 if (files[i].fp && files[i].type == '|')
88 pclose(files[i].fp);
125 program(NODE **a, int n)
171 array(NODE **a, int n)
190 int i;
208 matchop(NODE **a, int n)
212 int i;
217 i = match(a[1], s);
218 if (n == MATCH && i == 1 || n == NOTMATCH && i == 0)
228 boolop(NODE **a, int n)
231 int i;
237 i = istrue(x);
239 switch (n) {
241 if (i) return (true);
243 i = istrue(y);
245 if (i) return (true);
248 if (!i) return (false);
250 i = istrue(y);
252 if (i) return (true);
255 if (i) return (false);
258 error(FATAL, "unknown boolean operator %d", n);
267 relop(NODE **a, int n)
269 int i;
281 i = j<0? -1: (j>0? 1: 0);
286 i = wscoll(xs, ys);
292 switch (n) {
293 case LT: if (i<0) return (true);
295 case LE: if (i<=0) return (true);
297 case NE: if (i!=0) return (true);
299 case EQ: if (i == 0) return (true);
301 case GE: if (i>=0) return (true);
303 case GT: if (i>0) return (true);
306 error(FATAL, "unknown relational operator %d", n);
321 int i;
327 for (i=0; i<MAXTMP; i++)
328 if (tmps[i].tval == 0)
330 if (i == MAXTMP)
332 tmps[i] = tempcell;
333 x = &tmps[i];
341 indirect(NODE **a, int n)
362 int k, m, n;
383 n = getfval(x);
387 n = k - 1;
388 if (n < 0)
389 n = 0;
390 else if (n > k - m)
391 n = k - m;
392 dprintf("substr: m=%d, n=%d, s=%ws\n", m, n, s);
394 temp = s[n+m-1];
395 s[n+m-1] = (wchar_t)0x0;
397 s[n+m-1] = temp;
575 a_sprintf(NODE **a, int n)
593 arith(NODE **a, int n)
595 awkfloat i, j;
599 i = getfval(x);
601 if (n != UMINUS) {
607 switch (n) {
609 i += j;
612 i -= j;
615 i *= j;
620 i /= j;
625 i = i - j*(long)(i/j);
628 i = -i;
631 error(FATAL, "illegal arithmetic operator %d", n);
633 setfval(z, i);
641 incrdecr(NODE **a, int n)
649 k = (n == PREINCR || n == POSTINCR) ? 1 : -1;
650 if (n == PREINCR || n == PREDECR) {
664 assign(NODE **a, int n)
674 if (n == ASSIGN) { /* ordinary assignment */
689 switch (n) {
710 error(FATAL, "illegal assignment operator %d", n);
753 pastat(NODE **a, int n)
775 dopa2(NODE **a, int n)
805 aprintf(NODE **a, int n)
812 x = a_sprintf(a, n);
833 int n, flag;
850 dprintf("split: s=|%ws|, a=%ws, sep=|%wc|\n", s, ap->nval, sep);
858 n = 0;
860 for (n = 0; /* dummy */; /* dummy */) {
862 while (iswblank(c) || c == '\t' || c == '\n')
866 n++;
871 c != '\n' && c != '\0');
874 wsprintf(num, "%d", n);
886 n++;
888 while ((c = *s) != sep && c != '\n' && c != '\0')
892 wsprintf(num, "%d", n);
904 x->fval = n;
912 ifstat(NODE **a, int n)
935 whilestat(NODE **a, int n)
961 forstat(NODE **a, int n)
994 instat(NODE **a, int n)
998 int i;
1008 for (i = 0; i < MAXSYM; i++) { /* this routine knows too much */
1009 for (cp = tp[i]; cp != NULL; cp = cp->nextval) {
1028 jump(NODE **a, int n)
1035 switch (n) {
1049 error(FATAL, "illegal jump type %d", n);
1058 fncn(NODE **a, int n)
1089 print(NODE **a, int n)
1178 int i;
1183 for (i=0; i<FILENUM; i++)
1184 if (files[i].fname && wscmp(x->sval, files[i].fname) == 0)
1186 for (i=0; i<FILENUM; i++)
1187 if (files[i].fp == 0)
1189 if (i >= FILENUM)
1190 error(FATAL, "too many output files %d", i);
1192 files[i].fp = popen(toeuccode(x->sval), "w");
1194 files[i].fp = fopen(toeuccode(x->sval), "a");
1196 files[i].fp = fopen(toeuccode(x->sval), "w");
1199 if (files[i].fp == NULL)
1201 files[i].fname = tostring(x->sval);
1202 files[i].type = a;
1204 fprintf(files[i].fp, "%ws", s);
1206 fflush(files[i].fp); /* in case someone is waiting for the output */