return *s == '~';
}
+FcBool
+FcStrIsAbsoluteFilename (const FcChar8 *s)
+{
+#ifdef _WIN32
+ if (*s == '\\' ||
+ (isalpha (*s) && s[1] == ':' && (s[2] == '/' || s[2] == '\\')))
+ return FcTrue;
+#endif
+ return *s == '/';
+}
+
FcChar8 *
FcStrBuildFilename (const FcChar8 *path,
...)
if (!home)
return NULL;
size = strlen ((char *) home) + strlen ((char *) s);
- full = (FcChar8 *) malloc (size);
+ full = (FcChar8 *) malloc (size + 1);
if (!full)
return NULL;
strcpy ((char *) full, (char *) home);