Lines Matching refs:op
88 char* op; /* output buffer pointer */
391 init(Proto_t* proto, char* op, int flags)
397 op = strcopy(op, "\
459 op = strcopy(op, "\
491 switch (*op++ = *s++)
494 op--;
497 op = strcopy(op - 1, proto->package);
505 return op;
508 #define BACKOUT() (op=ko)
511 #define CACHEOUT() (op=proto->op)
513 #define KEEPOUT() (ko=op)
514 #define LASTOUT() (*(op-1))
515 #define PUTCHR(c) (*op++=(c))
518 #define SYNCOUT() (proto->op=op)
520 #define UNPUTCHR() (op--)
578 register char* op;
633 MEMCPY(op, ip, n);
641 if (op > proto->ob && *(op - 1) == '=' && (op == proto->ob + 1 || *(op - 2) != '=')) switch (c)
763 for (n = 0, t = qe + 1; t < op && (*t == ' ' || *t == '\t' || *t == '\n' && ++n || *t >= 'A' && *t <= 'Z' || *t == '_'); t++);
764 if (t == op)
766 op = qe;
784 qe = (c == '"') ? op : (char*)0;
887 if (op != proto->ob && LASTOUT() != ' ' && LASTOUT() != '\n')
902 op = strcopy(om, "/* ");
903 op = strcopy(op, im);
904 op = strcopy(op, " */\n");
914 op = strcopy(om, "#if defined(__STDC__) || defined(__STDPP__)\n");
915 op = strcopy(op, im);
916 op = strcopy(op, "\n#else\n");
919 *op++ = *ip++;
920 while (*op = *ip++)
921 if (*op++ == '#' && *ip != '(')
923 op--;
924 while (*--op == ' ' || *op == '\t');
927 op = strcopy(op + 1, "/**/");
932 if (*op != '"') *++op = '"';
933 op++;
935 while ((c = *ip) >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c >= '0' && c <= '9' || c == '_') *op++ = *ip++;
938 else *op++ = '"';
942 op = strcopy(op, "\n#endif\n");
943 op = linesync(proto, op, proto->line);
1017 op = strcopy(op - 6, "__INLINE__");
1031 proto->ox = op - 6;
1055 memcopy(op - 4, "__V_", 4);
1087 while (op > proto->ob && (*(op - 1) == ' ' || *(op - 1) == '\t'))
1088 op--;
1089 if (op > proto->ob && *(op - 1) != '\n') *op++ = ' ';
1147 om = op - 1;
1162 aom = op - 1;
1256 om = op + (ip - bp);
1276 om = op - 1;
1288 op = strcopy(op, "\
1297 op = linesync(proto, op, proto->line);
1314 op = strcopy(op, "undef __MANGLE__\n");
1315 op = linesync(proto, op, proto->line);
1316 op = strcopy(op, "#define __MANGLE__ __LINKAGE__");
1322 om = op - 1;
1329 op = strcopy(op, "undef __MANGLE__\n");
1330 op = linesync(proto, op, proto->line);
1331 op = strcopy(op, "#define __MANGLE__ __LINKAGE__");
1336 om = op - 1;
1357 v = number(op, args < 0 ? -args : args);
1362 proto_error((char*)proto + sizeof(Proto_t), 2, op, NiL);
1392 op = om++;
1395 v = op;
1399 om = (v = (op += 4)) + 1;
1414 om = (e = ++op) + 1;
1422 om = (v = (op += 7)) + 1;
1431 t = op;
1440 if (c != '*' && op > om) PUTCHR(' ');
1446 m = op;
1447 while (op > om && ((c = *(op - 1)) == '(' || c == ')' || c == '[' || c == ']'))
1448 op--;
1449 v = op;
1450 while (op > om && (c = *(op - 1)) != ' ' && c != '*')
1451 op--;
1452 while (*(op - 1) == ' ')
1453 op--;
1456 e = op;
1461 if (op <= om || *(op - 1) == ',' && (*op++ = ' '))
1462 op = strcopy(op, "int");
1464 if (op <= om)
1465 op = strcopy(op, "int");
1466 else if (*(op - 1) == ',')
1467 op = strcopy(op, " int");
1475 if (x = !e) e = op - 1;
1485 op -= m - e;
1493 t = op;
1499 if (op > om && (c = *(op - 1)) == ' ') op--;
1506 if (op > om && *(op - 1) == ' ') op--;
1512 if (op > om && *(op - 1) == '(')
1517 else if ((flags & EXTERN) && (op == om || *(op - 1) == ' ') && *ie == 'r' && !strncmp(ie, "register", 8) && (*(ie + 8) == ' ' || *(ie + 8) == '\t' || *(ie + 8) == '\n'))
1520 if (op > om) UNPUTCHR();
1525 if (op <= om) op = strcopy(op, "void");
1547 op = strcopy(om, " __PARAM__(");
1548 op = memcopy(op, im, ie - im);
1557 op = strcopy(op, "va_alist)) __OTORP__(va_dcl)\n{");
1563 proto->op = op;
1586 op = memcopy(op, m, e - m);
1598 op = memcopy(op, m, e - m);
1602 proto->op = op;
1624 proto->op = strcopy(op, " __OTORP__(");
1634 op = proto->op;
1638 op = linesync(proto, op, proto->line = line);
1686 if (paren == 0 && (flags & DECLARE)) *(op - 1) = c = ';';
1743 ko = op;
1745 v = op += n;
1768 op = om;
1769 while (*--op == ' ' || *op == '\t' || *op == '\n');
1770 if (*op != ')')
1772 op = om += 14;
1773 *--op = ')';
1774 while ((x = *(op - 14)) >= 'A' && x <= 'Z' || x >= 'a' && x <= 'z' || x >= '0' && x <= '9' || x == '_')
1775 *--op = x;
1776 memcopy(op - 13, "(__OTORP__(*)", 13);
1783 op = om;
1784 if (!(flags & TOKENS)) op = strcopy(op, "(...)");
1785 else op = memcopy(op, im, ie - im);
1790 if (flags & DECLARE) op = strcopy(om, "()");
1791 else if (!(flags & TOKENS)) op = strcopy(om, "(__VARARG__)");
1794 op = strcopy(om, " __PROTO__(");
1795 op = memcopy(op, im, ie - im);
1844 op = strcopy(op, " __MANGLE__");
1847 op = strcopy(op - 1, proto->package);
1848 func = op + 1;
1849 op = strcopy(op, "_DATA__");
1859 op -= 3;
1874 op = strcopy(op - 8, "__VA_START__");
1907 op = strcopy(op, " __OTORP__(");
1909 proto->op = op;
1929 op = memcopy(op, m, e - m);
1930 op = strcopy(op, " = ");
1932 op = strcopy(op, "va_arg(");
1933 op = memcopy(op, v, n);
1936 if (m > bp) op = memcopy(op, bp, m - bp);
1937 else op = strcopy(op, "int ");
1938 if (group > 1) op = strcopy(op, ")()");
1939 else op = memcopy(op, e, proto->ip - e - 1);
1955 op = memcopy(op, m, e - m);
1956 op = strcopy(op, " = ");
1958 op = strcopy(op, "va_arg(");
1959 op = memcopy(op, v, n);
1962 if (m > bp) op = memcopy(op, bp, m - bp);
1963 else op = strcopy(op, "int ");
1964 if (group > 1) op = strcopy(op, ")()");
1965 else op = memcopy(op, e, proto->ip - e - 1);
1972 proto->op = op;
1988 op = strcopy(op, ")");
2022 for (;; op--)
2024 switch (*(op - 1))
2028 t = op;
2031 op--;
2039 t = op;
2044 op--;
2057 *op++ = 'L';
2060 m = op;
2061 t = op = m + 10;
2123 op -= n;
2126 op = proto->op;
2131 *op++ = *ip++;
2132 op = init(proto, op, flags);
2133 op = linesync(proto, op, proto->line);
2236 proto->op = proto->ob = iob;
2403 proto->op = memcopy(proto->op, proto->ip, m);
2410 if ((comlen = astlicense(proto->op, proto->oz, notice, options, proto->cc[0], proto->cc[1], proto->cc[2])) < 0)
2411 proto_error((char*)proto + sizeof(Proto_t), 1, proto->op, NiL);
2413 proto->op += comlen;
2417 proto->op = linesync(proto, proto->op, 1);
2418 proto->iz += proto->op - proto->ob;
2420 memcopy(proto->op, proto->ip, n);
2438 if ((comlen = astlicense(proto->op, proto->oz, notice, options, proto->cc[0], proto->cc[1], proto->cc[2])) < 0)
2439 proto_error((char*)proto + sizeof(Proto_t), 1, proto->op, NiL);
2441 proto->op += comlen;
2456 *proto->op++ = '#';
2457 proto->op = strcopy(proto->op, PRAGMADIR);
2458 *proto->op++ = ' ';
2459 proto->op = strcopy(proto->op, pragmas[0].name);
2460 *proto->op++ = '\n';
2471 proto->op = strcopy(proto->op, "\n%{\n" + !notice);
2472 proto->op = strcopy(proto->op, GENERATED);
2473 proto->op = strcopy(proto->op, "%}\n");
2478 *proto->op++ = '\n';
2479 proto->op = strcopy(proto->op, GENERATED);
2481 proto->op = linesync(proto, proto->op, proto->line);
2483 proto->op = init(proto, proto->op, proto->flags);
2527 if (proto->op == proto->ob)
2534 register char* op = proto->ob;
2554 *op++ = *ip++;
2560 while (op < ep && (n = *op++ = *ip))
2567 *op++ = *ip++;
2574 *op++ = '%';
2581 proto->op = memcopy(proto->ob, proto->ip, ip - proto->ip);
2588 proto->op = strcopy(proto->op, "/* NOTE: some constructs may not have been converted */\n");
2590 n = proto->op - proto->ob;
2591 proto->op = proto->ob;