Lines Matching defs:tos

285 string_type *tos;
321 if (tos < stack)
323 if (tos >= stack + STACK)
394 if (tos->write_idx)
395 tos->write_idx--;
402 while ((isspace ((unsigned char) at (tos, tos->write_idx - 1))
403 || at (tos, tos->write_idx - 1) == '\n')
404 && tos->write_idx > 0)
405 tos->write_idx--;
422 tos++;
424 init_string (tos);
426 cattext (tos, *((char **) pc));
492 (long) (tos - stack));
520 || find (tos, "PARAMS") || find (tos, "PROTO") || !find (tos, "("))
522 catstr (&out, tos);
527 for (openp = 0; at (tos, openp) != '(' && at (tos, openp); openp++)
533 while (fname && isspace ((unsigned char) at (tos, fname)))
536 && !isspace ((unsigned char) at (tos,fname))
537 && at (tos,fname) != '*')
546 if (!isspace ((unsigned char) at (tos, len - 1)))
550 catchar (&out, at (tos, idx));
558 if (!isspace ((unsigned char) at (tos, len - 1)))
562 catchar (&out, at (tos, idx));
566 for (idx = openp; at (tos, idx) && at (tos, idx) != ';'; idx++)
567 catchar (&out, at (tos, idx));
571 overwrite_string (tos, &out);
586 while (at (tos, idx))
588 if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
593 else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
600 catchar (&out, at (tos, idx));
605 overwrite_string (tos, &out);
610 /* Mod tos so that only lines with leading dots remain */
618 while (at (tos, idx))
621 if (at (tos, idx) == '.')
627 while ((c = at (tos, idx)) && c != '\n')
629 if (c == '{' && at (tos, idx + 1) == '*')
634 else if (c == '*' && at (tos, idx + 1) == '}')
651 idx = skip_past_newline_1 (tos, idx);
655 overwrite_string (tos, &out);
659 /* Find lines starting with . and | and put example around them on tos */
669 while (at (tos, idx))
671 if (at (tos, idx) == '\n'
672 && (at (tos, idx +1 ) == '.'
673 || at (tos, idx + 1) == '|'))
680 while (at (tos, idx) && at (tos, idx) != '\n')
686 if (at (tos, idx) == '{')
688 else if (at (tos, idx) == '}')
693 if (at (tos, idx) == '{')
695 else if (!islower ((unsigned char) at (tos, idx)))
698 else if (at (tos, idx) == '@'
699 && islower ((unsigned char) at (tos, idx + 1)))
703 else if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
709 else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
715 else if (at (tos, idx) == '{'
716 || at (tos, idx) == '}')
721 catchar (&out, at (tos, idx));
726 while (at (tos, idx) == '\n'
727 && ((at (tos, idx + 1) == '.')
728 || (at (tos, idx + 1) == '|')))
734 catchar (&out, at (tos, idx));
739 overwrite_string (tos, &out);
755 while (at (tos, idx))
757 if (at (tos, idx) == '@'
758 && at (tos, idx + 1) == '*')
763 else if (at (tos, idx) == '\n'
764 && at (tos, idx + 1) == 'o'
765 && isspace ((unsigned char) at (tos, idx + 2)))
778 catchar (&out, at (tos, idx));
779 if (on && at (tos, idx) == '\n'
780 && at (tos, idx + 1) == '\n'
781 && at (tos, idx + 2) != 'o')
795 delete_string (tos);
796 *tos = out;
808 while (at (tos, idx))
810 if (at (tos, idx) == '<'
811 && at (tos, idx + 1) == '<'
812 && !isspace ((unsigned char) at (tos, idx + 2)))
817 while (at (tos, idx)
818 && at (tos, idx) != '>' )
820 catchar (&out, at (tos, idx));
829 catchar (&out, at (tos, idx));
833 delete_string (tos);
834 *tos = out;
902 tos++;
904 init_string (tos);
905 idx = copy_past_newline (ptr, idx, tos);
924 while (at (tos, idx) == '\n')
932 if (at (tos, idx) == '.')
936 while (at (tos, idx))
944 while (idx && isspace ((unsigned char) at (tos, idx)))
954 if (at (tos, c) == '\n'
955 && at (tos, c + 1) == '\n'
956 && at (tos, c + 2) == '.')
961 else if (at (tos, c) == '.' && sl)
966 else if (at (tos, c) == '\n'
967 && at (tos, c + 1) == '\n'
974 catchar (&out, at (tos, c));
975 if (at (tos, c) == '\n')
994 delete_string (tos);
995 *tos = out;
1007 while (at (tos, idx))
1009 switch (at (tos, idx))
1014 if (tab && at (tos, idx))
1036 catchar (&out, at (tos, idx));
1045 delete_string (tos);
1046 *tos = out;
1053 tos++;
1055 init_string (tos);
1061 idx = copy_past_newline (ptr, idx, tos);
1071 t = tos[0];
1072 tos[0] = tos[-1];
1073 tos[-1] = t;
1080 tos++;
1082 init_string (tos);
1083 catstr (tos, tos - 1);
1090 tos--;
1092 delete_string (tos + 1);
1107 tos--;
1109 catstr (tos, tos + 1);
1110 delete_string (tos + 1);
1135 catstr (tos - 1, tos);
1137 delete_string (tos);
1138 tos--;
1282 tos = stack;
1492 write_buffer (tos, stdout);
1494 write_buffer (tos, stderr);
1498 tos--;
1552 tos = stack + 1;
1632 if (tos != stack)
1635 (long) (tos - stack));