Lines Matching refs:segs
2210 // segs.length == Number of segments in path
2214 // segs[i] == Index of first char in segment i (0 <= i < segs.length)
2216 static private void split(char[] path, int[] segs) {
2231 segs[i++] = p++;
2248 if (i != segs.length)
2259 // segs[i] == -1 implies segment i is to be ignored
2265 static private int join(char[] path, int[] segs) {
2266 int ns = segs.length; // Number of segments
2276 int q = segs[i]; // Current segment
2308 private static void removeDots(char[] path, int[] segs) {
2309 int ns = segs.length;
2317 int p = segs[i];
2339 segs[i] = -1;
2346 if (segs[j] != -1) break;
2349 int q = segs[j];
2353 segs[i] = -1;
2354 segs[j] = -1;
2365 private static void maybeAddLeadingDot(char[] path, int[] segs) {
2371 int ns = segs.length;
2374 if (segs[f] >= 0)
2383 int p = segs[f];
2393 segs[0] = 0;
2414 int[] segs = new int[ns]; // Segment-index array
2415 split(path, segs);
2418 removeDots(path, segs);
2421 maybeAddLeadingDot(path, segs);
2424 String s = new String(path, 0, join(path, segs));