/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <stdlib.h>
#include <string.h>
#include "FileSystemSupport_md.h"
/*
*/
char pathSeparator() {
return ':';
}
/* Filenames are case senstitive */
}
return (char*)path;
} else {
if (len > 0) {
}
return str;
}
}
}
/* A normal Unix pathname contains no duplicate slashes and does not end
with a slash. It may be the empty string. */
/* Normalize the given pathname, whose length is len, starting at the given
offset; everything before this offset is already normal. */
char* sb;
int sbLen, i, n;
char prevChar;
n = len;
if (n == 0) return strdup("/");
sbLen = 0;
if (off > 0) {
}
prevChar = 0;
for (i = off; i < n; i++) {
char c = pathname[i];
prevChar = c;
}
return sb;
}
/* Check that the given pathname is normal. If not, invoke the real
normalizer on the part of the pathname that requires normalization.
This way we iterate through the whole pathname string only once. */
int i;
char prevChar = 0;
for (i = 0; i < n; i++) {
char c = pathname[i];
prevChar = c;
}
return (char*)pathname;
}
int len;
char* theChars;
int childStart = 0;
parentEnd--;
}
if (parentEnd > 0)
if (cn > 0)
} else {
if (parentEnd > 0)
if (cn > 0)
}
return theChars;
}
// "/foo/" --> "/foo", but "/" --> "/"
}
return str;
} else {
return (char*)path;
}
}