Lines Matching defs:tos

269 string_type *tos;
305 if (tos < stack)
307 if (tos >= stack + STACK)
378 if (tos->write_idx)
379 tos->write_idx--;
386 while ((isspace ((unsigned char) at (tos, tos->write_idx - 1))
387 || at (tos, tos->write_idx - 1) == '\n')
388 && tos->write_idx > 0)
389 tos->write_idx--;
406 tos++;
408 init_string (tos);
410 cattext (tos, *((char **) pc));
475 fprintf (stderr, "current string stack depth = %d, ", tos - stack);
502 || find (tos, "PARAMS") || find (tos, "PROTO") || !find (tos, "("))
504 catstr (&out, tos);
509 for (openp = 0; at (tos, openp) != '(' && at (tos, openp); openp++)
515 while (fname && isspace ((unsigned char) at (tos, fname)))
518 && !isspace ((unsigned char) at (tos,fname))
519 && at (tos,fname) != '*')
528 if (!isspace ((unsigned char) at (tos, len - 1)))
532 catchar (&out, at (tos, idx));
540 if (!isspace ((unsigned char) at (tos, len - 1)))
544 catchar (&out, at (tos, idx));
548 for (idx = openp; at (tos, idx) && at (tos, idx) != ';'; idx++)
549 catchar (&out, at (tos, idx));
553 overwrite_string (tos, &out);
568 while (at (tos, idx))
570 if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
575 else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
582 catchar (&out, at (tos, idx));
587 overwrite_string (tos, &out);
592 /* Mod tos so that only lines with leading dots remain */
600 while (at (tos, idx))
602 if (at (tos, idx) == '\n' && at (tos, idx + 1) == '.')
607 while ((c = at (tos, idx)) && c != '\n')
609 if (c == '{' && at (tos, idx + 1) == '*')
614 else if (c == '*' && at (tos, idx + 1) == '}')
633 overwrite_string (tos, &out);
637 /* Find lines starting with . and | and put example around them on tos */
647 while (at (tos, idx))
649 if (at (tos, idx) == '\n'
650 && (at (tos, idx +1 ) == '.'
651 || at (tos, idx + 1) == '|'))
658 while (at (tos, idx) && at (tos, idx) != '\n')
664 if (at (tos, idx) == '{')
666 else if (at (tos, idx) == '}')
671 if (at (tos, idx) == '{')
673 else if (!islower ((unsigned char) at (tos, idx)))
676 else if (at (tos, idx) == '@'
677 && islower ((unsigned char) at (tos, idx + 1)))
681 else if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
687 else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
693 else if (at (tos, idx) == '{'
694 || at (tos, idx) == '}')
699 catchar (&out, at (tos, idx));
704 while (at (tos, idx) == '\n'
705 && ((at (tos, idx + 1) == '.')
706 || (at (tos, idx + 1) == '|')))
712 catchar (&out, at (tos, idx));
717 overwrite_string (tos, &out);
733 while (at (tos, idx))
735 if (at (tos, idx) == '@'
736 && at (tos, idx + 1) == '*')
741 else if (at (tos, idx) == '\n'
742 && at (tos, idx + 1) == 'o'
743 && isspace ((unsigned char) at (tos, idx + 2)))
756 catchar (&out, at (tos, idx));
757 if (on && at (tos, idx) == '\n'
758 && at (tos, idx + 1) == '\n'
759 && at (tos, idx + 2) != 'o')
773 delete_string (tos);
774 *tos = out;
786 while (at (tos, idx))
788 if (at (tos, idx) == '<'
789 && at (tos, idx + 1) == '<'
790 && !isspace ((unsigned char) at (tos, idx + 2)))
795 while (at (tos, idx)
796 && at (tos, idx) != '>' )
798 catchar (&out, at (tos, idx));
807 catchar (&out, at (tos, idx));
811 delete_string (tos);
812 *tos = out;
880 tos++;
882 init_string (tos);
883 idx = copy_past_newline (ptr, idx, tos);
902 while (at (tos, idx) == '\n')
910 if (at (tos, idx) == '.')
914 while (at (tos, idx))
922 while (idx && isspace ((unsigned char) at (tos, idx)))
932 if (at (tos, c) == '\n'
933 && at (tos, c + 1) == '\n'
934 && at (tos, c + 2) == '.')
939 else if (at (tos, c) == '.' && sl)
944 else if (at (tos, c) == '\n'
945 && at (tos, c + 1) == '\n'
952 catchar (&out, at (tos, c));
953 if (at (tos, c) == '\n')
972 delete_string (tos);
973 *tos = out;
985 while (at (tos, idx))
987 switch (at (tos, idx))
992 if (tab && at (tos, idx))
1014 catchar (&out, at (tos, idx));
1023 delete_string (tos);
1024 *tos = out;
1031 tos++;
1033 init_string (tos);
1039 idx = copy_past_newline (ptr, idx, tos);
1049 t = tos[0];
1050 tos[0] = tos[-1];
1051 tos[-1] = t;
1058 tos++;
1060 init_string (tos);
1061 catstr (tos, tos - 1);
1068 tos--;
1084 tos--;
1086 catstr (tos, tos + 1);
1087 delete_string (tos + 1);
1115 catstr (tos - 1, tos);
1117 delete_string (tos);
1118 tos--;
1231 tos = stack;
1424 write_buffer (tos, stdout);
1426 write_buffer (tos, stderr);
1430 tos--;
1484 tos = stack + 1;
1560 if (tos != stack)
1563 tos - stack);