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 <sys/cygwin.h>
21 int main(int ac, char **av)
23 char buf[2 * PATH_MAX];
24 char posixpath[PATH_MAX + 1];
26 if (ac < 3 || ac > 4) {
27 MessageBox(0, "Usage: lyxeditor [-g] <file.tex> <lineno>",
28 "ERROR: Wrong number of arguments", 0);
33 cygwin_conv_to_full_posix_path(av[1], posixpath);
34 sprintf(buf, "lyxeditor.sh" PROGRAM_SUFFIX " '%s' %s",
37 cygwin_conv_to_full_posix_path(av[2], posixpath);
38 sprintf(buf, "lyxclient" PROGRAM_SUFFIX " %s '%s' %s",
39 av[1], posixpath, av[3]);