mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
remove lyxsocket and all obsolete Win32-related files from ./development
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14632 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
783cb8f8bf
commit
6764fe0ee2
@ -1,643 +0,0 @@
|
||||
/* src/config.h. Generated by configure. */
|
||||
/* src/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
|
||||
/* -*- C++ -*- */
|
||||
/*
|
||||
* \file config.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* This is the compilation configuration file for LyX.
|
||||
* It was generated by autoconfs configure.
|
||||
* You might want to change some of the defaults if something goes wrong
|
||||
* during the compilation.
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
#pragma warning(disable:4127 4244 4258 4355 4267 4503 4786 4800)
|
||||
|
||||
// Enable a bunch of useful warnings
|
||||
#pragma warning(3:4019 4032 4057 4125 4130 4152 4189 4201 4706)
|
||||
|
||||
#pragma warning(2:4032) // function arg has different type from declaration
|
||||
#pragma warning(2:4092) // 'sizeof' value too big
|
||||
#pragma warning(2:4132 4268)// const object not initialized
|
||||
#pragma warning(2:4152) // pointer conversion between function and data
|
||||
#pragma warning(2:4239) // standard doesn't allow this conversion
|
||||
#pragma warning(2:4701) // local variable used without being initialized
|
||||
#pragma warning(2:4706) // if (a=b) instead of (if a==b)
|
||||
#pragma warning(2:4709) // comma in array subscript
|
||||
//#pragma warning(3:4061) // not all enum values tested in switch statement ( works in vc7, and gives alot of warnings )
|
||||
//#pragma warning(3:4505) // unreferenced local function removed
|
||||
#pragma warning(3:4121) // space added for structure alignment
|
||||
#pragma warning(3:4019) // empty statement at global scope
|
||||
#pragma warning(3:4057) // pointers refer to different base types
|
||||
#pragma warning(3:4125) // decimal digit terminates octal escape
|
||||
#pragma warning(2:4131) // old-style function declarator
|
||||
#pragma warning(3:4211) // extern redefined as static
|
||||
#pragma warning(3:4213) // cast on left side of = is non-standard
|
||||
#pragma warning(3:4222) // member function at file scope shouldn't be static
|
||||
#pragma warning(3:4234 4235)// keyword not supported or reserved for future
|
||||
#pragma warning(3:4504) // type ambiguous; simplify code
|
||||
#pragma warning(3:4507) // explicit linkage specified after default linkage
|
||||
#pragma warning(3:4515) // namespace uses itself
|
||||
#pragma warning(3:4516 4517)// access declarations are deprecated
|
||||
#pragma warning(3:4670) // base class of thrown object is inaccessible
|
||||
#pragma warning(3:4671) // copy ctor of thrown object is inaccessible
|
||||
#pragma warning(3:4673) // thrown object cannot be handled in catch block
|
||||
#pragma warning(3:4674) // dtor of thrown object is inaccessible
|
||||
#pragma warning(3:4705) // statement has no effect (example: a+1;)
|
||||
|
||||
|
||||
/* Location of Aiksaurus.h */
|
||||
#define AIKSAURUS_H_LOCATION <Aiksaurus/Aiksaurus.h>
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define if your C++ compiler puts C library functions in the global
|
||||
namespace */
|
||||
#define CXX_GLOBAL_CSTD
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define if you are building a development version of LyX */
|
||||
#define DEVEL_VERSION 1
|
||||
|
||||
/* Define if you want assertions to be enabled in the code */
|
||||
#define ENABLE_ASSERTIONS 1
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
/* #undef ENABLE_NLS */
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
||||
/* Define to 1 if you have the <argz.h> header file. */
|
||||
/* #undef HAVE_ARGZ_H */
|
||||
|
||||
/* Define to 1 if you have the <aspell/aspell.h> header file. */
|
||||
/* #undef HAVE_ASPELL_ASPELL_H */
|
||||
|
||||
/* Define to 1 if you have the <aspell.h> header file. */
|
||||
/* #undef HAVE_ASPELL_H */
|
||||
|
||||
/* Define to 1 if you have the `asprintf' function. */
|
||||
/* #undef HAVE_ASPRINTF */
|
||||
|
||||
/* Define to 1 if you have the `close' function. */
|
||||
/* #undef HAVE_CLOSE */
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
/* #undef HAVE_DCGETTEXT */
|
||||
|
||||
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_FEOF_UNLOCKED 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
|
||||
you don't. */
|
||||
#define HAVE_DECL_FGETS_UNLOCKED 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_GETC_UNLOCKED 0
|
||||
|
||||
/* Define if you have the prototype for function `istreambuf_iterator' */
|
||||
#define HAVE_DECL_ISTREAMBUF_ITERATOR 1
|
||||
|
||||
/* Define if you have the prototype for function `mkstemp' */
|
||||
/* #undef HAVE_DECL_MKSTEMP */
|
||||
|
||||
/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL__SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL__SNWPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_DIRENT_H 1 */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define to 1 if you have the `fcntl' function. */
|
||||
/* #undef HAVE_FCNTL */
|
||||
|
||||
/* Define to 1 if you have the <flimage.h> header file. */
|
||||
/* #undef HAVE_FLIMAGE_H */
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
/* #undef HAVE_FORK */
|
||||
|
||||
/* Define to 1 if you have the `fwprintf' function. */
|
||||
#define HAVE_FWPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define to 1 if you have the `getegid' function. */
|
||||
#define HAVE_GETEGID 1
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define to 1 if you have the `getgid' function. */
|
||||
#define HAVE_GETGID 1
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define to 1 if you have the `getpid' function. */
|
||||
/* #undef HAVE_GETPID */
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
/* #undef HAVE_GETTEXT */
|
||||
|
||||
/* Define to 1 if you have the `getuid' function. */
|
||||
#define HAVE_GETUID 1
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#define HAVE_ICONV 1
|
||||
|
||||
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
|
||||
#define HAVE_INTMAX_T 1
|
||||
|
||||
/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
|
||||
declares uintmax_t. */
|
||||
#define HAVE_INTTYPES_H_WITH_UINTMAX 1
|
||||
|
||||
/* Define to 1 if you have the <ios> header file. */
|
||||
#define HAVE_IOS 1
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#define HAVE_IO_H 1
|
||||
|
||||
/* Define to 1 if you have the <istream> header file. */
|
||||
#define HAVE_ISTREAM 1
|
||||
|
||||
/* Define this if you have the kpsewhich program working on your system. */
|
||||
#define HAVE_KPSEWHICH 1
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
#define HAVE_LANGINFO_CODESET 1
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
|
||||
/* Define this if you have the AikSaurus library */
|
||||
/* #undef HAVE_LIBAIKSAURUS */
|
||||
|
||||
/* Define to 1 if you have the `c' library (-lc). */
|
||||
#define HAVE_LIBC 1
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#define HAVE_LIBM 1
|
||||
|
||||
/* Define to 1 if you have the <limits> header file. */
|
||||
#define HAVE_LIMITS 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the <locale> header file. */
|
||||
#define HAVE_LOCALE 1
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define if you have the 'long double' type. */
|
||||
#define HAVE_LONG_DOUBLE 1
|
||||
|
||||
/* Define if you have the 'long long' type. */
|
||||
#define HAVE_LONG_LONG 1
|
||||
|
||||
/* Define to 1 if you have the `lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mempcpy' function. */
|
||||
#define HAVE_MEMPCPY 1
|
||||
|
||||
/* Define to 1 if you have the `mkdir' function. */
|
||||
/* #define HAVE_MKDIR */
|
||||
|
||||
/* Define to 1 if you have the `mkfifo' function. */
|
||||
/* #undef HAVE_MKFIFO */
|
||||
|
||||
/* Define to 1 if you have the `mkstemp' function. */
|
||||
/* #undef HAVE_MKSTEMP */
|
||||
|
||||
/* Define to 1 if you have the `mktemp' function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
#define HAVE_MUNMAP 1
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <nl_types.h> header file. */
|
||||
#define HAVE_NL_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `open' function. */
|
||||
/* #undef HAVE_OPEN */
|
||||
|
||||
/* Define to 1 if you have the <ostream> header file. */
|
||||
#define HAVE_OSTREAM 1
|
||||
|
||||
/* Define to 1 if you have the `pclose' function. */
|
||||
/* #undef HAVE_PCLOSE */
|
||||
|
||||
/* Define to 1 if you have the `popen' function. */
|
||||
/* #undef HAVE_POPEN */
|
||||
|
||||
/* Define if your printf() function supports format strings with positions. */
|
||||
#define HAVE_POSIX_PRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <process.h> header file. */
|
||||
#define HAVE_PROCESS_H 1
|
||||
|
||||
/* Define to 1 if you have the <pspell/pspell.h> header file. */
|
||||
/* #undef HAVE_PSPELL_PSPELL_H */
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#define HAVE_PUTENV 1
|
||||
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
/* #undef HAVE_READLINK */
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
/* #undef HAVE_SETENV 1 */
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <sstream> header file. */
|
||||
#define HAVE_SSTREAM 1
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
|
||||
uintmax_t. */
|
||||
#define HAVE_STDINT_H_WITH_UINTMAX 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have a conforming std::count template, otherwise HP version
|
||||
of count template is assumed. */
|
||||
#define HAVE_STD_COUNT 1
|
||||
|
||||
/* Define to 1 if you have the `stpcpy' function. */
|
||||
#define HAVE_STPCPY 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strtoul' function. */
|
||||
#define HAVE_STRTOUL 1
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
#define HAVE_SYS_UTIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
/* #undef HAVE_UTIME_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `tsearch' function. */
|
||||
#define HAVE_TSEARCH 1
|
||||
|
||||
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
|
||||
#define HAVE_UINTMAX_T 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
/*#undef HAVE_UNISTD_H 1*/
|
||||
|
||||
/* Define if you have the 'unsigned long long' type. */
|
||||
#define HAVE_UNSIGNED_LONG_LONG 1
|
||||
|
||||
/* Define if you have the 'wchar_t' type. */
|
||||
#define HAVE_WCHAR_T 1
|
||||
|
||||
/* Define to 1 if you have the `wcslen' function. */
|
||||
#define HAVE_WCSLEN 1
|
||||
|
||||
/* Define if you have the 'wint_t' type. */
|
||||
#define HAVE_WINT_T 1
|
||||
|
||||
/* Define to 1 if you have the <X11/flimage.h> header file. */
|
||||
/* #undef HAVE_X11_FLIMAGE_H */
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
#define HAVE_ZLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `_close' function. */
|
||||
#define HAVE__CLOSE 1
|
||||
|
||||
/* Define to 1 if you have the `_getpid' function. */
|
||||
#define HAVE__GETPID 1
|
||||
|
||||
/* Define to 1 if you have the `_mkdir' function. */
|
||||
#define HAVE__MKDIR 1
|
||||
|
||||
/* Define to 1 if you have the `_open' function. */
|
||||
#define HAVE__OPEN 1
|
||||
|
||||
/* Define to 1 if you have the `_pclose' function. */
|
||||
#define HAVE__PCLOSE 1
|
||||
|
||||
/* Define to 1 if you have the `_popen' function. */
|
||||
#define HAVE__POPEN 1
|
||||
|
||||
/* Define to 1 if you have the `__argz_count' function. */
|
||||
/* #undef HAVE___ARGZ_COUNT */
|
||||
|
||||
/* Define to 1 if you have the `__argz_next' function. */
|
||||
/* #undef HAVE___ARGZ_NEXT */
|
||||
|
||||
/* Define to 1 if you have the `__argz_stringify' function. */
|
||||
/* #undef HAVE___ARGZ_STRINGIFY */
|
||||
|
||||
/* Define to 1 if you have the `__fsetlocking' function. */
|
||||
/* #undef HAVE___FSETLOCKING */
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#define ICONV_CONST
|
||||
|
||||
/* Define if integer division by zero raises signal SIGFPE. */
|
||||
#define INTDIV0_RAISES_SIGFPE 1
|
||||
|
||||
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
|
||||
*/
|
||||
/* #undef MAJOR_IN_MKDEV */
|
||||
|
||||
/* Define to 1 if `major', `minor', and `makedev' are declared in
|
||||
<sysmacros.h>. */
|
||||
/* #undef MAJOR_IN_SYSMACROS */
|
||||
|
||||
/* Define if mkdir takes only one argument. */
|
||||
/* #undef MKDIR_TAKES_ONE_ARG */
|
||||
|
||||
/* Define if you have modern standard-compliant STL streams */
|
||||
#define MODERN_STL_STREAMS 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "lyx"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "lyx-devel@lists.lyx.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "lyx"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "lyx 1.4.0cvs"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "lyx"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.4.0cvs"
|
||||
|
||||
/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
|
||||
/* #undef PRI_MACROS_BROKEN */
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#define SELECT_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#define SELECT_TYPE_ARG234 (fd_set *)
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#define SELECT_TYPE_ARG5 (struct timeval *)
|
||||
|
||||
/* Define as the maximum value of type 'size_t', if the system doesn't define
|
||||
it. */
|
||||
/* #undef SIZE_MAX */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define as 1 to use the aspell library */
|
||||
/* #undef USE_ASPELL */
|
||||
|
||||
/* Define as 1 if you want to support compressed files. */
|
||||
/* #undef USE_COMRESSION */
|
||||
|
||||
/* Define as 1 to use an external ispell process for spell-checking */
|
||||
/* #undef USE_ISPELL */
|
||||
|
||||
/* Define if you want to be able to load jpeg images natively */
|
||||
#define USE_JPEG_IMAGE_LOADER 1
|
||||
|
||||
/* Define to 1 if LyX should use a MacOS X application bundle file layout */
|
||||
/* #undef USE_MACOSX_PACKAGING */
|
||||
|
||||
/* Define to 1 if LyX should use a POSIX-style file layout */
|
||||
/* #undef USE_POSIX_PACKAGING */
|
||||
|
||||
/* Define as 1 to use the pspell library */
|
||||
/* #undef USE_PSPELL */
|
||||
|
||||
/* Define to 1 if LyX should use a Windows-style file layout */
|
||||
#define USE_WINDOWS_PACKAGING 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.4.0cvs"
|
||||
|
||||
/* Define this if you want to see the warning directives put here and there by
|
||||
the developpers to get attention */
|
||||
/* #undef WITH_WARNINGS */
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
/* #undef X_DISPLAY_MISSING */
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* # undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* libstdc++ concept checking */
|
||||
/* #undef _GLIBCPP_CONCEPT_CHECKS */
|
||||
|
||||
/* libstdc++ concept checking */
|
||||
/* #undef _GLIBCXX_CONCEPT_CHECKS */
|
||||
|
||||
/* libstdc++ debug mode */
|
||||
/* #undef _GLIBCXX_DEBUG */
|
||||
|
||||
/* libstdc++ pedantic debug mode */
|
||||
/* #undef _GLIBCXX_DEBUG_PEDANTIC */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to nothing if your compiler does not understand the 'explicit'
|
||||
directive */
|
||||
/* #undef explicit */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef gid_t */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#define pid_t int
|
||||
|
||||
/* Define as the type of the result of subtracting two pointers, if the system
|
||||
doesn't define it. */
|
||||
/* #undef ptrdiff_t */
|
||||
|
||||
/* Define to empty if the C compiler doesn't support this keyword. */
|
||||
/* #undef signed */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef uid_t */
|
||||
|
||||
/* Define to unsigned long or unsigned long long if <stdint.h> and
|
||||
<inttypes.h> don't define. */
|
||||
/* #undef uintmax_t */
|
||||
|
||||
|
||||
/************************************************************
|
||||
** You should not need to change anything beyond this point */
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
char * strerror(int n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MKSTEMP
|
||||
#ifndef HAVE_DECL_MKSTEMP
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
int mkstemp(char*);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM)
|
||||
#define USE_BOOST_FORMAT 1
|
||||
#else
|
||||
#define USE_BOOST_FORMAT 0
|
||||
#endif
|
||||
|
||||
#define BOOST_USER_CONFIG <config.h>
|
||||
|
||||
#if defined(ENABLE_ASSERTIONS)
|
||||
#define BOOST_ENABLE_ASSERT_HANDLER 1
|
||||
#else
|
||||
#define BOOST_DISABLE_ASSERTS 1
|
||||
#endif
|
||||
|
||||
#define BOOST_DISABLE_THREADS 1
|
||||
#define BOOST_NO_WREGEX 1
|
||||
#define BOOST_NO_WSTRING 1
|
||||
|
||||
#endif
|
||||
|
@ -1 +0,0 @@
|
||||
copy fakeconfig\*.* ..\..\lib\
|
@ -1,269 +0,0 @@
|
||||
% This is chkconfig.ltx, a script which tries to autodetect and
|
||||
% document your LaTeX configuration.
|
||||
% Author: Jean-Marc Lasgouttes (Jean-Marc.Lasgouttes@inria.fr)
|
||||
% with minimal changes by Asger Alstrup (alstrup@diku.dk).
|
||||
%
|
||||
% This script should only be run from the configure script to update
|
||||
% the files textclass.lst and doc/LyXConfig.lyx
|
||||
%
|
||||
% This script is in fact a complete rewrite of the original chkconfig
|
||||
% script. Expect bugs.
|
||||
|
||||
%%% If you want to add new packages/documentclasses to be recognized,
|
||||
%%% read the explanation that follow and jump to the section 'Actual
|
||||
%%% inspection code' below. You do not need to understand the ugly
|
||||
%%% LaTeX code below to help improving chkconfig.ltx :-)
|
||||
%%%
|
||||
%%% If you want to add the new package <name>, all you need most of
|
||||
%%% the times is a two-steps work:
|
||||
%%% 1- Add the command \TestPackage{<name>}. The syntax is:
|
||||
%%% \TestPackage[<file>]{<name>}, which tests whether <name>.sty
|
||||
%%% (or <file>, if this optional parameter is provided) exists.
|
||||
%%% 2- Add a description for <name> in doc/LyXConfig.lyx.in,
|
||||
%%% containing in particular a line like
|
||||
%%% Found @chk_<name>@
|
||||
%%% This line will be replaced at configure time by the proper text.
|
||||
%%%
|
||||
%%% For document classes, things are even simpler, since you do not
|
||||
%%% need to edit this file. Just put your layout file in some place
|
||||
%%% where LyX can find it and add if you wish a description in
|
||||
%%% LyXConfig.lyx.in, as described above.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%% Initialization part (skip) %%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% we do not want to stop on errors
|
||||
\nonstopmode\makeatletter
|
||||
|
||||
%%% Some useful macros.
|
||||
% Several commands are defined to test for packages:
|
||||
% \AddLayout{<layout>} adds an entry for <layout> in textclass.lst
|
||||
% \AddVariable{<name>}{<value>} creates a new variable chk_<name>,
|
||||
% and gives it the value <value>.
|
||||
% \TestDocClass{<name>}{<command>} if layout <name> has not already
|
||||
% been tested for, execute <command>. Note that you will
|
||||
% probably not need to use this directly, since the configure
|
||||
% script generates the needed macro calls automatically.
|
||||
% \TestPackage[<file>]{<name>} tests whether <name>.sty (or <file>,
|
||||
% if it is provided) exists.
|
||||
% Both commands call \AddVariable to give value 'yes' or 'no' to
|
||||
% the variable chk_<name>.
|
||||
%%%
|
||||
\newcommand{\prefix}{+} % the character used by grep to filter 'good' output
|
||||
\newcommand{\AddLayout}[4][\default]{
|
||||
\def\default{#2}
|
||||
\immediate\write\layouts{"#2" "#1" "#3" "#4"}}
|
||||
\newcommand{\AddVariable}[2]{
|
||||
\immediate\write\sed{s!@chk_#1@!#2!g}
|
||||
\immediate\write\vars{chk_#1='#2'}}
|
||||
\newcommand{\AddPackage}[1]{
|
||||
\immediate\write\packages{#1}}
|
||||
% Tests whether an item is present
|
||||
% Syntax: \TestItem{<file>}{<name>}{<type>}{<ext>}{<iftrue>}{<iffalse>}
|
||||
\newif\ifexists
|
||||
\newcommand{\TestItem}[6][\default]{
|
||||
\def\default{#2}
|
||||
\def\files{#1}
|
||||
\message{^^J\prefix checking for #3 #2 [#1]...}
|
||||
\let\firstelement\relax
|
||||
\existstrue
|
||||
\@for\file:=\files\do{
|
||||
\ifx\firstelement\relax
|
||||
\edef\firstelement{\file}
|
||||
\fi
|
||||
\IfFileExists{\file}
|
||||
{}
|
||||
{\IfFileExists{\file.#4}{}{\existsfalse}}
|
||||
}
|
||||
\ifexists
|
||||
\message{yes^^J}
|
||||
\AddVariable{#2}{yes}
|
||||
#5
|
||||
\else
|
||||
\message{no^^J}
|
||||
\AddVariable{#2}{no}
|
||||
#6
|
||||
\fi}
|
||||
\newcommand{\TestPackage}[2][\default]{
|
||||
\TestItem[#1]{#2}{package}{sty}{\AddPackage{#2}}{}}
|
||||
\newcommand{\TestDocClass}[2]{
|
||||
\def\layoutname{#1} % remember the name of the layout file
|
||||
\@ifundefined{layout@#1}
|
||||
{#2 % execute the command
|
||||
\global\@namedef{layout@#1}{}}
|
||||
{} % we have already tried this one.
|
||||
}
|
||||
\newcommand{\DeclareLaTeXClass}[2][\default]{
|
||||
\TestItem[#1]{\layoutname}{document class}{cls}
|
||||
{\AddLayout[\firstelement]{\layoutname}{#2}{true}}
|
||||
{\AddLayout[\firstelement]{\layoutname}{#2}{false}}
|
||||
}
|
||||
\newcommand{\DeclareLinuxDocClass}[2][\default]{
|
||||
\message{^^J\prefix checking for linuxdoc class \layoutname... }
|
||||
\@ifundefined{haslinuxdoc}
|
||||
{\message{no^^J}
|
||||
\AddLayout[#1]{\layoutname}{#2}{false}}
|
||||
{\message{yes^^J}
|
||||
\AddLayout[#1]{\layoutname}{#2}{true}}
|
||||
}
|
||||
% Only for compatibility. Will be removed later.
|
||||
\let\DeclareSGMLClass=\DeclareDocBookClass
|
||||
|
||||
\newcommand{\DeclareDocBookClass}[2][\default]{
|
||||
\message{^^J\prefix checking for docbook\space\space class \layoutname... }
|
||||
\@ifundefined{hasdocbook}
|
||||
{\message{no^^J}
|
||||
\AddLayout[#1]{\layoutname}{#2}{false}}
|
||||
{\message{yes^^J}
|
||||
\AddLayout[#1]{\layoutname}{#2}{true}}
|
||||
}
|
||||
|
||||
% Stolen from article.cls
|
||||
\newcommand{\today}{\ifcase\month\or
|
||||
January\or February\or March\or April\or May\or June\or
|
||||
July\or August\or September\or October\or November\or December\fi
|
||||
\space\number\day, \number\year}
|
||||
|
||||
% Initializes the files
|
||||
\typeout{\prefix Inspecting your LaTeX configuration.}
|
||||
\newwrite{\layouts} \immediate\openout \layouts = textclass.lst
|
||||
\newwrite{\sed} \immediate\openout \sed = chkconfig.sed
|
||||
\newwrite{\vars} \immediate\openout \vars = chkconfig.vars
|
||||
\newwrite{\packages} \immediate\openout \packages = packages.lst
|
||||
|
||||
\immediate\write\layouts{%
|
||||
# This file declares layouts and their associated definition files.^^J%
|
||||
# It has been automatically generated by configure^^J%
|
||||
# Use "Options/Reconfigure" if you need to update it after a^^J%
|
||||
# configuration change. Run ./configure manually to update the^^J%
|
||||
# system wide version of this file.}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%% ACTUAL CONFIGURATION INSPECTION CODE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%%% Add any new package or document class here.
|
||||
|
||||
%%% First, we want the day on which the test has been run.
|
||||
\AddVariable{date}{\today}
|
||||
|
||||
%%% Then, the version of LaTeX we are using
|
||||
\message{^^J\prefix checking for LaTeX version... \fmtversion}
|
||||
\AddVariable{fmtversion}{\fmtversion}
|
||||
|
||||
%%% And now, the list of available languages
|
||||
% The trick is to know that \the\everyjob contains something like
|
||||
% \typeout{LaTeX2e <2001/06/01>}
|
||||
% \typeout{Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, nohyphenation, loaded.}
|
||||
% All we have to do is to extract the list from there:
|
||||
% (1) concatenate all the messages that are displayed everytime the
|
||||
% format is loaded. The is done by redefining locally \typeout to
|
||||
% append its argument to the macro \mesg.
|
||||
\def\mesg{}
|
||||
{\def\typeout#1{\xdef\mesg{\mesg #1}}
|
||||
\the\everyjob}
|
||||
% (2) strip the useless parts from \mesg. This uses the fact that TeX
|
||||
% allows to define macros with parameters delimited by arbitrary text.
|
||||
\def\strip#1patterns for #2, loaded.#3\endmark{\def\langs{#2}}
|
||||
\expandafter\strip\mesg\endmark
|
||||
% (3) handle the result
|
||||
\message{^^J\prefix checking for available hyphenation patterns... \langs}
|
||||
\AddVariable{languages}{\langs}
|
||||
|
||||
%%% Check for ec fonts. Most of this code has been shamelessely stolen
|
||||
%%% from the file ltxcheck.tex in the LaTeX distribution. In particular,
|
||||
%%% don't ask me how the macro \ecrm works...
|
||||
\def\ecrm{%
|
||||
\begingroup
|
||||
\escapechar-1
|
||||
\xdef\reserved@a{%
|
||||
\noexpand\in@
|
||||
{\expandafter\string\csname ecrm\endcsname}%
|
||||
{\expandafter\expandafter\expandafter
|
||||
\string\csname T1/cmr/m/n\endcsname}}%
|
||||
\endgroup
|
||||
\reserved@a}
|
||||
|
||||
\message{^^J\prefix checking for default encoding (this may take a long time)^^J}
|
||||
\font\test=ecrm1000\relax
|
||||
\ifx\test\nullfont
|
||||
\message{^^J\prefix\prefix checking for ec fonts... no^^J}
|
||||
\AddVariable{ec}{no}
|
||||
\AddVariable{fontenc}{default}
|
||||
\else
|
||||
\message{^^J\prefix\space\space checking for ec fonts... yes^^J}
|
||||
\message{^^J\prefix\space\space checking for ec support in LaTeX format...}
|
||||
\ecrm
|
||||
\ifin@
|
||||
\message{yes^^J}
|
||||
\AddVariable{ec}{yes}
|
||||
\AddVariable{fontenc}{T1}
|
||||
\message{^^J \prefix\space\space default encoding will be set to T1^^J}
|
||||
\else
|
||||
\message{no^^J}
|
||||
\AddVariable{ec}{no}
|
||||
\AddVariable{fontenc}{default}
|
||||
\fi
|
||||
\fi
|
||||
|
||||
|
||||
%%% Document classes
|
||||
% The list of layout files has been put in this file here by the
|
||||
% configure script.
|
||||
\input{chklayouts}
|
||||
|
||||
|
||||
%%% Packages
|
||||
\TestPackage{a4}
|
||||
\TestPackage{a4wide}
|
||||
\TestPackage{array}
|
||||
\TestPackage{babel}
|
||||
\TestPackage{color} % this one should be there if graphics.sty is there.
|
||||
\TestPackage{fancyhdr}
|
||||
\TestPackage{floatflt}
|
||||
\TestPackage{setspace}
|
||||
\TestPackage{subfigure}
|
||||
\TestPackage{geometry}
|
||||
\TestPackage{longtable}
|
||||
\TestPackage{algorithm}
|
||||
\TestPackage{rotating}
|
||||
\TestPackage{latex8}
|
||||
\TestPackage{url}
|
||||
\TestPackage{varioref}
|
||||
\TestPackage{prettyref}
|
||||
\TestPackage{natbib}
|
||||
\TestPackage{dvipost}
|
||||
|
||||
% The test for the graphics package is slightly more involved...
|
||||
\newcommand\groption{dvips}
|
||||
\TestItem{graphicx}{package}{sty}
|
||||
% Let's do some clever things to guess the default driver for the
|
||||
% graphicx package. The maintainer of the site might have declared it
|
||||
% in the file 'graphics.cfg'. Let's hope there are no strange commands
|
||||
% in there...
|
||||
{\renewcommand\ExecuteOptions[1]{\renewcommand\groption{default}}
|
||||
\InputIfFileExists{graphics.cfg}{}{}
|
||||
\AddPackage{graphicx}}
|
||||
{\renewcommand{\groption}{none}}
|
||||
\message{^^J\prefix checking for graphics driver... \groption^^J}
|
||||
\AddVariable{graphicsdriver}{\groption}
|
||||
|
||||
% psnfss is in fact the name of a set of style files, among which
|
||||
% times.sty. If times.sty is here, we will assume that everything is
|
||||
% fine.
|
||||
\TestPackage[times.sty]{psnfss}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%% END ACTUAL CONFIGURATION INSPECTION CODE %%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% End of the LaTeX job
|
||||
\immediate\closeout\layouts
|
||||
\immediate\closeout\sed
|
||||
\immediate\closeout\vars
|
||||
\immediate\closeout\packages
|
||||
\typeout{\prefix Inspection done.}
|
||||
\typeout{\prefix Read the file doc/LaTeXConfig.lyx for more information.}
|
||||
% Get the real \end command, that has been hidden by LaTeX
|
||||
\@@end
|
@ -1,94 +0,0 @@
|
||||
# This file has been automatically generated by LyX' lib/configure
|
||||
# script. It contains default settings that have been determined by
|
||||
# examining your system. PLEASE DO NOT MODIFY ANYTHING HERE! If you
|
||||
# want to customize LyX, make a copy of the file LYXDIR/lyxrc as
|
||||
# ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will
|
||||
# override the values given here.
|
||||
\Format asciichess asc "Plain text (chess output)" "" "" "kedit"
|
||||
\Format asciiimage asc "Plain text (image)" "" "" "kedit"
|
||||
\Format asciixfig asc "Plain text (xfig output)" "" "" "kedit"
|
||||
\Format agr agr GRACE "" "none" "none"
|
||||
\Format bmp bmp BMP "" "kview" "gimp"
|
||||
\Format date "" "date command" "" "" ""
|
||||
\Format dateout tmp "date (output)" "" "" "kedit"
|
||||
\Format docbook sgml DocBook B "" "kedit"
|
||||
\Format docbook-xml xml "Docbook (xml)" "" "" "kedit"
|
||||
\Format dvi dvi DVI D "xdvi" ""
|
||||
\Format eps eps EPS "" "kghostview" ""
|
||||
\Format fax "" Fax "" "" ""
|
||||
\Format fen fen FEN "" "none" "none"
|
||||
\Format fig fig XFig "" "xfig" "xfig"
|
||||
\Format gif gif GIF "" "kview" "gimp"
|
||||
\Format html html HTML H "mozilla file://$$p$$i" ""
|
||||
\Format jpg jpg JPG "" "kview" "gimp"
|
||||
\Format latex tex LaTeX L "" "kedit"
|
||||
\Format linuxdoc sgml LinuxDoc x "" "kedit"
|
||||
\Format lyx lyx LyX "" "lyx" "lyx"
|
||||
\Format lyxpreview lyxpreview "LyX Preview" "" "" ""
|
||||
\Format literate nw NoWeb N "" "kedit"
|
||||
\Format pbm pbm PBM "" "kview" "gimp"
|
||||
\Format pdf pdf "PDF (ps2pdf)" P "acroread" ""
|
||||
\Format pdf2 pdf "PDF (pdflatex)" F "acroread" ""
|
||||
\Format pdf3 pdf "PDF (dvipdfm)" m "acroread" ""
|
||||
\Format pdftex pdftex_t PDFTEX "" "" ""
|
||||
\Format pgm pgm PGM "" "kview" "gimp"
|
||||
\Format png png PNG "" "kview" "gimp"
|
||||
\Format ppm ppm PPM "" "kview" "gimp"
|
||||
\Format program "" Program "" "" ""
|
||||
\Format ps ps Postscript t "kghostview" ""
|
||||
\Format pstex pstex_t PSTEX "" "" ""
|
||||
\Format tgif obj TGIF "" "tgif" "tgif"
|
||||
\Format sxw sxw "OpenOffice.Org Writer" O "" ""
|
||||
\Format text txt ASCII A "" "kedit"
|
||||
\Format textparagraph txt "ASCII (paragraphs)" "" "" "kedit"
|
||||
\Format tiff tif TIFF "" "kview" "gimp"
|
||||
\Format word doc Word W "" ""
|
||||
\Format xbm xbm XBM "" "kview" "gimp"
|
||||
\Format xpm xpm XPM "" "kview" "gimp"
|
||||
|
||||
\converter date dateout "date +%d-%m-%Y > $$o" ""
|
||||
\converter docbook docbook-xml "cp $$i $$o" "xml"
|
||||
\converter docbook dvi "db2dvi $$i" ""
|
||||
\converter docbook html "db2html $$i" ""
|
||||
\converter dvi pdf3 "dvipdfm $$i" ""
|
||||
\converter dvi ps "dvips -o $$o $$i" ""
|
||||
\converter fen asciichess "python $$s/scripts/fen2ascii.py $$i $$o" ""
|
||||
\converter fig pdftex "sh $$s/scripts/fig2pdftex.sh $$i $$o" ""
|
||||
\converter fig pstex "sh $$s/scripts/fig2pstex.sh $$i $$o" ""
|
||||
\converter html latex "none" ""
|
||||
\converter latex html "latex2html -no_subdir -split 0 -show_section_numbers $$i" "originaldir,needaux"
|
||||
\converter latex dvi "latex $$i" "latex"
|
||||
\converter latex lyx "reLyX-1.4.0cvs -f $$i" ""
|
||||
\converter latex pdf2 "pdflatex $$i" "latex"
|
||||
\converter latex sxw "oolatex $$i" "latex"
|
||||
\converter linuxdoc dvi "sgml2latex -o dvi $$i" ""
|
||||
\converter linuxdoc html "sgml2html $$i" ""
|
||||
\converter linuxdoc latex "sgml2latex $$i" ""
|
||||
\converter linuxdoc lyx "sgml2lyx $$i" ""
|
||||
\converter literate latex "none" ""
|
||||
\converter literate lyx "none" ""
|
||||
\converter lyxpreview png "python $$s/scripts/lyxpreview2bitmap.py" ""
|
||||
\converter lyxpreview ppm "python $$s/scripts/lyxpreview2bitmap.py" ""
|
||||
\converter ps fax "none" ""
|
||||
\converter ps pdf "ps2pdf -dCompatibilityLevel=1.3 $$i" ""
|
||||
\converter sxw latex "none" ""
|
||||
\converter word latex "none" ""
|
||||
\converter fig eps "fig2dev -L eps $$i $$o" ""
|
||||
\converter fig ppm "fig2dev -L ppm $$i $$o" ""
|
||||
\converter fig png "fig2dev -L png $$i $$o" ""
|
||||
\converter tiff eps "tiff2ps $$i > $$o" ""
|
||||
\converter tgif eps "tgif -stdout -print -color -eps $$i > $$o" ""
|
||||
\converter tgif pdf "tgif -stdout -print -color -pdf $$i > $$o" ""
|
||||
\converter eps pdf "epstopdf --outfile=$$o $$i" ""
|
||||
|
||||
\copier fig "sh $$s/scripts/fig_copy.sh $$i $$o"
|
||||
\copier pstex "python $$s/scripts/tex_copy.py $$i $$o $$l"
|
||||
\copier pdftex "python $$s/scripts/tex_copy.py $$i $$o $$l"
|
||||
|
||||
|
||||
\ascii_roff_command "groff -t -Tlatin1 $$FName"
|
||||
\chktex_command "none"
|
||||
\spell_command "ispell"
|
||||
\print_spool_command "lp"
|
||||
\print_spool_printerprefix "-d "
|
||||
\font_encoding "T1"
|
@ -1,17 +0,0 @@
|
||||
a4
|
||||
a4wide
|
||||
array
|
||||
babel
|
||||
color
|
||||
fancyhdr
|
||||
floatflt
|
||||
setspace
|
||||
subfigure
|
||||
geometry
|
||||
longtable
|
||||
rotating
|
||||
url
|
||||
varioref
|
||||
natbib
|
||||
graphicx
|
||||
psnfss
|
@ -1,74 +0,0 @@
|
||||
## This file declares layouts and their associated definition files.
|
||||
## It has been automatically generated by configure
|
||||
## Use "Options/Reconfigure" if you need to update it after a
|
||||
## configuration change. Run ./configure manually to update the
|
||||
## system wide version of this file.
|
||||
"IEEEtran" "IEEEtran" "article (IEEEtran)" "false"
|
||||
"aa" "aa" "article (A&A)" "false"
|
||||
"aapaper" "aa" "article (A&A V4)" "false"
|
||||
"aastex" "aastex" "article (AASTeX)" "false"
|
||||
"agu-dtd" "AGU-article" "AGU Article (SGML)" "true"
|
||||
"agums" "aguplus" "article (AGU++) manuscript" "false"
|
||||
"amsart-plain" "amsart" "article (AMS, unnumbered)" "true"
|
||||
"amsart-seq" "amsart" "article (AMS, sequential numbering)" "true"
|
||||
"amsart" "amsart" "article (AMS)" "true"
|
||||
"amsbook" "amsbook" "book (AMS)" "true"
|
||||
"apa" "apa" "APA style" "false"
|
||||
"article" "article" "article" "true"
|
||||
"book" "book" "book" "true"
|
||||
"broadway" "broadway" "broadway" "false"
|
||||
"chess" "article" "article (Chess)" "false"
|
||||
"cl2emult" "cl2emult" "article (cl2emult)" "false"
|
||||
"cv" "cv" "curriculum vitae" "false"
|
||||
"dinbrief" "dinbrief" "letter (german)" "true"
|
||||
"docbook-book" "book" "DocBook book (SGML)" "true"
|
||||
"docbook-chapter" "chapter" "DocBook chapter (SGML)" "true"
|
||||
"docbook-section" "section" "DocBook section (SGML)" "true"
|
||||
"docbook" "article" "DocBook article (SGML)" "true"
|
||||
"dtk" "dtk" "article (dtk)" "false"
|
||||
"egs" "egs" "article (European Geophysical Society) egs" "false"
|
||||
"elsart" "elsart" "article (elsevier)" "false"
|
||||
"entcs" "entcs" "article (ENTCS)" "false"
|
||||
"extarticle" "extarticle" "extarticle" "true"
|
||||
"extbook" "extbook" "extbook" "true"
|
||||
"extletter" "extletter" "extletter" "true"
|
||||
"extreport" "extreport" "extreport" "true"
|
||||
"foils" "foils" "slides (FoilTeX)" "true"
|
||||
"g-brief-de" "g-brief" "letter (g-brief)" "false"
|
||||
"g-brief-en" "g-brief" "letter (g-brief)" "false"
|
||||
"g-brief2" "g-brief2" "letter (g-brief2)" "false"
|
||||
"heb-article" "article" "article (Hebrew)" "true"
|
||||
"heb-letter" "letter" "letter (Hebrew)" "true"
|
||||
"hollywood" "hollywood" "hollywood" "false"
|
||||
"ijmpd" "ws-ijmpd" "article (ijmpd)" "false"
|
||||
"jgrga" "aguplus" "article (AGU++) JGR" "false"
|
||||
"kluwer" "kluwer" "article (Kluwer)" "false"
|
||||
"latex8" "article" "article (Latex8)" "false"
|
||||
"letter" "letter" "letter" "true"
|
||||
"linuxdoc" "article" "LinuxDoc article (SGML)" "true"
|
||||
"literate-article" "article" "article (Noweb)" "false"
|
||||
"literate-book" "book" "book (Noweb)" "false"
|
||||
"literate-report" "report" "report (Noweb)" "false"
|
||||
"llncs" "llncs" "Springer - Lecture Notes in Comp. Sci." "false"
|
||||
"ltugboat" "ltugboat" "article (tugboat)" "false"
|
||||
"manpage" "manpage" "LinuxDoc manpage (SGML)" "true"
|
||||
"memoir" "memoir" "memoir" "false"
|
||||
"mwart" "mwart" "article (mwart)" "true"
|
||||
"mwbk" "mwbk" "book (mwbk)" "true"
|
||||
"mwrep" "mwrep" "report (mwrep)" "true"
|
||||
"paper" "paper" "article (paper)" "false"
|
||||
"report" "report" "report" "true"
|
||||
"revtex" "revtex" "article (REVTeX)" "false"
|
||||
"revtex4" "revtex4" "article (REVTeX 4)" "true"
|
||||
"scrartcl" "scrartcl" "article (koma-script)" "true"
|
||||
"scrbook" "scrbook" "book (koma-script)" "true"
|
||||
"scrlettr" "scrlettr" "letter (koma-script)" "true"
|
||||
"scrlttr2" "scrlttr2" "letter (koma-script v.2)" "true"
|
||||
"scrreprt" "scrreprt" "report (koma-script)" "true"
|
||||
"seminar" "seminar" "seminar" "true"
|
||||
"siamltex" "siamltex" "article (siamltex)" "false"
|
||||
"slides" "slides" "slides (default)" "true"
|
||||
"spie" "spie" "article (SPIE-Proceedings)" "false"
|
||||
"svglobal" "svjour" "article (Springer - svjour/global)" "false"
|
||||
"svjog" "svjour" "article (Springer - svjour/jog)" "false"
|
||||
"svprobth" "svjour" "article (Springer - svjour/PTRF)" "false"
|
@ -1,383 +0,0 @@
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
/* The LC_MESSAGES locale category is the category used by the functions
|
||||
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
||||
On systems that don't define it, use an arbitrary value instead.
|
||||
On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
|
||||
then includes <libintl.h> (i.e. this file!) and then only defines
|
||||
LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
|
||||
in this case. */
|
||||
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
|
||||
# define LC_MESSAGES 1729
|
||||
#endif
|
||||
|
||||
/* We define an additional symbol to signal that we use the GNU
|
||||
implementation of gettext. */
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
|
||||
/* Provide information about the supported file formats. Returns the
|
||||
maximum minor revision number supported for a given major revision. */
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
|
||||
((major) == 0 ? 1 : -1)
|
||||
|
||||
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||
precedence over _conio_gettext. */
|
||||
#ifdef __DJGPP__
|
||||
# undef gettext
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* We redirect the functions to those prefixed with "libintl_". This is
|
||||
necessary, because some systems define gettext/textdomain/... in the C
|
||||
library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
|
||||
If we used the unprefixed names, there would be cases where the
|
||||
definition in the C library would override the one in the libintl.so
|
||||
shared library. Recall that on ELF systems, the symbols are looked
|
||||
up in the following order:
|
||||
1. in the executable,
|
||||
2. in the shared libraries specified on the link command line, in order,
|
||||
3. in the dependencies of the shared libraries specified on the link
|
||||
command line,
|
||||
4. in the dlopen()ed shared libraries, in the order in which they were
|
||||
dlopen()ed.
|
||||
The definition in the C library would override the one in libintl.so if
|
||||
either
|
||||
* -lc is given on the link command line and -lintl isn't, or
|
||||
* -lc is given on the link command line before -lintl, or
|
||||
* libintl.so is a dependency of a dlopen()ed shared library but not
|
||||
linked to the executable at link time.
|
||||
Since Solaris gettext() behaves differently than GNU gettext(), this
|
||||
would be unacceptable.
|
||||
|
||||
The redirection happens by default through macros in C, so that &gettext
|
||||
is independent of the compilation unit, but through inline functions in
|
||||
C++, in order not to interfere with the name mangling of class fields or
|
||||
class methods called 'gettext'. */
|
||||
|
||||
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
|
||||
If he doesn't, we choose the method. A third possible method is
|
||||
_INTL_REDIRECT_ASM, supported only by GCC. */
|
||||
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
|
||||
# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
|
||||
# define _INTL_REDIRECT_ASM
|
||||
# else
|
||||
# ifdef __cplusplus
|
||||
# define _INTL_REDIRECT_INLINE
|
||||
# else
|
||||
# define _INTL_REDIRECT_MACROS
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* Auxiliary macros. */
|
||||
#ifdef _INTL_REDIRECT_ASM
|
||||
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
|
||||
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
|
||||
# define _INTL_STRINGIFY(prefix) #prefix
|
||||
#else
|
||||
# define _INTL_ASM(cname)
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_gettext (const char *__msgid);
|
||||
static inline char *gettext (const char *__msgid)
|
||||
{
|
||||
return libintl_gettext (__msgid);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define gettext libintl_gettext
|
||||
#endif
|
||||
extern char *gettext (const char *__msgid)
|
||||
_INTL_ASM (libintl_gettext);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
|
||||
static inline char *dgettext (const char *__domainname, const char *__msgid)
|
||||
{
|
||||
return libintl_dgettext (__domainname, __msgid);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dgettext libintl_dgettext
|
||||
#endif
|
||||
extern char *dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_ASM (libintl_dgettext);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category);
|
||||
static inline char *dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
{
|
||||
return libintl_dcgettext (__domainname, __msgid, __category);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcgettext libintl_dcgettext
|
||||
#endif
|
||||
extern char *dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_ASM (libintl_dcgettext);
|
||||
#endif
|
||||
|
||||
|
||||
/* Similar to `gettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n);
|
||||
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
{
|
||||
return libintl_ngettext (__msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define ngettext libintl_ngettext
|
||||
#endif
|
||||
extern char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_ngettext);
|
||||
#endif
|
||||
|
||||
/* Similar to `dgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n);
|
||||
static inline char *dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
{
|
||||
return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dngettext libintl_dngettext
|
||||
#endif
|
||||
extern char *dngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_dngettext);
|
||||
#endif
|
||||
|
||||
/* Similar to `dcgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category);
|
||||
static inline char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
{
|
||||
return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcngettext libintl_dcngettext
|
||||
#endif
|
||||
extern char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_ASM (libintl_dcngettext);
|
||||
#endif
|
||||
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_textdomain (const char *__domainname);
|
||||
static inline char *textdomain (const char *__domainname)
|
||||
{
|
||||
return libintl_textdomain (__domainname);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define textdomain libintl_textdomain
|
||||
#endif
|
||||
extern char *textdomain (const char *__domainname)
|
||||
_INTL_ASM (libintl_textdomain);
|
||||
#endif
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bindtextdomain (const char *__domainname,
|
||||
const char *__dirname);
|
||||
static inline char *bindtextdomain (const char *__domainname,
|
||||
const char *__dirname)
|
||||
{
|
||||
return libintl_bindtextdomain (__domainname, __dirname);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define bindtextdomain libintl_bindtextdomain
|
||||
#endif
|
||||
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
|
||||
_INTL_ASM (libintl_bindtextdomain);
|
||||
#endif
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset);
|
||||
static inline char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
{
|
||||
return libintl_bind_textdomain_codeset (__domainname, __codeset);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
|
||||
#endif
|
||||
extern char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
_INTL_ASM (libintl_bind_textdomain_codeset);
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for format strings with positions in *printf(), following the
|
||||
POSIX/XSI specification.
|
||||
Note: These replacements for the *printf() functions are visible only
|
||||
in source files that #include <libintl.h> or #include "gettext.h".
|
||||
Packages that use *printf() in source files that don't refer to _()
|
||||
or gettext() but for which the format string could be the return value
|
||||
of _() or gettext() need to add this #include. Oh well. */
|
||||
|
||||
#if !1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/* Get va_list. */
|
||||
#if __STDC__ || defined __cplusplus || defined _MSC_VER
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
|
||||
#undef fprintf
|
||||
#define fprintf libintl_fprintf
|
||||
extern int fprintf (FILE *, const char *, ...);
|
||||
#undef vfprintf
|
||||
#define vfprintf libintl_vfprintf
|
||||
extern int vfprintf (FILE *, const char *, va_list);
|
||||
|
||||
#undef printf
|
||||
#define printf libintl_printf
|
||||
extern int printf (const char *, ...);
|
||||
#undef vprintf
|
||||
#define vprintf libintl_vprintf
|
||||
extern int vprintf (const char *, va_list);
|
||||
|
||||
#undef sprintf
|
||||
#define sprintf libintl_sprintf
|
||||
extern int sprintf (char *, const char *, ...);
|
||||
#undef vsprintf
|
||||
#define vsprintf libintl_vsprintf
|
||||
extern int vsprintf (char *, const char *, va_list);
|
||||
|
||||
#if 1
|
||||
|
||||
#undef snprintf
|
||||
#define snprintf libintl_snprintf
|
||||
extern int snprintf (char *, size_t, const char *, ...);
|
||||
#undef vsnprintf
|
||||
#define vsnprintf libintl_vsnprintf
|
||||
extern int vsnprintf (char *, size_t, const char *, va_list);
|
||||
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
||||
#undef asprintf
|
||||
#define asprintf libintl_asprintf
|
||||
extern int asprintf (char **, const char *, ...);
|
||||
#undef vasprintf
|
||||
#define vasprintf libintl_vasprintf
|
||||
extern int vasprintf (char **, const char *, va_list);
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
#undef fwprintf
|
||||
#define fwprintf libintl_fwprintf
|
||||
extern int fwprintf (FILE *, const wchar_t *, ...);
|
||||
#undef vfwprintf
|
||||
#define vfwprintf libintl_vfwprintf
|
||||
extern int vfwprintf (FILE *, const wchar_t *, va_list);
|
||||
|
||||
#undef wprintf
|
||||
#define wprintf libintl_wprintf
|
||||
extern int wprintf (const wchar_t *, ...);
|
||||
#undef vwprintf
|
||||
#define vwprintf libintl_vwprintf
|
||||
extern int vwprintf (const wchar_t *, va_list);
|
||||
|
||||
#undef swprintf
|
||||
#define swprintf libintl_swprintf
|
||||
extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
|
||||
#undef vswprintf
|
||||
#define vswprintf libintl_vswprintf
|
||||
extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for relocatable packages. */
|
||||
|
||||
/* Sets the original and the current installation prefix of the package.
|
||||
Relocation simply replaces a pathname starting with the original prefix
|
||||
by the corresponding pathname with the current prefix instead. Both
|
||||
prefixes should be directory names without trailing slash (i.e. use ""
|
||||
instead of "/"). */
|
||||
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
|
||||
extern void
|
||||
libintl_set_relocation_prefix (const char *orig_prefix,
|
||||
const char *curr_prefix);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* libintl.h */
|
@ -1,51 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lyx", "lyx.vcproj", "{967779B1-EB60-49DD-BDA7-8F4C15790778}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FDBBC827-4BD2-4E7D-B050-0967A0B6C754} = {FDBBC827-4BD2-4E7D-B050-0967A0B6C754}
|
||||
{3BF0EC29-8B64-460F-AE0A-96794D38088D} = {3BF0EC29-8B64-460F-AE0A-96794D38088D}
|
||||
{3BF0EC29-8B64-460F-AE0A-96794D38088D} = {3BF0EC29-8B64-460F-AE0A-96794D38088D}
|
||||
{3BF0EC29-8B64-460F-AE0A-96794D38088D} = {3BF0EC29-8B64-460F-AE0A-96794D38088D}
|
||||
{3BF0EC29-8B64-460F-AE0A-96794D38088D} = {3BF0EC29-8B64-460F-AE0A-96794D38088D}
|
||||
{684579F5-D732-45CE-BBFB-9419BB98DADC} = {684579F5-D732-45CE-BBFB-9419BB98DADC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboost_regex", "..\..\boost\libs\regex\regex.vcproj", "{FDBBC827-4BD2-4E7D-B050-0967A0B6C754}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboost_signals", "..\..\boost\libs\signals\signals.vcproj", "{3BF0EC29-8B64-460F-AE0A-96794D38088D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboost_filesystem", "..\..\boost\libs\filesystem\filesystem.vcproj", "{684579F5-D732-45CE-BBFB-9419BB98DADC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{967779B1-EB60-49DD-BDA7-8F4C15790778}.Debug.ActiveCfg = Debug|Win32
|
||||
{967779B1-EB60-49DD-BDA7-8F4C15790778}.Debug.Build.0 = Debug|Win32
|
||||
{967779B1-EB60-49DD-BDA7-8F4C15790778}.Release.ActiveCfg = Release|Win32
|
||||
{967779B1-EB60-49DD-BDA7-8F4C15790778}.Release.Build.0 = Release|Win32
|
||||
{FDBBC827-4BD2-4E7D-B050-0967A0B6C754}.Debug.ActiveCfg = Debug|Win32
|
||||
{FDBBC827-4BD2-4E7D-B050-0967A0B6C754}.Debug.Build.0 = Debug|Win32
|
||||
{FDBBC827-4BD2-4E7D-B050-0967A0B6C754}.Release.ActiveCfg = Release|Win32
|
||||
{FDBBC827-4BD2-4E7D-B050-0967A0B6C754}.Release.Build.0 = Release|Win32
|
||||
{3BF0EC29-8B64-460F-AE0A-96794D38088D}.Debug.ActiveCfg = Debug|Win32
|
||||
{3BF0EC29-8B64-460F-AE0A-96794D38088D}.Debug.Build.0 = Debug|Win32
|
||||
{3BF0EC29-8B64-460F-AE0A-96794D38088D}.Release.ActiveCfg = Release|Win32
|
||||
{3BF0EC29-8B64-460F-AE0A-96794D38088D}.Release.Build.0 = Release|Win32
|
||||
{684579F5-D732-45CE-BBFB-9419BB98DADC}.Debug.ActiveCfg = Debug|Win32
|
||||
{684579F5-D732-45CE-BBFB-9419BB98DADC}.Debug.Build.0 = Debug|Win32
|
||||
{684579F5-D732-45CE-BBFB-9419BB98DADC}.Release.ActiveCfg = Release|Win32
|
||||
{684579F5-D732-45CE-BBFB-9419BB98DADC}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
||||
# Set up your home directory (in Cygwin syntax)
|
||||
export HOME="//x/YourHomeDirectory"
|
||||
|
||||
# Set up your Language (if you do not want English)
|
||||
# export LANG=DE
|
||||
|
||||
# ========================================================
|
||||
# Below this line you should not change anything if you're
|
||||
# not familiar with configuration of an unix application!
|
||||
# ========================================================
|
||||
export PATH="/usr/bin:/usr/local/bin:/usr/X11R6/bin:/bin:$PATH"
|
||||
export USER="`id -un`"
|
||||
export DISPLAY=127.0.0.1:0.0
|
||||
export MAKE_MODE=unix
|
||||
|
||||
unset DOSDRIVE
|
||||
unset DOSDIR
|
||||
unset TMPDIR
|
||||
unset TMP
|
||||
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -f $i ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
|
||||
cd "$HOME"
|
||||
|
||||
test -f ./.bashrc && . ./.bashrc
|
@ -1,49 +0,0 @@
|
||||
/* This is the wrapper program for LyX on Win32. Using this
|
||||
* wrapper program no DOS window will be present running LyX.
|
||||
* The bad side of this: no error output could be seen ;-)
|
||||
*
|
||||
* compile this sourec with following options set:
|
||||
*
|
||||
* gcc lyxwin32.c -O2 -o lyxwin32 -static -Wall -Wno-format \
|
||||
* -Wstrict-prototypes -Wmissing-prototypes \
|
||||
* -mwindows -e _mainCRTStartup
|
||||
*
|
||||
* Claus Hentschel, 2002-01-17
|
||||
*/
|
||||
#include <stdio.h> /* standard io library */
|
||||
#include <stdlib.h> /* standard library */
|
||||
#include <unistd.h> /* sleep , fork & exec */
|
||||
#include <string.h> /* standard string library */
|
||||
#include <errno.h>
|
||||
|
||||
int main ( int argc, char *argv[] )
|
||||
{
|
||||
char cmd [32000] = "lyx " ; /* user command */
|
||||
char *nargs [5 ] = { /* execute with login /bin/bash */
|
||||
"/bin/bash", "--login",
|
||||
"-c" , cmd ,
|
||||
NULL
|
||||
} ;
|
||||
int i = 1; /* just to count */
|
||||
|
||||
/* ensure bash reads my global env changes */
|
||||
putenv ( "BASH_ENV=/etc/lyxprofile" ) ;
|
||||
|
||||
/* do for all "real" args */
|
||||
while ( i < argc )
|
||||
{
|
||||
strcat ( cmd , "\"" ) ; /* add quote before */
|
||||
strcat ( cmd , argv [ i ] ) ; /* add the argument */
|
||||
strcat ( cmd , "\" " ) ; /* add closing quote */
|
||||
i ++ ;
|
||||
}
|
||||
|
||||
strcat ( cmd, "</dev/null 2>/tmp/lyx.out");
|
||||
|
||||
fprintf ( stderr , "Command is: |%s|\n" , cmd );
|
||||
execv ( "/bin/bash" , nargs ) ; /* exec sub command */
|
||||
|
||||
/* we should never reach here */
|
||||
perror ( "Execute failed") ;
|
||||
return ( 0 ) ; /* exit with no error */
|
||||
}
|
@ -1,748 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file package.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*
|
||||
* Warning! This file is autogenerated from package.C.in.
|
||||
* All changes to this file will be lost.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "support/package.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
|
||||
#include "support/environment.h"
|
||||
#include "support/filetools.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/os.h"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
#include <list>
|
||||
#include <utility>
|
||||
|
||||
#if !defined (USE_WINDOWS_PACKAGING) && \
|
||||
!defined (USE_MACOSX_PACKAGING) && \
|
||||
!defined (USE_POSIX_PACKAGING)
|
||||
#error USE_FOO_PACKAGING must be defined for FOO = WINDOWS, MACOSX or POSIX.
|
||||
#endif
|
||||
|
||||
#if defined (USE_WINDOWS_PACKAGING)
|
||||
|
||||
/*
|
||||
* MinGW's version of winver.h contains this comment:
|
||||
*
|
||||
* If you need Win32 API features newer the Win95 and WinNT then you must
|
||||
* define WINVER before including windows.h or any other method of including
|
||||
* the windef.h header.
|
||||
*
|
||||
* GetLongPathNameA requires WINVER == 0x0500.
|
||||
*
|
||||
* It doesn't matter if the Windows version is older than this because the
|
||||
* function will compile but will fail at run time. See
|
||||
* http://msdn.microsoft.com/library/en-us/mslu/winprog/microsoft_layer_for_unicode_apis_with_limited_support.asp
|
||||
*/
|
||||
# if defined(__MINGW32__)
|
||||
# define WINVER 0x0500
|
||||
# endif
|
||||
|
||||
# include <windows.h>
|
||||
# include <shlobj.h> // SHGetFolderPath
|
||||
|
||||
// Needed for MinGW:
|
||||
# ifndef SHGFP_TYPE_CURRENT
|
||||
# define SHGFP_TYPE_CURRENT 0
|
||||
# endif
|
||||
|
||||
#elif defined (USE_MACOSX_PACKAGING)
|
||||
# include <CoreServices/CoreServices.h> // FSFindFolder, FSRefMakePath
|
||||
#endif
|
||||
|
||||
using std::string;
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace lyx {
|
||||
namespace support {
|
||||
|
||||
namespace {
|
||||
|
||||
Package package_;
|
||||
bool initialised_ = false;
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void init_package(string const & command_line_arg0,
|
||||
string const & command_line_system_support_dir,
|
||||
string const & command_line_user_support_dir,
|
||||
exe_build_dir_to_top_build_dir top_build_dir_location)
|
||||
{
|
||||
// Can do so only once.
|
||||
if (initialised_)
|
||||
return;
|
||||
|
||||
package_ = Package(command_line_arg0,
|
||||
command_line_system_support_dir,
|
||||
command_line_user_support_dir,
|
||||
top_build_dir_location);
|
||||
initialised_ = true;
|
||||
}
|
||||
|
||||
|
||||
Package const & package()
|
||||
{
|
||||
// Commented out because package().locale_dir() can be called
|
||||
// from the message translation code in messages.C before
|
||||
// init_package() is called. Lars is on the case...
|
||||
// BOOST_ASSERT(initialised_);
|
||||
return package_;
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
string const abs_path_from_binary_name(string const & exe);
|
||||
|
||||
std::pair<string, string> const
|
||||
get_build_dirs(string const & abs_binary,
|
||||
exe_build_dir_to_top_build_dir top_build_dir_location);
|
||||
|
||||
string const get_document_dir(string const & home_dir);
|
||||
|
||||
string const get_home_dir();
|
||||
|
||||
string const get_locale_dir(string const & system_support_dir);
|
||||
|
||||
string const get_system_support_dir(string const & abs_binary,
|
||||
string const & command_line_system_support_dir);
|
||||
|
||||
string const get_temp_dir();
|
||||
|
||||
string const get_default_user_support_dir(string const & home_dir);
|
||||
|
||||
std::pair<string, bool> const
|
||||
get_user_support_dir(string const & default_user_support_dir,
|
||||
string const & command_line_user_support_dir);
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
Package::Package(string const & command_line_arg0,
|
||||
string const & command_line_system_support_dir,
|
||||
string const & command_line_user_support_dir,
|
||||
exe_build_dir_to_top_build_dir top_build_dir_location)
|
||||
: explicit_user_support_dir_(false)
|
||||
{
|
||||
home_dir_ = get_home_dir();
|
||||
temp_dir_ = get_temp_dir();
|
||||
document_dir_ = get_document_dir(home_dir_);
|
||||
|
||||
string const abs_binary = abs_path_from_binary_name(command_line_arg0);
|
||||
binary_dir_ = OnlyPath(abs_binary);
|
||||
|
||||
// Is LyX being run in-place from the build tree?
|
||||
boost::tie(build_support_dir_, system_support_dir_) =
|
||||
get_build_dirs(abs_binary, top_build_dir_location);
|
||||
|
||||
if (build_support_dir_.empty())
|
||||
system_support_dir_ =
|
||||
get_system_support_dir(abs_binary,
|
||||
command_line_system_support_dir);
|
||||
|
||||
locale_dir_ = get_locale_dir(system_support_dir_);
|
||||
|
||||
string const default_user_support_dir =
|
||||
get_default_user_support_dir(home_dir_);
|
||||
boost::tie(user_support_dir_, explicit_user_support_dir_) =
|
||||
get_user_support_dir(default_user_support_dir,
|
||||
command_line_user_support_dir);
|
||||
|
||||
lyxerr[Debug::INIT]
|
||||
<< "<package>\n"
|
||||
<< "\tbinary_dir " << binary_dir() << '\n'
|
||||
<< "\tsystem_support " << system_support() << '\n'
|
||||
<< "\tbuild_support " << build_support() << '\n'
|
||||
<< "\tuser_support " << user_support() << '\n'
|
||||
<< "\tlocale_dir " << locale_dir() << '\n'
|
||||
<< "\tdocument_dir " << document_dir() << '\n'
|
||||
<< "\ttemp_dir " << temp_dir() << '\n'
|
||||
<< "\thome_dir " << home_dir() << '\n'
|
||||
<< "</package>\n" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// These next three functions contain the stuff that is substituted at
|
||||
// configuration-time.
|
||||
string const top_srcdir()
|
||||
{
|
||||
static string const dir("%TOP_SRCDIR%");
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
||||
string const hardcoded_localedir()
|
||||
{
|
||||
return string("%LOCALEDIR%");
|
||||
}
|
||||
|
||||
|
||||
string const hardcoded_system_support_dir()
|
||||
{
|
||||
return string("../../lib/");
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
string const & Package::top_srcdir() const
|
||||
{
|
||||
static string const dir("%TOP_SRCDIR%");
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
bool check_command_line_dir(string const & dir,
|
||||
string const & file,
|
||||
string const & command_line_switch);
|
||||
|
||||
string const extract_env_var_dir(string const & env_var);
|
||||
|
||||
bool check_env_var_dir(string const & dir,
|
||||
string const & env_var);
|
||||
|
||||
bool check_env_var_dir(string const & dir,
|
||||
string const & file,
|
||||
string const & env_var);
|
||||
|
||||
string const relative_locale_dir();
|
||||
|
||||
string const relative_system_support_dir();
|
||||
|
||||
|
||||
#if defined (USE_WINDOWS_PACKAGING)
|
||||
// Given a folder ID, returns the folder name (in unix-style format).
|
||||
// Eg CSIDL_PERSONAL -> "C:/Documents and Settings/USERNAME/My Documents"
|
||||
string const win32_folder_path(int folder_id)
|
||||
{
|
||||
char folder_path[MAX_PATH + 1];
|
||||
if (SUCCEEDED(SHGetFolderPath(0, folder_id, 0,
|
||||
SHGFP_TYPE_CURRENT, folder_path)))
|
||||
return os::internal_path(folder_path);
|
||||
return string();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
std::string const
|
||||
get_build_support_dir(std::string const & binary_dir,
|
||||
exe_build_dir_to_top_build_dir top_build_dir_location)
|
||||
{
|
||||
string indirection;
|
||||
switch (top_build_dir_location) {
|
||||
case top_build_dir_is_one_level_up:
|
||||
indirection = "../lib";
|
||||
break;
|
||||
case top_build_dir_is_two_levels_up:
|
||||
indirection = "../../lib";
|
||||
break;
|
||||
}
|
||||
|
||||
return NormalizePath(AddPath(binary_dir, indirection));
|
||||
}
|
||||
|
||||
|
||||
std::pair<string, string> const
|
||||
get_build_dirs(string const & abs_binary,
|
||||
exe_build_dir_to_top_build_dir top_build_dir_location)
|
||||
{
|
||||
string const check_text = "Checking whether LyX is run in place...";
|
||||
|
||||
// We're looking for "lyxrc.defaults" in a directory
|
||||
// binary_dir/../lib
|
||||
// We're also looking for "chkconfig.ltx" in a directory
|
||||
// binary_dir/top_srcdir()/lib
|
||||
// If both are found, then we're running LyX in-place.
|
||||
|
||||
// Note that the name of the lyx binary may be a symbolic link.
|
||||
// If that is the case, then we follow the links too.
|
||||
string binary = abs_binary;
|
||||
while (true) {
|
||||
// Try and find "lyxrc.defaults".
|
||||
string const binary_dir = OnlyPath(binary);
|
||||
string const build_support_dir =
|
||||
get_build_support_dir(binary_dir, top_build_dir_location);
|
||||
|
||||
if (!FileSearch(build_support_dir, "lyxrc.defaults").empty()) {
|
||||
// Try and find "chkconfig.ltx".
|
||||
string const system_support_dir =
|
||||
MakeAbsPath(AddPath(top_srcdir(), "lib"),
|
||||
AddPath(binary_dir, "support"));
|
||||
|
||||
if (!FileSearch(system_support_dir, "chkconfig.ltx").empty()) {
|
||||
lyxerr[Debug::INIT] << check_text << " yes"
|
||||
<< std::endl;
|
||||
return std::make_pair(build_support_dir, system_support_dir);
|
||||
}
|
||||
}
|
||||
|
||||
// Check whether binary is a symbolic link.
|
||||
// If so, resolve it and repeat the exercise.
|
||||
if (!fs::symbolic_link_exists(binary))
|
||||
break;
|
||||
|
||||
string link;
|
||||
if (LyXReadLink(binary, link, true)) {
|
||||
binary = link;
|
||||
} else {
|
||||
// Unable to resolve the link.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
lyxerr[Debug::INIT] << check_text << " no" << std::endl;
|
||||
return std::make_pair(string(), string());
|
||||
}
|
||||
|
||||
|
||||
// Specification of document_dir_ may be reset by LyXRC,
|
||||
// but the default is fixed for a given OS.
|
||||
string const get_document_dir(string const & home_dir)
|
||||
{
|
||||
#if defined (USE_WINDOWS_PACKAGING)
|
||||
(void)home_dir; // Silence warning about unused variable.
|
||||
return win32_folder_path(CSIDL_PERSONAL);
|
||||
#else // Posix-like.
|
||||
return home_dir;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// The specification of home_dir_ is fixed for a given OS.
|
||||
// A typical example on Windows: "C:/Documents and Settings/USERNAME"
|
||||
// and on a Posix-like machine: "/home/USERNAME".
|
||||
string const get_home_dir()
|
||||
{
|
||||
#if defined (USE_WINDOWS_PACKAGING)
|
||||
string const home_dir = getEnv("USERPROFILE");
|
||||
#else // Posix-like.
|
||||
string const home_dir = getEnv("HOME");
|
||||
#endif
|
||||
|
||||
return os::internal_path(home_dir);
|
||||
}
|
||||
|
||||
|
||||
// Several sources are probed to ascertain the locale directory.
|
||||
// The only requirement is that the result is indeed a directory.
|
||||
string const get_locale_dir(string const & system_support_dir)
|
||||
{
|
||||
// 1. Use the "LYX_LOCALEDIR" environment variable.
|
||||
string path = extract_env_var_dir("LYX_LOCALEDIR");
|
||||
if (!path.empty() && check_env_var_dir(path, "LYX_LOCALEDIR"))
|
||||
return path;
|
||||
|
||||
// 2. Search for system_support_dir / <relative locale dir>
|
||||
// The <relative locale dir> is OS-dependent. (On Unix, it will
|
||||
// be "../locale/".)
|
||||
path = NormalizePath(AddPath(system_support_dir, relative_locale_dir()));
|
||||
|
||||
if (fs::exists(path) && fs::is_directory(path))
|
||||
return path;
|
||||
|
||||
// 3. Fall back to the hard-coded LOCALEDIR.
|
||||
path = hardcoded_localedir();
|
||||
if (fs::exists(path) && fs::is_directory(path))
|
||||
return path;
|
||||
|
||||
return string();
|
||||
}
|
||||
|
||||
|
||||
// Specification of temp_dir_ may be reset by LyXRC,
|
||||
// but the default is fixed for a given OS.
|
||||
string const get_temp_dir()
|
||||
{
|
||||
#if defined (USE_WINDOWS_PACKAGING)
|
||||
// Typical example: C:/TEMP/.
|
||||
char path[MAX_PATH + 1];
|
||||
GetTempPath(MAX_PATH, path);
|
||||
GetLongPathName(path, path, MAX_PATH + 1);
|
||||
return os::internal_path(path);
|
||||
#else // Posix-like.
|
||||
return "/tmp";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// If we use a 'lazy' lyxerr in the hope of setting the locale before
|
||||
// printing any messages, then we should ensure that it is flushed first.
|
||||
void bail_out()
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::exit;
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
// Extracts the absolute path from the foo of "-sysdir foo" or "-userdir foo"
|
||||
string const abs_path_from_command_line(string const & command_line)
|
||||
{
|
||||
if (command_line.empty())
|
||||
return string();
|
||||
|
||||
string const path = os::internal_path(command_line);
|
||||
return os::is_absolute_path(path) ? path : MakeAbsPath(path);
|
||||
}
|
||||
|
||||
|
||||
// Does the grunt work for abs_path_from_binary_name()
|
||||
string const get_binary_path(string const & exe)
|
||||
{
|
||||
// The executable may have been invoked either with or
|
||||
// without the .exe extension.
|
||||
// Ensure that it is present.
|
||||
string const as_internal_path = os::internal_path(exe);
|
||||
string const exe_path = suffixIs(as_internal_path, ".exe") ?
|
||||
as_internal_path : as_internal_path + ".exe";
|
||||
if (os::is_absolute_path(exe_path))
|
||||
return exe_path;
|
||||
|
||||
// Two possibilities present themselves.
|
||||
// 1. The binary is relative to the CWD.
|
||||
string const abs_exe_path = MakeAbsPath(exe_path);
|
||||
if (fs::exists(abs_exe_path))
|
||||
return abs_exe_path;
|
||||
|
||||
// 2. exe must be the name of the binary only and it
|
||||
// can be found on the PATH.
|
||||
string const exe_name = OnlyFilename(exe_path);
|
||||
if (exe_name != exe_path)
|
||||
return string();
|
||||
|
||||
std::vector<string> const path = getEnvPath("PATH");
|
||||
std::vector<string>::const_iterator it = path.begin();
|
||||
std::vector<string>::const_iterator const end = path.end();
|
||||
for (; it != end; ++it) {
|
||||
// This will do nothing if *it is already absolute.
|
||||
string const exe_dir = MakeAbsPath(*it);
|
||||
|
||||
string const exe_path = AddName(exe_dir, exe_name);
|
||||
if (fs::exists(exe_path))
|
||||
return exe_path;
|
||||
}
|
||||
|
||||
// Didn't find anything.
|
||||
return string();
|
||||
}
|
||||
|
||||
|
||||
// Extracts the absolute path to the binary name received as argv[0].
|
||||
string const abs_path_from_binary_name(string const & exe)
|
||||
{
|
||||
string const abs_binary = get_binary_path(exe);
|
||||
if (abs_binary.empty()) {
|
||||
lyxerr << bformat(_("Unable to determine the path to the "
|
||||
"LyX binary from the command line %1$s"),
|
||||
exe)
|
||||
<< std::endl;
|
||||
bail_out();
|
||||
}
|
||||
return abs_binary;
|
||||
}
|
||||
|
||||
|
||||
// A plethora of directories is searched to ascertain the system
|
||||
// lyxdir which is defined as the first directory to contain
|
||||
// "chkconfig.ltx".
|
||||
string const
|
||||
get_system_support_dir(string const & abs_binary,
|
||||
string const & command_line_system_support_dir)
|
||||
{
|
||||
string const chkconfig_ltx = "chkconfig.ltx";
|
||||
|
||||
// searched_dirs is used for diagnostic purposes only in the case
|
||||
// that "chkconfig.ltx" is not found.
|
||||
std::list<string> searched_dirs;
|
||||
|
||||
// 1. Use the -sysdir command line parameter.
|
||||
string path = abs_path_from_command_line(command_line_system_support_dir);
|
||||
if (!path.empty()) {
|
||||
searched_dirs.push_back(path);
|
||||
if (check_command_line_dir(path, chkconfig_ltx, "-sysdir"))
|
||||
return path;
|
||||
}
|
||||
|
||||
// 2. Use the "LYX_DIR_13x" environment variable.
|
||||
path = extract_env_var_dir("LYX_DIR_13x");
|
||||
if (!path.empty()) {
|
||||
searched_dirs.push_back(path);
|
||||
if (check_env_var_dir(path, chkconfig_ltx, "LYX_DIR_13x"))
|
||||
return path;
|
||||
}
|
||||
|
||||
// 3. Search relative to the lyx binary.
|
||||
// We're looking for "chkconfig.ltx" in a directory
|
||||
// OnlyPath(abs_binary) / <relative dir> / PACKAGE /
|
||||
// PACKAGE is hardcoded in config.h. Eg "lyx" or "lyx-1.3.6cvs".
|
||||
// <relative dir> is OS-dependent; on Unix, it will be "../share/".
|
||||
string const relative_lyxdir = relative_system_support_dir();
|
||||
|
||||
// One subtlety to be aware of. The name of the lyx binary may be
|
||||
// a symbolic link. If that is the case, then we follow the links too.
|
||||
string binary = abs_binary;
|
||||
while (true) {
|
||||
// Try and find "chkconfig.ltx".
|
||||
string const binary_dir = OnlyPath(binary);
|
||||
|
||||
string const lyxdir =
|
||||
NormalizePath(AddPath(binary_dir, relative_lyxdir));
|
||||
searched_dirs.push_back(lyxdir);
|
||||
|
||||
if (!FileSearch(lyxdir, chkconfig_ltx).empty()) {
|
||||
// Success! "chkconfig.ltx" has been found.
|
||||
return lyxdir;
|
||||
}
|
||||
|
||||
// Check whether binary is a symbolic link.
|
||||
// If so, resolve it and repeat the exercise.
|
||||
if (!fs::symbolic_link_exists(binary))
|
||||
break;
|
||||
|
||||
string link;
|
||||
if (LyXReadLink(binary, link, true)) {
|
||||
binary = link;
|
||||
} else {
|
||||
// Unable to resolve the link.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Repeat the exercise on the directory itself.
|
||||
string binary_dir = OnlyPath(abs_binary);
|
||||
while (true) {
|
||||
// This time test whether the directory is a symbolic link
|
||||
// *before* looking for "chkconfig.ltx".
|
||||
// (We've looked relative to the original already.)
|
||||
if (!fs::symbolic_link_exists(binary))
|
||||
break;
|
||||
|
||||
string link;
|
||||
if (LyXReadLink(binary_dir, link, true)) {
|
||||
binary_dir = link;
|
||||
} else {
|
||||
// Unable to resolve the link.
|
||||
break;
|
||||
}
|
||||
|
||||
// Try and find "chkconfig.ltx".
|
||||
string const lyxdir =
|
||||
NormalizePath(AddPath(binary_dir, relative_lyxdir));
|
||||
searched_dirs.push_back(lyxdir);
|
||||
|
||||
if (!FileSearch(lyxdir, chkconfig_ltx).empty()) {
|
||||
// Success! "chkconfig.ltx" has been found.
|
||||
return lyxdir;
|
||||
}
|
||||
}
|
||||
|
||||
// 5. In desparation, try the hard-coded system support dir.
|
||||
path = hardcoded_system_support_dir();
|
||||
if (!FileSearch(path, chkconfig_ltx).empty())
|
||||
return path;
|
||||
|
||||
// Everything has failed :-(
|
||||
// So inform the user and exit.
|
||||
string searched_dirs_str;
|
||||
typedef std::list<string>::const_iterator iterator;
|
||||
iterator const begin = searched_dirs.begin();
|
||||
iterator const end = searched_dirs.end();
|
||||
for (iterator it = begin; it != end; ++it) {
|
||||
if (it != begin)
|
||||
searched_dirs_str += "\n\t";
|
||||
searched_dirs_str += *it;
|
||||
}
|
||||
|
||||
lyxerr << bformat(_("Unable to determine the system directory "
|
||||
"having searched\n"
|
||||
"\t%1$s\n"
|
||||
"Try the '-sysdir' command line parameter or "
|
||||
"set the environment variable LYX_DIR_13x to "
|
||||
"the LyX system directory containing the file "
|
||||
"`chkconfig.ltx'."),
|
||||
searched_dirs_str)
|
||||
<< std::endl;
|
||||
|
||||
bail_out();
|
||||
// Keep the compiler happy.
|
||||
return string();
|
||||
}
|
||||
|
||||
|
||||
// Returns the absolute path to the user lyxdir, together with a flag
|
||||
// indicating whether this directory was specified explicitly (as -userdir
|
||||
// or through an environment variable) or whether it was deduced.
|
||||
std::pair<string, bool> const
|
||||
get_user_support_dir(string const & default_user_support_dir,
|
||||
string const & command_line_user_support_dir)
|
||||
{
|
||||
bool explicit_userdir = true;
|
||||
|
||||
// 1. Use the -userdir command line parameter.
|
||||
string path =
|
||||
abs_path_from_command_line(command_line_user_support_dir);
|
||||
if (!path.empty())
|
||||
return std::make_pair(path, explicit_userdir);
|
||||
|
||||
// 2. Use the LYX_USERDIR_13x environment variable.
|
||||
path = extract_env_var_dir("LYX_USERDIR_13x");
|
||||
if (!path.empty())
|
||||
return std::make_pair(path, explicit_userdir);
|
||||
|
||||
// 3. Use the OS-dependent default_user_support_dir
|
||||
explicit_userdir = false;
|
||||
return std::make_pair(default_user_support_dir, explicit_userdir);
|
||||
}
|
||||
|
||||
|
||||
// $HOME/.lyx on all platforms but Win32 where it will be something like
|
||||
// "C:/Documents and Settings/USERNAME/Application Data/lyx"
|
||||
string const get_default_user_support_dir(string const & home_dir)
|
||||
{
|
||||
#if defined (USE_WINDOWS_PACKAGING)
|
||||
(void)home_dir; // Silence warning about unused variable.
|
||||
|
||||
return AddPath(win32_folder_path(CSIDL_APPDATA), PACKAGE);
|
||||
|
||||
#elif defined (USE_MACOSX_PACKAGING)
|
||||
(void)home_dir; // Silence warning about unused variable.
|
||||
|
||||
FSRef fsref;
|
||||
OSErr const error_code =
|
||||
FSFindFolder(kUserDomain, kApplicationSupportFolderType,
|
||||
kDontCreateFolder, &fsref);
|
||||
if (error_code != 0)
|
||||
return string();
|
||||
|
||||
char store[PATH_MAX + 1];
|
||||
OSStatus const status_code =
|
||||
FSRefMakePath(&fsref,
|
||||
reinterpret_cast<UInt8*>(store), PATH_MAX);
|
||||
if (status_code != 0)
|
||||
return string();
|
||||
|
||||
return AddPath(reinterpret_cast<char const *>(store), PACKAGE);
|
||||
|
||||
#else // USE_POSIX_PACKAGING
|
||||
return AddPath(home_dir, string(".") + PACKAGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Check that directory @c dir contains @c file.
|
||||
// Else emit a warning about an invalid @c command_line_switch.
|
||||
bool check_command_line_dir(string const & dir,
|
||||
string const & file,
|
||||
string const & command_line_switch)
|
||||
{
|
||||
string const abs_path = FileSearch(dir, file);
|
||||
if (abs_path.empty()) {
|
||||
lyxerr << bformat(_("Invalid %1$s switch.\n"
|
||||
"Directory %2$s does not contain %3$s."),
|
||||
command_line_switch, dir, file)
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
return !abs_path.empty();
|
||||
}
|
||||
|
||||
|
||||
// The environment variable @c env_var expands to a (single) file path.
|
||||
string const extract_env_var_dir(string const & env_var)
|
||||
{
|
||||
string const dir = os::internal_path(getEnv(env_var));
|
||||
return dir.empty() ? dir : MakeAbsPath(dir);
|
||||
}
|
||||
|
||||
|
||||
// Check that directory @c dir contains @c file.
|
||||
// Else emit a warning about an invalid @c env_var.
|
||||
bool check_env_var_dir(string const & dir,
|
||||
string const & file,
|
||||
string const & env_var)
|
||||
{
|
||||
string const abs_path = FileSearch(dir, file);
|
||||
if (abs_path.empty()) {
|
||||
lyxerr << bformat(_("Invalid %1$s environment variable.\n"
|
||||
"Directory %2$s does not contain %3$s."),
|
||||
env_var, dir, file)
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
return !abs_path.empty();
|
||||
}
|
||||
|
||||
|
||||
// Check that directory @c dir is indeed a directory.
|
||||
// Else emit a warning about an invalid @c env_var.
|
||||
bool check_env_var_dir(string const & dir,
|
||||
string const & env_var)
|
||||
{
|
||||
bool const success = (fs::exists(dir) && fs::is_directory(dir));
|
||||
|
||||
if (!success) {
|
||||
// Put this string on a single line so that the gettext
|
||||
// search mechanism in po/Makefile.in.in will register
|
||||
// package.C.in as a file containing strings that need
|
||||
// translation.
|
||||
string const fmt =
|
||||
_("Invalid %1$s environment variable.\n%2$s is not a directory.");
|
||||
|
||||
lyxerr << bformat(fmt, env_var, dir)
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
// The locale directory relative to the LyX system directory.
|
||||
string const relative_locale_dir()
|
||||
{
|
||||
return "../locale/";
|
||||
}
|
||||
|
||||
|
||||
// The system lyxdir is relative to the directory containing the LyX binary.
|
||||
string const relative_system_support_dir()
|
||||
{
|
||||
string result;
|
||||
|
||||
#if defined (USE_WINDOWS_PACKAGING) || defined (USE_MACOSX_PACKAGING)
|
||||
result = AddPath("../Resources/", PACKAGE);
|
||||
#else // Posix-like.
|
||||
result = AddPath("../share/", PACKAGE);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
|
||||
} // namespace support
|
||||
} // namespace lyx
|
@ -1,30 +0,0 @@
|
||||
To compile using MicroSoft Visual Studio 2003.NET, do this:
|
||||
|
||||
1) Checkout Qt/Free from CVS next to lyx-devel and compile.
|
||||
See http://kde-cygwin.sourceforge.net/qt3-win32/compile-net.php
|
||||
for more info. If you get a linking error about qt-mt3.lib, then
|
||||
copy lib/qt-mt333.lib to qt-mt3.lib and rerun configure.
|
||||
|
||||
2) Make sure QTDIR is set in your global environment, and QTDIR\bin
|
||||
is in your path. Control panel, system, advanced, environment
|
||||
variables is your friend on Windows XP.
|
||||
|
||||
3) Open the development\win32\lyx.sln file in Visual Studio,
|
||||
compile and run. You can probably also use the free version
|
||||
of Microsoft's compiler, but I haven't tried that.
|
||||
|
||||
Development:
|
||||
|
||||
To get a stack-trace for assertions in LyX, make a breakpoint
|
||||
in src/Boost.C.
|
||||
To see the output from LyX, add "2> c:\errors.txt" to the command
|
||||
line in Project, Build properties, Debugging, Command arguments
|
||||
|
||||
|
||||
To run LyX, you need a bunch of generated files from configure.
|
||||
|
||||
Run "fake.bat" to copy chkconfig.ltx, lyxrc.defaults, packages.lst
|
||||
and textclass.lst from fakeconfig to their destination.
|
||||
|
||||
At start-up, you might get an assertion about a unix path in
|
||||
boost::filesystem. You can safely ignore that.
|
@ -1,21 +0,0 @@
|
||||
/* -*- C++ -*- */
|
||||
/**
|
||||
* \file version.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Jean-Marc Lasgouttes
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*
|
||||
* Warning! This file is autogenerated from version.C.in.
|
||||
* All changes to this file will be lost.
|
||||
*/
|
||||
|
||||
///
|
||||
char const * lyx_version = "1.4.0cvs";
|
||||
///
|
||||
char const * lyx_release_date = "Thu, Jan 30, 2003";
|
||||
|
||||
/// This is the version information shown by 'lyx -version'
|
||||
char const * lyx_version_info = "@VERSION_INFO@";
|
@ -1,567 +0,0 @@
|
||||
/**
|
||||
* \file lyxclient.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author João Luis M. Assirati
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
|
||||
// getpid(), getppid()
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// select()
|
||||
#include <sys/select.h>
|
||||
|
||||
// opendir(), closedir(), readdir()
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
// stat()
|
||||
#include <sys/stat.h>
|
||||
|
||||
// socket(), connect()
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
// fcntl()
|
||||
#include <fcntl.h>
|
||||
|
||||
// getenv()
|
||||
#include <cstdlib>
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
using std::cin;
|
||||
using std::endl;
|
||||
|
||||
|
||||
namespace support {
|
||||
|
||||
string itoa(unsigned int i)
|
||||
{
|
||||
string str;
|
||||
if(!i) {
|
||||
str = "0";
|
||||
} else {
|
||||
while((0 < i) && (i <= 9)) {
|
||||
str = static_cast<char>('0' + i % 10) + str;
|
||||
i /= 10;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
bool prefixIs(string const & a, string const & pre)
|
||||
{
|
||||
char const * p_a = a.c_str();
|
||||
char const * p_pre = pre.c_str();
|
||||
while ((*p_a != '\0') && (*p_pre != '\0') && (*p_a == *p_pre)) {
|
||||
++p_a;
|
||||
++p_pre;
|
||||
}
|
||||
if (*p_pre == '\0') return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Parts stolen from lyx::support::DirList()
|
||||
// Returns the absolute pathnames of all lyx local sockets
|
||||
vector<string> lyxSockets(string const & dir, string const & pid)
|
||||
{
|
||||
vector<string> dirlist;
|
||||
DIR * dirp = ::opendir(dir.c_str());
|
||||
if (!dirp) {
|
||||
cerr << "lyxclient: Could not read dir " << dir
|
||||
<< ": " << strerror(errno);
|
||||
return dirlist;
|
||||
}
|
||||
|
||||
dirent * dire;
|
||||
while ((dire = ::readdir(dirp))) {
|
||||
string const fil = dire->d_name;
|
||||
if (prefixIs(fil, "lyx_tmpdir" + pid)) {
|
||||
string lyxsocket = dir + '/' + fil + "/lyxsocket";
|
||||
struct stat status;
|
||||
// not checking if it is a socket -- just if it exists
|
||||
// and has reading permissions
|
||||
if (!::stat(lyxsocket.c_str(), &status)) {
|
||||
dirlist.push_back(lyxsocket);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::closedir(dirp);
|
||||
return dirlist;
|
||||
}
|
||||
|
||||
namespace socktools {
|
||||
|
||||
int connect(string const & name)
|
||||
{
|
||||
int fd; // File descriptor for the socket
|
||||
sockaddr_un addr; // Structure that hold the socket address
|
||||
|
||||
// char sun_path[108]
|
||||
string::size_type len = name.size();
|
||||
if(len > 107) {
|
||||
cerr << "lyxclient: Socket address '" << name
|
||||
<< "' too long." << endl;
|
||||
return -1;
|
||||
}
|
||||
// Synonims for AF_UNIX are AF_LOCAL and AF_FILE
|
||||
addr.sun_family = AF_UNIX;
|
||||
name.copy(addr.sun_path, 107);
|
||||
addr.sun_path[len] = '\0';
|
||||
|
||||
if((fd = ::socket(PF_UNIX, SOCK_STREAM, 0))== -1) {
|
||||
cerr << "lyxclient: Could not create socket descriptor: "
|
||||
<< strerror(errno) << endl;
|
||||
return -1;
|
||||
}
|
||||
if(::connect(fd, (struct sockaddr *)&addr, SUN_LEN(&addr)) == -1) {
|
||||
cerr << "lyxclient: Could not connect to socket " << name
|
||||
<< ": " << strerror(errno) << endl;
|
||||
::close(fd);
|
||||
return -1;
|
||||
}
|
||||
if (::fcntl(fd, F_SETFL, O_NONBLOCK) == -1) {
|
||||
cerr << "lyxclient: Could not set O_NONBLOCK for socket: "
|
||||
<< strerror(errno) << endl;
|
||||
::close(fd);
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
} // namespace socktools
|
||||
} // namespace support
|
||||
|
||||
|
||||
|
||||
// Class IOWatch ------------------------------------------------------------
|
||||
class IOWatch
|
||||
{
|
||||
public:
|
||||
IOWatch();
|
||||
void clear();
|
||||
void addfd(int);
|
||||
bool wait(double);
|
||||
bool wait();
|
||||
bool isset(int fd);
|
||||
|
||||
private:
|
||||
fd_set des;
|
||||
fd_set act;
|
||||
};
|
||||
|
||||
IOWatch::IOWatch() {
|
||||
clear();
|
||||
}
|
||||
void IOWatch::clear() {
|
||||
FD_ZERO(&des);
|
||||
}
|
||||
void IOWatch::addfd(int fd) {
|
||||
FD_SET(fd, &des);
|
||||
}
|
||||
bool IOWatch::wait(double timeout) {
|
||||
timeval to;
|
||||
to.tv_sec = static_cast<long int>(timeout);
|
||||
to.tv_usec = static_cast<long int>((timeout - to.tv_sec)*1E6);
|
||||
act = des;
|
||||
return select(FD_SETSIZE, &act,
|
||||
(fd_set *)0, (fd_set *)0, &to);
|
||||
}
|
||||
bool IOWatch::wait() {
|
||||
act = des;
|
||||
return select(FD_SETSIZE, &act,
|
||||
(fd_set *)0, (fd_set *)0, (timeval *)0);
|
||||
}
|
||||
bool IOWatch::isset(int fd) {
|
||||
return FD_ISSET(fd, &act);
|
||||
}
|
||||
// ~Class IOWatch ------------------------------------------------------------
|
||||
|
||||
|
||||
// Class LyXDataSocket -------------------------------------------------------
|
||||
// Modified LyXDataSocket class for use with the client
|
||||
class LyXDataSocket
|
||||
{
|
||||
public:
|
||||
LyXDataSocket(string const &);
|
||||
~LyXDataSocket();
|
||||
// File descriptor of the connection
|
||||
int fd() const;
|
||||
// Connection status
|
||||
bool connected() const;
|
||||
// Line buffered input from the socket
|
||||
bool readln(string &);
|
||||
// Write the string + '\n' to the socket
|
||||
void writeln(string const &);
|
||||
|
||||
private:
|
||||
// File descriptor for the data socket
|
||||
int fd_;
|
||||
// True if the connection is up
|
||||
bool connected_;
|
||||
// buffer for input data
|
||||
string buffer;
|
||||
};
|
||||
|
||||
LyXDataSocket::LyXDataSocket(string const & address)
|
||||
{
|
||||
if ((fd_ = support::socktools::connect(address)) == -1) {
|
||||
connected_ = false;
|
||||
} else {
|
||||
connected_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
LyXDataSocket::~LyXDataSocket()
|
||||
{
|
||||
::close(fd_);
|
||||
}
|
||||
|
||||
int LyXDataSocket::fd() const
|
||||
{
|
||||
return fd_;
|
||||
}
|
||||
|
||||
bool LyXDataSocket::connected() const
|
||||
{
|
||||
return connected_;
|
||||
}
|
||||
|
||||
// Returns true if there was a complete line to input
|
||||
// A line is of the form <key>:<value>
|
||||
// A line not of this form will not be passed
|
||||
// The line read is splitted and stored in 'key' and 'value'
|
||||
bool LyXDataSocket::readln(string & line)
|
||||
{
|
||||
int const charbuf_size = 100;
|
||||
char charbuf[charbuf_size]; // buffer for the ::read() system call
|
||||
int count;
|
||||
string::size_type pos;
|
||||
|
||||
// read and store characters in buffer
|
||||
while ((count = ::read(fd_, charbuf, charbuf_size - 1)) > 0) {
|
||||
charbuf[count] = '\0'; // turn it into a c string
|
||||
buffer += charbuf;
|
||||
}
|
||||
|
||||
// Error conditions. The buffer must still be
|
||||
// processed for lines read
|
||||
if (count == 0) { // EOF -- connection closed
|
||||
connected_ = false;
|
||||
} else if ((count == -1) && (errno != EAGAIN)) { // IO error
|
||||
cerr << "lyxclient: IO error." << endl;
|
||||
connected_ = false;
|
||||
}
|
||||
|
||||
// Cut a line from buffer
|
||||
if ((pos = buffer.find('\n')) == string::npos)
|
||||
return false; // No complete line stored
|
||||
line = buffer.substr(0, pos);
|
||||
buffer = buffer.substr(pos + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Write a line of the form <key>:<value> to the socket
|
||||
void LyXDataSocket::writeln(string const & line)
|
||||
{
|
||||
string linen(line + '\n');
|
||||
int size = linen.size();
|
||||
int written = ::write(fd_, linen.c_str(), size);
|
||||
if (written < size) { // Allways mean end of connection.
|
||||
if ((written == -1) && (errno == EPIPE)) {
|
||||
// The program will also receive a SIGPIPE
|
||||
// that must be catched
|
||||
cerr << "lyxclient: connection closed while writing."
|
||||
<< endl;
|
||||
} else {
|
||||
// Anything else, including errno == EAGAIN, must be
|
||||
// considered IO error. EAGAIN should never happen
|
||||
// when line is small
|
||||
cerr << "lyxclient: IO error: " << strerror(errno);
|
||||
}
|
||||
connected_ = false;
|
||||
}
|
||||
}
|
||||
// ~Class LyXDataSocket -------------------------------------------------------
|
||||
|
||||
|
||||
// Class CmdLineParser -------------------------------------------------------
|
||||
class CmdLineParser
|
||||
{
|
||||
public:
|
||||
typedef int (*optfunc)(vector<char *> const & args);
|
||||
std::map<string, optfunc> helper;
|
||||
std::map<string, bool> isset;
|
||||
bool parse(int, char * []);
|
||||
vector<char *> nonopt;
|
||||
};
|
||||
|
||||
bool CmdLineParser::parse(int argc, char * argv[])
|
||||
{
|
||||
int opt = 1;
|
||||
while(opt < argc) {
|
||||
vector<char *> args;
|
||||
if(helper[argv[opt]]) {
|
||||
isset[argv[opt]] = true;
|
||||
int arg = opt + 1;
|
||||
while((arg < argc) && (!helper[argv[arg]])) {
|
||||
args.push_back(argv[arg]);
|
||||
++arg;
|
||||
}
|
||||
int taken = helper[argv[opt]](args);
|
||||
if(taken == -1) return false;
|
||||
opt += 1 + taken;
|
||||
} else {
|
||||
if(argv[opt][0] == '-') {
|
||||
if((argv[opt][1] == '-')
|
||||
&& (argv[opt][2]== '\0')) {
|
||||
++opt;
|
||||
while(opt < argc) {
|
||||
nonopt.push_back(argv[opt]);
|
||||
++opt;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
cerr << "lyxclient: unknown option "
|
||||
<< argv[opt] << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
nonopt.push_back(argv[opt]);
|
||||
++opt;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// ~Class CmdLineParser -------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace cmdline
|
||||
{
|
||||
void usage()
|
||||
{
|
||||
cerr << "Usage: lyxclient [options]" << endl
|
||||
<< "Options are:" << endl
|
||||
<< " -a address set address of the lyx socket" << endl
|
||||
<< " -t directory set system temporary directory" << endl
|
||||
<< " -p pid select a running lyx by pid" << endl
|
||||
<< " -c command send a single command and quit" << endl
|
||||
<< " -g file row send a command to go to file and row" << endl
|
||||
<< " -n name set client name" << endl
|
||||
<< " -h name display this help end exit" << endl
|
||||
<< "If -a is not used, lyxclient will use the arguments of -t and -p to look for" << endl
|
||||
<< "a running lyx. If -t is not set, 'directory' defaults to /tmp. If -p is set," << endl
|
||||
<< "lyxclient will connect only to a lyx with the specified pid. Options -c and -g" << endl
|
||||
<< "cannot be set simultaneoulsly. If no -c or -g options are given, lyxclient" << endl
|
||||
<< "will read commands from standard input and disconnect when command read is BYE:"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
int h(vector<char *> const & arg)
|
||||
{
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
string clientName(support::itoa(::getppid()) + ">" + support::itoa(::getpid()));
|
||||
int n(vector<char *> const & arg)
|
||||
{
|
||||
if(arg.size() < 1) {
|
||||
cerr << "lyxclient: The option -n requires 1 argument."
|
||||
<< endl;
|
||||
return -1;
|
||||
}
|
||||
clientName = arg[0];
|
||||
return 1;
|
||||
}
|
||||
|
||||
string singleCommand;
|
||||
int c(vector<char *> const & arg)
|
||||
{
|
||||
if(arg.size() < 1) {
|
||||
cerr << "lyxclient: The option -c requires 1 argument."
|
||||
<< endl;
|
||||
return -1;
|
||||
}
|
||||
singleCommand = arg[0];
|
||||
return 1;
|
||||
}
|
||||
|
||||
int g(vector<char *> const & arg)
|
||||
{
|
||||
if(arg.size() < 2) {
|
||||
cerr << "lyxclient: The option -g requires 2 arguments."
|
||||
<< endl;
|
||||
return -1;
|
||||
}
|
||||
singleCommand = "LYXCMD:server-goto-file-row "
|
||||
+ static_cast<string>(arg[0]) + ' '
|
||||
+ static_cast<string>(arg[1]);
|
||||
return 2;
|
||||
}
|
||||
|
||||
// 0 if LYXSOCKET is not set in the environment
|
||||
char * serverAddress = getenv("LYXSOCKET");
|
||||
int a(vector<char *> const & arg)
|
||||
{
|
||||
if(arg.size() < 1) {
|
||||
cerr << "lyxclient: The option -a requires 1 argument."
|
||||
<< endl;
|
||||
return -1;
|
||||
}
|
||||
// -a supercedes LYXSOCKET environment variable
|
||||
serverAddress = arg[0];
|
||||
return 1;
|
||||
}
|
||||
|
||||
string mainTmp("/tmp");
|
||||
int t(vector<char *> const & arg)
|
||||
{
|
||||
if(arg.size() < 1) {
|
||||
cerr << "lyxclient: The option -t requires 1 argument."
|
||||
<< endl;
|
||||
return -1;
|
||||
}
|
||||
mainTmp = arg[0];
|
||||
return 1;
|
||||
}
|
||||
|
||||
string serverPid; // Init to empty string
|
||||
int p(vector<char *> const & arg)
|
||||
{
|
||||
if(arg.size() < 1) {
|
||||
cerr << "lyxclient: The option -p requires 1 argument."
|
||||
<< endl;
|
||||
return -1;
|
||||
}
|
||||
serverPid = arg[0];
|
||||
return 1;
|
||||
}
|
||||
|
||||
} // namespace cmdline
|
||||
|
||||
using support::prefixIs;
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
CmdLineParser args;
|
||||
args.helper["-h"] = cmdline::h;
|
||||
args.helper["-c"] = cmdline::c;
|
||||
args.helper["-g"] = cmdline::g;
|
||||
args.helper["-n"] = cmdline::n;
|
||||
args.helper["-a"] = cmdline::a;
|
||||
args.helper["-t"] = cmdline::t;
|
||||
args.helper["-p"] = cmdline::p;
|
||||
// Command line failure conditions:
|
||||
if((!args.parse(argc, argv))
|
||||
|| (args.isset["-c"] && args.isset["-g"])
|
||||
|| (args.isset["-a"] && args.isset["-p"])) {
|
||||
cmdline::usage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
LyXDataSocket * server;
|
||||
|
||||
if(cmdline::serverAddress) {
|
||||
server = new LyXDataSocket(cmdline::serverAddress);
|
||||
if(!server->connected()) {
|
||||
cerr << "lyxclient: " << "Could not connect to "
|
||||
<< cmdline::serverAddress << endl;
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
// We have to look for an address.
|
||||
// serverPid can be empty.
|
||||
vector<string> addrs = support::lyxSockets(cmdline::mainTmp, cmdline::serverPid);
|
||||
vector<string>::iterator addr = addrs.begin();
|
||||
vector<string>::iterator end = addrs.end();
|
||||
while (addr < end) {
|
||||
server = new LyXDataSocket(*addr);
|
||||
if(server->connected()) break;
|
||||
cerr << "lyxclient: " << "Could not connect to "
|
||||
<< *addr << endl;
|
||||
delete server;
|
||||
++addr;
|
||||
}
|
||||
if(addr == end) {
|
||||
cerr << "lyxclient: No suitable server found." << endl;
|
||||
return 1;
|
||||
}
|
||||
cerr << "lyxclient: " << "Connected to " << *addr << endl;
|
||||
}
|
||||
|
||||
int const serverfd = server->fd();
|
||||
|
||||
IOWatch iowatch;
|
||||
iowatch.addfd(serverfd);
|
||||
|
||||
// Used to read from server
|
||||
string answer;
|
||||
|
||||
// Send greeting
|
||||
server->writeln("HELLO:" + cmdline::clientName);
|
||||
// wait at most 2 seconds until server responds
|
||||
iowatch.wait(2.0);
|
||||
if(iowatch.isset(serverfd) && server->readln(answer)) {
|
||||
if(prefixIs(answer, "BYE:")) {
|
||||
cerr << "lyxclient: Server disconnected." << endl;
|
||||
cout << answer << endl;
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
cerr << "lyxclient: No answer from server." << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(args.isset["-g"] || args.isset["-c"]) {
|
||||
server->writeln(cmdline::singleCommand);
|
||||
iowatch.wait(2.0);
|
||||
if(iowatch.isset(serverfd) && server->readln(answer)) {
|
||||
cout << answer;
|
||||
if(prefixIs(answer, "ERROR:")) return 1;
|
||||
return 0;
|
||||
} else {
|
||||
cerr << "lyxclient: No answer from server." << endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Take commands from stdin
|
||||
iowatch.addfd(0); // stdin
|
||||
bool saidbye = false;
|
||||
while((!saidbye) && server->connected()) {
|
||||
iowatch.wait();
|
||||
if(iowatch.isset(0)) {
|
||||
string command;
|
||||
cin >> command;
|
||||
if(command == "BYE:") {
|
||||
server->writeln("BYE:");
|
||||
saidbye = true;
|
||||
} else {
|
||||
server->writeln("LYXCMD:" + command);
|
||||
}
|
||||
}
|
||||
if(iowatch.isset(serverfd)) {
|
||||
while(server->readln(answer))
|
||||
cout << answer << endl;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
.\" Man page for lyxclient.
|
||||
.\" Use the following command to view man page:
|
||||
.\"
|
||||
.\" tbl lyxclient.1 | nroff -man | less
|
||||
.\"
|
||||
.TH LYXCLIENT 1 "Oct 2003" "Version 1.4" "lyxclient 1.4"
|
||||
.SH NAME
|
||||
lyxclient \- send commands to a running LyX editor
|
||||
.\"
|
||||
.\" setup
|
||||
.de Cr
|
||||
.ie n (c)
|
||||
.el \(co
|
||||
..
|
||||
.SH SYNOPSIS
|
||||
\fBlyxclient\fR [ \fIoptions\fR ]
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
When LyX starts, it creates a unique, per-process local socket in the
|
||||
temporary directory through which commands can be sent. That is, it can act
|
||||
like a server, accepting connections from clients. \fBlyxclient\fR
|
||||
can be used as such client. \fBlyxclient\fR will take care of all
|
||||
connection and communication protocol details, leaving you (or your app)
|
||||
free to concentrate on what you want to send to LyX.
|
||||
.SH SERVER IDENTIFICATION OPTIONS
|
||||
\fBlyxclient\fR must first identify to which server (i.e. a running LyX)
|
||||
commands are to be sent. The following options are used to specify the server.
|
||||
.TP 6
|
||||
.TP
|
||||
.BI \-p " pid"
|
||||
specify the \fIpid\fR of the running LyX process to which \fBlyxclient\fR
|
||||
should send commands.
|
||||
.TP
|
||||
.BI \-a " socket_address"
|
||||
specify explicitly which socket special file should be used. These special
|
||||
files are located inside lyx_tmpdir<lyx_pid><hash>, in the temporary
|
||||
directory. There is one per running LyX process.
|
||||
.TP
|
||||
.BI \-t " tmp_dir"
|
||||
if LyX is configured to use a temporary directory other than /tmp, you must
|
||||
inform \fBlyxclient\fR of this.
|
||||
.PP
|
||||
If neither \fB\-a\fR nor \fB\-p\fR are invoked, \fBlyxclient\fR will search for
|
||||
sockets in /tmp (or \fItmp_dir\fR if the \fB\-t\fR option is used) and use
|
||||
the first socket to which it can connect.
|
||||
This is safe if you are running only one LyX process at any one time.
|
||||
.SH COMMAND MODE OPTIONS
|
||||
\fBlyxclient\fR can send commands to LyX from both the command-line
|
||||
and from standard input.
|
||||
LyX commands are documented in <fixme>.
|
||||
.TP 6
|
||||
.BI \-c " command"
|
||||
send a single \fIcommand\fR, print LyX information to standard output and exit.
|
||||
.TP
|
||||
.BI \-g " file line"
|
||||
this is simply a wrapper for the command 'server\-goto\-file\-row \fIfile\fR \fIline\fR'. It is used by the DVI previewer to elicit inverse DVI search.
|
||||
.PP
|
||||
If neither \fB\-c\fR nor \fB\-g\fR are used, \fBlyxclient\fR will regard any
|
||||
standard input as commands to be sent to LyX, printing LyX's responses to
|
||||
standard output. Commands are
|
||||
separated by newlines (the '\\n' character). To finish communication
|
||||
and terminate the \fBlyxclient\fR process, send the command 'BYE:'.
|
||||
.SH MISCELANEOUS OPTIONS
|
||||
.TP 6
|
||||
.BI \-n " name"
|
||||
when starting communication, \fBlyxclient\fR sends an idenfifier
|
||||
string to LyX. By default, this string is "PPID>PID", where PPID is
|
||||
\fBlyxclient\fR's parent pid and pid is \fBlyxclient\fR's pid.
|
||||
Use this option to override this default.
|
||||
.TP
|
||||
.BI \-h
|
||||
print the \fBlyxclient\fR version and summarize its usage.
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B LYXSOCKET
|
||||
can be used to specify the socket special file that must be used.
|
||||
LyX sets this variable.
|
||||
It is overridden by the \fB\-a\fR option.
|
||||
.SH SEE ALSO
|
||||
lyx(1), xdvi(1), lyx functions <fixme>.
|
||||
.SH AUTHORS
|
||||
João Luis M. Assirati <assirati@fma.if.usp.br> is the principal author
|
||||
of lyxclient.
|
Loading…
Reference in New Issue
Block a user