Lines Matching refs:pos
260 int get(int pos);
265 int skipwhite(int pos);
270 int getword(int pos, String &ret);
275 bool sequ(int pos, char *key);
500 String::size_type pos = fullname.find_last_of('/');
501 if (pos != fullname.npos && pos<fullname.size()-1)
503 path = fullname.substr(0, pos);
504 pos++;
505 basename = fullname.substr(pos, fullname.size()-pos);
513 pos = basename.find_last_of('.');
514 if (pos != basename.npos && pos<basename.size()-1)
516 suffix = basename.substr(pos+1, basename.size()-pos-1);
517 basename = basename.substr(0, pos);
532 String::size_type pos = fname.find_last_of('.');
533 if (pos == fname.npos)
535 pos++;
536 String res = fname.substr(pos, fname.size()-pos);
683 * Get a character from the buffer at pos. If out of range,
686 int DepTool::get(int pos)
688 if (pos>fileSize)
690 return fileBuf[pos];
696 * Skip over all whitespace characters beginning at pos. Return
699 int DepTool::skipwhite(int pos)
701 while (pos < fileSize)
703 int ch = get(pos);
708 pos++;
710 return pos;
715 * Parse the buffer beginning at pos, for a word. Fill
719 int DepTool::getword(int pos, String &ret)
721 while (pos < fileSize)
723 int ch = get(pos);
729 pos++;
731 return pos;
736 * beginning at pos match the key, for the length of the key
738 bool DepTool::sequ(int pos, char *key)
742 if (*key != get(pos))
744 key++; pos++;
818 int pos = 0;
821 while (pos < fileSize)
823 //trace("p:%c", get(pos));
826 if (get(pos) == '/' && get(pos+1) == '*')
828 pos += 2;
829 while (pos < fileSize)
831 if (get(pos) == '*' && get(pos+1) == '/')
833 pos += 2;
837 pos++;
841 else if (get(pos) == '/' && get(pos+1) == '/')
843 pos += 2;
844 while (pos < fileSize)
846 if (get(pos) == '\n')
848 pos++;
852 pos++;
856 else if (sequ(pos, "#include"))
858 pos += 8;
859 pos = skipwhite(pos);
861 pos = getword(pos, iname);
870 pos++;