Index: ass_fontconfig.c =================================================================== --- ass_fontconfig.c (revision 1035) +++ ass_fontconfig.c (working copy) @@ -385,11 +385,15 @@ priv->family_default = family ? strdup(family) : 0; priv->index_default = 0; +#ifdef __VISUALC__ + priv->path_default = path; +#else rc = stat(path, &st); if (!rc && S_ISREG(st.st_mode)) priv->path_default = path ? strdup(path) : 0; else priv->path_default = 0; +#endif return priv; } Index: ass_utils.c =================================================================== --- ass_utils.c (revision 1035) +++ ass_utils.c (working copy) @@ -22,7 +22,9 @@ #include #include +#ifndef __VISUALC__ #include +#endif #include #include "mputils.h" Index: libass.vcproj =================================================================== --- libass.vcproj (revision 0) +++ libass.vcproj (revision 0) @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: mputils.c =================================================================== --- mputils.c (revision 1035) +++ mputils.c (working copy) @@ -14,9 +14,9 @@ #endif void my_mp_msg(int lvl, char *lvl_str, char *fmt, ...) { + va_list va; if(lvl > MSGL_V) return; printf("[ass] **%s**: ", lvl_str); - va_list va; va_start(va, fmt); vprintf(fmt, va); va_end(va); Index: mputils.h =================================================================== --- mputils.h (revision 1035) +++ mputils.h (working copy) @@ -7,7 +7,13 @@ void my_mp_msg(int lvl, char *lvl_str, char *fmt, ...); +#ifdef __VISUALC__ +static void mp_msg(int mod, int level, const char *fmt, ...) { + // MSVC doesn't like the # used all around for mp_msg, so it breaks va_arg +} +#else #define mp_msg(mod, level, args...) my_mp_msg(level, #level, args) +#endif #define MSGT_ASS 43 Index: msvc.h =================================================================== --- msvc.h (revision 0) +++ msvc.h (revision 0) @@ -0,0 +1,20 @@ +#ifdef WIN32 + +#include + +#define strtoll(p, e, b) _strtoi64(p, e, b) +#define snprintf _snprintf +#define strcasecmp stricmp +#define strncasecmp strnicmp + +#ifndef M_PI +#define M_PI 3.1415926535897932384626433832795 +#endif + +#define __VISUALC__ +#define HAVE_FONTCONFIG + +#define S_IFREG 0100000 +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) + +#endif