diff options
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 0c95e98973e..f09819408d1 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,8 @@ +2011-05-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * texmfmp.c: add a function generic_synctex_get_current_name() + in order to get full path names for SyncTeX. + 2011-05-04 Peter Breitenlohner <peb@mppmu.mpg.de> * texmfmp.c (ipc_open_out): Avoid to #define SOCK_NONBLOCK which diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index c672ae10704..c97ee075b96 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -90,6 +90,29 @@ #define edit_var "MFEDIT" #endif /* MF */ +#if defined(__SyncTeX__) +/* + SyncTeX file name should be full path in the case where + --output-directory option is given. + Borrowed from LuaTeX. +*/ +char *generic_synctex_get_current_name (void) +{ + char *pwdbuf = NULL, *ret; + int pwdbufsize = 2; + if (kpse_absolute_p(fullnameoffile, 0)) { + return xstrdup(fullnameoffile); + } + do { + pwdbufsize = 2*pwdbufsize; + pwdbuf = xrealloc (pwdbuf, pwdbufsize); + } while (!getcwd(pwdbuf, pwdbufsize)); + ret = concat3(pwdbuf, DIR_SEP_STRING, fullnameoffile); + free(pwdbuf) ; + return ret; +} +#endif + /* Shell escape. If shellenabledp == 0, all shell escapes are forbidden. |