MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / xmlFileOpenW

Function xmlFileOpenW

Externals/LibXML/xmlIO.c:919–941  ·  view source on GitHub ↗

* xmlFileOpenW: * @filename: the URI for matching * * output to from FILE *, * if @filename is "-" then the standard output is used * * Returns an I/O context or NULL in case of error */

Source from the content-addressed store, hash-verified

917 * Returns an I/O context or NULL in case of error
918 */
919static void *
920xmlFileOpenW (const char *filename) {
921 const char *path = NULL;
922 FILE *fd;
923
924 if (!strcmp(filename, "-")) {
925 fd = stdout;
926 return((void *) fd);
927 }
928
929 if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
930#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
931 path = &filename[17];
932#else
933 path = &filename[16];
934#endif
935 else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
936#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
937 path = &filename[8];
938#else
939 path = &filename[7];
940#endif
941 } else
942 path = filename;
943
944 if (path == NULL)

Callers

nothing calls this directly

Calls 1

xmlStrncasecmpFunction · 0.85

Tested by

no test coverage detected