3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Enrico Forestieri
8 * Full author contact details are available in file CREDITS.
10 * This is a wrapper program for the lyxeditor.sh script or lyxclient program,
11 * meant to be used with yap or sumatrapdf for inverse search.
18 #include <cygwin/version.h>
19 #include <sys/cygwin.h>
22 void convert_to_full_posix_path(char const * from, char *to)
24 #if CYGWIN_VERSION_DLL_MAJOR >= 1007
25 cygwin_conv_path(CCP_WIN_A_TO_POSIX, from, to, PATH_MAX);
27 cygwin_conv_to_full_posix_path(from, to);
31 int main(int ac, char **av)
33 char buf[2 * PATH_MAX];
34 char posixpath[PATH_MAX + 1];
36 if (ac < 3 || ac > 4) {
37 MessageBox(0, "Usage: lyxeditor [-g] <file.tex> <lineno>",
38 "ERROR: Wrong number of arguments", 0);
43 convert_to_full_posix_path(av[1], posixpath);
44 sprintf(buf, "lyxeditor.sh" PROGRAM_SUFFIX " '%s' %s",
47 convert_to_full_posix_path(av[2], posixpath);
48 sprintf(buf, "lyxclient" PROGRAM_SUFFIX " %s '%s' %s",
49 av[1], posixpath, av[3]);