Lines Matching refs:idx

129 unsigned int idx = 0; /* Pos in input buffer */
231 addr (string_type *buffer, unsigned int idx)
233 return buffer->ptr + idx;
291 skip_white_and_stars (string_type *src, unsigned int idx)
294 while ((c = at (src, idx)),
299 && at (src, idx +1) != '/'
300 && at (src, idx -1) != '\n'))
301 idx++;
302 return idx;
306 skip_past_newline_1 (string_type *ptr, unsigned int idx)
308 while (at (ptr, idx)
309 && at (ptr, idx) != '\n')
310 idx++;
311 if (at (ptr, idx) == '\n')
312 return idx + 1;
313 return idx;
398 unsigned int idx = 0;
400 while (at (src, idx))
403 if (at (src, idx) == '\n'
404 && at (src, idx + 1) == '/'
405 && at (src, idx + 2) == '*')
407 idx += 3;
409 idx = skip_white_and_stars (src, idx);
412 if (at (src, idx) == '.')
413 idx++;
417 while (at (src, idx))
419 if (at (src, idx) == '\n')
422 if (at (src, idx + 1) == '\n')
425 idx++;
426 idx = skip_white_and_stars (src, idx);
428 else if (at (src, idx) == '*' && at (src, idx + 1) == '/')
430 idx += 2;
436 catchar (dst, at (src, idx));
437 idx++;
442 idx++;
469 unsigned int idx;
507 for (idx = 0; idx < len; idx++)
508 catchar (&out, at (tos, idx));
519 for (idx = fname; idx < len; idx++)
520 catchar (&out, at (tos, idx));
524 for (idx = openp; at (tos, idx) && at (tos, idx) != ';'; idx++)
525 catchar (&out, at (tos, idx));
540 unsigned int idx = 0;
544 while (at (tos, idx))
546 if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
549 idx += 2;
551 else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
554 idx += 2;
558 catchar (&out, at (tos, idx));
559 idx++;
572 unsigned int idx = 0;
576 while (at (tos, idx))
579 if (at (tos, idx) == '.')
583 idx++;
585 while ((c = at (tos, idx)) && c != '\n')
587 if (c == '{' && at (tos, idx + 1) == '*')
590 idx += 2;
592 else if (c == '*' && at (tos, idx + 1) == '}')
595 idx += 2;
600 idx++;
604 idx++;
609 idx = skip_past_newline_1 (tos, idx);
622 unsigned int idx = 0;
627 while (at (tos, idx))
629 if (at (tos, idx) == '\n'
630 && (at (tos, idx +1 ) == '.'
631 || at (tos, idx + 1) == '|'))
636 idx += 2;
638 while (at (tos, idx) && at (tos, idx) != '\n')
644 if (at (tos, idx) == '{')
646 else if (at (tos, idx) == '}')
651 if (at (tos, idx) == '{')
653 else if (!islower ((unsigned char) at (tos, idx)))
656 else if (at (tos, idx) == '@'
657 && islower ((unsigned char) at (tos, idx + 1)))
661 else if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
664 idx += 2;
667 else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
670 idx += 2;
673 else if (at (tos, idx) == '{'
674 || at (tos, idx) == '}')
679 catchar (&out, at (tos, idx));
680 idx++;
684 while (at (tos, idx) == '\n'
685 && ((at (tos, idx + 1) == '.')
686 || (at (tos, idx + 1) == '|')))
692 catchar (&out, at (tos, idx));
693 idx++;
708 unsigned int idx = 0;
713 while (at (tos, idx))
715 if (at (tos, idx) == '@'
716 && at (tos, idx + 1) == '*')
719 idx += 2;
721 else if (at (tos, idx) == '\n'
722 && at (tos, idx + 1) == 'o'
723 && isspace ((unsigned char) at (tos, idx + 2)))
732 idx += 3;
736 catchar (&out, at (tos, idx));
737 if (on && at (tos, idx) == '\n'
738 && at (tos, idx + 1) == '\n'
739 && at (tos, idx + 2) != 'o')
744 idx++;
763 unsigned int idx = 0;
766 while (at (tos, idx))
768 if (at (tos, idx) == '<'
769 && at (tos, idx + 1) == '<'
770 && !isspace ((unsigned char) at (tos, idx + 2)))
773 idx += 2;
775 while (at (tos, idx)
776 && at (tos, idx) != '>' )
778 catchar (&out, at (tos, idx));
779 idx++;
783 idx += 2;
787 catchar (&out, at (tos, idx));
788 idx++;
800 iscommand (string_type *ptr, unsigned int idx)
803 while (at (ptr, idx))
805 if (isupper ((unsigned char) at (ptr, idx))
806 || at (ptr, idx) == ' ' || at (ptr, idx) == '_')
809 idx++;
811 else if (at (ptr, idx) == '\n')
824 copy_past_newline (string_type *ptr, unsigned int idx, string_type *dst)
828 while (at (ptr, idx) && at (ptr, idx) != '\n')
830 if (at (ptr, idx) == '\t')
840 catchar (dst, at (ptr, idx));
843 idx++;
846 catchar (dst, at (ptr, idx));
847 idx++;
848 return idx;
858 idx = copy_past_newline (ptr, idx, tos);
870 int idx = 0;
877 while (at (tos, idx) == '\n')
879 idx++;
881 c = idx;
885 if (at (tos, idx) == '.')
889 while (at (tos, idx))
891 idx++;
895 idx--;
897 while (idx && isspace ((unsigned char) at (tos, idx)))
898 idx--;
899 idx++;
905 while (c < idx)
957 int idx = 0;
960 while (at (tos, idx))
962 switch (at (tos, idx))
966 idx++;
967 if (tab && at (tos, idx))
977 idx++;
984 idx++;
989 catchar (&out, at (tos, idx));
992 idx++;
1010 while (at (ptr, idx))
1012 if (iscommand (ptr, idx))
1014 idx = copy_past_newline (ptr, idx, tos);
1070 idx = skip_past_newline_1 (ptr, idx);
1100 int idx;
1155 for (idx = 0; idx < length; idx++)
1157 if (src[idx] == '\\')
1158 switch (src[idx + 1])
1162 idx++;
1166 *dst++ = src[idx + 1];
1167 idx++;
1174 *dst++ = src[idx];
1232 while (at (ptr, idx))
1235 if (iscommand (ptr, idx))
1240 (void) nextword (addr (ptr, idx), &next);
1252 idx = skip_past_newline_1 (ptr, idx);
1257 idx = skip_past_newline_1 (ptr, idx);